Merge pull request #149 from open-cloud/feature/container_ssl
Feature/container ssl
diff --git a/.dockerignore b/.dockerignore
index ca65eed..ea51f67 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,4 +1,3 @@
views/
applications/
-containers/
xos/tests/api/node_modules
diff --git a/containers/synchronizer/Dockerfile b/containers/synchronizer/Dockerfile
index 011e8dd..c4bb737 100644
--- a/containers/synchronizer/Dockerfile
+++ b/containers/synchronizer/Dockerfile
@@ -45,4 +45,4 @@
# Supervisor
COPY conf/synchronizer.conf /etc/supervisor/conf.d/
-CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf
+CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf
diff --git a/containers/xos/Dockerfile b/containers/xos/Dockerfile
index afc7c9d..fe8f73a 100644
--- a/containers/xos/Dockerfile
+++ b/containers/xos/Dockerfile
@@ -74,6 +74,10 @@
ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
+# Include certificates from Openstack
+ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
+RUN update-ca-certificates
+
# Install XOS
RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \
mv /tmp/xos/xos /opt/ && \
@@ -93,4 +97,4 @@
WORKDIR /opt/xos
# Define default command.
-CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
diff --git a/containers/xos/Dockerfile.devel b/containers/xos/Dockerfile.devel
index 5dc62a6..2b796e4 100644
--- a/containers/xos/Dockerfile.devel
+++ b/containers/xos/Dockerfile.devel
@@ -74,6 +74,10 @@
ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
+# Include certificates from Openstack
+ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
+RUN update-ca-certificates
+
# Install XOS
ADD xos /opt/xos
RUN chmod +x /opt/xos/tools/xos-manage
@@ -92,4 +96,4 @@
WORKDIR /opt/xos
# Define default command.
-CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
diff --git a/containers/xos/Dockerfile.templ b/containers/xos/Dockerfile.templ
index cfcf9ac..95592c6 100644
--- a/containers/xos/Dockerfile.templ
+++ b/containers/xos/Dockerfile.templ
@@ -68,6 +68,10 @@
ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
+# Include certificates from Openstack
+ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
+RUN update-ca-certificates
+
# Install XOS
RUN git clone XOS_GIT_REPO -b XOS_GIT_BRANCH /tmp/xos && \
mv /tmp/xos/xos /opt/ && \
@@ -86,4 +90,4 @@
WORKDIR /root
# Define default command.
-CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
diff --git a/containers/xos/initdb b/containers/xos/initdb
index 1f5b770..b90a570 100755
--- a/containers/xos/initdb
+++ b/containers/xos/initdb
@@ -12,5 +12,5 @@
# init db schema
docker run -it --name=$CONTAINER_NAME $IMAGE_NAME /opt/xos/tools/xos-manage makemigrations
# run overrides the CMD specifed in the Dockerfile, so we re-set the CMD in the final commit"
-docker commit --change="CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure" $CONTAINER_NAME $IMAGE_NAME
+docker commit --change="CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure" $CONTAINER_NAME $IMAGE_NAME
docker rm $CONTAINER_NAME
diff --git a/containers/xos/local_certs.crt b/containers/xos/local_certs.crt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/containers/xos/local_certs.crt
diff --git a/xos/configurations/cord-pod/Makefile b/xos/configurations/cord-pod/Makefile
index 54f985a..878797c 100644
--- a/xos/configurations/cord-pod/Makefile
+++ b/xos/configurations/cord-pod/Makefile
@@ -10,7 +10,6 @@
sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/setup.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
- sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/images.yaml
vtn: vtn-external.yaml
@@ -54,13 +53,30 @@
./cleanup.sh
bash -c "source ./admin-openrc.sh; nova list --all-tenants; neutron net-list"
-ceilometer_custom_images:
- bash -c "source ./admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || ! mkdir -p ./images || ! wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -P ./images || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file ./images/ceilometer-trusty-server-multi-nic.compressed.qcow2 --container-format bare"
+ceilometer_custom_images: images/ceilometer-trusty-server-multi-nic.img
+ bash -c "source ./admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file ./images/ceilometer-trusty-server-multi-nic.img --container-format bare"
-vsg_custom_images:
- bash -c "source ./admin-openrc.sh; glance image-show vsg-1.0 || ! mkdir -p ./glance-images || ! wget http://www.vicci.org/cord/vsg-1.0.img -P ./glance-images || glance image-create --name vsg-1.0 --disk-format qcow2 --file ./glance-images/vsg-1.0.img --container-format bare"
+vsg_custom_images: images/vsg-1.0.img
+ bash -c "source ./admin-openrc.sh; glance image-show vsg-1.0 || glance image-create --name vsg-1.0 --disk-format qcow2 --file ./images/vsg-1.0.img --container-format bare"
+
+images/ceilometer-trusty-server-multi-nic.img: images
+ wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -P ./images
+ mv ./images/ceilometer-trusty-server-multi-nic.compressed.qcow2 ./images/ceilometer-trusty-server-multi-nic.img
+
+images/vsg-1.0.img: images
+ wget http://www.vicci.org/cord/vsg-1.0.img -P ./images
+
+images:
+ mkdir -p ./images
.PHONY: local_containers
local_containers:
+ echo "" > ../../../containers/xos/local_certs.crt
+ for CRT in /usr/local/share/ca-certificates/* ; do \
+ echo Adding Certificate: $$CRT ;\
+ cat $$CRT >> ../../../containers/xos/local_certs.crt ;\
+ echo "" >> ../../../containers/xos/local_certs.crt ;\
+ done
cd ../../../containers/xos; make devel
cd ../../../containers/synchronizer; make
+
diff --git a/xos/configurations/cord-pod/make-vtn-external-yaml.sh b/xos/configurations/cord-pod/make-vtn-external-yaml.sh
index 8d0885d..a7f04c1 100644
--- a/xos/configurations/cord-pod/make-vtn-external-yaml.sh
+++ b/xos/configurations/cord-pod/make-vtn-external-yaml.sh
@@ -106,4 +106,4 @@
properties:
dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.cordvtn, org.onosproject.olt, org.onosproject.igmp, org.onosproject.cordmcast
autogenerate: vtn-network-cfg
-EOF
\ No newline at end of file
+EOF