Change name of ONOS docker image to opencord/onos
fixed onos-fabric-install role
whitespace
Change-Id: I2dd372957118a366ed12d374370713f6b7aa0571
diff --git a/roles/onos-fabric-install/tasks/main.yml b/roles/onos-fabric-install/tasks/main.yml
index 7d67c88..4f16e64 100644
--- a/roles/onos-fabric-install/tasks/main.yml
+++ b/roles/onos-fabric-install/tasks/main.yml
@@ -8,30 +8,16 @@
- skip_ansible_lint # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable
- name: Create dest directory
- file: path="{{ onos_fabric_dest }}" state=directory
+ file:
+ path: "{{ onos_fabric_dest }}"
+ state: directory
- name: Create templated ONOS files
template:
src: "{{ item }}.j2"
dest: "{{ onos_fabric_dest }}/{{ item }}"
with_items:
- - Dockerfile
- - onos-service
-
-- name: Copy over ONOS playbook and other files
- copy:
- src: "onos-fabric-docker-compose.yml"
- dest: "{{ onos_fabric_dest }}/docker-compose.yml"
-
-# TODO: Find the proper place for this on the dev machine rather than
-# copying it within the head node machine.
-
-- name: Copy SSL Certs to ONOS so docker-compose can find it
- copy:
- src: "/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt"
- dest: "{{ onos_fabric_dest }}/xos-certs.crt"
- owner: "{{ ansible_user_id }}"
- remote_src: True
+ - docker-compose.yml
# Note: we do not rebuild onos container for the fabric
diff --git a/roles/onos-fabric-install/templates/Dockerfile.j2 b/roles/onos-fabric-install/templates/Dockerfile.j2
deleted file mode 100644
index a9973be..0000000
--- a/roles/onos-fabric-install/templates/Dockerfile.j2
+++ /dev/null
@@ -1,20 +0,0 @@
-# ONOS dockerfile with XOS/CORD additions
-
-FROM {{ onos_docker_image }}
-MAINTAINER Zack Williams <zdw@cs.arizona.edu>
-
-# Add SSL certs
-COPY xos-certs.crt /usr/local/share/ca-certificates/xos-certs.crt
-RUN update-ca-certificates
-
-# Create Java KeyStore from certs
-RUN openssl x509 -in /usr/local/share/ca-certificates/xos-certs.crt \
- -outform der -out /usr/local/share/ca-certificates/xos-certs.der && \
- keytool -import -noprompt -storepass {{ trust_store_pw }} -alias xos-certs \
- -file /usr/local/share/ca-certificates/xos-certs.der \
- -keystore /usr/local/share/ca-certificates/xos-certs.jks
-
-# Updated onos-service to use the jks
-COPY onos-service /root/onos/bin/onos-service
-RUN chmod 755 /root/onos/bin/onos-service
-
diff --git a/roles/onos-fabric-install/files/onos-fabric-docker-compose.yml b/roles/onos-fabric-install/templates/docker-compose.yml.j2
similarity index 80%
rename from roles/onos-fabric-install/files/onos-fabric-docker-compose.yml
rename to roles/onos-fabric-install/templates/docker-compose.yml.j2
index 76d64cd..b98230f 100644
--- a/roles/onos-fabric-install/files/onos-fabric-docker-compose.yml
+++ b/roles/onos-fabric-install/templates/docker-compose.yml.j2
@@ -4,7 +4,7 @@
services:
xos-onos:
- image: docker-registry:5000/onosproject/onos:candidate
+ image: {{ onos_docker_image }}
ports:
- "6653:6653" # OpenFlow
- "8101:8101" # ONOS SSH
diff --git a/roles/onos-fabric-install/templates/onos-service.j2 b/roles/onos-fabric-install/templates/onos-service.j2
deleted file mode 100644
index 7eef6f5..0000000
--- a/roles/onos-fabric-install/templates/onos-service.j2
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-# -----------------------------------------------------------------------------
-# Starts ONOS Apache Karaf container
-# -----------------------------------------------------------------------------
-
-# uncomment the following line for performance testing
-#export JAVA_OPTS="${JAVA_OPTS:--Xms8G -Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+PrintGCDetails -XX:+PrintGCTimeStamps}"
-
-# uncomment the following line for Netty TLS encryption
-# Do modify the keystore location/password and truststore location/password accordingly
-#export JAVA_OPTS="${JAVA_OPTS:--DenableNettyTLS=true -Djavax.net.ssl.keyStore=/home/ubuntu/onos.jks -Djavax.net.ssl.keyStorePassword=222222 -Djavax.net.ssl.trustStore=/home/ubuntu/onos.jks -Djavax.net.ssl.trustStorePassword=222222}"
-
-export JAVA_OPTS="-Djavax.net.ssl.trustStore=/usr/local/share/ca-certificates/xos-certs.jks -Djavax.net.ssl.trustStorePassword={{ trust_store_pw }}"
-
-set -e # exit on error
-set -u # exit on undefined variable
-
-# If ONOS_HOME is set, respect its value.
-# If ONOS_HOME is not set (e.g. in the init or service environment),
-# set it based on this script's path.
-ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)}
-KARAF_ARGS=
-SYS_APPS=drivers
-ONOS_APPS=${ONOS_APPS:-} # Empty means don't activate any new apps
-
-cd $ONOS_HOME
-
-# Parse out arguments destinted for karaf invocation v. arguments that
-# will be processed in line
-while [ $# -gt 0 ]; do
- case $1 in
- apps-clean)
- # Deactivate all applications
- find ${ONOS_HOME}/apps -name "active" -exec rm \{\} \;
- ;;
- *)
- KARAF_ARGS+=" $1"
- ;;
- esac
- shift
-done
-
-# Activate the system required applications (SYS_APPS) as well as any
-# specified applications in the var ONOS_APPS
-for app in ${SYS_APPS//,/ } ${ONOS_APPS//,/ }; do
- if [[ "$app" =~ \. ]]; then
- touch ${ONOS_HOME}/apps/$app/active
- else
- touch ${ONOS_HOME}/apps/org.onosproject.$app/active
- fi
-done
-
-exec ${ONOS_HOME}/apache-karaf-3.0.5/bin/karaf $KARAF_ARGS
diff --git a/vars/cord_defaults.yml b/vars/cord_defaults.yml
index 91cbd09..7a0549b 100644
--- a/vars/cord_defaults.yml
+++ b/vars/cord_defaults.yml
@@ -19,7 +19,7 @@
xos_configuration: cord-pod
# Pull ONOS from local Docker registry rather than Docker Hub
-onos_docker_image: "docker-registry:5000/onosproject/onos:candidate"
+onos_docker_image: "docker-registry:5000/opencord/onos:candidate"
xos_config_targets:
- local_containers