summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-05 13:57:43 +0000
committerGerrit Code Review <review@openstack.org>2017-07-05 13:57:43 +0000
commitd61d11daba1c4d0189e225e227e94f0136dd7ec1 (patch)
treea0f84aed57cc8962f35d3d475cbac29403dff84f
parent3943c775abe4770e2e094a19419aec00012e9af0 (diff)
parent24e855dae3822233a863bc27a105b08d112f57af (diff)
Merge "Adds docker OpenDaylight"
-rwxr-xr-xdocker/docker-puppet.py2
-rw-r--r--docker/services/neutron-plugin-ml2.yaml4
-rw-r--r--docker/services/opendaylight-api.yaml116
-rw-r--r--environments/docker.yaml3
-rw-r--r--environments/services-docker/neutron-opendaylight.yaml16
5 files changed, 138 insertions, 3 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 4c193e49..7ca63337 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -203,7 +203,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
# Disables archiving
if [ -z "$NO_ARCHIVE" ]; then
- archivedirs=("/etc" "/root" "/var/lib/ironic/tftpboot" "/var/lib/ironic/httpboot" "/var/www")
+ archivedirs=("/etc" "/root" "/opt" "/var/lib/ironic/tftpboot" "/var/lib/ironic/httpboot" "/var/www")
rsync_srcs=""
for d in "${archivedirs[@]}"; do
if [ -d "$d" ]; then
diff --git a/docker/services/neutron-plugin-ml2.yaml b/docker/services/neutron-plugin-ml2.yaml
index 7211014e..aa62bded 100644
--- a/docker/services/neutron-plugin-ml2.yaml
+++ b/docker/services/neutron-plugin-ml2.yaml
@@ -38,7 +38,7 @@ parameters:
resources:
NeutronBase:
- type: ../../puppet/services/neutron-plugin-ml2.yaml
+ type: OS::TripleO::Docker::NeutronMl2PluginBase
properties:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
@@ -60,7 +60,7 @@ outputs:
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: 'neutron'
- puppet_tags: ''
+ puppet_tags: neutron_plugin_ml2
step_config: *step_config
config_image:
list_join:
diff --git a/docker/services/opendaylight-api.yaml b/docker/services/opendaylight-api.yaml
new file mode 100644
index 00000000..cb476685
--- /dev/null
+++ b/docker/services/opendaylight-api.yaml
@@ -0,0 +1,116 @@
+heat_template_version: pike
+
+description: >
+ OpenStack containerized OpenDaylight API service
+
+parameters:
+ DockerNamespace:
+ description: namespace
+ default: 'tripleoupstream'
+ type: string
+ DockerOpendaylightApiImage:
+ description: image
+ default: 'centos-binary-opendaylight:latest'
+ type: string
+ DockerOpendaylightConfigImage:
+ description: image
+ default: 'centos-binary-opendaylight:latest'
+ type: string
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ ServiceNetMap:
+ default: {}
+ description: Mapping of service_name -> network name. Typically set
+ via parameter_defaults in the resource registry. This
+ mapping overrides those in ServiceNetMapDefaults.
+ type: json
+ DefaultPasswords:
+ default: {}
+ type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ type: json
+
+resources:
+
+ ContainersCommon:
+ type: ./containers-common.yaml
+
+ OpenDaylightBase:
+ type: ../../puppet/services/opendaylight-api.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+ ServiceNetMap: {get_param: ServiceNetMap}
+ DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
+
+outputs:
+ role_data:
+ description: Role data for the OpenDaylight API role.
+ value:
+ service_name: {get_attr: [OpenDaylightBase, role_data, service_name]}
+ config_settings:
+ map_merge:
+ - get_attr: [OpenDaylightBase, role_data, config_settings]
+ step_config: &step_config
+ list_join:
+ - "\n"
+ - - get_attr: [OpenDaylightBase, role_data, step_config]
+ - "include tripleo::profile::base::neutron::opendaylight::create_cluster"
+ # BEGIN DOCKER SETTINGS
+ puppet_config:
+ config_volume: opendaylight
+ # 'file,concat,file_line,augeas' are included by default
+ puppet_tags: odl_user,tripleo::profile::base::neutron::opendaylight::configure_cluster
+ step_config: *step_config
+ config_image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOpendaylightConfigImage} ]
+ kolla_config:
+ /var/lib/kolla/config_files/opendaylight_api.json:
+ command: /opt/opendaylight/bin/karaf
+ permissions:
+ - path: /opt/opendaylight
+ owner: odl:odl
+ recurse: true
+ docker_config:
+ step_1:
+ opendaylight_api:
+ start_order: 0
+ image: &odl_api_image
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOpendaylightApiImage} ]
+ privileged: false
+ net: host
+ detach: true
+ user: odl
+ restart: always
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/opendaylight_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/opendaylight/opt/opendaylight/data/idmlight.db.mv.db:/opt/opendaylight/data/idmlight.db.mv.db
+ - /var/lib/config-data/opendaylight/opt/opendaylight/configuration/initial/:/opt/opendaylight/configuration/initial/
+ - /var/lib/config-data/opendaylight/opt/opendaylight/etc/jetty.xml:/opt/opendaylight/etc/jetty.xml:ro
+ - /var/lib/config-data/opendaylight/opt/opendaylight/etc/org.apache.karaf.features.cfg:/opt/opendaylight/etc/org.apache.karaf.features.cfg:ro
+ - /var/lib/config-data/opendaylight/opt/opendaylight/etc/org.ops4j.pax.logging.cfg:/opt/opendaylight/etc/org.ops4j.pax.logging.cfg:ro
+ - /var/lib/config-data/opendaylight/opt/opendaylight/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg:/opt/opendaylight/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg:ro
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+
+ upgrade_tasks:
+ - name: Stop and disable opendaylight_api service
+ tags: step2
+ service: name=opendaylight state=stopped enabled=no
diff --git a/environments/docker.yaml b/environments/docker.yaml
index 03713e83..c32001a7 100644
--- a/environments/docker.yaml
+++ b/environments/docker.yaml
@@ -6,6 +6,8 @@ resource_registry:
OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
OS::TripleO::Services::Docker: ../puppet/services/docker.yaml
+ # Default Neutron ML2 puppet plugin to use when NeutronCorePlugin is set to ML2
+ OS::TripleO::Docker::NeutronMl2PluginBase: ../puppet/services/neutron-plugin-ml2.yaml
#NOTE (dprince) add roles to be docker enabled as we support them
OS::TripleO::Services::NovaLibvirt: ../docker/services/nova-libvirt.yaml
@@ -75,3 +77,4 @@ parameter_defaults:
- OS::TripleO::Services::Docker
- OS::TripleO::Services::CeilometerAgentCompute
- OS::TripleO::Services::Sshd
+ - OS::TripleO::Services::OpenDaylightOvs
diff --git a/environments/services-docker/neutron-opendaylight.yaml b/environments/services-docker/neutron-opendaylight.yaml
new file mode 100644
index 00000000..b749cb69
--- /dev/null
+++ b/environments/services-docker/neutron-opendaylight.yaml
@@ -0,0 +1,16 @@
+# A Heat environment that can be used to deploy OpenDaylight with L3 DVR using Docker containers
+resource_registry:
+ OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
+ OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
+ OS::TripleO::Services::ComputeNeutronCorePlugin: OS::Heat::None
+ OS::TripleO::Services::OpenDaylightApi: ../../docker/services/opendaylight-api.yaml
+ OS::TripleO::Services::OpenDaylightOvs: ../../puppet/services/opendaylight-ovs.yaml
+ OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
+ OS::TripleO::Docker::NeutronMl2PluginBase: ../../puppet/services/neutron-plugin-ml2-odl.yaml
+
+parameter_defaults:
+ NeutronEnableForceMetadata: true
+ NeutronMechanismDrivers: 'opendaylight_v2'
+ NeutronServicePlugins: 'odl-router_v2,trunk'
+ DockerNeutronApiImage: 'centos-binary-neutron-server-opendaylight:latest'
+ DockerNeutronConfigImage: 'centos-binary-neutron-server-opendaylight:latest'