Skip to content

Commit 013a249

Browse files
resmomattclay
authored andcommitted
fix simulator not in hypervisor.list
1 parent 852a056 commit 013a249

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:xenial-20180808
22

33
MAINTAINER "René Moser" <[email protected]>
44

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
build:
2+
docker build -t cloudstack-sim .
3+
4+
build-no-cache:
25
docker build --no-cache -t cloudstack-sim .
36

47
clean:

deploy.sh

+11
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ done
1010

1111
sleep 3
1212
python /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg
13+
14+
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
15+
export CLOUDSTACK_KEY=""
16+
export CLOUDSTACK_SECRET=""
17+
18+
# Add Simulator to supported hypervisors exclusively
19+
cs updateConfiguration name=hypervisor.list value=Simulator
20+
21+
# Workaround for Nuage VPC Offering
22+
vpc_offering_id="$(cs listVPCOfferings listall=true name=Nuage | jq .vpcoffering[0].id)"
23+
cs updateVPCOffering id=$vpc_offering_id state=Disabled

run.sh

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
#!/bin/bash
2+
3+
# In case the container was restarted
4+
rm -f /var/www/html/admin.json
5+
26
until nc -z localhost 8096; do
37
echo "waiting for port 8096..."
48
sleep 3
59
done
610

711
sleep 3
8-
if [ ! -e /var/www/html/admin.json ]
9-
then
10-
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
11-
export CLOUDSTACK_KEY=""
12-
export CLOUDSTACK_SECRET=""
1312

14-
# Workaround for Nuage VPC Offering
15-
vpc_offering_id="$(cs listVPCOfferings listall=true name=Nuage | jq .vpcoffering[0].id)"
16-
cs updateVPCOffering id=$vpc_offering_id state=Disabled
13+
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
14+
export CLOUDSTACK_KEY=""
15+
export CLOUDSTACK_SECRET=""
1716

18-
admin_id="$(cs listUsers account=admin | jq .user[0].id)"
19-
cs getUserKeys id=$admin_id | jq .userkeys > /var/www/html/admin.json
20-
fi
17+
admin_id="$(cs listUsers account=admin | jq .user[0].id)"
18+
cs getUserKeys id=$admin_id | jq .userkeys > /var/www/html/admin.json

0 commit comments

Comments
 (0)