Skip to content

Commit 941f3cf

Browse files
committed
create instance in CI
Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
1 parent 85081ef commit 941f3cf

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/action.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@ jobs:
2525
- name: Exec OpenStack CLI
2626
run: |
2727
docker-compose logs -t --tail=100
28-
docker-compose exec -T --user stack controller /bin/bash -c 'source devstack/openrc admin admin; openstack compute service list'
28+
docker-compose exec -T --user stack controller /bin/bash -c \
29+
'source devstack/openrc admin admin; openstack compute service list'
30+
net_id=$(docker-compose exec -T --user stack controller /bin/bash -c \
31+
'source devstack/openrc admin admin >/dev/null 2>&1; openstack network show private -f json 2>/dev/null | jq -r .id' | tr -d "\r\n")
32+
docker-compose exec -T --user stack controller /bin/bash -c \
33+
"source devstack/openrc admin admin; exec nova boot --image cirros-0.5.2-x86_64-disk --flavor m1.medium --nic net-id=$net_id testvm"
34+
docker-compose exec -T --user stack controller /bin/bash -c \
35+
"source devstack/openrc admin admin; exec nova list"

compute/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN apt-get update \
1616
curl=7.68.0-1ubuntu2.14 \
1717
init=1.57 \
1818
ebtables=2.0.11-3build1 \
19+
jq=1.6-1ubuntu0.20.04.1 \
1920
&& apt-get -y clean \
2021
&& rm -rf /var/lib/apt/lists/* \
2122
&& curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for-it.sh \

controller/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN apt-get update \
1616
curl=7.68.0-1ubuntu2.14 \
1717
init=1.57 \
1818
ebtables=2.0.11-3build1 \
19+
jq=1.6-1ubuntu0.20.04.1 \
1920
&& apt-get -y clean \
2021
&& rm -rf /var/lib/apt/lists/* \
2122
&& curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for-it.sh \

0 commit comments

Comments
 (0)