summaryrefslogtreecommitdiffstats
path: root/juju
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-11-07 23:40:00 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2017-11-10 14:46:55 -0600
commit3663f0a4d58783cd54905320bba9ebce33be1e65 (patch)
treec5154487fca216b5cb7941190441b6b67a7d5511 /juju
parent34dd0b2e19d2d50486364d18c594c87b77ba078e (diff)
modified to replace neutron with openstack commands.
Added intel pod19 labconfig as well. updated with comments. Change-Id: I206da5afdfc1ed73f6fd589853bbbdf2bcc27e07 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'juju')
-rwxr-xr-xjuju/configure-juju-on-openstack16
-rwxr-xr-xjuju/joid-configure-openstack12
2 files changed, 20 insertions, 8 deletions
diff --git a/juju/configure-juju-on-openstack b/juju/configure-juju-on-openstack
index 1d98fd08..6717ce53 100755
--- a/juju/configure-juju-on-openstack
+++ b/juju/configure-juju-on-openstack
@@ -70,8 +70,20 @@ T_IMAGE_ID=`openstack image list -f value | grep -i trusty | cut -f 1 -d " "`
#We can now use Juju to generate the metadata:
-juju metadata generate-image -d ~/simplestreams -i $X_IMAGE_ID -s xenial -r $OS_REGION_NAME -u $OS_AUTH_URL
-juju metadata generate-image -d ~/simplestreams -i $T_IMAGE_ID -s trusty -r $OS_REGION_NAME -u $OS_AUTH_URL
+#Upload images to glance
+## image name is used by script to generate metadata .. don't screw the series
+NODE_ARCTYPE=`arch`
+
+if [ "ppc64le" == "$NODE_ARCTYPE" ]; then
+ NODE_ARCHES="ppc64el"
+elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ NODE_ARCHES="arm"
+else
+ NODE_ARCHES="amd64"
+fi
+
+juju metadata generate-image -d ~/simplestreams -i $X_IMAGE_ID -s xenial -r $OS_REGION_NAME -u $OS_AUTH_URL -a $NODE_ARCHES
+juju metadata generate-image -d ~/simplestreams -i $T_IMAGE_ID -s trusty -r $OS_REGION_NAME -u $OS_AUTH_URL -a $NODE_ARCHES
#To verify that the correct metadata files have been generated, you may run:
#You should see .json files containing the details we just added on the images.
diff --git a/juju/joid-configure-openstack b/juju/joid-configure-openstack
index 0feebeec..47db0893 100755
--- a/juju/joid-configure-openstack
+++ b/juju/joid-configure-openstack
@@ -39,18 +39,19 @@ EXTERNAL_NETWORK_ID=$(openstack network show ext-net | grep " id" | awk '{print
#Create private network for neutron for tenant VMs
openstack network show private > /dev/null 2>&1 || openstack network create private
-openstack subnet show private_subnet > /dev/null 2>&1 || neutron subnet-create private $NEUTRON_FIXED_NET_CIDR -- --name private_subnet --dns_nameservers list=true 8.8.8.8
+openstack subnet show private_subnet > /dev/null 2>&1 || openstack subnet create --network private --subnet-range $NEUTRON_FIXED_NET_CIDR --dns-nameserver 8.8.8.8 private_subnet
SUBNET_ID=$(openstack subnet show private_subnet | grep " id" | awk '{print $4}')
#Create router for external network and private network
openstack router show provider-router > /dev/null 2>&1 || openstack router create --project-domain=$OS_PROJECT_DOMAIN_NAME --project $OS_PROJECT_NAME provider-router
ROUTER_ID=$(openstack router show provider-router | grep " id" | awk '{print $4}')
-neutron router-gateway-clear provider-router || true
-neutron router-gateway-set $ROUTER_ID $EXTERNAL_NETWORK_ID
-## make it always ok to have it indempodent.
-neutron router-interface-add $ROUTER_ID $SUBNET_ID || true
+openstack router set --external-gateway $EXTERNAL_NETWORK_ID --enable $ROUTER_ID || true
+ ## make it always ok to have it indempodent.
+openstack router add subnet $ROUTER_ID $SUBNET_ID || true
+
+#neutron router-gateway-clear provider-router || true
echo "Configuring security groups for access to ICMP, SSH and RDP by default"
@@ -80,7 +81,6 @@ openstack flavor show m1.xlarge > /dev/null 2>&1 || openstack flavor create --ra
echo "modifying default quotas for admin user"
#Modify quotas for the tenant to allow large deployments
-PROJECT_ID=`openstack quota show -f value -c project`
openstack quota set --instances 400 --cores 800 --ram 404800 --secgroups 4000 --floating-ips -1 --secgroup-rules -1 $PROJECT_ID
### need to find how to change quota for the project not the tenant