A bit of reorganization and cleanup
diff --git a/xos/configurations/bash/Dockerfile.bash b/xos/configurations/bash/Dockerfile.bash
index a9c224d..fc7177b 100644
--- a/xos/configurations/bash/Dockerfile.bash
+++ b/xos/configurations/bash/Dockerfile.bash
@@ -2,7 +2,7 @@
ADD xos/configurations/common/admin-openrc.sh /root/setup/
ADD xos/configurations/common/controller_settings /root/setup/
ADD xos/configurations/common/flat_net_name /root/setup/
-ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
+ADD xos/configurations/common/nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
ADD xos/configurations/common/node_key.pub /root/setup/node_key.pub
ADD xos/configurations/common/node_key /root/setup/node_key
diff --git a/xos/configurations/bash/Makefile.inside b/xos/configurations/bash/Makefile.inside
index 176ef47..4ec8328 100644
--- a/xos/configurations/bash/Makefile.inside
+++ b/xos/configurations/bash/Makefile.inside
@@ -3,5 +3,5 @@
setup_xos:
bash /opt/xos/scripts/docker_setup_xos
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-nodes.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
diff --git a/xos/configurations/common/Makefile.cloudlab b/xos/configurations/common/Makefile.cloudlab
index 6e609d7..af2ec58 100644
--- a/xos/configurations/common/Makefile.cloudlab
+++ b/xos/configurations/common/Makefile.cloudlab
@@ -16,7 +16,7 @@
[ -s flat_net_name ] # throw error if flat_net_name is empty
nodes_yaml:
- bash ./make-cloudlab-nodes-yaml.sh
+ bash ./make-nodes-yaml.sh
ceilometer_url:
echo http://`hostname -i`/xosmetering/ > ceilometer_url
diff --git a/xos/configurations/common/Makefile.devstack b/xos/configurations/common/Makefile.devstack
index 2f31696..f716058 100644
--- a/xos/configurations/common/Makefile.devstack
+++ b/xos/configurations/common/Makefile.devstack
@@ -15,7 +15,7 @@
bash -c "source admin-openrc.sh; openstack network set --share private"
nodes_yaml:
- bash ./make-cloudlab-nodes-yaml.sh
+ bash ./make-nodes-yaml.sh
ceilometer_url:
echo http://`hostname -i`/xosmetering/ > ceilometer_url
diff --git a/xos/configurations/common/cloudlab.yaml b/xos/configurations/common/base.yaml
similarity index 97%
rename from xos/configurations/common/cloudlab.yaml
rename to xos/configurations/common/base.yaml
index a0beeeb..6b6ae34 100644
--- a/xos/configurations/common/cloudlab.yaml
+++ b/xos/configurations/common/base.yaml
@@ -29,7 +29,7 @@
node: trusty-server-multi-nic
relationship: tosca.relationships.SupportsImage
- CloudLab:
+ Backend:
type: tosca.nodes.Controller
requirements:
- deployment:
@@ -37,7 +37,7 @@
relationship: tosca.relationships.ControllerDeployment
properties:
backend_type: OpenStack
- version: Juno
+ 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] }
@@ -61,7 +61,7 @@
relationship: tosca.relationships.SiteDeployment
requirements:
- controller:
- node: CloudLab
+ node: Backend
relationship: tosca.relationships.UsesController
Public shared IPv4:
diff --git a/xos/configurations/devstack/local.conf b/xos/configurations/common/devstack/local.conf
similarity index 100%
rename from xos/configurations/devstack/local.conf
rename to xos/configurations/common/devstack/local.conf
diff --git a/xos/configurations/devstack/net-fix.sh b/xos/configurations/common/devstack/net-fix.sh
similarity index 100%
rename from xos/configurations/devstack/net-fix.sh
rename to xos/configurations/common/devstack/net-fix.sh
diff --git a/xos/configurations/common/make-cloudlab-nodes-yaml.sh b/xos/configurations/common/make-nodes-yaml.sh
similarity index 84%
rename from xos/configurations/common/make-cloudlab-nodes-yaml.sh
rename to xos/configurations/common/make-nodes-yaml.sh
index f2555a4..eafab4a 100644
--- a/xos/configurations/common/make-cloudlab-nodes-yaml.sh
+++ b/xos/configurations/common/make-nodes-yaml.sh
@@ -1,5 +1,4 @@
-#FN=/opt/xos/configurations/common/cloudlab-nodes.yaml
-FN=cloudlab-nodes.yaml
+FN=nodes.yaml
rm -f $FN
@@ -9,7 +8,7 @@
imports:
- custom_types/xos.yaml
-description: autogenerated cloudlab nodes file
+description: autogenerated nodes file
topology_template:
node_templates:
diff --git a/xos/configurations/cord/Dockerfile.cord b/xos/configurations/cord/Dockerfile.cord
index a436871..9fde1b0 100644
--- a/xos/configurations/cord/Dockerfile.cord
+++ b/xos/configurations/cord/Dockerfile.cord
@@ -2,7 +2,7 @@
ADD xos/configurations/common/admin-openrc.sh /root/setup/
ADD xos/configurations/common/controller_settings /root/setup/
ADD xos/configurations/common/flat_net_name /root/setup/
-ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
+ADD xos/configurations/common/nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
ADD xos/configurations/common/id_rsa.pub /opt/xos/observers/vcpe/vcpe_public_key
ADD xos/configurations/common/id_rsa /opt/xos/observers/vcpe/vcpe_private_key
diff --git a/xos/configurations/cord/Makefile b/xos/configurations/cord/Makefile
index 9c11927..755f704 100644
--- a/xos/configurations/cord/Makefile
+++ b/xos/configurations/cord/Makefile
@@ -16,7 +16,7 @@
make -C ../common -f Makefile.cloudlab
ceilometer_dashboard:
- #NOTE: The below dashboard install scripts assume
+ #NOTE: The below dashboard install scripts assume
#clouldlab openstack environment created using "OpenStack" profile
#bash install_xos_ceilometer_dashboard.sh
bash install_ceilometer_patch.sh
@@ -55,7 +55,7 @@
# reboot the vBNG ONOS
cd dataplane; ansible -i hosts onos_vbng -m shell -s -a "docker restart ONOS"
-cleanup: stop
+cleanup:
cd dataplane; ./cleanup.sh
bash -c "source ../common/admin-openrc.sh; nova list --all-tenants; neutron net-list"
echo "Don't forget to clean up containers"
diff --git a/xos/configurations/cord/Makefile.inside b/xos/configurations/cord/Makefile.inside
index b8e23f8..1b4fb97 100644
--- a/xos/configurations/cord/Makefile.inside
+++ b/xos/configurations/cord/Makefile.inside
@@ -3,8 +3,8 @@
setup_xos:
bash /opt/xos/scripts/docker_setup_xos
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-nodes.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/cord.yaml
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/ceilometer.yaml
diff --git a/xos/configurations/cord/make-virtualbng-json.sh b/xos/configurations/cord/make-virtualbng-json.sh
index 0e1d350..2d6501d 100644
--- a/xos/configurations/cord/make-virtualbng-json.sh
+++ b/xos/configurations/cord/make-virtualbng-json.sh
@@ -1,4 +1,3 @@
-#FN=/opt/xos/configurations/common/cloudlab-nodes.yaml
FN=virtualbng.json
rm -f $FN
@@ -15,7 +14,7 @@
"hosts" : {
EOF
-NODES=$( sudo bash -c "source /root/setup/admin-openrc.sh ; nova hypervisor-list" |grep cloudlab|awk '{print $4}' )
+NODES=$( sudo bash -c "source /root/setup/admin-openrc.sh ; nova hypervisor-list" |grep enabled|awk '{print $4}' )
NODECOUNT=0
for NODE in $NODES; do
diff --git a/xos/configurations/devel/Dockerfile.devel b/xos/configurations/devel/Dockerfile.devel
index 60c0143..85b661d 100644
--- a/xos/configurations/devel/Dockerfile.devel
+++ b/xos/configurations/devel/Dockerfile.devel
@@ -2,7 +2,7 @@
ADD xos/configurations/common/admin-openrc.sh /root/setup/
ADD xos/configurations/common/controller_settings /root/setup/
ADD xos/configurations/common/flat_net_name /root/setup/
-ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
+ADD xos/configurations/common/nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
ADD xos/configurations/common/id_rsa /opt/xos/observers/helloworldservice_complete/helloworldservice_private_key
ADD xos/configurations/common/node_key.pub /root/setup/node_key.pub
diff --git a/xos/configurations/devel/Makefile b/xos/configurations/devel/Makefile
index eb5802a..a4ed2a8 100644
--- a/xos/configurations/devel/Makefile
+++ b/xos/configurations/devel/Makefile
@@ -31,7 +31,7 @@
sudo docker exec -t -i $(RUNNING_CONTAINER) bash
devstack_net_fix:
- sudo ../devstack/net-fix.sh
+ 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:
diff --git a/xos/configurations/devel/Makefile.inside b/xos/configurations/devel/Makefile.inside
index 57cde4c..fb9433c 100644
--- a/xos/configurations/devel/Makefile.inside
+++ b/xos/configurations/devel/Makefile.inside
@@ -2,8 +2,8 @@
setup_xos:
bash /opt/xos/scripts/docker_setup_xos
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-nodes.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
run_develserver:
cd /opt/xos; python manage.py runserver 0.0.0.0:8000 --insecure
diff --git a/xos/configurations/devel/README.md b/xos/configurations/devel/README.md
index 54a51a8..d877a39 100644
--- a/xos/configurations/devel/README.md
+++ b/xos/configurations/devel/README.md
@@ -42,7 +42,7 @@
~$ git clone https://github.com/open-cloud/xos.git
~$ git clone https://git.openstack.org/openstack-dev/devstack
~$ cd devstack
-~/devstack$ cp ../xos/xos/configurations/devstack/local.conf .
+~/devstack$ cp ../xos/xos/configurations/common/devstack/local.conf .
~/devstack$ ./stack.sh
~/devstack$ cd ../xos/xos/configurations/devel/
~/xos/xos/configurations/devel$ make devstack
diff --git a/xos/configurations/kilo-install/Dockerfile b/xos/configurations/kilo-install/Dockerfile
deleted file mode 100644
index f0ced90..0000000
--- a/xos/configurations/kilo-install/Dockerfile
+++ /dev/null
@@ -1,154 +0,0 @@
-# Autogenerated -- do not edit
-FROM ubuntu:14.04.2
-MAINTAINER Andy Bavier <acb@cs.princeton.edu>
-
-# XXX Workaround for docker bug:
-# https://github.com/docker/docker/issues/6345
-# Kernel 3.15 breaks docker, uss the line below as a workaround
-# until there is a fix
-RUN ln -s -f /bin/true /usr/bin/chfn
-# XXX End workaround
-
-# Install.
-RUN apt-get update && apt-get install -y \
- git \
- postgresql \
- python-psycopg2 \
- graphviz \
- graphviz-dev \
- libxslt1.1 \
- libxslt1-dev \
- python-pip \
- tar \
- gcc \
- python-httplib2 \
- geoip-database \
- libgeoip1 \
- wget \
- curl \
- python-dev \
- libyaml-dev \
- pkg-config \
- python-pycurl
-
-RUN pip install django==1.7
-RUN pip install djangorestframework==2.4.4
-RUN pip install markdown # Markdown support for the browseable API.
-RUN pip install pyyaml # YAML content-type support.
-RUN pip install django-filter # Filtering support
-RUN pip install lxml # XML manipulation library
-RUN pip install netaddr # IP Addr library
-RUN pip install pytz
-RUN pip install django-timezones
-RUN pip install requests
-RUN pip install django-crispy-forms
-RUN pip install django-geoposition
-RUN pip install django-extensions
-RUN pip install django-suit
-RUN pip install django-bitfield
-RUN pip install django-ipware
-RUN pip install django-encrypted-fields
-RUN pip install python-keyczar
-RUN pip install pygraphviz
-RUN pip install dnslib
-
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-keystoneclient
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-novaclient
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-neutronclient
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-glanceclient
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-ceilometerclient
-
-RUN pip install django_rest_swagger
-
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-setuptools
-RUN easy_install django_evolution
-RUN easy_install python_gflags
-RUN easy_install --upgrade httplib2
-RUN easy_install google_api_python_client
-RUN easy_install httplib2.ca_certs_locater
-
-# Install custom Ansible
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-crypto
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-yaml
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-client
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-paramiko
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-jinja2
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-httplib2
-RUN git clone -b release1.8.2 git://github.com/ansible/ansible.git /opt/ansible
-RUN git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/lib/ansible/modules/extras
-RUN git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/v2/ansible/modules/extras
-RUN git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/lib/ansible/modules/core
-RUN git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/v2/ansible/modules/core
-ADD ansible-hosts /etc/ansible/hosts
-
-ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
-
-# For Observer
-RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum
-RUN cd /tmp/fofum; python setup.py install
-RUN rm -rf /tmp/fofum
-
-RUN mkdir -p /usr/local/share /bin
-ADD http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2 /usr/local/share/
-RUN tar jxvf /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 -C /usr/local/share/
-RUN rm -f /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2
-RUN ln -s /usr/local/share/phantomjs-1.7.0-linux-x86_64 /usr/local/share/phantomjs
-RUN ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs
-
-# Supervisor
-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor
-ADD observer.conf /etc/supervisor/conf.d/
-
-# Get XOS
-ADD xos /opt/xos
-
-# Initscript is broken in Ubuntu
-#ADD observer-initscript /etc/init.d/xosobserver
-
-RUN chmod +x /opt/xos/scripts/opencloud
-RUN /opt/xos/scripts/opencloud genkeys
-
-# Workaround for AUFS issue
-# https://github.com/docker/docker/issues/783#issuecomment-56013588
-RUN mkdir /etc/ssl/private-copy; mv /etc/ssl/private/* /etc/ssl/private-copy/; rm -r /etc/ssl/private; mv /etc/ssl/private-copy /etc/ssl/private; chmod -R 0700 /etc/ssl/private; chown -R postgres /etc/ssl/private
-
-# Set postgres password to match default value in settings.py
-RUN service postgresql start; sudo -u postgres psql -c "alter user postgres with password 'password';"
-
-# Turn DEBUG on so that devel server will serve static files
-# (not necessary if --insecure is passed to 'manage.py runserver')
-# RUN sed -i 's/DEBUG = False/DEBUG = True/' /opt/xos/xos/settings.py
-
-# Cruft to workaround problems with migrations, should go away...
-RUN /opt/xos/scripts/opencloud remigrate
-
-# git clone uses cached copy, doesn't pick up latest
-RUN git -C /opt/ansible pull
-RUN git -C /opt/ansible/lib/ansible/modules/core pull
-RUN git -C /opt/ansible/v2/ansible/modules/core pull
-
-# install Tosca engine
-RUN apt-get install -y m4
-RUN pip install python-dateutil
-RUN bash /opt/xos/tosca/install_tosca.sh
-
-EXPOSE 8000
-
-# Set environment variables.
-ENV HOME /root
-
-# Define working directory.
-WORKDIR /root
-
-# Define default command.
-#CMD ["/bin/bash"]
-#CMD /opt/xos/scripts/docker_start_xos
-RUN mkdir -p /root/setup
-ADD xos/configurations/common/admin-openrc.sh /root/setup/
-RUN bash -c 'echo "nat-net" > /root/setup/flat_net_name'
-ADD xos/configurations/common/cloudlab-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/Dockerfile.kilo-install b/xos/configurations/kilo-install/Dockerfile.kilo-install
index fabfcd8..477a549 100644
--- a/xos/configurations/kilo-install/Dockerfile.kilo-install
+++ b/xos/configurations/kilo-install/Dockerfile.kilo-install
@@ -1,6 +1,6 @@
RUN mkdir -p /root/setup
ADD xos/configurations/common/admin-openrc.sh /root/setup/
-ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
+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
diff --git a/xos/configurations/kilo-install/Makefile.inside b/xos/configurations/kilo-install/Makefile.inside
index c49841a..1f20e5d 100644
--- a/xos/configurations/kilo-install/Makefile.inside
+++ b/xos/configurations/kilo-install/Makefile.inside
@@ -3,7 +3,7 @@
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/cloudlab-nodes.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
update_certificates:
update-ca-certificates
diff --git a/xos/configurations/test/Dockerfile.test b/xos/configurations/test/Dockerfile.test
index eb39645..5c2c717 100644
--- a/xos/configurations/test/Dockerfile.test
+++ b/xos/configurations/test/Dockerfile.test
@@ -1,7 +1,8 @@
RUN mkdir -p /root/setup
ADD xos/configurations/common/admin-openrc.sh /root/setup/
+ADD xos/configurations/common/controller_settings /root/setup/
ADD xos/configurations/common/flat_net_name /root/setup/
-ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
+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/test", "-f", "Makefile.inside"]
diff --git a/xos/configurations/test/Makefile.inside b/xos/configurations/test/Makefile.inside
index d6c6de1..168f671 100644
--- a/xos/configurations/test/Makefile.inside
+++ b/xos/configurations/test/Makefile.inside
@@ -2,8 +2,8 @@
setup_xos:
bash /opt/xos/scripts/docker_setup_xos
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab.yaml
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-nodes.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/nodes.yaml
echo sleeping 30 seconds
sleep 30