Created
October 6, 2015 22:16
-
-
Save jamesbeedy/6429af503c3581ba9e7e to your computer and use it in GitHub Desktop.
stack-up.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bootstrap juju/add bootstrap node | |
juju bootstrap --to kilo-bootstrap.tfawint.com | |
sleep 5 | |
# Deploy multi-host by tag | |
juju add-machine --constraints tags="multi" | |
sleep 5 | |
# Deploy ceph-osd | |
juju deploy ceph-osd --constraints tags="osd" --config charmconf.yaml -n 3 | |
sleep 5 | |
# Deploy cinder-volume | |
juju deploy cinder-avail0 --constraints tags="avail0" --config charmconf.yaml | |
sleep 5 | |
juju deploy cinder-avail1 --constraints tags="avail1" --config charmconf.yaml | |
sleep 5 | |
juju deploy cinder-avail2 --constraints tags="avail2" --config charmconf.yaml | |
sleep 5 | |
# Deploy primary network, storage, mysql, rabbitmq, and cinder | |
juju deploy ceph --constraints tags="mon" --config charmconf.yaml -n 3 | |
sleep 5 | |
juju deploy neutron-gateway --constraints tags="network" --config charmconf.yaml | |
sleep 5 | |
# Deploy lxc's on multi-host | |
for i in mysql rabbitmq-server cinder-api keystone openstack-dashboard ceph-radosgw nova-cloud-controller glance glance-simplestreams-sync heat juju-gui neutron-api; do | |
juju deploy $i --config charmconf.yaml --to lxc:1; | |
done; | |
sleep 5 | |
# Deploy nova-compute | |
juju deploy nova-compute --to 2 --config charmconf.yaml | |
sleep 5 | |
juju add-unit nova-compute --to 3 | |
sleep 5 | |
juju add-unit nova-compute --to 4 | |
sleep 5 | |
# Deploy subordinate charms | |
juju deploy neutron-openvswitch --config charmconf.yaml | |
juju deploy cinder-ceph --config charmconf.yaml | |
juju deploy ntp | |
### Add relations | |
IFS=','; | |
for i in "ceph:client,cinder-ceph:ceph" "glance:ceph,ceph:client" \ | |
"nova-compute:ceph,ceph:client" "ntp:juju-info,ceph:juju-info" \ | |
"ceph:osd,ceph-osd:mon" "ntp:juju-info,ceph-osd:juju-info" \ | |
"ceph:radosgw,ceph-radosgw:mon" "ceph-radosgw:identity-service,keystone:identity-service" \ | |
"cinder-api:image-service,glance:image-service" "cinder-api:storage-backend,cinder-ceph:storage-backend" \ | |
"cinder-avail0:image-service,glance:image-service" "cinder-avail0:storage-backend,cinder-ceph:storage-backend" \ | |
"cinder-avail1:image-service,glance:image-service" "cinder-avail1:storage-backend,cinder-ceph:storage-backend" \ | |
"cinder-avail2:image-service,glance:image-service" "cinder-avail2:storage-backend,cinder-ceph:storage-backend" \ | |
"rabbitmq-server:amqp,cinder-api:amqp" "cinder-api:identity-service,keystone:identity-service" \ | |
"rabbitmq-server:amqp,cinder-avail0:amqp" "rabbitmq-server:amqp,cinder-avail1:amqp" \ | |
"rabbitmq-server:amqp,cinder-avail2:amqp" "cinder-avail0:shared-db,mysql:shared-db" \ | |
"cinder-avail1:shared-db,mysql:shared-db" "cinder-avail2:shared-db,mysql:shared-db" \ | |
"nova-cloud-controller:cinder-volume-service,cinder-avail0:cinder-volume-service" \ | |
"nova-cloud-controller:cinder-volume-service,cinder-avail1:cinder-volume-service" \ | |
"nova-cloud-controller:cinder-volume-service,cinder-avail2:cinder-volume-service" \ | |
"cinder-api:shared-db,mysql:shared-db" "nova-compute:neutron-plugin,neutron-openvswitch:neutron-plugin" \ | |
"nova-compute:amqp,rabbitmq-server:amqp" "mysql:shared-db,nova-compute:shared-db" \ | |
"nova-compute:image-service,glance:image-service" "nova-cloud-controller:cloud-compute,nova-compute:cloud-compute" \ | |
"ntp:juju-info,nova-compute:juju-info" "nova-cloud-controller:shared-db,mysql:shared-db" \ | |
"rabbitmq-server:amqp,nova-cloud-controller:amqp" "glance:image-service,nova-cloud-controller:image-service" \ | |
"keystone:identity-service,nova-cloud-controller:identity-service" "mysql:shared-db,glance:shared-db" \ | |
"keystone:identity-service,glance:identity-service" "rabbitmq-server:amqp,glance:amqp" \ | |
"keystone:identity-service,glance-simplestreams-sync:identity-service" \ | |
"keystone:identity-service,heat:identity-service" "mysql:shared-db,heat:shared-db" \ | |
"rabbitmq-server:amqp,heat:amqp" "keystone:identity-service,openstack-dashboard:identity-service" \ | |
"mysql:shared-db,keystone:shared-db" "mysql:shared-db,neutron-gateway:shared-db" \ | |
"nova-cloud-controller:quantum-network-service,neutron-gateway:quantum-network-service" \ | |
"ntp:juju-info,neutron-gateway:juju-info" "rabbitmq-server:amqp,neutron-gateway:amqp" \ | |
"neutron-api:identity-service,keystone:identity-service" "neutron-openvswitch:neutron-plugin-api,neutron-api:neutron-plugin-api" \ | |
"mysql:shared-db,neutron-api:shared-db" "rabbitmq-server:amqp,neutron-api:amqp" "neutron-gateway:neutron-plugin-api,neutron-api:neutron-plugin-api" \ | |
"nova-cloud-controller:neutron-api,neutron-api:neutron-api" "rabbitmq-server:amqp,neutron-openvswitch:amqp"; do | |
set $i; | |
juju add-relation $1 $2; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment