Skip to content

Commit

Permalink
fix simulator not in hypervisor.list
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo authored and mattclay committed Aug 27, 2018
1 parent 852a056 commit 013a249
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:xenial-20180808

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

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
build:
docker build -t cloudstack-sim .

build-no-cache:
docker build --no-cache -t cloudstack-sim .

clean:
Expand Down
11 changes: 11 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ done

sleep 3
python /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg

export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
export CLOUDSTACK_KEY=""
export CLOUDSTACK_SECRET=""

# Add Simulator to supported hypervisors exclusively
cs updateConfiguration name=hypervisor.list value=Simulator

# Workaround for Nuage VPC Offering
vpc_offering_id="$(cs listVPCOfferings listall=true name=Nuage | jq .vpcoffering[0].id)"
cs updateVPCOffering id=$vpc_offering_id state=Disabled
20 changes: 9 additions & 11 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
#!/bin/bash

# In case the container was restarted
rm -f /var/www/html/admin.json

until nc -z localhost 8096; do
echo "waiting for port 8096..."
sleep 3
done

sleep 3
if [ ! -e /var/www/html/admin.json ]
then
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
export CLOUDSTACK_KEY=""
export CLOUDSTACK_SECRET=""

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

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

0 comments on commit 013a249

Please sign in to comment.