Rolled kilo-install configuration into devel ('make opencloud')
diff --git a/xos/configurations/common/Makefile.devstack b/xos/configurations/common/Makefile.devstack
index f716058..f969b3d 100644
--- a/xos/configurations/common/Makefile.devstack
+++ b/xos/configurations/common/Makefile.devstack
@@ -1,10 +1,11 @@
# This shouldn't be hardcoded
DEVSTACK_ROOT:=~/devstack
-all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url node_key
+all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url node_key net_fix
prereqs:
make -f Makefile.prereqs
+ sudo pip install httpie --upgrade
admin-openrc:
bash ./devstack-creds.sh $(DEVSTACK_ROOT) > admin-openrc.sh
@@ -32,3 +33,7 @@
node_key:
sudo cat ~/.ssh/id_rsa > node_key
sudo cat ~/.ssh/id_rsa.pub > node_key.pub
+
+net_fix:
+ sudo devstack/net-fix.sh
+ bash -c "source admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4"
diff --git a/xos/configurations/common/Makefile.opencloud b/xos/configurations/common/Makefile.opencloud
new file mode 100644
index 0000000..8bc5b93
--- /dev/null
+++ b/xos/configurations/common/Makefile.opencloud
@@ -0,0 +1,36 @@
+MYFLATLANIP:=$(shell hostname -i)
+
+all: prereqs admin-openrc flat_name nodes_yaml public_key private_key ceilometer_url node_key images
+
+prereqs:
+ make -f Makefile.prereqs
+
+admin-openrc:
+ sudo cat /root/setup/admin-openrc.sh > admin-openrc.sh
+ sudo cat /root/setup/settings > controller_settings
+ echo 'CONTROLLER_FLAT_LAN_IP=$(MYFLATLANIP)' >> controller_settings
+
+flat_name:
+ echo nat-net|tr -d '\n' > flat_net_name
+
+nodes_yaml:
+ bash ./make-nodes-yaml.sh
+
+ceilometer_url:
+ echo http://`hostname -i`/xosmetering/ > ceilometer_url
+
+public_key: ~/.ssh/id_rsa.pub
+ cp ~/.ssh/id_rsa.pub .
+
+private_key: ~/.ssh/id_rsa
+ cp ~/.ssh/id_rsa .
+
+~/.ssh/id_rsa.pub:
+ cat /dev/zero | ssh-keygen -q -N ""
+
+node_key:
+ sudo cat /root/setup/id_rsa > node_key
+ sudo cat /root/setup/id_rsa.pub > node_key.pub
+
+images:
+ source admin-openrc.sh; glance image-show trusty-server-multi-nic || glance image-create --name trusty-server-multi-nic --disk-format qcow2 --file /proj/xos-PG0/acb/images/trusty-server-multi-nic.img --container-format bare
diff --git a/xos/configurations/common/devstack.yaml b/xos/configurations/common/devstack.yaml
deleted file mode 100644
index cd17b1c..0000000
--- a/xos/configurations/common/devstack.yaml
+++ /dev/null
@@ -1,87 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-# Note:
-# assumes the following have been created and filled with appropriate data:
-# /root/setup/admin_openrc
-# /root/setup/flat_net_name
-# /root/setup/padmin_public_key
-
-description: >
- * Adds OpenCloud Sites, Deployments, and Controllers.
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
- cirros-0.3.4-x86_64-uec:
- type: tosca.nodes.Image
- properties:
- disk_format: RAW
- container_format: BARE
-
- MyDeployment:
- type: tosca.nodes.Deployment
- properties:
- flavors: m1.large, m1.medium, m1.small
- requirements:
- - image:
- node: cirros-0.3.4-x86_64-uec
- relationship: tosca.relationships.SupportsImage
-
- CloudLab:
- type: tosca.nodes.Controller
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.ControllerDeployment
- properties:
- backend_type: OpenStack
- version: Kilo
- auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
- admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
- admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
- admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
- rabbit_user: { get_script_env: [ SELF, controller_settings, RABBIT_USER, LOCAL_FILE] }
- rabbit_password: { get_script_env: [ SELF, controller_settings, RABBIT_PASS, LOCAL_FILE] }
- rabbit_host: { get_script_env: [ SELF, controller_settings, CONTROLLER_IP, LOCAL_FILE] }
- domain: Default
- artifacts:
- adminrc: /root/setup/admin-openrc.sh
- controller_settings: /root/setup/controller_settings
-
- mysite:
- type: tosca.nodes.Site
- properties:
- display_name: MySite
- site_url: http://opencloud.us/
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.SiteDeployment
- requirements:
- - controller:
- node: CloudLab
- relationship: tosca.relationships.UsesController
-
- Public shared IPv4:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: NAT
- shared_network_name: private
-
- padmin@vicci.org:
- type: tosca.nodes.User
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- properties:
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE ] }
- is_admin: true
- is_active: true
- firstname: XOS
- lastname: admin
- artifacts:
- pubkey: /root/setup/padmin_public_key
diff --git a/xos/configurations/devel/Makefile b/xos/configurations/devel/Makefile
index a4ed2a8..f33479f 100644
--- a/xos/configurations/devel/Makefile
+++ b/xos/configurations/devel/Makefile
@@ -4,7 +4,9 @@
cloudlab: common_cloudlab xos
-devstack: upgrade_pkgs common_devstack devstack_net_fix xos
+devstack: common_devstack xos
+
+opencloud: common_opencloud xos
xos:
rm ../../xos_configuration/*
@@ -21,6 +23,9 @@
common_devstack:
make -C ../common -f Makefile.devstack
+common_opencloud:
+ make -C ../common -f Makefile.opencloud
+
stop:
sudo docker stop $(RUNNING_CONTAINER)
@@ -29,10 +34,3 @@
enter:
sudo docker exec -t -i $(RUNNING_CONTAINER) bash
-
-devstack_net_fix:
- sudo ../common/devstack/net-fix.sh
- sudo bash -c "source ../common/admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4"
-
-upgrade_pkgs:
- sudo pip install httpie --upgrade
diff --git a/xos/configurations/kilo-install/Dockerfile.kilo-install b/xos/configurations/kilo-install/Dockerfile.kilo-install
deleted file mode 100644
index 477a549..0000000
--- a/xos/configurations/kilo-install/Dockerfile.kilo-install
+++ /dev/null
@@ -1,8 +0,0 @@
-RUN mkdir -p /root/setup
-ADD xos/configurations/common/admin-openrc.sh /root/setup/
-ADD xos/configurations/common/nodes.yaml /opt/xos/configurations/commmon/
-ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
-
-CMD /usr/bin/make -C /opt/xos/configurations/kilo-install -f Makefile.inside; /bin/bash
-
-#CMD ["/bin/bash"]
diff --git a/xos/configurations/kilo-install/Makefile b/xos/configurations/kilo-install/Makefile
deleted file mode 100644
index 108df7a..0000000
--- a/xos/configurations/kilo-install/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-MYIP:=$(shell hostname -i)
-RUNNING_CONTAINER:=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
-LAST_CONTAINER=$(shell sudo docker ps -l -q)
-
-# For installing XOS on a node that is not the OpenStack head node
-MGMT_SUBNET="192.168.122.0/24"
-HEAD_NODE_IP="130.127.133.61"
-
-test: common_cloudlab images
- echo "# Autogenerated -- do not edit" > Dockerfile
- cat ../common/Dockerfile.common Dockerfile.kilo-install >> Dockerfile
- cd ../../..; sudo docker build -t xos -f xos/configurations/kilo-install/Dockerfile .
- sudo docker run -d -p 9999:8000 -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro xos
- bash ../common/wait_for_xos.sh
-
-common_cloudlab:
- make -C ../common -f Makefile.cloudlab
-
-stop:
- sudo docker stop $(RUNNING_CONTAINER)
-
-showlogs:
- sudo docker logs $(LAST_CONTAINER)
-
-enter:
- sudo docker exec -t -i $(RUNNING_CONTAINER) bash
-
-images:
- sudo bash -c "source /root/setup/admin-openrc.sh; \
- glance image-show trusty-server-multi-nic || \
- glance image-create --name trusty-server-multi-nic \
- --disk-format qcow2 \
- --file /proj/xos-PG0/acb/images/trusty-server-multi-nic.img \
- --container-format bare"
-
-remote_head_node:
- sudo iptables -t nat -A OUTPUT -p tcp -d $MGMT_SUBNET -j DNAT --to-destination $HEAD_NODE_IP
- sudo iptables -t nat -A PREROUTING -p tcp -d $MGMT_SUBNET -j DNAT --to-destination $HEAD_NODE_IP
diff --git a/xos/configurations/kilo-install/Makefile.inside b/xos/configurations/kilo-install/Makefile.inside
deleted file mode 100644
index 1f20e5d..0000000
--- a/xos/configurations/kilo-install/Makefile.inside
+++ /dev/null
@@ -1,12 +0,0 @@
-all: setup_xos update_certificates run_develserver
-
-setup_xos:
- bash /opt/xos/scripts/docker_setup_xos
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/kilo-install/cloudlab.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
-
-update_certificates:
- update-ca-certificates
-
-run_develserver:
- cd /opt/xos; python manage.py runserver 0.0.0.0:8000 --insecure
diff --git a/xos/configurations/kilo-install/README b/xos/configurations/kilo-install/README
deleted file mode 100644
index 2ff7549..0000000
--- a/xos/configurations/kilo-install/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This configuration is based on the "devel" configuration for CloudLab. It is
-meant to work with an OpenStack Kilo cluster installed on CloudLab using the
-procedure documented here:
-
-https://github.com/andybavier/opencloud-cluster-setup
-
-It launches an XOS container on Cloudlab that runs the XOS develserver. The
-container is left running in the background.
diff --git a/xos/configurations/kilo-install/cloudlab.yaml b/xos/configurations/kilo-install/cloudlab.yaml
deleted file mode 100644
index f92442c..0000000
--- a/xos/configurations/kilo-install/cloudlab.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-# Note:
-# assumes the following have been created and filled with appropriate data:
-# /root/setup/admin_openrc
-# /root/setup/flat_net_name
-# /root/setup/padmin_public_key
-
-description: >
- * Adds OpenCloud Sites, Deployments, and Controllers.
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
- trusty-server-multi-nic:
- type: tosca.nodes.Image
- properties:
- disk_format: QCOW2
- container_format: BARE
-
- MyDeployment:
- type: tosca.nodes.Deployment
- properties:
- flavors: m1.large, m1.medium, m1.small
- requirements:
- - image:
- node: trusty-server-multi-nic
- relationship: tosca.relationships.SupportsImage
-
- CloudLab:
- type: tosca.nodes.Controller
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.ControllerDeployment
- properties:
- backend_type: OpenStack
- version: Juno
- auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
- admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
- admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
- admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
- domain: Default
- artifacts:
- adminrc: /root/setup/admin-openrc.sh
-
- mysite:
- type: tosca.nodes.Site
- properties:
- display_name: MySite
- site_url: http://opencloud.us/
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.SiteDeployment
- requirements:
- - controller:
- node: CloudLab
- relationship: tosca.relationships.UsesController
-
- padmin@vicci.org:
- type: tosca.nodes.User
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- properties:
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE ] }
- is_admin: true
- is_active: true
- firstname: XOS
- lastname: admin
- artifacts:
- pubkey: /root/setup/padmin_public_key