summaryrefslogtreecommitdiffstats
path: root/vagrant/setup_control.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant/setup_control.sh')
-rw-r--r--vagrant/setup_control.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/vagrant/setup_control.sh b/vagrant/setup_control.sh
new file mode 100644
index 00000000..6ff364f6
--- /dev/null
+++ b/vagrant/setup_control.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+set -ex
+
+cd devstack
+cp /vagrant/control.conf local.conf
+./stack.sh
+
+source /vagrant/openrc
+
+openstack network create public --external --provider-network-type=flat --provider-physical-network=public
+openstack subnet create --network=public --subnet-range=192.168.1.0/24 --allocation-pool start=192.168.1.200,end=192.168.1.250 --gateway 192.168.1.1 public-subnet
+openstack security group list -f value | cut -f1 -d" " | xargs -I {} openstack security group rule create --ingress --ethertype=IPv4 --protocol=0 {}
+
+wget https://cloud-images.ubuntu.com/releases/14.04.1/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img
+wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
+openstack image create ubuntu1404 --file ubuntu-14.04-server-cloudimg-amd64-disk1.img --disk-format qcow2
+openstack image create ubuntu1604 --file ubuntu-16.04-server-cloudimg-amd64-disk1.img --disk-format qcow2
+
+openstack quota set admin --instances 30
+openstack quota set admin --cores 45
+openstack quota set admin --ram 61440
+
+openstack flavor delete m1.large
+openstack flavor create --public m1.large --id auto --ram 6144 --vcpus 3 --disk 80
+openstack flavor delete m1.xlarge
+openstack flavor create --public m1.xlarge --id auto --ram 6144 --vcpus 4 --disk 100