Merge lp:~cpe-sa/sademos/16.04-nc-lxd-fix-20160506-1 into lp:sademos/16.04

Proposed by Michael Iatrou
Status: Approved
Approved by: Scott Croft
Approved revision: 95
Proposed branch: lp:~cpe-sa/sademos/16.04-nc-lxd-fix-20160506-1
Merge into: lp:sademos/16.04
Diff against target: 147 lines (+32/-33)
3 files modified
openstack/nclxd/configure-openstack (+29/-30)
openstack/nclxd/nclxd.yaml (+2/-2)
openstack/openstack-liberty.yaml (+1/-1)
To merge this branch: bzr merge lp:~cpe-sa/sademos/16.04-nc-lxd-fix-20160506-1
Reviewer Review Type Date Requested Status
Scott Croft (community) Approve
Review via email: mp+294059@code.launchpad.net

Description of the change

This is a superset of fixes for NC-LXD that have appeared during the preparation for ODS.

- Enables ZFS for NC-LXD
- Fixes LXD networking (the instances can now be accessed from the OB and have outbound connectivity)
- Cleanup of the OpenStack configuration script

Thanks to Massimo Morana for the initial patch set, Omar Lara for troubleshooting the LXD networking and Francisco Hernandez for sharing his OB for testing.

To post a comment you must log in.
Revision history for this message
Nicolas Thomas (thomnico) wrote :

Big +1 for me .. worked without any tricks .. could deploy on it good job

Revision history for this message
Scott Croft (secroft) :
review: Approve

Unmerged revisions

95. By Michael Iatrou

Fix NC-LXD demo

94. By Michael Iatrou

Fix OpenStack Liberty bundle (keystone)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openstack/nclxd/configure-openstack'
--- openstack/nclxd/configure-openstack 2016-04-22 01:26:27 +0000
+++ openstack/nclxd/configure-openstack 2016-05-06 23:33:11 +0000
@@ -21,23 +21,22 @@
2121
22echo "This command is run to configure an Orange-Box Openstack deployment"22echo "This command is run to configure an Orange-Box Openstack deployment"
2323
24obnum=`hostname | cut -c 10- -`24obnum=$(hostname | cut -c 10- -)
25external_net=`expr ${obnum} + 1`25external_net=$((obnum+3))
2626
27#QUANTUM_EXT_NET_GW="172.27.${external_net}.254"27QUANTUM_EXT_NET_GW="172.27.${external_net}.254"
28QUANTUM_EXT_NET_GW="172.27.${obnum}.1"28#QUANTUM_EXT_NET_GW="172.27.${obnum}.1"
29QUANTUM_EXT_NET_CIDR="172.27.${obnum}.0/23"29QUANTUM_EXT_NET_CIDR="172.27.${external_net}.0/23"
30QUANTUM_EXT_NET_NAME="ext_net"30#QUANTUM_EXT_NET_NAME="ext_net" # Unused
31QUANTUM_DNS="172.27.${obnum}.1"31QUANTUM_DNS="172.27.$((obnum+2)).1"
32QUANTUM_FLOAT_RANGE_START="172.27.${external_net}.200"32QUANTUM_FLOAT_RANGE_START="172.27.${external_net}.200"
33QUANTUM_FLOAT_RANGE_END="172.27.${external_net}.253"33QUANTUM_FLOAT_RANGE_END="172.27.${external_net}.253"
3434
35QUANTUM_FIXED_NET_CIDR="192.168.14.0/22"35QUANTUM_FIXED_NET_CIDR="192.168.14.0/22"
36QUANTUM_FIXED_NET_NAME="admin_net"36#QUANTUM_FIXED_NET_NAME="admin_net" # Unused
3737
38#keystone=$(juju status keystone | grep public-address | head -1 | awk '{print $2}')38#keystone=$(juju status keystone | grep public-address | head -1 | awk '{print $2}')
39keystone1=$(juju status keystone |grep Unit|awk '{print $6}')39keystone=$(juju status keystone | grep Unit | awk '{print $6}' | tr -d '\n')
40keystone=`echo $keystone1||tr '\n' ' '`
4140
42echo "export SERVICE_ENDPOINT=http://$keystone:35357/v2.0/41echo "export SERVICE_ENDPOINT=http://$keystone:35357/v2.0/
43export SERVICE_TOKEN=admin42export SERVICE_TOKEN=admin
@@ -51,7 +50,7 @@
51source ~/nova.rc50source ~/nova.rc
5251
53# Determine the tenant id for the configured tenant name.52# Determine the tenant id for the configured tenant name.
54export TENANT_ID="$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{ print $2 }')"53export TENANT_ID="$(keystone tenant-list | grep "$OS_TENANT_NAME" | awk '{ print $2 }')"
5554
56if [ "$TENANT_ID" = "" ]; then55if [ "$TENANT_ID" = "" ]; then
57 echo "Unable to find tenant ID, keystone auth problem"56 echo "Unable to find tenant ID, keystone auth problem"
@@ -61,33 +60,33 @@
61echo "Configuring Openstack Neutron Networking"60echo "Configuring Openstack Neutron Networking"
6261
63#create ext network with neutron for floating IPs62#create ext network with neutron for floating IPs
64neutron net-show ext_net > /dev/null 2>&1 || neutron net-create ext_net --tenant-id $TENANT_ID -- --router:external=True63neutron net-show ext_net > /dev/null 2>&1 || neutron net-create ext_net --tenant-id "$TENANT_ID" -- --router:external=True
65EXTERNAL_NETWORK_ID=$(neutron net-show ext_net | grep " id" | awk '{print $4}')64EXTERNAL_NETWORK_ID=$(neutron net-show ext_net | grep " id" | awk '{print $4}')
66neutron subnet-show ext_net_subnet > /dev/null 2>&1 || neutron subnet-create ext_net $QUANTUM_EXT_NET_CIDR --name ext_net_subnet --tenant-id $TENANT_ID \65neutron subnet-show ext_net_subnet > /dev/null 2>&1 || neutron subnet-create ext_net "$QUANTUM_EXT_NET_CIDR" --name ext_net_subnet --tenant-id "$TENANT_ID" \
67--allocation-pool start=$QUANTUM_FLOAT_RANGE_START,end=$QUANTUM_FLOAT_RANGE_END \66--allocation-pool start="$QUANTUM_FLOAT_RANGE_START",end="$QUANTUM_FLOAT_RANGE_END" \
68--gateway $QUANTUM_EXT_NET_GW --disable-dhcp --dns_nameservers $QUANTUM_DNS list=true67--gateway "$QUANTUM_EXT_NET_GW" --disable-dhcp --dns_nameservers "$QUANTUM_DNS" list=true
6968
70#Create private network for neutron for tenant VMs69#Create private network for neutron for tenant VMs
71neutron net-show private > /dev/null 2>&1 || neutron net-create private70neutron net-show private > /dev/null 2>&1 || neutron net-create private
72neutron subnet-show private_subnet > /dev/null 2>&1 || neutron subnet-create private $QUANTUM_FIXED_NET_CIDR -- --name private_subnet --dns_nameservers list=true $QUANTUM_DNS71neutron subnet-show private_subnet > /dev/null 2>&1 || neutron subnet-create private "$QUANTUM_FIXED_NET_CIDR" -- --name private_subnet --dns_nameservers list=true "$QUANTUM_DNS"
73SUBNET_ID=$(neutron subnet-show private_subnet | grep " id" | awk '{print $4}')72SUBNET_ID=$(neutron subnet-show private_subnet | grep " id" | awk '{print $4}')
7473
75#creating private network router74#creating private network router
7675
7776
78#Create router for external network and private network77#Create router for external network and private network
79neutron router-show cloud-router > /dev/null 2>&1 || neutron router-create --tenant-id $TENANT_ID cloud-router78neutron router-show cloud-router > /dev/null 2>&1 || neutron router-create --tenant-id "$TENANT_ID" cloud-router
80ROUTER_ID=$(neutron router-show cloud-router | grep " id" | awk '{print $4}')79ROUTER_ID=$(neutron router-show cloud-router | grep " id" | awk '{print $4}')
8180
82PORT_ID=$(neutron port-list | grep $SUBNET_ID | awk '{print $2}')81#PORT_ID=$(neutron port-list | grep "$SUBNET_ID" | awk '{print $2}') # Unused
8382
84#if [ "$PORT_ID" != "" ]; then83#if [ "$PORT_ID" != "" ]; then
85# neutron router-interface-delete $ROUTER_ID port=$PORT_ID84# neutron router-interface-delete $ROUTER_ID port=$PORT_ID
86#fi85#fi
87neutron router-interface-add $ROUTER_ID $SUBNET_ID86neutron router-interface-add "$ROUTER_ID" "$SUBNET_ID"
8887
89neutron router-gateway-clear cloud-router88neutron router-gateway-clear cloud-router
90neutron router-gateway-set $ROUTER_ID $EXTERNAL_NETWORK_ID89neutron router-gateway-set "$ROUTER_ID" "$EXTERNAL_NETWORK_ID"
9190
92echo "Configuring security groups for access to ICMP, SSH and RDP by default"91echo "Configuring security groups for access to ICMP, SSH and RDP by default"
9392
@@ -117,19 +116,19 @@
117nova flavor-create --is-public true m1.large auto 3072 10 2 > /dev/null 2>&1116nova flavor-create --is-public true m1.large auto 3072 10 2 > /dev/null 2>&1
118nova flavor-create --is-public true m1.xlarge auto 4096 10 2 > /dev/null 2>&1117nova flavor-create --is-public true m1.xlarge auto 4096 10 2 > /dev/null 2>&1
119118
120echo "modifying default quotas for admin user"119echo "Modifying default quotas for admin user"
121120
122#Modify quotas for the tenant to allow large deployments121#Modify quotas for the tenant to allow large deployments
123nova quota-update --instances -1 $TENANT_ID122nova quota-update --instances -1 "$TENANT_ID"
124nova quota-update --cores -1 $TENANT_ID123nova quota-update --cores -1 "$TENANT_ID"
125nova quota-update --ram -1 $TENANT_ID124nova quota-update --ram -1 "$TENANT_ID"
126nova quota-update --security-groups -1 $TENANT_ID125nova quota-update --security-groups -1 "$TENANT_ID"
127nova quota-update --fixed-ips -1 $TENANT_ID126nova quota-update --fixed-ips -1 "$TENANT_ID"
128nova quota-update --security-group-rules -1 $TENANT_ID127nova quota-update --security-group-rules -1 "$TENANT_ID"
129nova quota-update --security-groups -1 $TENANT_ID128nova quota-update --security-groups -1 "$TENANT_ID"
130nova quota-update --floating-ips -1 $TENANT_ID129nova quota-update --floating-ips -1 "$TENANT_ID"
131130
132echo "Uploading images to glance"131#echo "Uploading images to glance"
133132
134#Upload images to glance133#Upload images to glance
135#glance image-show "Precise x86_64" > /dev/null 2>&1 || glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img 134#glance image-show "Precise x86_64" > /dev/null 2>&1 || glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img
136135
=== modified file 'openstack/nclxd/nclxd.yaml'
--- openstack/nclxd/nclxd.yaml 2016-04-22 00:18:27 +0000
+++ openstack/nclxd/nclxd.yaml 2016-05-06 23:33:11 +0000
@@ -13,9 +13,9 @@
13 charm: "cs:xenial/lxd"13 charm: "cs:xenial/lxd"
14 series: xenial14 series: xenial
15 options: 15 options:
16 "block-device": /dev/sdb16 "block-devices": /dev/sdb
17 overwrite: true17 overwrite: true
18 "storage-type": lvm18 "storage-type": zfs
19 annotations: 19 annotations:
20 "gui-x": "750"20 "gui-x": "750"
21 "gui-y": "250"21 "gui-y": "250"
2222
=== modified file 'openstack/openstack-liberty.yaml'
--- openstack/openstack-liberty.yaml 2016-04-08 18:03:47 +0000
+++ openstack/openstack-liberty.yaml 2016-05-06 23:33:11 +0000
@@ -159,7 +159,7 @@
159 annotations:159 annotations:
160 gui-x: '500'160 gui-x: '500'
161 gui-y: '0'161 gui-y: '0'
162 charm: cs:trusty/keystone-33162 charm: cs:trusty/keystone-254
163 num_units: 1163 num_units: 1
164 options:164 options:
165 admin-password: openstack165 admin-password: openstack

Subscribers

People subscribed via source and target branches

to all changes: