Skip to content

Commit 615fe22

Browse files
committed
refactor(contrib/rackspace): create private network on Rackspace
Previously, we were creating servers using the default Rackspace ServiceNet as the private network. This means that they are feasibly accessible by other servers on that network. This commit ensures we are creating a new, private network for deis and not connecting to the ServiceNet any longer. closes #891
1 parent e6e15d1 commit 615fe22

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

contrib/rackspace/provision-rackspace-cluster.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,20 @@ if ! which supernova > /dev/null; then
2626
exit 1
2727
fi
2828

29+
if ! supernova production network-list|grep -q deis &>/dev/null; then
30+
echo_yellow "Creating deis private network..."
31+
supernova production network-create deis 10.21.12.0/24
32+
fi
33+
34+
NETWORK_ID=`supernova production network-list|grep deis|awk -F"|" '{print $2}'|sed 's/^ *//g'`
35+
2936
if [ -z "$DEIS_NUM_INSTANCES" ]; then
3037
DEIS_NUM_INSTANCES=3
3138
fi
3239

3340
i=1 ; while [[ $i -le $DEIS_NUM_INSTANCES ]] ; do \
3441
echo_yellow "Provisioning deis-$i..."
35-
supernova production boot --image c431c19c-4c09-48ef-a7c1-f4a43f65a1de --flavor $FLAVOR --key-name $1 --user-data ../coreos/user-data --config-drive true deis-$i ; \
42+
supernova production boot --image c431c19c-4c09-48ef-a7c1-f4a43f65a1de --flavor $FLAVOR --key-name $1 --user-data ../coreos/user-data --no-service-net --nic net-id=$NETWORK_ID --config-drive true deis-$i ; \
3643
((i = i + 1)) ; \
3744
done
3845

0 commit comments

Comments
 (0)