diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2017-07-25 12:47:44 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2017-07-25 14:46:38 -0500 |
commit | bba15961e7ffeaa27bb1d0f9c2f975a7f187fdd5 (patch) | |
tree | 7675d6b9efbc5e81bf45eb740899b0040d03046e /ci/opencontrail/cloud-sh-contrail | |
parent | 104b79844106eb6961b361b70071ad70f0dd9c95 (diff) |
modified to accomodate OCL
Change-Id: Ib8227c4050b51adc2c466511bedf47e45a817db1
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/opencontrail/cloud-sh-contrail')
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/cloud-setup.sh | 29 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/compute.sh | 8 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-precise.sh | 48 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-precise.yaml | 37 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-trusty-juno.sh | 48 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-trusty-juno.yaml | 37 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-trusty.sh | 43 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/config-trusty.yaml | 18 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/deploy-precise.sh | 2 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/deploy-trusty-juno.sh | 2 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/deploy-trusty.sh | 2 | ||||
-rw-r--r-- | ci/opencontrail/cloud-sh-contrail/environments.yaml | 8 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/glance.sh | 8 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/lxc-network.sh | 18 | ||||
-rwxr-xr-x | ci/opencontrail/cloud-sh-contrail/openstack.sh | 188 |
15 files changed, 0 insertions, 496 deletions
diff --git a/ci/opencontrail/cloud-sh-contrail/cloud-setup.sh b/ci/opencontrail/cloud-sh-contrail/cloud-setup.sh deleted file mode 100755 index 47e625c9..00000000 --- a/ci/opencontrail/cloud-sh-contrail/cloud-setup.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e - -. ~/admin-openrc - -# adjust tiny image -nova flavor-delete m1.tiny -nova flavor-create m1.tiny 1 512 8 1 - -# configure external network -neutron net-create --router:external=True public-net -neutron subnet-create --name public-subnet --no-gateway --allocation-pool start=10.0.10.2,end=10.0.10.254 --disable-dhcp public-net 10.0.10.0/24 - -# create vm network -neutron net-create ubuntu-net -neutron subnet-create --name ubuntu-subnet --gateway 10.0.5.1 ubuntu-net 10.0.5.0/24 - -# create pool of floating ips -i=0 -while [ $i -ne 10 ]; do - neutron floatingip-create public-net - i=$((i + 1)) -done - -# configure security groups -neutron security-group-rule-create --direction ingress --ethertype IPv4 --protocol icmp --remote-ip-prefix 0.0.0.0/0 default -neutron security-group-rule-create --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 22 --port-range-max 22 --remote-ip-prefix 0.0.0.0/0 default - -# import key pair -nova keypair-add --pub-key id_rsa.pub ubuntu-keypair diff --git a/ci/opencontrail/cloud-sh-contrail/compute.sh b/ci/opencontrail/cloud-sh-contrail/compute.sh deleted file mode 100755 index eb818250..00000000 --- a/ci/opencontrail/cloud-sh-contrail/compute.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -modprobe kvm_intel -printf "\n%s\n" kvm_intel >> /etc/modules -service libvirt-bin restart - -sed -e 's/KSM_ENABLED=1/KSM_ENABLED=0/' -i /etc/default/qemu-kvm -service qemu-kvm restart diff --git a/ci/opencontrail/cloud-sh-contrail/config-precise.sh b/ci/opencontrail/cloud-sh-contrail/config-precise.sh deleted file mode 100644 index b22f0a6d..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-precise.sh +++ /dev/null @@ -1,48 +0,0 @@ -export JUJU_REPOSITORY=../charms - -DEFAULT_SERIES=precise - -CHARM_CASSANDRA=local:precise/cassandra -CHARM_CASSANDRA_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_CONTRAIL_ANALYTICS=local:precise/contrail-analytics -CHARM_CONTRAIL_ANALYTICS_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_CONTRAIL_CONFIGURATION=local:precise/contrail-configuration -CHARM_CONTRAIL_CONFIGURATION_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_CONTRAIL_CONTROL=local:precise/contrail-control -CHARM_CONTRAIL_CONTROL_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_CONTRAIL_WEBUI=local:trusty/contrail-webui - -CHARM_GLANCE=local:precise/glance -CHARM_GLANCE_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_KEYSTONE=local:precise/keystone -CHARM_KEYSTONE_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_MYSQL=precise/mysql -CHARM_MYSQL_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_NEUTRON_API=local:precise/neutron-api -CHARM_NEUTRON_API_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_NEUTRON_API_CONTRAIL=local:precise/neutron-api-contrail - -CHARM_NEUTRON_CONTRAIL=local:precise/neutron-contrail - -CHARM_NOVA_CLOUD_CONTROLLER=local:precise/nova-cloud-controller -CHARM_NOVA_CLOUD_CONTROLLER_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_NOVA_COMPUTE=local:precise/nova-compute -CHARM_NOVA_COMPUTE_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_OPENSTACK_DASHBOARD=local:precise/openstack-dashboard -CHARM_OPENSTACK_DASHBOARD_DEPLOY_OPTS="--config config-precise.yaml" - -CHARM_RABBITMQ_SERVER=precise/rabbitmq-server - -CHARM_ZOOKEEPER=local:precise/zookeeper - -CONFIGURE_HOST_ROUTING=true diff --git a/ci/opencontrail/cloud-sh-contrail/config-precise.yaml b/ci/opencontrail/cloud-sh-contrail/config-precise.yaml deleted file mode 100644 index ebdd0337..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-precise.yaml +++ /dev/null @@ -1,37 +0,0 @@ -cassandra: - authenticator: AllowAllAuthenticator - -contrail-analytics: - openstack-origin: cloud:precise-icehouse - -contrail-configuration: - openstack-origin: cloud:precise-icehouse - -contrail-control: - openstack-origin: cloud:precise-icehouse - -glance: - openstack-origin: cloud:precise-icehouse - -keystone: - admin-password: password - admin-role: admin - openstack-origin: cloud:precise-icehouse - -mysql: - dataset-size: 15% - -neutron-api: - manage-neutron-plugin-legacy-mode: false - openstack-origin: cloud:precise-icehouse - -nova-cloud-controller: - network-manager: Neutron - openstack-origin: cloud:precise-icehouse - -nova-compute: - manage-neutron-plugin-legacy-mode: false - openstack-origin: cloud:precise-icehouse - -openstack-dashboard: - openstack-origin: cloud:precise-icehouse diff --git a/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.sh b/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.sh deleted file mode 100644 index aeebf861..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.sh +++ /dev/null @@ -1,48 +0,0 @@ -export JUJU_REPOSITORY=../charms - -DEFAULT_SERIES=trusty - -CHARM_CASSANDRA=local:trusty/cassandra -CHARM_CASSANDRA_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_CONTRAIL_ANALYTICS=local:trusty/contrail-analytics -CHARM_CONTRAIL_ANALYTICS_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_CONTRAIL_CONFIGURATION=local:trusty/contrail-configuration -CHARM_CONTRAIL_CONFIGURATION_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_CONTRAIL_CONTROL=local:trusty/contrail-control -CHARM_CONTRAIL_CONTROL_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_CONTRAIL_WEBUI=local:trusty/contrail-webui - -CHARM_GLANCE=local:trusty/glance -CHARM_GLANCE_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_KEYSTONE=local:trusty/keystone -CHARM_KEYSTONE_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_MYSQL=trusty/mysql -CHARM_MYSQL_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_NEUTRON_API=local:trusty/neutron-api -CHARM_NEUTRON_API_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_NEUTRON_API_CONTRAIL=local:trusty/neutron-api-contrail - -CHARM_NEUTRON_CONTRAIL=local:trusty/neutron-contrail - -CHARM_NOVA_CLOUD_CONTROLLER=local:trusty/nova-cloud-controller -CHARM_NOVA_CLOUD_CONTROLLER_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_NOVA_COMPUTE=local:trusty/nova-compute -CHARM_NOVA_COMPUTE_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_OPENSTACK_DASHBOARD=local:trusty/openstack-dashboard -CHARM_OPENSTACK_DASHBOARD_DEPLOY_OPTS="--config config-trusty-juno.yaml" - -CHARM_RABBITMQ_SERVER=trusty/rabbitmq-server - -CHARM_ZOOKEEPER=local:precise/zookeeper - -CONFIGURE_HOST_ROUTING=true diff --git a/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.yaml b/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.yaml deleted file mode 100644 index 7db15be9..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-trusty-juno.yaml +++ /dev/null @@ -1,37 +0,0 @@ -cassandra: - authenticator: AllowAllAuthenticator - -contrail-analytics: - openstack-origin: cloud:trusty-juno - -contrail-configuration: - openstack-origin: cloud:trusty-juno - -contrail-control: - openstack-origin: cloud:trusty-juno - -glance: - openstack-origin: cloud:trusty-juno - -keystone: - admin-password: password - admin-role: admin - openstack-origin: cloud:trusty-juno - -mysql: - dataset-size: 15% - -neutron-api: - manage-neutron-plugin-legacy-mode: false - openstack-origin: cloud:trusty-juno - -nova-cloud-controller: - network-manager: Neutron - openstack-origin: cloud:trusty-juno - -nova-compute: - manage-neutron-plugin-legacy-mode: false - openstack-origin: cloud:trusty-juno - -openstack-dashboard: - openstack-origin: cloud:trusty-juno diff --git a/ci/opencontrail/cloud-sh-contrail/config-trusty.sh b/ci/opencontrail/cloud-sh-contrail/config-trusty.sh deleted file mode 100644 index 9d38461c..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-trusty.sh +++ /dev/null @@ -1,43 +0,0 @@ -export JUJU_REPOSITORY=../charms - -DEFAULT_SERIES=trusty - -CHARM_CASSANDRA=local:trusty/cassandra -CHARM_CASSANDRA_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_CONTRAIL_ANALYTICS=local:trusty/contrail-analytics - -CHARM_CONTRAIL_CONFIGURATION=local:trusty/contrail-configuration - -CHARM_CONTRAIL_CONTROL=local:trusty/contrail-control - -CHARM_CONTRAIL_WEBUI=local:trusty/contrail-webui - -CHARM_GLANCE=local:trusty/glance - -CHARM_KEYSTONE=local:trusty/keystone -CHARM_KEYSTONE_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_MYSQL=trusty/mysql -CHARM_MYSQL_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_NEUTRON_API=local:trusty/neutron-api -CHARM_NEUTRON_API_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_NEUTRON_API_CONTRAIL=local:trusty/neutron-api-contrail - -CHARM_NEUTRON_CONTRAIL=local:trusty/neutron-contrail - -CHARM_NOVA_CLOUD_CONTROLLER=local:trusty/nova-cloud-controller -CHARM_NOVA_CLOUD_CONTROLLER_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_NOVA_COMPUTE=local:trusty/nova-compute -CHARM_NOVA_COMPUTE_DEPLOY_OPTS="--config config-trusty.yaml" - -CHARM_OPENSTACK_DASHBOARD=local:trusty/openstack-dashboard - -CHARM_RABBITMQ_SERVER=trusty/rabbitmq-server - -CHARM_ZOOKEEPER=local:precise/zookeeper - -CONFIGURE_HOST_ROUTING=true diff --git a/ci/opencontrail/cloud-sh-contrail/config-trusty.yaml b/ci/opencontrail/cloud-sh-contrail/config-trusty.yaml deleted file mode 100644 index abb862ad..00000000 --- a/ci/opencontrail/cloud-sh-contrail/config-trusty.yaml +++ /dev/null @@ -1,18 +0,0 @@ -cassandra: - authenticator: AllowAllAuthenticator - -keystone: - admin-password: password - admin-role: admin - -mysql: - dataset-size: 15% - -neutron-api: - manage-neutron-plugin-legacy-mode: false - -nova-cloud-controller: - network-manager: Neutron - -nova-compute: - manage-neutron-plugin-legacy-mode: false diff --git a/ci/opencontrail/cloud-sh-contrail/deploy-precise.sh b/ci/opencontrail/cloud-sh-contrail/deploy-precise.sh deleted file mode 100755 index 2e35546b..00000000 --- a/ci/opencontrail/cloud-sh-contrail/deploy-precise.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -e -exec ./openstack.sh ./config-precise.sh 2>&1 | tee out.log diff --git a/ci/opencontrail/cloud-sh-contrail/deploy-trusty-juno.sh b/ci/opencontrail/cloud-sh-contrail/deploy-trusty-juno.sh deleted file mode 100755 index 27a9d56f..00000000 --- a/ci/opencontrail/cloud-sh-contrail/deploy-trusty-juno.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -e -exec ./openstack.sh ./config-trusty-juno.sh 2>&1 | tee out.log diff --git a/ci/opencontrail/cloud-sh-contrail/deploy-trusty.sh b/ci/opencontrail/cloud-sh-contrail/deploy-trusty.sh deleted file mode 100755 index b7b21de0..00000000 --- a/ci/opencontrail/cloud-sh-contrail/deploy-trusty.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -e -exec ./openstack.sh ./config-trusty.sh 2>&1 | tee out.log diff --git a/ci/opencontrail/cloud-sh-contrail/environments.yaml b/ci/opencontrail/cloud-sh-contrail/environments.yaml deleted file mode 100644 index 72a492d3..00000000 --- a/ci/opencontrail/cloud-sh-contrail/environments.yaml +++ /dev/null @@ -1,8 +0,0 @@ -default: local - -environments: - local: - type: local - container: kvm - default-series: trusty - lxc-clone: true diff --git a/ci/opencontrail/cloud-sh-contrail/glance.sh b/ci/opencontrail/cloud-sh-contrail/glance.sh deleted file mode 100755 index 467932ff..00000000 --- a/ci/opencontrail/cloud-sh-contrail/glance.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -. ~/admin-openrc - -wget http://cloud-images.ubuntu.com/trusty/current/MD5SUMS - -wget http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -glance image-create --name ubuntu-trusty-daily --disk-format qcow2 --container-format bare --owner admin --file trusty-server-cloudimg-amd64-disk1.img --checksum $(grep trusty-server-cloudimg-amd64-disk1.img MD5SUMS | cut -d " " -f 1) --is-public True diff --git a/ci/opencontrail/cloud-sh-contrail/lxc-network.sh b/ci/opencontrail/cloud-sh-contrail/lxc-network.sh deleted file mode 100755 index 5a65fa18..00000000 --- a/ci/opencontrail/cloud-sh-contrail/lxc-network.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -e - -DEBIAN_FRONTEND=noninteractive apt-get -qy -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install lxc < /dev/null - -sed -e 's/^USE_LXC_BRIDGE="true"/USE_LXC_BRIDGE="false"/' -i /etc/default/lxc -service lxc-net restart - -ifdown eth0 -mv /etc/network/interfaces.d/eth0.cfg /etc/network/interfaces.d/eth0.cfg.bak -cat <<-"EOF" > /etc/network/interfaces.d/bridge.cfg - auto eth0 - iface eth0 inet manual - - auto lxcbr0 - iface lxcbr0 inet dhcp - bridge_ports eth0 - EOF -ifup eth0 lxcbr0 diff --git a/ci/opencontrail/cloud-sh-contrail/openstack.sh b/ci/opencontrail/cloud-sh-contrail/openstack.sh deleted file mode 100755 index b1234fcc..00000000 --- a/ci/opencontrail/cloud-sh-contrail/openstack.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/sh -ex - -agentState() -{ - juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"machines\"][\"$1\"][\"agent-state\"]" 2> /dev/null -} - -agentStateUnit() -{ - juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"agent-state\"]" 2> /dev/null -} - -configOpenrc() -{ - cat <<-EOF - export OS_USERNAME=$1 - export OS_PASSWORD=$2 - export OS_TENANT_NAME=$3 - export OS_AUTH_URL=$4 - export OS_REGION_NAME=$5 - EOF -} - -unitAddress() -{ - juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null -} - -unitMachine() -{ - juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"machine\"]" 2> /dev/null -} - -waitForMachine() -{ - for machine; do - while [ "$(agentState $machine)" != started ]; do - sleep 5 - done - done -} - -waitForService() -{ - for service; do - while [ "$(agentStateUnit "$service" 0)" != started ]; do - sleep 5 - done - done -} - -if [ $# -ne 0 ]; then - . "$1" -fi - -juju bootstrap -waitForMachine 0 - -spare_cpus=$(($(grep processor /proc/cpuinfo | wc -l) - 4)) -if [ $spare_cpus -gt 0 ]; then - spare_cpus=$(((spare_cpus * 3) / 4)) -else - spare_cpus=0 -fi - -extra_cpus=0 -[ $spare_cpus -ne 0 ] && extra_cpus=$((1 + (((spare_cpus - 1) * 3) / 4))) && spare_cpus=$((spare_cpus - extra_cpus)) -juju add-machine --constraints "cpu-cores=$((1 + extra_cpus)) mem=12G root-disk=20G" --series $DEFAULT_SERIES - -extra_cpus=0 -[ $spare_cpus -ne 0 ] && extra_cpus=$((1 + (((spare_cpus - 1) * 3) / 4))) && spare_cpus=$((spare_cpus - extra_cpus)) -juju deploy --constraints "cpu-cores=$((1 + extra_cpus)) mem=4G root-disk=20G" $CHARM_NOVA_COMPUTE_DEPLOY_OPTS "${CHARM_NOVA_COMPUTE:-nova-compute}" - -juju add-machine --constraints "cpu-cores=$((1 + spare_cpus)) mem=8G root-disk=20G" --series $DEFAULT_SERIES - -waitForMachine 1 -juju scp lxc-network.sh 1: -juju run --machine 1 "sudo ./lxc-network.sh" - -waitForMachine 3 -juju scp lxc-network.sh 3: -juju run --machine 3 "sudo ./lxc-network.sh" - -juju deploy --to lxc:1 $CHARM_MYSQL_DEPLOY_OPTS "${CHARM_MYSQL:-mysql}" -juju deploy --to lxc:1 $CHARM_RABBITMQ_SERVER_DEPLOY_OPTS "${CHARM_RABBITMQ_SERVER:-rabbitmq-server}" -juju deploy --to lxc:1 $CHARM_KEYSTONE_DEPLOY_OPTS "${CHARM_KEYSTONE:-keystone}" -juju deploy --to lxc:1 $CHARM_NOVA_CLOUD_CONTROLLER_DEPLOY_OPTS "${CHARM_NOVA_CLOUD_CONTROLLER:-nova-cloud-controller}" -juju deploy --to lxc:1 $CHARM_NEUTRON_API_DEPLOY_OPTS "${CHARM_NEUTRON_API:-neutron-api}" -juju deploy --to lxc:1 $CHARM_GLANCE_DEPLOY_OPTS "${CHARM_GLANCE:-glance}" -juju deploy --to lxc:1 $CHARM_OPENSTACK_DASHBOARD_DEPLOY_OPTS "${CHARM_OPENSTACK_DASHBOARD:-openstack-dashboard}" -# contrail -juju deploy --to lxc:1 $CHARM_ZOOKEEPER_DEPLOY_OPTS "${CHARM_ZOOKEEPER:-zookeeper}" -juju deploy --to lxc:1 $CHARM_CONTRAIL_CONFIGURATION_DEPLOY_OPTS "${CHARM_CONTRAIL_CONFIGURATION:-contrail-configuration}" -juju deploy --to lxc:1 $CHARM_CONTRAIL_CONTROL_DEPLOY_OPTS "${CHARM_CONTRAIL_CONTROL:-contrail-control}" -juju deploy --to lxc:1 $CHARM_CONTRAIL_ANALYTICS_DEPLOY_OPTS "${CHARM_CONTRAIL_ANALYTICS:-contrail-analytics}" -juju deploy --to lxc:1 $CHARM_CONTRAIL_WEBUI_DEPLOY_OPTS "${CHARM_CONTRAIL_WEBUI:-contrail-webui}" -juju deploy --to lxc:3 $CHARM_CASSANDRA_DEPLOY_OPTS "${CHARM_CASSANDRA:-cassandra}" -juju deploy $CHARM_NEUTRON_API_CONTRAIL_DEPLOY_OPTS "${CHARM_NEUTRON_API_CONTRAIL:-neutron-api-contrail}" -juju deploy $CHARM_NEUTRON_CONTRAIL_DEPLOY_OPTS "${CHARM_NEUTRON_CONTRAIL:-neutron-contrail}" - -# relation must be set first -# no official way of knowing when this relation hook will fire -waitForService mysql keystone -juju add-relation keystone mysql -sleep 60 - -waitForService rabbitmq-server nova-cloud-controller glance openstack-dashboard nova-compute -juju add-relation nova-cloud-controller mysql -juju add-relation nova-cloud-controller rabbitmq-server -juju add-relation nova-cloud-controller glance -juju add-relation nova-cloud-controller keystone -juju add-relation nova-compute:shared-db mysql:shared-db -juju add-relation nova-compute:amqp rabbitmq-server:amqp -juju add-relation nova-compute glance -juju add-relation nova-compute nova-cloud-controller -juju add-relation glance mysql -juju add-relation glance keystone -juju add-relation openstack-dashboard keystone -sleep 60 - -waitForService neutron-api -juju add-relation neutron-api mysql -juju add-relation neutron-api rabbitmq-server -juju add-relation neutron-api nova-cloud-controller -juju add-relation neutron-api keystone -juju add-relation neutron-api neutron-api-contrail -sleep 60 - -# contrail -waitForService cassandra zookeeper contrail-configuration -juju add-relation contrail-configuration:cassandra cassandra:database -juju add-relation contrail-configuration zookeeper -juju add-relation contrail-configuration rabbitmq-server -juju add-relation contrail-configuration keystone -sleep 60 - -waitForService contrail-control contrail-analytics -juju add-relation neutron-api-contrail contrail-configuration -juju add-relation neutron-api-contrail keystone -juju add-relation contrail-control:contrail-api contrail-configuration:contrail-api -juju add-relation contrail-control:contrail-discovery contrail-configuration:contrail-discovery -juju add-relation contrail-control:contrail-ifmap contrail-configuration:contrail-ifmap -juju add-relation contrail-control keystone -juju add-relation contrail-analytics:cassandra cassandra:database -juju add-relation contrail-analytics contrail-configuration -juju add-relation nova-compute neutron-contrail -juju add-relation neutron-contrail:contrail-discovery contrail-configuration:contrail-discovery -juju add-relation neutron-contrail:contrail-api contrail-configuration:contrail-api -juju add-relation neutron-contrail keystone -sleep 60 - -waitForService contrail-webui -juju add-relation contrail-webui keystone -juju add-relation contrail-webui:contrail_api contrail-configuration:contrail-api -juju add-relation contrail-webui:contrail_discovery contrail-configuration:contrail-discovery -juju add-relation contrail-webui:cassandra cassandra:database -sleep 60 - -# enable kvm on compute -machine=$(unitMachine nova-compute 0) -juju scp compute.sh $machine: -juju run --machine $machine "sudo ./compute.sh" - -mkdir -m 0700 -p cloud -controller_address=$(unitAddress keystone 0) -configOpenrc admin password Admin http://$controller_address:5000/v2.0 RegionOne > cloud/admin-openrc -chmod 0600 cloud/admin-openrc - -machine=$(unitMachine nova-cloud-controller 0) -juju scp cloud-setup.sh cloud/admin-openrc ~/.ssh/id_rsa.pub $machine: -juju run --machine $machine ./cloud-setup.sh - -# setup contrail routing -juju set contrail-configuration "floating-ip-pools=[ { project: admin, network: public-net, pool-name: floatingip_pool, target-projects: [ admin ] } ]" -juju set neutron-contrail "virtual-gateways=[ { project: admin, network: public-net, interface: vgw, subnets: [ 10.0.10.0/24 ], routes: [ 0.0.0.0/0 ] } ]" - -machine=$(unitMachine glance 0) -juju scp glance.sh cloud/admin-openrc $machine: -juju run --machine $machine ./glance.sh - -# setup host routing -if [ -n "$CONFIGURE_HOST_ROUTING" ]; then - compute_address=$(unitAddress nova-compute 0) - sudo ip route replace 10.0.10.0/24 via $compute_address - sudo iptables -C FORWARD -s 10.0.10.0/24 -j ACCEPT 2> /dev/null || sudo iptables -I FORWARD 1 -s 10.0.10.0/24 -j ACCEPT - sudo iptables -C FORWARD -d 10.0.10.0/24 -j ACCEPT 2> /dev/null || sudo iptables -I FORWARD 2 -d 10.0.10.0/24 -j ACCEPT - sudo iptables -t nat -C POSTROUTING -s 10.0.10.0/24 ! -d 10.0.10.0/24 -j MASQUERADE 2> /dev/null || sudo iptables -t nat -A POSTROUTING -s 10.0.10.0/24 ! -d 10.0.10.0/24 -j MASQUERADE -fi |