Skip to content

Commit 8245444

Browse files
committed
fix(contrib/openstack/provision-openstack-cluster.sh): fix openstack install script
update security-group rules for openstack install script. * git rule should be 2222 only * should allow all deis instances full access to eachother.
1 parent 9054447 commit 8245444

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

contrib/openstack/provision-openstack-cluster.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if [ -z "$OS_AUTH_URL" ]; then
4545
fi
4646

4747
if neutron net-list|grep -q $DEIS_NETWORK &>/dev/null; then
48-
NETWORK_ID=$(neutron net-list | grep internal | awk -F'| ' '{print $2}')
48+
NETWORK_ID=$(neutron net-list | grep $DEIS_NETWORK | awk -F'| ' '{print $2}')
4949
else
5050
echo_yellow "Creating deis private network..."
5151
CIDR=${DEIS_CIDR:-10.21.12.0/24}
@@ -58,10 +58,16 @@ fi
5858

5959
if ! neutron security-group-list | grep -q $DEIS_SECGROUP &>/dev/null; then
6060
neutron security-group-create $DEIS_SECGROUP
61+
# Allow SSH from anywhere.
6162
neutron security-group-rule-create --protocol tcp --remote-ip-prefix 0/0 --port-range-min 22 --port-range-max 22 $DEIS_SECGROUP
62-
neutron security-group-rule-create --protocol tcp --remote-ip-prefix 0/0 --port-range-min 2222 --port-range-max 22222 $DEIS_SECGROUP
63+
# Allow git push from anywhere
64+
neutron security-group-rule-create --protocol tcp --remote-ip-prefix 0/0 --port-range-min 2222 --port-range-max 2222 $DEIS_SECGROUP
65+
# allow web from anywhere
6366
neutron security-group-rule-create --protocol tcp --remote-ip-prefix 0/0 --port-range-min 80 --port-range-max 80 $DEIS_SECGROUP
67+
# allow ping from anywhere.
6468
neutron security-group-rule-create --protocol icmp --remote-ip-prefix 0/0 $DEIS_SECGROUP
69+
# allow intra-sec-group communication
70+
neutron security-group-rule-create --remote-group-id $DEIS_SECGROUP $DEIS_SECGROUP
6571
fi
6672

6773
if [ -z "$DEIS_NUM_INSTANCES" ]; then

0 commit comments

Comments
 (0)