tripleo-heat-templates/docker/services/opendaylight-api.yaml
Giulio Fidente baf6eee501 Adds network/cidr mapping into a new service property
Makes it possible to resolve network subnets within a service
template; the data is transported into a new property ServiceData
wired into every service which hopefully is generic enough to
be extended in the future and transport more data.

Data can be consumed in service templates to set config values
which need to know what is the subnet where a deamon operates (for
example the Ceph Public vs Cluster network).

Change-Id: I28e21c46f1ef609517175f7e7ee19e28d1c0cba2
2017-07-14 13:44:04 +02:00

122 lines
3.9 KiB
YAML

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
ServiceData:
default: {}
description: Dictionary packing service data
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}
ServiceData: {get_param: ServiceData}
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
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
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/puppet-generated/opendaylight/:/var/lib/kolla/config_files/src: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