Skip to content
Snippets Groups Projects
Commit b05e4e1e authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Fix security group creation"

parents b388f7f9 8c189377
No related branches found
No related tags found
No related merge requests found
......@@ -62,16 +62,21 @@ openstack router create demo-router
openstack router add subnet demo-router demo-subnet
openstack router set --external-gateway public1 demo-router
# Get admin user and tenant IDs
ADMIN_USER_ID=$(openstack user list | awk '/ admin / {print $2}')
ADMIN_PROJECT_ID=$(openstack project list | awk '/ admin / {print $2}')
ADMIN_SEC_GROUP=$(openstack security group list --project ${ADMIN_PROJECT_ID} | awk '/ default / {print $2}')
# Sec Group Config
openstack security group rule create --ingress --ethertype IPv4 \
--protocol icmp default
--protocol icmp ${ADMIN_SEC_GROUP}
openstack security group rule create --ingress --ethertype IPv4 \
--protocol tcp --dst-port 22 default
--protocol tcp --dst-port 22 ${ADMIN_SEC_GROUP}
# Open heat-cfn so it can run on a different host
openstack security group rule create --ingress --ethertype IPv4 \
--protocol tcp --dst-port 8000 default
--protocol tcp --dst-port 8000 ${ADMIN_SEC_GROUP}
openstack security group rule create --ingress --ethertype IPv4 \
--protocol tcp --dst-port 8080 default
--protocol tcp --dst-port 8080 ${ADMIN_SEC_GROUP}
if [ ! -f ~/.ssh/id_rsa.pub ]; then
echo Generating ssh key.
......@@ -84,10 +89,6 @@ fi
# Increase the quota to allow 40 m1.small instances to be created
# Get admin user and tenant IDs
ADMIN_USER_ID=$(openstack user list | awk '/ admin / {print $2}')
ADMIN_PROJECT_ID=$(openstack project list | awk '/ admin / {print $2}')
# 40 instances
openstack quota set --instances 40 $ADMIN_PROJECT_ID
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment