Merge "Add docker keystone service"
authorJenkins <jenkins@review.openstack.org>
Wed, 22 Feb 2017 21:22:37 +0000 (21:22 +0000)
committerGerrit Code Review <review@openstack.org>
Wed, 22 Feb 2017 21:22:37 +0000 (21:22 +0000)
100 files changed:
README.rst
ci/environments/multinode-3nodes.yaml
ci/environments/multinode-core.yaml [new file with mode: 0644]
ci/environments/multinode.yaml
ci/environments/multinode_major_upgrade.yaml
ci/environments/scenario001-multinode.yaml
ci/environments/scenario002-multinode.yaml
ci/environments/scenario003-multinode.yaml
ci/environments/scenario004-multinode.yaml
ci/pingtests/scenario004-multinode.yaml
ci/scripts/freeipa_setup.sh
deployed-server/deployed-server-roles-data.yaml
docker/docker-puppet.py
docker/post.j2.yaml
docker/services/README.rst
docker/services/heat-api-cfn.yaml [new file with mode: 0644]
docker/services/heat-api.yaml [new file with mode: 0644]
docker/services/heat-engine.yaml [new file with mode: 0644]
docker/services/ironic-api.yaml [new file with mode: 0644]
docker/services/ironic-conductor.yaml [new file with mode: 0644]
docker/services/ironic-pxe.yaml [new file with mode: 0644]
docker/services/memcached.yaml [new file with mode: 0644]
docker/services/mistral-api.yaml [new file with mode: 0644]
docker/services/mistral-engine.yaml [new file with mode: 0644]
docker/services/mistral-executor.yaml [new file with mode: 0644]
docker/services/neutron-api.yaml [new file with mode: 0644]
docker/services/neutron-dhcp.yaml [new file with mode: 0644]
docker/services/neutron-plugin-ml2.yaml [new file with mode: 0644]
docker/services/nova-api.yaml [new file with mode: 0644]
docker/services/nova-compute.yaml
docker/services/nova-conductor.yaml [new file with mode: 0644]
docker/services/nova-ironic.yaml [new file with mode: 0644]
docker/services/nova-metadata.yaml [new file with mode: 0644]
docker/services/nova-placement.yaml [new file with mode: 0644]
docker/services/nova-scheduler.yaml [new file with mode: 0644]
docker/services/rabbitmq.yaml [new file with mode: 0644]
docker/services/services.yaml
docker/services/zaqar.yaml [new file with mode: 0644]
environments/deployed-server-pacemaker-environment.yaml [new file with mode: 0644]
environments/docker.yaml
environments/low-memory-usage.yaml
environments/major-upgrade-composable-steps.yaml
environments/major-upgrade-converge.yaml [new file with mode: 0644]
environments/neutron-opendaylight.yaml
extraconfig/tasks/run_puppet.sh [new file with mode: 0755]
extraconfig/tasks/swift-ring-deploy.yaml [new file with mode: 0644]
extraconfig/tasks/swift-ring-update.yaml [new file with mode: 0644]
extraconfig/tasks/tripleo_upgrade_node.sh
overcloud-resource-registry-puppet.j2.yaml
puppet/blockstorage-role.yaml
puppet/cephstorage-role.yaml
puppet/compute-role.yaml
puppet/controller-role.yaml
puppet/major_upgrade_steps.j2.yaml
puppet/objectstorage-role.yaml
puppet/puppet-steps.j2
puppet/role.role.j2.yaml
puppet/services/README.rst
puppet/services/aodh-base.yaml
puppet/services/barbican-api.yaml
puppet/services/ceilometer-base.yaml
puppet/services/cinder-base.yaml
puppet/services/congress.yaml
puppet/services/database/mysql-client.yaml [new file with mode: 0644]
puppet/services/database/mysql.yaml
puppet/services/ec2-api.yaml
puppet/services/glance-api.yaml
puppet/services/gnocchi-base.yaml
puppet/services/heat-api-cfn.yaml
puppet/services/heat-api-cloudwatch.yaml
puppet/services/heat-api.yaml
puppet/services/heat-engine.yaml
puppet/services/ironic-base.yaml
puppet/services/keystone.yaml
puppet/services/manila-base.yaml
puppet/services/mistral-base.yaml
puppet/services/neutron-api.yaml
puppet/services/neutron-compute-plugin-ovn.yaml
puppet/services/neutron-plugin-plumgrid.yaml
puppet/services/nova-api.yaml
puppet/services/nova-base.yaml
puppet/services/nova-compute.yaml
puppet/services/nova-conductor.yaml
puppet/services/nova-consoleauth.yaml
puppet/services/nova-placement.yaml
puppet/services/nova-scheduler.yaml
puppet/services/nova-vnc-proxy.yaml
puppet/services/octavia-api.yaml
puppet/services/panko-base.yaml
puppet/services/sahara-base.yaml
puppet/services/tacker.yaml
puppet/services/time/ntp.yaml
puppet/upgrade_config.yaml
releasenotes/notes/add-default-ntp-server-696b8568e09be497.yaml [new file with mode: 0644]
releasenotes/notes/composable-ha-37e2d7e1f57f5c10.yaml [new file with mode: 0644]
releasenotes/notes/ha-by-default-55326e699ee8602c.yaml [new file with mode: 0644]
releasenotes/source/index.rst
releasenotes/source/ocata.rst [new file with mode: 0644]
roles_data.yaml
tools/yaml-validate.py

index b0b7ceb..68fdd0e 100644 (file)
@@ -124,3 +124,7 @@ and should be executed according to the following table:
 +----------------+-------------+-------------+-------------+-------------+-----------------+
 | congress       |      X      |             |             |             |                 |
 +----------------+-------------+-------------+-------------+-------------+-----------------+
+| cephmds        |             |             |             |      X      |                 |
++----------------+-------------+-------------+-------------+-------------+-----------------+
+| manila         |             |             |             |      X      |                 |
++----------------+-------------+-------------+-------------+-------------+-----------------+
index f35a080..03065c6 100644 (file)
@@ -65,6 +65,7 @@
     - OS::TripleO::Services::Core
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::RabbitMQ
     - OS::TripleO::Services::HAproxy
     - OS::TripleO::Services::Keepalived
diff --git a/ci/environments/multinode-core.yaml b/ci/environments/multinode-core.yaml
new file mode 100644 (file)
index 0000000..0c07a1b
--- /dev/null
@@ -0,0 +1,37 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack Core Service
+
+parameters:
+  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
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  Debug:
+    type: string
+    default: ''
+
+resources:
+
+outputs:
+  role_data:
+    description: Role data for the multinode firewall configuration
+    value:
+      service_name: multinode_core
+      config_settings:
+          tripleo.core.firewall_rules:
+            '999 core':
+              proto: 'udp'
+              dport:
+                - 4789
index 212f6a2..d89a494 100644 (file)
@@ -4,6 +4,8 @@ resource_registry:
 
 parameter_defaults:
   ControllerServices:
+    - OS::TripleO::Services::CephMon
+    - OS::TripleO::Services::CephOSD
     - OS::TripleO::Services::CinderApi
     - OS::TripleO::Services::CinderScheduler
     - OS::TripleO::Services::CinderVolume
@@ -15,6 +17,7 @@ parameter_defaults:
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
@@ -44,5 +47,9 @@ parameter_defaults:
     nova::compute::libvirt::libvirt_virt_type: qemu
     # Required for Centos 7.3 and Qemu 2.6.0
     nova::compute::libvirt::libvirt_cpu_mode: 'none'
+    #NOTE(gfidente): not great but we need this to deploy on ext4
+    #http://docs.ceph.com/docs/jewel/rados/configuration/filesystem-recommendations/
+    ceph::profile::params::osd_max_object_name_len: 256
+    ceph::profile::params::osd_max_object_namespace_len: 64
   SwiftCeilometerPipelineEnabled: False
   Debug: True
index 56d04de..6710fef 100644 (file)
@@ -1,12 +1,10 @@
 resource_registry:
   OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
   OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
-  OS::TripleO::Services::Core: multinode-core.yaml
 
 parameter_defaults:
   ControllerServices:
     - OS::TripleO::Services::CACerts
-    - OS::TripleO::Services::Core
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::Keystone
     - OS::TripleO::Services::GlanceApi
@@ -30,6 +28,7 @@ parameter_defaults:
     - OS::TripleO::Services::SaharaApi
     - OS::TripleO::Services::SaharaEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::RabbitMQ
     - OS::TripleO::Services::HAproxy
     - OS::TripleO::Services::Keepalived
index 72e2570..e09ca70 100644 (file)
@@ -1,6 +1,6 @@
 resource_registry:
-  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
-  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
+  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
+  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
   OS::TripleO::Services::CephMon: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-mon.yaml
   OS::TripleO::Services::CephOSD: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-osd.yaml
   OS::TripleO::Services::CephClient: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-client.yaml
@@ -19,6 +19,7 @@ parameter_defaults:
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
index bf4721e..3207d13 100644 (file)
@@ -1,6 +1,6 @@
 resource_registry:
-  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
-  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
+  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
+  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
   OS::TripleO::Services::BarbicanApi: ../../puppet/services/barbican-api.yaml
   OS::TripleO::Services::Zaqar: ../../puppet/services/zaqar.yaml
   OS::TripleO::Services::Ec2Api: ../../puppet/services/ec2-api.yaml
@@ -15,6 +15,7 @@ parameter_defaults:
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
index 9167010..1dc8b13 100644 (file)
@@ -1,6 +1,6 @@
 resource_registry:
-  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
-  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
+  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
+  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
   OS::TripleO::Services::SaharaApi: ../../puppet/services/sahara-api.yaml
   OS::TripleO::Services::SaharaEngine: ../../puppet/services/sahara-engine.yaml
   OS::TripleO::Services::MistralApi: ../../puppet/services/mistral-api.yaml
@@ -17,6 +17,7 @@ parameter_defaults:
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
index 87b10ca..dc05ab4 100644 (file)
@@ -1,16 +1,35 @@
 resource_registry:
-  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
-  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode-os-net-config.yaml
-  OS::TripleO::Services::CephMon: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-mon.yaml
-  OS::TripleO::Services::CephOSD: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-osd.yaml
-  OS::TripleO::Services::CephClient: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-client.yaml
-  OS::TripleO::Services::CephRgw: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-rgw.yaml
+  OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
+  OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
+  OS::TripleO::Services::CephMds: ../../puppet/services/ceph-mds.yaml
+  OS::TripleO::Services::CephMon: ../../puppet/services/ceph-mon.yaml
+  OS::TripleO::Services::CephOSD: ../../puppet/services/ceph-osd.yaml
+  OS::TripleO::Services::CephRgw: ../../puppet/services/ceph-rgw.yaml
   OS::TripleO::Services::SwiftProxy: OS::Heat::None
   OS::TripleO::Services::SwiftStorage: OS::Heat::None
   OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
+  OS::TripleO::Services::ManilaApi: ../../puppet/services/manila-api.yaml
+  OS::TripleO::Services::ManilaScheduler: ../../puppet/services/manila-scheduler.yaml
+  OS::TripleO::Services::ManilaShare: ../../puppet/services/pacemaker/manila-share.yaml
+  OS::TripleO::Services::ManilaBackendCephFs: ../../puppet/services/manila-backend-cephfs.yaml
+  # These enable Pacemaker
+  OS::TripleO::Tasks::ControllerPrePuppet: ../../extraconfig/tasks/pre_puppet_pacemaker.yaml
+  OS::TripleO::Tasks::ControllerPostPuppet: ../../extraconfig/tasks/post_puppet_pacemaker.yaml
+  OS::TripleO::Tasks::ControllerPostPuppetRestart: ../../extraconfig/tasks/post_puppet_pacemaker_restart.yaml
+  OS::TripleO::Services::RabbitMQ: ../../puppet/services/pacemaker/rabbitmq.yaml
+  OS::TripleO::Services::HAproxy: ../../puppet/services/pacemaker/haproxy.yaml
+  OS::TripleO::Services::Pacemaker: ../../puppet/services/pacemaker.yaml
+  OS::TripleO::Services::Redis: ../../puppet/services/pacemaker/database/redis.yaml
+  OS::TripleO::Services::MySQL: ../../puppet/services/pacemaker/database/mysql.yaml
+  OS::TripleO::Services::Keepalived: OS::Heat::None
+
 
 parameter_defaults:
   ControllerServices:
+    - OS::TripleO::Services::CephMds
+    - OS::TripleO::Services::CephMon
+    - OS::TripleO::Services::CephOSD
+    - OS::TripleO::Services::CephRgw
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::Keystone
     - OS::TripleO::Services::GlanceApi
@@ -19,6 +38,7 @@ parameter_defaults:
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
@@ -28,6 +48,10 @@ parameter_defaults:
     - OS::TripleO::Services::RabbitMQ
     - OS::TripleO::Services::HAproxy
     - OS::TripleO::Services::Keepalived
+    - OS::TripleO::Services::ManilaApi
+    - OS::TripleO::Services::ManilaScheduler
+    - OS::TripleO::Services::ManilaBackendCephFs
+    - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
     - OS::TripleO::Services::Pacemaker
     - OS::TripleO::Services::NovaConductor
@@ -40,10 +64,6 @@ parameter_defaults:
     - OS::TripleO::Services::Timezone
     - OS::TripleO::Services::NovaCompute
     - OS::TripleO::Services::NovaLibvirt
-    - OS::TripleO::Services::CephMon
-    - OS::TripleO::Services::CephOSD
-    - OS::TripleO::Services::CephClient
-    - OS::TripleO::Services::CephRgw
     - OS::TripleO::Services::TripleoPackages
     - OS::TripleO::Services::TripleoFirewall
   ControllerExtraConfig:
index a188fd1..ebdfea1 100644 (file)
@@ -118,6 +118,18 @@ resources:
       ram: 512
       vcpus: 1
 
+  manila_share_type:
+    type: OS::Manila::ShareType
+    properties:
+      name: default
+      driver_handles_share_servers: false
+
+  manila_share:
+    type: OS::Manila::Share
+    properties:
+      share_protocol: CEPHFS
+      size: 1
+
 outputs:
   server1_private_ip:
     description: IP address of server1 in private network
index a4a3d66..e699841 100644 (file)
@@ -94,7 +94,9 @@ rm -f /etc/httpd/conf.d/ssl.conf
 # Set up FreeIPA
 ipa-server-install -U -r `hostname -d|tr "[a-z]" "[A-Z]"` \
                    -p $DirectoryManagerPassword -a $AdminPassword \
-                   --hostname `hostname -f`
+                   --hostname `hostname -f` \
+                   --ip-address=$FreeIPAIP \
+                   --setup-dns --auto-forwarders --auto-reverse
 
 # Authenticate
 echo $AdminPassword | kinit admin
index 9795a00..04da556 100644 (file)
@@ -41,6 +41,7 @@
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
index 2d56081..fe87ce7 100755 (executable)
@@ -72,7 +72,9 @@ with open(config_file) as f:
 
 configs = {}
 
-for service in json_data:
+for service in (json_data or []):
+    if service is None:
+        continue
     config_volume = service[0] or ''
     puppet_tags = service[1] or ''
     manifest = service[2] or ''
index c125423..3473f4c 100644 (file)
@@ -29,6 +29,66 @@ parameters:
 
 resources:
 
+  # These utility tasks use docker-puppet.py to execute tasks via puppet
+  # We only execute these on the first node in the primary role
+  {{primary_role_name}}DockerPuppetTasks:
+    type: OS::Heat::Value
+    properties:
+      type: json
+      value:
+        yaql:
+          expression:
+            dict($.data.docker_puppet_tasks.where($1 != null).selectMany($.items()).groupBy($[0], $[1]))
+          data:
+            docker_puppet_tasks: {get_param: [role_data, {{primary_role_name}}, docker_puppet_tasks]}
+
+# BEGIN primary_role_name docker-puppet-tasks (run only on a single node)
+{% for step in range(1, 6) %}
+
+  {{primary_role_name}}DockerPuppetJsonConfig{{step}}:
+      type: OS::Heat::StructuredConfig
+      properties:
+        group: json-file
+        config:
+          /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json:
+            {get_attr: [{{primary_role_name}}DockerPuppetTasks, value, 'step_{{step}}']}
+
+  {{primary_role_name}}DockerPuppetJsonDeployment{{step}}:
+    type: OS::Heat::SoftwareDeployment
+    properties:
+      server: {get_param: [servers, {{primary_role_name}}, '0']}
+      config: {get_resource: {{primary_role_name}}DockerPuppetJsonConfig{{step}}}
+
+  {{primary_role_name}}DockerPuppetTasksConfig{{step}}:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: script
+      config: {get_file: docker-puppet.py}
+      inputs:
+        - name: CONFIG
+        - name: NET_HOST
+        - name: NO_ARCHIVE
+
+  {{primary_role_name}}DockerPuppetTasksDeployment{{step}}:
+    type: OS::Heat::SoftwareDeployment
+    depends_on:
+      {% for dep in roles %}
+      - {{dep.name}}Deployment_Step{{step}}
+      - {{dep.name}}ContainersDeployment_Step{{step}}
+      {% endfor %}
+      - {{primary_role_name}}DockerPuppetJsonDeployment{{step}}
+    properties:
+      name: {{primary_role_name}}DockerPuppetJsonDeployment{{step}}
+      server: {get_param: [servers, {{primary_role_name}}, '0']}
+      config: {get_resource: {{primary_role_name}}DockerPuppetTasksConfig{{step}}}
+      input_values:
+        CONFIG: /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json
+        NET_HOST: 'true'
+        NO_ARCHIVE: 'true'
+
+{% endfor %}
+# END primary_role_name docker-puppet-tasks
+
 {% for role in roles %}
   # Post deployment steps for all roles
   # A single config is re-applied with an incrementing step number
@@ -165,10 +225,11 @@ resources:
     depends_on: [{{role.name}}PreConfig, {{role.name}}ArtifactsDeploy]
   {% else %}
     depends_on:
-    {% for dep in roles %}
+      {% for dep in roles %}
       - {{dep.name}}Deployment_Step{{step -1}}
       - {{dep.name}}ContainersDeployment_Step{{step -1}}
-    {% endfor %}
+      {% endfor %}
+      - {{primary_role_name}}DockerPuppetTasksDeployment{{step -1}}
   {% endif %}
     properties:
       name: {{role.name}}Deployment_Step{{step}}
@@ -201,11 +262,12 @@ resources:
       - {{role.name}}GenerateConfigDeployment
   {% else %}
     depends_on:
-      {% for dep in roles %}
+        {% for dep in roles %}
         - {{dep.name}}ContainersDeployment_Step{{step -1}}
         - {{dep.name}}Deployment_Step{{step}} # baremetal steps of the same level run first
         - {{dep.name}}Deployment_Step{{step -1}}
-      {% endfor %}
+        {% endfor %}
+        - {{primary_role_name}}DockerPuppetTasksDeployment{{step -1}}
   {% endif %}
     properties:
       name: {{role.name}}ContainersDeployment_Step{{step}}
@@ -220,6 +282,7 @@ resources:
     depends_on:
   {% for dep in roles %}
       - {{dep.name}}Deployment_Step5
+      - {{primary_role_name}}DockerPuppetTasksDeployment5
   {% endfor %}
     properties:
       servers:  {get_param: servers}
index edaa5ee..881a2a3 100644 (file)
@@ -19,8 +19,11 @@ Building Kolla Images
 
 TripleO currently relies on Kolla docker containers. Kolla supports container
 customization and we are making use of this feature within TripleO to inject
-puppet (our configuration tool of choice) into the Kolla base images. To
-build Kolla images for TripleO adjust your kolla config to build your
+puppet (our configuration tool of choice) into the Kolla base images. The
+undercloud nova-scheduler also requires openstack-tripleo-common to
+provide custom filters.
+
+To build Kolla images for TripleO adjust your kolla config to build your
 centos base image with puppet using the example below:
 
 .. code-block::
@@ -28,6 +31,7 @@ centos base image with puppet using the example below:
 $ cat template-overrides.j2
 {% extends parent_template %}
 {% set base_centos_binary_packages_append = ['puppet'] %}
+{% set nova_scheduler_packages_append = ['openstack-tripleo-common'] %}
 
 kolla-build --base centos --template-override template-overrides.j2
 
@@ -76,6 +80,13 @@ are re-asserted when applying latter ones.
    'docker_image' above but some containers share a common set of
    config files which are generated in a common base container.
 
+ * docker_puppet_tasks: This section provides data to drive the
+   docker-puppet.py tool directly. The task is executed only once
+   within the cluster (not on each node) and is useful for several
+   puppet snippets we require for initialization of things like
+   keystone endpoints, database users, etc. See docker-puppet.py
+   for formatting.
+
 Docker steps
 ------------
 Similar to baremetal docker containers are brought up in a stepwise manner.
diff --git a/docker/services/heat-api-cfn.yaml b/docker/services/heat-api-cfn.yaml
new file mode 100644 (file)
index 0000000..9363216
--- /dev/null
@@ -0,0 +1,90 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Heat API CFN service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerHeatApiCfnImage:
+    description: image
+    default: 'centos-binary-heat-api-cfn:latest'
+    type: string
+  # we configure all heat services in the same heat engine container
+  DockerHeatEngineImage:
+    description: image
+    default: 'centos-binary-heat-engine: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
+
+
+resources:
+
+  HeatBase:
+    type: ../../puppet/services/heat-api-cfn.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Heat API CFN role.
+    value:
+      service_name: {get_attr: [HeatBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [HeatBase, role_data, config_settings]
+          - apache::default_vhost: false
+      step_config: {get_attr: [HeatBase, role_data, step_config]}
+      service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &heat_api_cfn_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiCfnImage} ]
+      puppet_tags: heat_config,file,concat,file_line
+      config_volume: heat
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/heat_api_cfn.json:
+           command: /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+           config_files:
+           - dest: /etc/heat/heat.conf
+             owner: heat
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
+      docker_config:
+        step_4:
+          heat_api_cfn:
+            image: *heat_api_cfn_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /dev:/dev
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/heat-api.yaml b/docker/services/heat-api.yaml
new file mode 100644 (file)
index 0000000..2efabb6
--- /dev/null
@@ -0,0 +1,90 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Heat API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerHeatApiImage:
+    description: image
+    default: 'centos-binary-heat-api:latest'
+    type: string
+  # we configure all heat services in the same heat engine container
+  DockerHeatEngineImage:
+    description: image
+    default: 'centos-binary-heat-engine: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
+
+
+resources:
+
+  HeatBase:
+    type: ../../puppet/services/heat-api.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Heat API role.
+    value:
+      service_name: {get_attr: [HeatBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [HeatBase, role_data, config_settings]
+          - apache::default_vhost: false
+      step_config: {get_attr: [HeatBase, role_data, step_config]}
+      service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &heat_api_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiImage} ]
+      puppet_tags: heat_config,file,concat,file_line
+      config_volume: heat
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/heat_api.json:
+           command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+           config_files:
+           - dest: /etc/heat/heat.conf
+             owner: heat
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
+      docker_config:
+        step_4:
+          heat_api:
+            image: *heat_api_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /dev:/dev
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/heat-engine.yaml b/docker/services/heat-engine.yaml
new file mode 100644 (file)
index 0000000..db8c2be
--- /dev/null
@@ -0,0 +1,92 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Heat Engine service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerHeatEngineImage:
+    description: image
+    default: 'centos-binary-heat-engine: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
+
+
+resources:
+
+  HeatBase:
+    type: ../../puppet/services/heat-engine.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Heat Engine role.
+    value:
+      service_name: {get_attr: [HeatBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [HeatBase, role_data, config_settings]
+          - apache::default_vhost: false
+      step_config: {get_attr: [HeatBase, role_data, step_config]}
+      service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &heat_engine_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
+      puppet_tags: heat_config,file,concat,file_line
+      config_volume: heat
+      config_image: *heat_engine_image
+      kolla_config:
+         /var/lib/kolla/config_files/heat_engine.json:
+           command: /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+           config_files:
+           - dest: /etc/heat/heat.conf
+             owner: heat
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/heat/heat.conf
+      docker_config:
+        step_3:
+          heat_engine_db_sync:
+            image: *heat_engine_image
+            net: host
+            privileged: false
+            detach: false
+            volumes:
+              - /var/lib/config-data/heat/etc/heat:/etc/heat:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            command: ['heat-manage', 'db_sync']
+        step_4:
+          heat_engine:
+            image: *heat_engine_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/heat/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/ironic-api.yaml b/docker/services/ironic-api.yaml
new file mode 100644 (file)
index 0000000..8012056
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Ironic API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerIronicApiImage:
+    description: image
+    default: 'centos-binary-ironic-api:latest'
+    type: string
+  DockerIronicConfigImage:
+    description: image
+    default: 'centos-binary-ironic-pxe: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
+
+resources:
+
+  IronicApiBase:
+    type: ../../puppet/services/ironic-api.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Ironic API role.
+    value:
+      service_name: {get_attr: [IronicApiBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [IronicApiBase, role_data, config_settings]
+      step_config: {get_attr: [IronicApiBase, role_data, step_config]}
+      service_config_settings: {get_attr: [IronicApiBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &ironic_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicApiImage} ]
+      puppet_tags: ironic_config
+      config_volume: ironic
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/ironic_api.json:
+           command: /usr/bin/ironic-api
+           config_files:
+           - dest: /etc/ironic/ironic.conf
+             owner: ironic
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/ironic/ironic.conf
+      docker_config:
+        step_3:
+          ironic_db_sync:
+            image: *ironic_image
+            net: host
+            privileged: false
+            detach: false
+            volumes:
+              - /var/lib/config-data/ironic/etc/:/etc/:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+            command: ['ironic-dbsync', '--config-file', '/etc/ironic/ironic.conf']
+        step_4:
+          ironic_api:
+            start_order: 10
+            image: *ironic_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/ironic_api.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/ironic/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/ironic-conductor.yaml b/docker/services/ironic-conductor.yaml
new file mode 100644 (file)
index 0000000..945ef3f
--- /dev/null
@@ -0,0 +1,111 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Ironic Conductor service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerIronicConductorImage:
+    description: image
+    default: 'centos-binary-ironic-conductor:latest'
+    type: string
+  DockerIronicConfigImage:
+    description: image
+    default: 'centos-binary-ironic-pxe: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
+
+resources:
+
+  IronicConductorBase:
+    type: ../../puppet/services/ironic-conductor.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Ironic Conductor role.
+    value:
+      service_name: {get_attr: [IronicConductorBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [IronicConductorBase, role_data, config_settings]
+          # to avoid hard linking errors we store these on the same
+          # volume/device as the ironic master_path
+          - ironic::drivers::pxe::tftp_root: /var/lib/ironic/tftpboot
+          - ironic::drivers::pxe::tftp_master_path: /var/lib/ironic/tftpboot/master_images
+          - ironic::pxe::tftp_root: /var/lib/ironic/tftpboot
+          - ironic::pxe::http_root: /var/lib/ironic/httpboot
+          - ironic::conductor::http_root: /var/lib/ironic/httpboot
+      step_config: {get_attr: [IronicConductorBase, role_data, step_config]}
+      service_config_settings: {get_attr: [IronicConductorBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &ironic_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
+      puppet_tags: ironic_config
+      config_volume: ironic
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/ironic_conductor.json:
+           command: /usr/bin/ironic-conductor
+           config_files:
+           - dest: /etc/ironic/ironic.conf
+             owner: ironic
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/ironic/ironic.conf
+           permissions:
+           - path: /var/lib/ironic/httpboot
+             owner: ironic:ironic
+             recurse: true
+           - path: /var/lib/ironic/tftpboot
+             owner: ironic:ironic
+             recurse: true
+      docker_config:
+        step_4:
+          ironic-init-dirs:
+            image: *ironic_image
+            user: root
+            command: ['/bin/bash', '-c', 'mkdir /var/lib/ironic/httpboot && mkdir /var/lib/ironic/tftpboot']
+            volumes:
+              - ironic:/var/lib/ironic
+          ironic_conductor:
+            start_order: 80
+            image: *ironic_image
+            net: host
+            privileged: true
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/ironic/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /lib/modules:/lib/modules:ro
+              - /sys:/sys
+              - /dev:/dev
+              - /run:/run #shared?
+              - ironic:/var/lib/ironic
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/ironic-pxe.yaml b/docker/services/ironic-pxe.yaml
new file mode 100644 (file)
index 0000000..bc7b467
--- /dev/null
@@ -0,0 +1,131 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Ironic PXE service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerIronicPxeImage:
+    description: image
+    default: 'centos-binary-ironic-pxe:latest'
+    type: string
+  DockerIronicConfigImage:
+    description: image
+    default: 'centos-binary-ironic-pxe: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
+
+outputs:
+  role_data:
+    description: Role data for the Ironic PXE role.
+    value:
+      service_name: ironic_pxe
+      config_settings: {}
+      step_config: ''
+      service_config_settings: {}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &ironic_pxe_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicPxeImage} ]
+      puppet_tags: ironic_config
+      config_volume: ironic
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/ironic_pxe_http.json:
+           command: /usr/sbin/httpd -DFOREGROUND
+           config_files:
+           - dest: /etc/ironic/ironic.conf
+             owner: ironic
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/ironic/ironic.conf
+           - dest: /etc/httpd/conf.d/10-ipxe_vhost.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf.d/10-ipxe_vhost.conf
+           - dest: /etc/httpd/conf/httpd.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf/httpd.conf
+           - dest: /etc/httpd/conf/ports.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf/ports.conf
+         /var/lib/kolla/config_files/ironic_pxe_tftp.json:
+           command: /usr/sbin/in.tftpd --foreground --user root --address 0.0.0.0:69 --map-file /var/lib/ironic/tftpboot/map-file /var/lib/ironic/tftpboot
+           config_files:
+           - dest: /etc/ironic/ironic.conf
+             owner: ironic
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/ironic/ironic.conf
+           - dest: /var/lib/ironic/tftpboot/chain.c32
+             owner: ironic
+             perm: '0744'
+             source: /var/lib/kolla/config_files/src/var/lib/ironic/tftpboot/chain.c32
+           - dest: /var/lib/ironic/tftpboot/pxelinux.0
+             owner: ironic
+             perm: '0744'
+             source: /var/lib/kolla/config_files/src/var/lib/ironic/tftpboot/pxelinux.0
+           - dest: /var/lib/ironic/tftpboot/ipxe.efi
+             owner: ironic
+             perm: '0744'
+             source: /var/lib/kolla/config_files/src/var/lib/ironic/tftpboot/ipxe.efi
+           - dest: /var/lib/ironic/tftpboot/undionly.kpxe
+             owner: ironic
+             perm: '0744'
+             source: /var/lib/kolla/config_files/src/var/lib/ironic/tftpboot/undionly.kpxe
+           - dest: /var/lib/ironic/tftpboot/map-file
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/var/lib/ironic/tftpboot/map-file
+      docker_config:
+        step_4:
+          ironic_pxe_tftp:
+            start_order: 90
+            image: *ironic_pxe_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/ironic_pxe_tftp.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/ironic/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /dev/log:/dev/log
+              - ironic:/var/lib/ironic/
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+          ironic_pxe_http:
+            start_order: 91
+            image: *ironic_pxe_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/ironic_pxe_http.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/ironic/:/var/lib/kolla/config_files/src:ro
+              - /var/lib/config-data/ironic/etc/httpd/conf.modules.d:/etc/httpd/conf.modules.d:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - ironic:/var/lib/ironic/
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/memcached.yaml b/docker/services/memcached.yaml
new file mode 100644 (file)
index 0000000..d459c82
--- /dev/null
@@ -0,0 +1,69 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Memcached services
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerMemcachedImage:
+    description: image
+    default: 'centos-binary-memcached: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
+
+resources:
+
+  MemcachedBase:
+    type: ../../puppet/services/memcached.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Memcached API role.
+    value:
+      service_name: {get_attr: [MemcachedBase, role_data, service_name]}
+      config_settings: {get_attr: [MemcachedBase, role_data, config_settings]}
+      step_config: {get_attr: [MemcachedBase, role_data, step_config]}
+      service_config_settings: {get_attr: [MemcachedBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &memcached_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMemcachedImage} ]
+      puppet_tags: 'file'
+      config_volume: 'memcached'
+      config_image: *memcached_image
+      kolla_config: {}
+      docker_config:
+        step_1:
+          memcached:
+            image: *memcached_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS']
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/mistral-api.yaml b/docker/services/mistral-api.yaml
new file mode 100644 (file)
index 0000000..e535a81
--- /dev/null
@@ -0,0 +1,115 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Mistral API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerMistralApiImage:
+    description: image
+    default: 'centos-binary-mistral-api:latest'
+    type: string
+  DockerMistralConfigImage:
+    description: image
+    default: 'centos-binary-mistral-api: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
+
+resources:
+
+  MistralApiBase:
+    type: ../../puppet/services/mistral-api.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Mistral API role.
+    value:
+      service_name: {get_attr: [MistralApiBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [MistralApiBase, role_data, config_settings]
+      step_config: {get_attr: [MistralApiBase, role_data, step_config]}
+      service_config_settings: {get_attr: [MistralApiBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &mistral_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ]
+      puppet_tags: mistral_config
+      config_volume: mistral
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/mistral_api.json:
+           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api
+           config_files:
+           - dest: /etc/mistral/mistral.conf
+             owner: mistral
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
+      docker_config:
+        step_3:
+          mistral_db_sync:
+            start_order: 1
+            image: *mistral_image
+            net: host
+            privileged: false
+            detach: false
+            volumes:
+              - /var/lib/config-data/mistral/etc/:/etc/:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+            command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'upgrade', 'head']
+          mistral_db_populate:
+            start_order: 2
+            image: *mistral_image
+            net: host
+            privileged: false
+            detach: false
+            volumes:
+              - /var/lib/config-data/mistral/etc/:/etc/:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+            # NOTE: dprince this requires that we install openstack-tripleo-common into
+            # the Mistral API image so that we get tripleo* actions
+            command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'populate']
+        step_4:
+          mistral_api:
+            start_order: 15
+            image: *mistral_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/mistral-engine.yaml b/docker/services/mistral-engine.yaml
new file mode 100644 (file)
index 0000000..be4c8af
--- /dev/null
@@ -0,0 +1,87 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Mistral Engine service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerMistralEngineImage:
+    description: image
+    default: 'centos-binary-mistral-engine:latest'
+    type: string
+  DockerMistralConfigImage:
+    description: image
+    default: 'centos-binary-mistral-api: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
+
+
+resources:
+
+  MistralBase:
+    type: ../../puppet/services/mistral-engine.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Mistral Engine role.
+    value:
+      service_name: {get_attr: [MistralBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [MistralBase, role_data, config_settings]
+      step_config: {get_attr: [MistralBase, role_data, step_config]}
+      service_config_settings: {get_attr: [MistralBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &mistral_engine_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralEngineImage} ]
+      puppet_tags: mistral_config
+      config_volume: mistral
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/mistral_engine.json:
+           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/engine.log --server=engine
+           config_files:
+           - dest: /etc/mistral/mistral.conf
+             owner: mistral
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
+      docker_config:
+        step_4:
+          mistral_engine:
+            image: *mistral_engine_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/mistral-executor.yaml b/docker/services/mistral-executor.yaml
new file mode 100644 (file)
index 0000000..33608a4
--- /dev/null
@@ -0,0 +1,91 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Mistral Executor service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerMistralExecutorImage:
+    description: image
+    default: 'centos-binary-mistral-executor:latest'
+    type: string
+  DockerMistralConfigImage:
+    description: image
+    default: 'centos-binary-mistral-api: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
+
+
+resources:
+
+  MistralBase:
+    type: ../../puppet/services/mistral-executor.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Mistral Executor role.
+    value:
+      service_name: {get_attr: [MistralBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [MistralBase, role_data, config_settings]
+      step_config: {get_attr: [MistralBase, role_data, step_config]}
+      service_config_settings: {get_attr: [MistralBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &mistral_executor_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ]
+      puppet_tags: mistral_config
+      config_volume: mistral
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/mistral_executor.json:
+           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor
+           config_files:
+           - dest: /etc/mistral/mistral.conf
+             owner: mistral
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
+      docker_config:
+        step_4:
+          mistral_executor:
+            image: *mistral_executor_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/mistral_executor.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              # FIXME: this is required in order for Nova cells
+              # initialization workflows on the Undercloud. Need to
+              # exclude this on the overcloud for security reasons.
+              - /var/lib/config-data/nova/etc/nova:/etc/nova:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/neutron-api.yaml b/docker/services/neutron-api.yaml
new file mode 100644 (file)
index 0000000..e444f39
--- /dev/null
@@ -0,0 +1,102 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Neutron API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNeutronApiImage:
+    description: image
+    default: 'centos-binary-neutron-server:latest'
+    type: string
+  # we configure all neutron services in the same neutron
+  DockerNeutronConfigImage:
+    description: image
+    default: 'centos-binary-neutron-openvswitch-agent: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
+
+resources:
+
+  NeutronBase:
+    type: ../../puppet/services/neutron-api.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron API role.
+    value:
+      service_name: {get_attr: [NeutronBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+      step_config: {get_attr: [NeutronBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &neutron_api_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
+      puppet_tags: neutron_config,neutron_api_config
+      config_volume: neutron
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/neutron_api.json:
+           command: /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini
+           config_files:
+           - dest: /etc/neutron/neutron.conf
+             owner: neutron
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/neutron/neutron.conf
+           - dest: /etc/neutron/plugin.ini
+             owner: neutron
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/neutron/plugins/ml2/ml2_conf.ini
+      docker_config:
+        step_3:
+          neutron_db_sync:
+            image: *neutron_api_image
+            net: host
+            privileged: false
+            detach: false
+            volumes:
+              - /var/lib/config-data/neutron/etc/neutron:/etc/neutron:ro
+              - /var/lib/config-data/neutron/usr/share/neutron:/usr/share/neutron:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            command: ['neutron-db-manage', 'upgrade', 'heads']
+        step_4:
+          neutron_api:
+            image: *neutron_api_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/neutron_api.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/neutron/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/neutron-dhcp.yaml b/docker/services/neutron-dhcp.yaml
new file mode 100644 (file)
index 0000000..fc13b3d
--- /dev/null
@@ -0,0 +1,93 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Neutron DHCP service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNeutronApiImage:
+    description: image
+    default: 'centos-binary-neutron-dhcp-agent:latest'
+    type: string
+  # we configure all neutron services in the same neutron
+  DockerNeutronConfigImage:
+    description: image
+    default: 'centos-binary-neutron-openvswitch-agent: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
+
+resources:
+
+  NeutronBase:
+    type: ../../puppet/services/neutron-dhcp.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron DHCP role.
+    value:
+      service_name: {get_attr: [NeutronBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+      step_config: {get_attr: [NeutronBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &neutron_dhcp_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
+      puppet_tags: neutron_config,neutron_dhcp_agent_config
+      config_volume: neutron
+      config_image:
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/neutron_dhcp.json:
+           command: /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file /var/log/neutron/dhcp-agent.log
+           config_files:
+           - dest: /etc/neutron/neutron.conf
+             owner: neutron
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/neutron/neutron.conf
+           - dest: /etc/neutron/dhcp_agent.ini
+             owner: neutron
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/neutron/dhcp_agent.ini
+      docker_config:
+        step_4:
+          neutron_dhcp:
+            image: *neutron_dhcp_image
+            net: host
+            pid: host
+            privileged: true
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/neutron_dhcp.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/neutron/:/var/lib/kolla/config_files/src:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /lib/modules:/lib/modules:ro
+              - /run/:/run
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/neutron-plugin-ml2.yaml b/docker/services/neutron-plugin-ml2.yaml
new file mode 100644 (file)
index 0000000..37ab8db
--- /dev/null
@@ -0,0 +1,58 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Neutron ML2 Plugin configured with Puppet
+
+parameters:
+  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
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNeutronConfigImage:
+    description: image
+    default: 'centos-binary-neutron-openvswitch-agent:latest'
+    type: string
+  DefaultPasswords:
+    default: {}
+    type: json
+
+resources:
+
+  NeutronBase:
+    type: ../../puppet/services/neutron-plugin-ml2.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron ML2 Plugin role.
+    value:
+      service_name: {get_attr: [NeutronBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+      step_config: {get_attr: [NeutronBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NeutronBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &docker_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
+      puppet_tags: ''
+      config_volume: 'neutron'
+      config_image: *docker_image
+      kolla_config: {}
+      docker_config: {}
diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml
new file mode 100644 (file)
index 0000000..26ae514
--- /dev/null
@@ -0,0 +1,134 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNovaApiImage:
+    description: image
+    default: 'centos-binary-nova-api:latest'
+    type: string
+  DockerNovaBaseImage:
+    description: image
+    default: 'centos-binary-nova-base: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
+
+resources:
+
+  NovaApiBase:
+    type: ../../puppet/services/nova-api.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Nova API role.
+    value:
+      service_name: {get_attr: [NovaApiBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NovaApiBase, role_data, config_settings]
+          - apache::default_vhost: false
+      step_config: {get_attr: [NovaApiBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &nova_api_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
+      puppet_tags: nova_config
+      config_volume: nova
+      config_image:
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/nova_api.json:
+           command: /usr/bin/nova-api
+           config_files:
+           - dest: /etc/nova/nova.conf
+             owner: nova
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
+      docker_config:
+        step_3:
+          nova_api_db_sync:
+            start_order: 1
+            image: *nova_api_image
+            net: host
+            detach: false
+            volumes: &nova_api_volumes
+              - /var/lib/config-data/nova/etc/:/etc/:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            command: ['/usr/bin/nova-manage', 'api_db', 'sync']
+          # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
+          # to be capable of upgrading a baremetal setup. This is to ensure the name
+          # of the cell is 'default'
+          nova_api_map_cell0:
+            start_order: 2
+            image: *nova_api_image
+            net: host
+            detach: false
+            volumes: *nova_api_volumes
+            command:
+              - '/usr/bin/nova-manage'
+              - 'cell_v2'
+              - 'map_cell0'
+          nova_api_create_default_cell:
+            start_order: 3
+            image: *nova_api_image
+            net: host
+            detach: false
+            volumes: *nova_api_volumes
+            # NOTE: allowing the exit code 2 is a dirty way of making
+            # this idempotent (if the resource already exists a conflict
+            # is raised)
+            exit_codes: [0,2]
+            command:
+              - '/usr/bin/nova-manage'
+              - 'cell_v2'
+              - 'create_cell'
+              - '--name="default"'
+          nova_db_sync:
+            start_order: 4
+            image: *nova_api_image
+            net: host
+            detach: false
+            volumes: *nova_api_volumes
+            command: ['/usr/bin/nova-manage', 'db', 'sync']
+        step_4:
+          nova_api:
+            start_order: 2
+            image: *nova_api_image
+            net: host
+            user: nova
+            privileged: true
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/nova/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
index 8eebc39..570df95 100644 (file)
@@ -64,6 +64,7 @@ outputs:
              perm: '0600'
              source: /var/lib/kolla/config_files/src/etc/nova/rootwrap.conf
       docker_config:
+        # FIXME: run discover hosts here
         step_4:
           novacompute:
             image: *nova_compute_image
diff --git a/docker/services/nova-conductor.yaml b/docker/services/nova-conductor.yaml
new file mode 100644 (file)
index 0000000..aa009b4
--- /dev/null
@@ -0,0 +1,85 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova Conductor service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNovaConductorImage:
+    description: image
+    default: 'centos-binary-nova-conductor:latest'
+    type: string
+  DockerNovaBaseImage:
+    description: image
+    default: 'centos-binary-nova-base: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
+
+
+resources:
+
+  NovaConductorBase:
+    type: ../../puppet/services/nova-conductor.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Conductor service.
+    value:
+      service_name: {get_attr: [NovaConductorBase, role_data, service_name]}
+      config_settings: {get_attr: [NovaConductorBase, role_data, config_settings]}
+      step_config: {get_attr: [NovaConductorBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NovaConductorBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &nova_conductor_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConductorImage} ]
+      puppet_tags: nova_config
+      config_volume: nova
+      config_image:
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/nova_conductor.json:
+           command: /usr/bin/nova-conductor
+           config_files:
+           - dest: /etc/nova/nova.conf
+             owner: nova
+             perm: '0600'
+             source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
+      docker_config:
+        step_4:
+          nova_conductor:
+            image: *nova_conductor_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/nova_conductor.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/nova/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/nova-ironic.yaml b/docker/services/nova-ironic.yaml
new file mode 100644 (file)
index 0000000..c1858de
--- /dev/null
@@ -0,0 +1,88 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova Ironic Compute service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNovaComputeImage:
+    description: image
+    default: 'centos-binary-nova-compute-ironic:latest'
+    type: string
+  DockerNovaBaseImage:
+    description: image
+    default: 'centos-binary-nova-base:latest'
+    type: string
+  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
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+resources:
+
+
+  NovaIronicBase:
+    type: ../../puppet/services/nova-ironic.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Compute service.
+    value:
+      service_name: {get_attr: [NovaIronicBase, role_data, service_name]}
+      config_settings: {get_attr: [NovaIronicBase, role_data, config_settings]}
+      step_config: {get_attr: [NovaIronicBase, role_data, step_config]}
+      puppet_tags: nova_config,nova_paste_api_ini
+      docker_image: &nova_ironic_image
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
+      config_volume: nova
+      config_image:
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+      kolla_config:
+        /var/lib/kolla/config_files/nova_ironic.json:
+           command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
+           config_files:
+           - dest: /etc/nova/nova.conf
+             owner: nova
+             perm: '0600'
+             source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
+           - dest: /etc/nova/rootwrap.conf
+             owner: nova
+             perm: '0600'
+             source: /var/lib/kolla/config_files/src/etc/nova/rootwrap.conf
+      docker_config:
+        step_5:
+          novacompute:
+            image: *nova_ironic_image
+            net: host
+            privileged: true
+            user: root
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/nova:/var/lib/kolla/config_files/src:ro
+              - /etc/localtime:/etc/localtime:ro
+              - /run:/run
+              - /dev:/dev
+              - /etc/iscsi:/etc/iscsi
+              - nova_compute:/var/lib/nova/
+            environment:
+             - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/nova-metadata.yaml b/docker/services/nova-metadata.yaml
new file mode 100644 (file)
index 0000000..a4baaa2
--- /dev/null
@@ -0,0 +1,48 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova Metadata service
+
+parameters:
+  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
+
+
+resources:
+
+  NovaMetadataBase:
+    type: ../../puppet/services/nova-metadata.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Metadata service.
+    value:
+      service_name: {get_attr: [NovaMetadataBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NovaMetadataBase, role_data, config_settings]
+      step_config: {get_attr: [NovaMetadataBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NovaMetadataBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: ''
+      puppet_tags: ''
+      config_volume: ''
+      config_image: ''
+      kolla_config: {}
+      docker_config: {}
diff --git a/docker/services/nova-placement.yaml b/docker/services/nova-placement.yaml
new file mode 100644 (file)
index 0000000..f0f7d72
--- /dev/null
@@ -0,0 +1,101 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova Placement API service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNovaPlacementImage:
+    description: image
+    default: 'centos-binary-nova-placement-api'
+    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
+
+resources:
+
+  NovaPlacementBase:
+    type: ../../puppet/services/nova-placement.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Placement API role.
+    value:
+      service_name: {get_attr: [NovaPlacementBase, role_data, service_name]}
+      config_settings:
+        map_merge:
+          - get_attr: [NovaPlacementBase, role_data, config_settings]
+          - apache::default_vhost: false
+      step_config: {get_attr: [NovaPlacementBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NovaPlacementBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &nova_placement_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
+      puppet_tags: nova_config
+      config_volume: nova_placement
+      config_image:
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/nova_placement.json:
+           command: /usr/sbin/httpd -DFOREGROUND
+           config_files:
+           - dest: /etc/nova/nova.conf
+             owner: nova
+             perm: '0640'
+             source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
+           - dest: /etc/httpd/conf.d/10-placement_wsgi.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf.d/10-placement_wsgi.conf
+           - dest: /etc/httpd/conf/httpd.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf/httpd.conf
+           - dest: /etc/httpd/conf/ports.conf
+             owner: root
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/etc/httpd/conf/ports.conf
+           - dest: /var/www/cgi-bin/nova/nova-placement-api
+             owner: nova
+             perm: '0644'
+             source: /var/lib/kolla/config_files/src/var/www/cgi-bin/nova/nova-placement-api
+      docker_config:
+        # start this early so it is up before computes start reporting
+        step_3:
+          nova_placement:
+            start_order: 1
+            image: *nova_placement_image
+            net: host
+            user: root
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/nova_placement.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/nova_placement/:/var/lib/kolla/config_files/src:ro
+              - /var/lib/config-data/nova_placement/etc/httpd/conf.modules.d:/etc/httpd/conf.modules.d:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/nova-scheduler.yaml b/docker/services/nova-scheduler.yaml
new file mode 100644 (file)
index 0000000..a1a98b4
--- /dev/null
@@ -0,0 +1,84 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Nova Scheduler service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerNovaSchedulerImage:
+    description: image
+    default: 'centos-binary-nova-scheduler:latest'
+    type: string
+  DockerNovaBaseImage:
+    description: image
+    default: 'centos-binary-nova-base: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
+
+resources:
+
+  NovaSchedulerBase:
+    type: ../../puppet/services/nova-scheduler.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Nova Scheduler service.
+    value:
+      service_name: {get_attr: [NovaSchedulerBase, role_data, service_name]}
+      config_settings: {get_attr: [NovaSchedulerBase, role_data, config_settings]}
+      step_config: {get_attr: [NovaSchedulerBase, role_data, step_config]}
+      service_config_settings: {get_attr: [NovaSchedulerBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &nova_scheduler_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaSchedulerImage} ]
+      puppet_tags: nova_config
+      config_volume: nova
+      config_image:
+        list_join:
+        - '/'
+        - [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
+      kolla_config:
+         /var/lib/kolla/config_files/nova_scheduler.json:
+           command: /usr/bin/nova-scheduler
+           config_files:
+           - dest: /etc/nova/nova.conf
+             owner: nova
+             perm: '0600'
+             source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
+      docker_config:
+        step_4:
+          nova_scheduler:
+            image: *nova_scheduler_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /run:/run
+              - /var/lib/kolla/config_files/nova_scheduler.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/nova/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/rabbitmq.yaml b/docker/services/rabbitmq.yaml
new file mode 100644 (file)
index 0000000..cea3d8a
--- /dev/null
@@ -0,0 +1,119 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Rabbitmq service
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerRabbitmqImage:
+    description: image
+    default: 'centos-binary-rabbitmq: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
+  RabbitCookie:
+    type: string
+    default: ''
+    hidden: true
+
+resources:
+
+  RabbitmqBase:
+    type: ../../puppet/services/rabbitmq.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Rabbitmq API role.
+    value:
+      service_name: {get_attr: [RabbitmqBase, role_data, service_name]}
+      config_settings: {get_attr: [RabbitmqBase, role_data, config_settings]}
+      step_config: {get_attr: [RabbitmqBase, role_data, step_config]}
+      service_config_settings: {get_attr: [RabbitmqBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &rabbitmq_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerRabbitmqImage} ]
+      puppet_tags: file
+      config_volume: rabbitmq
+      config_image: *rabbitmq_image
+      kolla_config:
+        /var/lib/kolla/config_files/rabbitmq.json:
+          command: /usr/lib/rabbitmq/bin/rabbitmq-server
+          config_files:
+          - dest: /etc/rabbitmq/rabbitmq.config
+            owner: root
+            perm: '0644'
+            source: /var/lib/kolla/config_files/src/etc/rabbitmq/rabbitmq.config
+          - dest: /etc/rabbitmq/enabled_plugins
+            owner: root
+            perm: '0644'
+            source: /var/lib/kolla/config_files/src/etc/rabbitmq/enabled_plugins
+          - dest: /etc/rabbitmq/rabbitmq-env.conf
+            owner: root
+            perm: '0644'
+            source: /var/lib/kolla/config_files/src/etc/rabbitmq/rabbitmq-env.conf
+          - dest: /etc/rabbitmq/rabbitmqadmin.conf
+            owner: root
+            perm: '0644'
+            source: /var/lib/kolla/config_files/src/etc/rabbitmq/rabbitmqadmin.conf
+      docker_config:
+        step_1:
+          rabbitmq_bootstrap:
+            start_order: 0
+            image: *rabbitmq_image
+            net: host
+            privileged: false
+            volumes:
+              - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/rabbitmq/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - rabbitmq:/var/lib/rabbitmq/
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+              - KOLLA_BOOTSTRAP=True
+              - 
+                list_join:
+                  - '='
+                  - - 'RABBITMQ_CLUSTER_COOKIE'
+                    -
+                      yaql:
+                        expression: $.data.passwords.where($ != '').first()
+                        data:
+                          passwords:
+                            - {get_param: RabbitCookie}
+                            - {get_param: [DefaultPasswords, rabbit_cookie]}
+          rabbitmq:
+            start_order: 1
+            image: *rabbitmq_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/rabbitmq/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+              - rabbitmq:/var/lib/rabbitmq/
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
index 8e89902..cd9f4cb 100644 (file)
@@ -75,3 +75,5 @@ outputs:
         map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
       docker_config:
         {get_attr: [ServiceChain, role_data, docker_config]}
+      docker_puppet_tasks:
+        {get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
diff --git a/docker/services/zaqar.yaml b/docker/services/zaqar.yaml
new file mode 100644 (file)
index 0000000..9f248ce
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: ocata
+
+description: >
+  OpenStack containerized Zaqar services
+
+parameters:
+  DockerNamespace:
+    description: namespace
+    default: 'tripleoupstream'
+    type: string
+  DockerZaqarImage:
+    description: image
+    default: 'centos-binary-zaqar: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
+
+resources:
+
+  ZaqarBase:
+    type: ../../puppet/services/zaqar.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+
+outputs:
+  role_data:
+    description: Role data for the Zaqar API role.
+    value:
+      service_name: {get_attr: [ZaqarBase, role_data, service_name]}
+      config_settings: {get_attr: [ZaqarBase, role_data, config_settings]}
+      step_config: {get_attr: [ZaqarBase, role_data, step_config]}
+      service_config_settings: {get_attr: [ZaqarBase, role_data, service_config_settings]}
+      # BEGIN DOCKER SETTINGS
+      docker_image: &zaqar_image
+        list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
+      puppet_tags: zaqar_config
+      config_volume: zaqar
+      config_image: *zaqar_image
+      kolla_config:
+        /var/lib/kolla/config_files/zaqar.json:
+          command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
+          config_files:
+          - dest: /etc/zaqar/zaqar.conf
+            owner: zaqar
+            perm: '0640'
+            source: /var/lib/kolla/config_files/src/etc/zaqar/zaqar.conf
+        /var/lib/kolla/config_files/zaqar_websocket.json:
+          command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
+          config_files:
+          - dest: /etc/zaqar/zaqar.conf
+            owner: zaqar
+            perm: '0640'
+            source: /var/lib/kolla/config_files/src/etc/zaqar/zaqar.conf
+          - dest: /etc/zaqar/1.conf
+            owner: zaqar
+            perm: '0640'
+            source: /var/lib/kolla/config_files/src/etc/zaqar/1.conf
+      docker_config:
+        step_4:
+          zaqar:
+            image: *zaqar_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+          zaqar_websocket:
+            image: *zaqar_image
+            net: host
+            privileged: false
+            restart: always
+            volumes:
+              - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/zaqar/:/var/lib/kolla/config_files/src:ro
+              - /etc/hosts:/etc/hosts:ro
+              - /etc/localtime:/etc/localtime:ro
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/environments/deployed-server-pacemaker-environment.yaml b/environments/deployed-server-pacemaker-environment.yaml
new file mode 100644 (file)
index 0000000..85fa7d2
--- /dev/null
@@ -0,0 +1,4 @@
+resource_registry:
+  OS::TripleO::Tasks::ControllerDeployedServerPrePuppet: ../extraconfig/tasks/pre_puppet_pacemaker.yaml
+  OS::TripleO::Tasks::ControllerDeployedServerPostPuppet: ../extraconfig/tasks/post_puppet_pacemaker.yaml
+  OS::TripleO::Tasks::ControllerDeployedServerPostPuppetRestart: ../extraconfig/tasks/post_puppet_pacemaker_restart.yaml
index 37612b0..ca3715b 100644 (file)
@@ -5,6 +5,36 @@ resource_registry:
   OS::TripleO::Services::NovaLibvirt: ../docker/services/nova-libvirt.yaml
   OS::TripleO::Services::ComputeNeutronOvsAgent: ../docker/services/neutron-ovs-agent.yaml
   OS::TripleO::Services::NovaCompute: ../docker/services/nova-compute.yaml
+  OS::TripleO::Services::Keystone: ../docker/services/keystone.yaml
+  OS::TripleO::Services::GlanceApi: ../docker/services/glance-api.yaml
+  OS::TripleO::Services::HeatApi: ../docker/services/heat-api.yaml
+  OS::TripleO::Services::HeatApiCfn: ../docker/services/heat-api-cfn.yaml
+  OS::TripleO::Services::HeatEngine: ../docker/services/heat-engine.yaml
+  OS::TripleO::Services::NovaApi: ../docker/services/nova-api.yaml
+  OS::TripleO::Services::NovaPlacement: ../docker/services/nova-placement.yaml
+  OS::TripleO::Services::NovaConductor: ../docker/services/nova-conductor.yaml
+  OS::TripleO::Services::NovaScheduler: ../docker/services/nova-scheduler.yaml
+  # FIXME: these need to go into a environments/services-docker dir?
+  OS::TripleO::Services::NovaIronic: ../docker/services/nova-ironic.yaml
+  OS::TripleO::Services::IronicApi: ../docker/services/ironic-api.yaml
+  OS::TripleO::Services::IronicConductor: ../docker/services/ironic-conductor.yaml
+  OS::TripleO::Services::IronicPxe: ../docker/services/ironic-pxe.yaml
+  OS::TripleO::Services::NeutronServer: ../docker/services/neutron-api.yaml
+  OS::TripleO::Services::NeutronApi: ../docker/services/neutron-api.yaml
+  OS::TripleO::Services::NeutronCorePlugin: ../docker/services/neutron-plugin-ml2.yaml
+  OS::TripleO::Services::NeutronOvsAgent: ../docker/services/neutron-ovs-agent.yaml
+  OS::TripleO::Services::NeutronDhcpAgent: ../docker/services/neutron-dhcp.yaml
+  OS::TripleO::Services::MySQL: ../docker/services/database/mysql.yaml
+  OS::TripleO::Services::MistralApi: ../docker/services/mistral-api.yaml
+  OS::TripleO::Services::MistralEngine: ../docker/services/mistral-engine.yaml
+  OS::TripleO::Services::MistralExecutor: ../docker/services/mistral-executor.yaml
+  OS::TripleO::Services::Zaqar: ../docker/services/zaqar.yaml
+  OS::TripleO::Services::RabbitMQ: ../docker/services/rabbitmq.yaml
+  OS::TripleO::Services::MongoDb: ../docker/services/database/mongodb.yaml
+  OS::TripleO::Services::Memcached: ../docker/services/memcached.yaml
+  OS::TripleO::Services::SwiftProxy: ../docker/services/swift-proxy.yaml
+  OS::TripleO::Services::SwiftStorage: ../docker/services/swift-storage.yaml
+  OS::TripleO::Services::SwiftRingBuilder: ../docker/services/swift-ringbuilder.yaml
 
   OS::TripleO::PostDeploySteps: ../docker/post.yaml
   OS::TripleO::Services: ../docker/services/services.yaml
index 47b2003..3a60633 100644 (file)
@@ -11,8 +11,8 @@ parameter_defaults:
   SwiftWorkers: 1
   GnocchiMetricdWorkers: 1
 
-  ApacheMaxRequestWorkers: 32
-  ApacheServerLimit: 32
+  ApacheMaxRequestWorkers: 100
+  ApacheServerLimit: 100
 
   ControllerExtraConfig:
       'nova::network::neutron::neutron_url_timeout': '60'
index 4283b21..9e3cddb 100644 (file)
@@ -1,2 +1,15 @@
 resource_registry:
   OS::TripleO::PostDeploySteps: ../puppet/major_upgrade_steps.yaml
+parameter_defaults:
+  UpgradeLevelNovaCompute: auto
+  UpgradeInitCommonCommand: |
+    #!/bin/bash
+    # Newton to Ocata, we need to remove old hiera hook data and
+    # install ansible heat agents and ansible-pacemaker
+    set -eu
+    yum install -y python-heat-agent-*
+    yum install -y ansible-pacemaker
+    rm -f /usr/libexec/os-apply-config/templates/etc/puppet/hiera.yaml
+    rm -f /usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles
+    rm -f /etc/puppet/hieradata/*.yaml
+
diff --git a/environments/major-upgrade-converge.yaml b/environments/major-upgrade-converge.yaml
new file mode 100644 (file)
index 0000000..f09fb20
--- /dev/null
@@ -0,0 +1,7 @@
+# Use this to reset any mappings only used for upgrades after the
+# update of all nodes is completed
+resource_registry:
+  OS::TripleO::PostDeploySteps: ../puppet/post.yaml
+parameter_defaults:
+  UpgradeLevelNovaCompute: ''
+  UpgradeInitCommonCommand: ''
index e08b2b2..ed7292b 100644 (file)
@@ -10,4 +10,4 @@ resource_registry:
 parameter_defaults:
   NeutronEnableForceMetadata: true
   NeutronMechanismDrivers: 'opendaylight_v2'
-  NeutronServicePlugins: 'odl-router_v2'
+  NeutronServicePlugins: 'odl-router_v2,trunk'
diff --git a/extraconfig/tasks/run_puppet.sh b/extraconfig/tasks/run_puppet.sh
new file mode 100755 (executable)
index 0000000..b7771e3
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+function run_puppet {
+    set -eux
+    local manifest="$1"
+    local role="$2"
+    local step="$3"
+    local rc=0
+
+    export FACTER_deploy_config_name="${role}Deployment_Step${step}"
+    if [ -e "/etc/puppet/hieradata/heat_config_${FACTER_deploy_config_name}.json" ]; then
+        set +e
+        puppet apply --detailed-exitcodes "${manifest}"
+        rc=$?
+        echo "puppet apply exited with exit code $rc"
+    else
+        echo "Step${step} doesn't exist for ${role}"
+    fi
+    set -e
+
+    if [ $rc -eq 2 -o $rc -eq 0 ]; then
+        set +xu
+        return 0
+    fi
+    set +xu
+    return $rc
+}
diff --git a/extraconfig/tasks/swift-ring-deploy.yaml b/extraconfig/tasks/swift-ring-deploy.yaml
new file mode 100644 (file)
index 0000000..d17f78a
--- /dev/null
@@ -0,0 +1,31 @@
+heat_template_version: ocata
+
+parameters:
+  servers:
+    type: json
+  SwiftRingGetTempurl:
+    default: ''
+    description: A temporary Swift URL to download rings from.
+    type: string
+
+resources:
+  SwiftRingDeployConfig:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: script
+      inputs:
+        - name: swift_ring_get_tempurl
+      config: |
+        #!/bin/sh
+        pushd /
+        curl --insecure --silent "${swift_ring_get_tempurl}" | tar xz || true
+        popd
+
+  SwiftRingDeploy:
+    type: OS::Heat::SoftwareDeployments
+    properties:
+      name: SwiftRingDeploy
+      config: {get_resource: SwiftRingDeployConfig}
+      servers:  {get_param: servers}
+      input_values:
+        swift_ring_get_tempurl: {get_param: SwiftRingGetTempurl}
diff --git a/extraconfig/tasks/swift-ring-update.yaml b/extraconfig/tasks/swift-ring-update.yaml
new file mode 100644 (file)
index 0000000..440c688
--- /dev/null
@@ -0,0 +1,42 @@
+heat_template_version: ocata
+
+parameters:
+  servers:
+    type: json
+  SwiftRingPutTempurl:
+    default: ''
+    description: A temporary Swift URL to upload rings to.
+    type: string
+
+resources:
+  SwiftRingUpdateConfig:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: script
+      inputs:
+        - name: swift_ring_put_tempurl
+      config: |
+        #!/bin/sh
+        TMP_DATA=$(mktemp -d)
+        function cleanup {
+          rm -Rf "$TMP_DATA"
+        }
+        trap cleanup EXIT
+        # sanity check in case rings are not consistent within cluster
+        swift-recon --md5 | grep -q "doesn't match" && exit 1
+        pushd ${TMP_DATA}
+        tar -cvzf swift-rings.tar.gz /etc/swift/*.builder /etc/swift/*.ring.gz /etc/swift/backups/*
+        resp=`curl --insecure --silent -X PUT "${swift_ring_put_tempurl}" --write-out "%{http_code}" --data-binary @swift-rings.tar.gz`
+        popd
+        if [ "$resp" != "201" ]; then
+            exit 1
+        fi
+
+  SwiftRingUpdate:
+    type: OS::Heat::SoftwareDeployments
+    properties:
+      name: SwiftRingUpdate
+      config: {get_resource: SwiftRingUpdateConfig}
+      servers: {get_param: servers}
+      input_values:
+        swift_ring_put_tempurl: {get_param: SwiftRingPutTempurl}
index 27ba33a..c256541 100644 (file)
@@ -15,9 +15,13 @@ cat > $UPGRADE_SCRIPT << ENDOFCAT
 
 set -eu
 NOVA_COMPUTE=""
-if systemctl show 'openstack-nova-compute' --property ActiveState | grep '\bactive\b'; then
+if hiera -c /etc/puppet/hiera.yaml service_names | grep nova_compute ; then
    NOVA_COMPUTE="true"
 fi
+SWIFT_STORAGE=""
+if hiera -c /etc/puppet/hiera.yaml service_names | grep swift_storage ; then
+   SWIFT_STORAGE="true"
+fi
 
 DEBUG="true"
 SCRIPT_NAME=$(basename $0)
@@ -34,19 +38,27 @@ $(declare -f special_case_ovs_upgrade_if_needed)
 special_case_ovs_upgrade_if_needed
 
 yum -y install python-zaqarclient  # needed for os-collect-config
-systemctl_swift stop
+if [[ -n \$SWIFT_STORAGE ]]; then
+    systemctl_swift stop
+fi
 yum -y update
-systemctl_swift start
-
+if [[ -n \$SWIFT_STORAGE ]]; then
+    systemctl_swift start
+fi
 # Due to bug#1640177 we need to restart compute agent
 if [[ -n \$NOVA_COMPUTE ]]; then
     echo "Restarting openstack ceilometer agent compute"
     systemctl restart openstack-ceilometer-compute
 fi
 
-# Apply puppet manifest to converge just right after the \$ROLE upgrade
-puppet apply /root/${ROLE}_puppet_config.pp
-
+# Apply puppet manifest to converge just right after the ${ROLE} upgrade
+$(declare -f run_puppet)
+for step in 1 2 3 4 5 6; do
+    if ! run_puppet /root/${ROLE}_puppet_config.pp ${ROLE} \${step}; then
+         echo "Puppet failure at step \${step}"
+         exit 1
+    fi
+done
 ENDOFCAT
 
 # ensure the permissions are OK
index a6b32dd..1360d0b 100644 (file)
@@ -2,7 +2,7 @@ resource_registry:
 
   OS::TripleO::SoftwareDeployment: OS::Heat::StructuredDeployment
   OS::TripleO::PostDeploySteps: puppet/post.yaml
-  OS::TripleO::PostUpgradeSteps: puppet/post.yaml
+  OS::TripleO::PostUpgradeSteps: puppet/post-upgrade.yaml
   OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
   OS::TripleO::Hosts::SoftwareConfig: hosts-config.yaml
   OS::TripleO::DefaultPasswords: default_passwords.yaml
@@ -11,6 +11,9 @@ resource_registry:
   OS::TripleO::Tasks::UpdateWorkflow: OS::Heat::None
   OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml
 
+  OS::TripleO::Tasks::SwiftRingDeploy: extraconfig/tasks/swift-ring-deploy.yaml
+  OS::TripleO::Tasks::SwiftRingUpdate: extraconfig/tasks/swift-ring-update.yaml
+
 {% for role in roles %}
   OS::TripleO::{{role.name}}::PreNetworkConfig: OS::Heat::None
   OS::TripleO::{{role.name}}PostDeploySteps: puppet/post.yaml
@@ -66,8 +69,10 @@ resource_registry:
   OS::TripleO::NodeExtraConfig: puppet/extraconfig/pre_deploy/default.yaml
   OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml
 
-  OS::TripleO::Tasks::ControllerPrePuppet: OS::Heat::None
-  OS::TripleO::Tasks::ControllerPostPuppet: OS::Heat::None
+{% for role in roles %}
+  OS::TripleO::Tasks::{{role.name}}PrePuppet: OS::Heat::None
+  OS::TripleO::Tasks::{{role.name}}PostPuppet: OS::Heat::None
+{% endfor %}
 
   # "AllNodes" Extra cluster config, runs on all nodes prior to the post_deploy
   # phase, e.g when puppet is applied, but after the pre_deploy phase.  Useful when
@@ -218,7 +223,7 @@ resource_registry:
   OS::TripleO::Services::AodhEvaluator: puppet/services/aodh-evaluator.yaml
   OS::TripleO::Services::AodhNotifier: puppet/services/aodh-notifier.yaml
   OS::TripleO::Services::AodhListener: puppet/services/aodh-listener.yaml
-  OS::TripleO::Services::PankoApi: OS::Heat::None
+  OS::TripleO::Services::PankoApi: puppet/services/panko-api.yaml
   OS::TripleO::Services::MistralEngine: OS::Heat::None
   OS::TripleO::Services::MistralApi: OS::Heat::None
   OS::TripleO::Services::MistralExecutor: OS::Heat::None
@@ -242,6 +247,7 @@ resource_registry:
   OS::TripleO::Services::OctaviaHealthManager: OS::Heat::None
   OS::TripleO::Services::OctaviaHousekeeping: OS::Heat::None
   OS::TripleO::Services::OctaviaWorker: OS::Heat::None
+  OS::TripleO::Services::MySQLClient: puppet/services/database/mysql-client.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index e92de45..a5218db 100644 (file)
@@ -115,6 +115,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 resources:
   BlockStorage:
@@ -360,6 +368,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index 892f91e..0867e17 100644 (file)
@@ -121,6 +121,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 resources:
   CephStorage:
@@ -366,6 +374,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index 62adcd3..1a0294a 100644 (file)
@@ -133,6 +133,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 resources:
 
@@ -383,6 +391,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index d3268ee..825006b 100644 (file)
@@ -147,6 +147,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 parameter_groups:
 - label: deprecated
@@ -417,6 +425,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index 3362a01..6f2dd68 100644 (file)
@@ -79,6 +79,7 @@ resources:
                 AUTH_URL: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
                 ROLE_NAME: {{role.name}}
           - get_file: ../extraconfig/tasks/pacemaker_common_functions.sh
+          - get_file: ../extraconfig/tasks/run_puppet.sh
           - get_file: ../extraconfig/tasks/tripleo_upgrade_node.sh
 
   {{role.name}}DeliverUpgradeScriptDeployment:
index 1633134..172484d 100644 (file)
@@ -115,6 +115,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 resources:
 
@@ -360,6 +368,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index cb08f87..581c4f0 100644 (file)
     properties:
       StepConfig: {list_join: ["\n", {get_param: [role_data, {{role.name}}, step_config]}]}
 
-  {% if role.name == 'Controller' %}
-  ControllerPrePuppet:
-    type: OS::TripleO::Tasks::ControllerPrePuppet
+  {{role.name}}PrePuppet:
+    type: OS::TripleO::Tasks::{{role.name}}PrePuppet
     properties:
-      servers: {get_param: [servers, Controller]}
+      servers: {get_param: [servers, {{role.name}}]}
       input_values:
         update_identifier: {get_param: DeployIdentifier}
+
+  {% if role.name in ['Controller', 'ObjectStorage'] %}
+  {{role.name}}SwiftRingDeploy:
+    type: OS::TripleO::Tasks::SwiftRingDeploy
+    properties:
+      servers: {get_param: [servers, {{role.name}}]}
   {% endif %}
 
   # Step through a series of configuration steps
     properties:
         servers: {get_param: [servers, {{role.name}}]}
 
-  {% if role.name == 'Controller' %}
-  ControllerPostPuppet:
+  {{role.name}}PostPuppet:
     depends_on:
-      - ControllerExtraConfigPost
-    type: OS::TripleO::Tasks::ControllerPostPuppet
+      - {{role.name}}ExtraConfigPost
+    type: OS::TripleO::Tasks::{{role.name}}PostPuppet
     properties:
-      servers: {get_param: [servers, Controller]}
+      servers: {get_param: [servers, {{role.name}}]}
       input_values:
         update_identifier: {get_param: DeployIdentifier}
+
+  {% if role.name in ['Controller', 'ObjectStorage'] %}
+  {{role.name}}SwiftRingUpdate:
+    type: OS::TripleO::Tasks::SwiftRingUpdate
+    depends_on:
+  {% for dep in roles %}
+      - {{dep.name}}Deployment_Step5
+  {% endfor %}
+    properties:
+      servers: {get_param: [servers, {{role.name}}]}
   {% endif %}
 {% endfor %}
index 2f070da..2e1bd6f 100644 (file)
@@ -137,7 +137,14 @@ parameters:
       Command or script snippet to run on all overcloud nodes to
       initialize the upgrade process. E.g. a repository switch.
     default: ''
-
+  UpgradeInitCommonCommand:
+    type: string
+    description: |
+      Common commands required by the upgrades process. This should not
+      normally be modified by the operator and is set and unset in the
+      major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
+      environment files.
+    default: ''
 
 resources:
   {{role}}:
@@ -386,6 +393,7 @@ resources:
         - - "#!/bin/bash\n\n"
           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
           - get_param: UpgradeInitCommand
+          - get_param: UpgradeInitCommonCommand
 
   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
index 9c2d8c5..e5c1153 100644 (file)
@@ -19,8 +19,21 @@ environment to set per service parameters.
 Config Settings
 ---------------
 
-Each service may define a config_settings output variable which returns
-Hiera settings to be configured.
+Each service may define three ways in which to output variables to configure Hiera
+settings on the nodes.
+
+ * config_settings: the hiera keys will be pushed on all roles of which the service
+   is a part of.
+
+ * global_config_settings: the hiera keys will be distributed to all roles
+
+ * service_config_settings: Takes an extra key to wire in values that are
+   defined for a service that need to be consumed by some other service.
+   For example:
+   service_config_settings:
+     haproxy:
+       foo: bar
+   This will set the hiera key 'foo' on all roles where haproxy is included.
 
 Deployment Steps
 ----------------
index f5ca329..c2c2d02 100644 (file)
@@ -69,8 +69,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/aodh'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         aodh::debug: {get_param: Debug}
         aodh::auth::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
         aodh::rabbit_userid: {get_param: RabbitUserName}
index 239b6ca..ffc4c83 100644 (file)
@@ -105,8 +105,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/barbican'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             tripleo.barbican_api.firewall_rules:
               '117 barbican':
                 dport:
index 17588dc..874c689 100644 (file)
@@ -93,10 +93,8 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/ceilometer'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         ceilometer_backend: {get_param: CeilometerBackend}
-        ceilometer::metering_secret: {get_param: CeilometerMeteringSecret}
         # we include db_sync class in puppet-tripleo
         ceilometer::db::sync_db: false
         ceilometer::keystone::authtoken::project_name: 'service'
index a5d7fcf..88e7edb 100644 (file)
@@ -100,8 +100,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/cinder'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         cinder::debug: {get_param: Debug}
         cinder::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
         cinder::rabbit_userid: {get_param: RabbitUserName}
index 1b82f55..6855a83 100644 (file)
@@ -64,8 +64,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/congress'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         congress::keystone::auth::tenant: 'service'
         congress::keystone::auth::password: {get_param: CongressPassword}
         congress::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
@@ -88,3 +87,11 @@ outputs:
 
       step_config: |
         include ::tripleo::profile::base::congress
+
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
+          shell: /usr/bin/systemctl show 'openstack-congress-server' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
+        - name: Stop congress service
+          tags: step2
+          service: name=openstack-congress-server state=stopped
diff --git a/puppet/services/database/mysql-client.yaml b/puppet/services/database/mysql-client.yaml
new file mode 100644 (file)
index 0000000..1415391
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: ocata
+
+description: >
+  Mysql client settings
+
+parameters:
+  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
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+
+outputs:
+  role_data:
+    description: Role for setting mysql client parameters
+    value:
+      service_name: mysql_client
+      config_settings:
+        tripleo::profile::base:database::mysql::client_bind_address: {get_param: [ServiceNetMap, MysqlNetwork]}
+      step_config: |
+        include ::tripleo::profile::base::database::mysql::client
index 8c4042d..808f135 100644 (file)
@@ -34,6 +34,10 @@ parameters:
     default: true
     description: Whether to use Galera instead of regular MariaDB.
     type: boolean
+  NovaPassword:
+    description: The password for the nova db account
+    type: string
+    hidden: true
 
 resources:
 
@@ -94,6 +98,8 @@ outputs:
               {get_param: [ServiceNetMap, MysqlNetwork]}
       step_config: |
         include ::tripleo::profile::base::database::mysql
+      metadata_settings:
+        get_attr: [MySQLTLS, role_data, metadata_settings]
       upgrade_tasks:
         - name: Check for galera root password
           tags: step0
@@ -104,6 +110,15 @@ outputs:
         - name: Start service
           tags: step4
           service: name=mariadb state=started
-      metadata_settings:
-        get_attr: [MySQLTLS, role_data, metadata_settings]
-
+        - name: Setup cell_v2 (create cell0 database)
+          tags: step4
+          mysql_db:
+            name: nova_cell0
+            state: present
+        - name: Setup cell_v2 (grant access to the nova DB user)
+          tags: step4
+          mysql_user:
+            str_replace:
+              template: "name=nova password=PASSWORD host=\"%\" priv=\"nova.*:ALL/nova_cell0.*:ALL,GRANT\" state=present"
+              params:
+                PASSWORD: {get_param: NovaPassword}
index 002342b..bb10140 100644 (file)
@@ -90,8 +90,7 @@ outputs:
                 - '@'
                 - {get_param: [EndpointMap, MysqlInternal, host]}
                 - '/ec2_api'
-                - '?bind_address='
-                - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         -
           if:
           - nova_workers_zero
index c4f97d5..d26d96a 100644 (file)
@@ -91,8 +91,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/glance'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             glance::api::bind_port: {get_param: [EndpointMap, GlanceInternal, port]}
             glance::api::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
             glance::api::authtoken::auth_url: { get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
index 8fddae4..c631005 100644 (file)
@@ -67,8 +67,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/gnocchi'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         gnocchi::db::sync::extra_opts: '--skip-storage'
         gnocchi::storage::swift::swift_user: 'service:gnocchi'
         gnocchi::storage::swift::swift_auth_version: 2
index 7bd2fcf..3ae4cc7 100644 (file)
@@ -86,7 +86,7 @@ outputs:
               heat::keystone::auth_cfn::region: {get_param: KeystoneRegion}
       upgrade_tasks:
         - name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running"
-          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
+          shell: /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
           tags: step0,validation
         - name: Stop heat_api_cfn service
           tags: step2
index 0954ad1..5618353 100644 (file)
@@ -68,7 +68,7 @@ outputs:
         include ::tripleo::profile::base::heat::api_cloudwatch
       upgrade_tasks:
         - name: "PreUpgrade step0,validation: Check service openstack-heat-api-cloudwatch is running"
-          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api-cloudwatch' --property ActiveState | grep '\bactive\b'
+          shell: /usr/bin/systemctl show 'openstack-heat-api-cloudwatch' --property ActiveState | grep '\bactive\b'
           tags: step0,validation
         - name: Stop heat_api_cloudwatch service
           tags: step2
index ae656b1..38c5b47 100644 (file)
@@ -86,7 +86,7 @@ outputs:
               heat::keystone::auth::region: {get_param: KeystoneRegion}
       upgrade_tasks:
         - name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
-          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api' --property ActiveState | grep '\bactive\b'
+          shell: /usr/bin/systemctl show 'openstack-heat-api' --property ActiveState | grep '\bactive\b'
           tags: step0,validation
         - name: Stop heat_api service
           tags: step2
index e85b753..7787d0a 100644 (file)
@@ -111,8 +111,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/heat'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             heat::keystone_ec2_uri: {get_param: [EndpointMap, KeystoneEC2, uri]}
             heat::keystone::domain::domain_password: {get_param: HeatStackDomainAdminPassword}
             heat::engine::auth_encryption_key:
@@ -139,7 +138,7 @@ outputs:
             tripleo::profile::base::keystone::heat_admin_password: {get_param: HeatStackDomainAdminPassword}
       upgrade_tasks:
         - name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
-          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-engine' --property ActiveState | grep '\bactive\b'
+          shell: /usr/bin/systemctl show 'openstack-heat-engine' --property ActiveState | grep '\bactive\b'
           tags: step0,validation
         - name: Stop heat_engine service
           tags: step2
index ad7ef6e..d186b04 100644 (file)
@@ -60,8 +60,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/ironic'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         ironic::debug: {get_param: Debug}
         ironic::rabbit_userid: {get_param: RabbitUserName}
         ironic::rabbit_password: {get_param: RabbitPassword}
index b2374ec..9c4cc60 100644 (file)
@@ -193,8 +193,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/keystone'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             keystone::admin_token: {get_param: AdminToken}
             keystone::admin_password: {get_param: AdminPassword}
             keystone::roles::admin::password: {get_param: AdminPassword}
index 2a9745a..c183bc0 100644 (file)
@@ -67,8 +67,7 @@ outputs:
             - '@'
             - {get_param: [EndpointMap, MysqlInternal, host]}
             - '/manila'
-            - '?bind_address='
-            - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+            - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
       service_config_settings:
         mysql:
           manila::db::mysql::password: {get_param: ManilaPassword}
index 4d02049..e103034 100644 (file)
@@ -65,8 +65,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/mistral'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         mistral::rabbit_userid: {get_param: RabbitUserName}
         mistral::rabbit_password: {get_param: RabbitPassword}
         mistral::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
index 48e53f4..4d671e1 100644 (file)
@@ -127,8 +127,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/ovs_neutron'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             neutron::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
             neutron::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
             neutron::server::api_workers: {get_param: NeutronWorkers}
@@ -136,8 +135,6 @@ outputs:
             neutron::server::allow_automatic_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
             neutron::server::enable_proxy_headers_parsing: true
             neutron::keystone::authtoken::password: {get_param: NeutronPassword}
-
-            neutron::server::notifications::nova_url: { get_param: [ EndpointMap, NovaInternal, uri ] }
             neutron::server::notifications::auth_url: { get_param: [ EndpointMap, KeystoneV3Admin, uri ] }
             neutron::server::notifications::tenant_name: 'service'
             neutron::server::notifications::project_name: 'service'
index 868b2bc..e3a4da9 100644 (file)
@@ -26,6 +26,16 @@ parameters:
     description: Tunnel encapsulation type
     type: string
     default: geneve
+  NeutronBridgeMappings:
+    description: >
+      The OVS logical->physical bridge mappings to use. See the Neutron
+      documentation for details. Defaults to mapping br-ex - the external
+      bridge on hosts - to a physical name 'datacentre' which can be used
+      to create provider networks (and we use this for the default floating
+      network) - if changing this either use different post-install network
+      scripts or be sure to keep 'datacentre' as a mapping network name
+    type: comma_delimited_list
+    default: "datacentre:br-ex"
 
 
 outputs:
@@ -37,6 +47,7 @@ outputs:
         ovn::southbound::port: {get_param: OVNSouthboundServerPort}
         ovn::controller::ovn_encap_type: {get_param: OVNTunnelEncapType}
         ovn::controller::ovn_encap_ip: {get_param: [ServiceNetMap, NeutronApiNetwork]}
+        ovn::controller::ovn_bridge_mappings: {get_param: NeutronBridgeMappings}
         tripleo.neutron_compute_plugin_ovn.firewall_rules:
           '118 neutron vxlan networks':
                 proto: 'udp'
index ad1dcfb..f948dd0 100644 (file)
@@ -100,8 +100,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/ovs_neutron'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         neutron::plugins::plumgrid::controller_priv_host: {get_param: [EndpointMap, KeystoneInternal, host]}
         neutron::plugins::plumgrid::admin_password: {get_param: AdminPassword}
         neutron::plugins::plumgrid::metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
index 18c790e..0adefec 100644 (file)
@@ -58,6 +58,10 @@ parameters:
     default: 'public'
     description: Default pool for floating IP addresses
     type: string
+  NovaDbSyncTimeout:
+    default: 300
+    description: Timeout for Nova db sync
+    type: number
 
 conditions:
   nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
@@ -178,3 +182,86 @@ outputs:
       # https://bugs.launchpad.net/nova/+bug/1661360
       # metadata_settings:
       #   get_attr: [ApacheServiceBase, role_data, metadata_settings]
+      upgrade_tasks:
+        - name: get bootstrap nodeid
+          tags: common
+          command: hiera bootstrap_nodeid
+          register: bootstrap_node
+        - name: set is_bootstrap_node fact
+          tags: common
+          set_fact: is_bootstrap_node={{bootstrap_node.stdout == ansible_hostname}}
+        - name: Extra migration for nova tripleo/+bug/1656791
+          tags: step0,pre-upgrade
+          when: is_bootstrap_node
+          command: nova-manage db online_data_migrations
+        - name: Stop and disable nova_api service (pre-upgrade not under httpd)
+          tags: step2
+          service: name=openstack-nova-api state=stopped enabled=no
+        - name: update nova api
+          tags: step2
+          yum: name=openstack-nova-api state=latest
+        - name: Create puppet manifest to set transport_url in nova.conf
+          tags: step5
+          when: is_bootstrap_node
+          copy:
+            dest: /root/nova-api_upgrade_manifest.pp
+            mode: 0600
+            content: >
+              $transport_url = os_transport_url({
+                'transport' => hiera('messaging_service_name', 'rabbit'),
+                'hosts'     => any2array(hiera('rabbitmq_node_names', undef)),
+                'port'      => sprintf('%s',hiera('nova::rabbit_port', '5672') ),
+                'username'  => hiera('nova::rabbit_userid', 'guest'),
+                'password'  => hiera('nova::rabbit_password'),
+                'ssl'       => sprintf('%s', bool2num(str2bool(hiera('nova::rabbit_use_ssl', '0'))))
+              })
+              oslo::messaging::default { 'nova_config':
+                transport_url => $transport_url
+              }
+        - name: Run puppet apply to set tranport_url in nova.conf
+          tags: step5
+          when: is_bootstrap_node
+          command: puppet apply --detailed-exitcodes /root/nova-api_upgrade_manifest.pp
+          register: puppet_apply_nova_api_upgrade
+          failed_when: puppet_apply_nova_api_upgrade.rc not in [0,2]
+          changed_when: puppet_apply_nova_api_upgrade.rc == 2
+        - name: Setup cell_v2 (map cell0)
+          tags: step5
+          when: is_bootstrap_node
+          command: nova-manage cell_v2 map_cell0
+        - name: Setup cell_v2 (create default cell)
+          tags: step5
+          when: is_bootstrap_node
+          # (owalsh) puppet-nova expects the cell name 'default'
+          # (owalsh) pass the db uri explicitly to avoid https://bugs.launchpad.net/tripleo/+bug/1662344
+          shell: nova-manage cell_v2 create_cell --name='default' --database_connection=$(hiera nova::database_connection)
+          register: nova_api_create_cell
+          failed_when: nova_api_create_cell.rc not in [0,2]
+          changed_when: nova_api_create_cell.rc == 0
+        - name: Setup cell_v2 (sync nova/cell DB)
+          tags: step5
+          when: is_bootstrap_node
+          command: nova-manage db sync
+          async: {get_param: NovaDbSyncTimeout}
+          poll: 10
+        - name: Setup cell_v2 (migrate hosts)
+          tags: step5
+          when: is_bootstrap_node
+          command: nova-manage cell_v2 map_cell_and_hosts
+        - name: Setup cell_v2 (get cell uuid)
+          tags: step5
+          when: is_bootstrap_node
+          shell: nova-manage cell_v2 list_cells | sed -e '1,3d' -e '$d' | awk -F ' *| *' '$2 == "default" {print $4}'
+          register: nova_api_cell_uuid
+        - name: Setup cell_v2 (migrate instances)
+          tags: step5
+          when: is_bootstrap_node
+          command: nova-manage cell_v2 map_instances --cell_uuid {{nova_api_cell_uuid.stdout}}
+        - name: Sync nova_api DB
+          tags: step5
+          command: nova-manage api_db sync
+          when: is_bootstrap_node
+        - name: Online data migration for nova
+          tags: step5
+          when: is_bootstrap_node
+          command: nova-manage db online_data_migrations
index 26d05cc..ceacb0b 100644 (file)
@@ -121,7 +121,6 @@ parameters:
         Endpoint interface to be used for the placement API.
     default: 'internal'
 
-
 conditions:
 
   compute_upgrade_level_empty: {equals : [{get_param: UpgradeLevelNovaCompute}, '']}
@@ -151,6 +150,7 @@ outputs:
                 - '@'
                 - {get_param: [EndpointMap, MysqlInternal, host]}
                 - '/nova'
+                - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
           nova::api_database_connection:
             list_join:
               - ''
@@ -160,6 +160,7 @@ outputs:
                 - '@'
                 - {get_param: [EndpointMap, MysqlInternal, host]}
                 - '/nova_api'
+                - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
           nova::placement_database_connection:
             list_join:
               - ''
@@ -169,6 +170,7 @@ outputs:
                 - '@'
                 - {get_param: [EndpointMap, MysqlInternal, host]}
                 - '/nova_placement'
+                - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
           nova::debug: {get_param: Debug}
           nova::purge_config: {get_param: EnableConfigPurge}
           nova::network::neutron::neutron_project_name: 'service'
index f7484da..9923e83 100644 (file)
@@ -75,6 +75,10 @@ parameters:
     default:
       tag: openstack.nova.compute
       path: /var/log/nova/nova-compute.log
+  UpgradeLevelNovaCompute:
+    type: string
+    description: Nova Compute upgrade level
+    default: auto
 
 resources:
   NovaBase:
@@ -146,3 +150,19 @@ outputs:
           tripleo.collectd.plugins.nova_compute:
             - virt
           collectd::plugins::virt::connection: "qemu:///system"
+      upgrade_tasks:
+        - name: Stop nova-compute service
+          tags: step2
+          service: name=openstack-nova-compute state=stopped
+        # If not already set by puppet (e.g a pre-ocata version), set the
+        # upgrade_level for compute to "auto"
+        - name: Set compute upgrade level to auto
+          tags: step3
+          ini_file:
+            str_replace:
+              template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
+              params:
+                LEVEL: {get_param: UpgradeLevelNovaCompute}
+        - name: Start nova-compute service
+          tags: step6
+          service: name=openstack-nova-compute state=started
index b96bf6e..7b08653 100644 (file)
@@ -30,6 +30,10 @@ parameters:
     default:
       tag: openstack.nova.scheduler
       path: /var/log/nova/nova-scheduler.log
+  UpgradeLevelNovaCompute:
+    type: string
+    description: Nova Compute upgrade level
+    default: auto
 
 conditions:
   nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
@@ -61,3 +65,19 @@ outputs:
           - nova::conductor::workers: {get_param: NovaWorkers}
       step_config: |
         include tripleo::profile::base::nova::conductor
+      upgrade_tasks:
+        - name: Stop nova_conductor service
+          tags: step2
+          service: name=openstack-nova-conductor state=stopped
+        - name: update nova conductor
+          tags: step2
+          yum: name=openstack-nova-conductor state=latest
+        # If not already set by puppet (e.g a pre-ocata version), set the
+        # upgrade_level for compute to "auto"
+        - name: Set compute upgrade level to auto
+          tags: step3
+          ini_file:
+            str_replace:
+              template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
+              params:
+                LEVEL: {get_param: UpgradeLevelNovaCompute}
index 79969de..b5a1312 100644 (file)
@@ -48,3 +48,7 @@ outputs:
         get_attr: [NovaBase, role_data, config_settings]
       step_config: |
         include tripleo::profile::base::nova::consoleauth
+      upgrade_tasks:
+        - name: Stop nova_consoleauth service
+          tags: step2
+          service: name=openstack-nova-consoleauth state=stopped
index 5564c1b..9389c80 100644 (file)
@@ -122,3 +122,8 @@ outputs:
         - name: Stop nova_placement service (running under httpd)
           tags: step2
           service: name=httpd state=stopped
+        # The nova placement API isn't installed in newton images, so install
+        # it on upgrade
+        - name: Install nova-placement packages on upgrade
+          tags: step3
+          yum: name=openstack-nova-placement-api state=latest
index 353a75a..0e0b9d1 100644 (file)
@@ -63,3 +63,10 @@ outputs:
             nova::scheduler::filter::scheduler_default_filters: {get_param: NovaSchedulerDefaultFilters}
       step_config: |
         include tripleo::profile::base::nova::scheduler
+      upgrade_tasks:
+        - name: Stop nova_scheduler service
+          tags: step2
+          service: name=openstack-nova-scheduler state=stopped
+        - name: update nova scheduler
+          tags: step2
+          yum: name=openstack-nova-scheduler state=latest
index bf24494..f6cf964 100644 (file)
@@ -64,3 +64,7 @@ outputs:
                   - 13080
       step_config: |
         include tripleo::profile::base::nova::vncproxy
+      upgrade_tasks:
+        - name: Stop nova_vnc_proxy service
+          tags: step2
+          service: name=openstack-nova-consoleauth state=stopped
index 37ba1f7..909a303 100644 (file)
@@ -66,8 +66,7 @@ outputs:
                   - '@'
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/octavia'
-                  - '?bind_address='
-                  - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+                  - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
             octavia::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
             octavia::keystone::authtoken::project_name: 'service'
             octavia::keystone::authtoken::password: {get_param: OctaviaPassword}
index 2c2586a..998e64e 100644 (file)
@@ -46,8 +46,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/panko'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         panko::debug: {get_param: Debug}
         panko::auth::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
         panko::keystone::authtoken::project_name: 'service'
index e208418..224989b 100644 (file)
@@ -64,8 +64,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/sahara'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
         sahara::rabbit_password: {get_param: RabbitPassword}
         sahara::rabbit_user: {get_param: RabbitUserName}
         sahara::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
index 5cf09a6..6ceb9f1 100644 (file)
@@ -64,8 +64,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/tacker'
-              - '?bind_address='
-              - "%{hiera('tripleo::profile::base::database::mysql::client_bind_address')}"
+              - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo'
 
         tacker::keystone::auth::tenant: 'service'
         tacker::keystone::auth::password: {get_param: TackerPassword}
@@ -89,3 +88,10 @@ outputs:
 
       step_config: |
         include ::tripleo::profile::base::tacker
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-tacker-server is running"
+          shell: /usr/bin/systemctl show 'openstack-tacker-server' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
+        - name: Stop tacker service
+          tags: step2
+          service: name=openstack-tacker-server state=stopped
index 88ab90c..b14d7bc 100644 (file)
@@ -22,8 +22,10 @@ parameters:
                  via parameter_defaults in the resource registry.
     type: json
   NtpServer:
-    default: []
-    description: NTP servers
+    default: ['pool.ntp.org']
+    description: NTP servers list. Defaulted to pool.ntp.org in order to
+                 have a sane default for Pacemaker deployments when
+                 not configuring this parameter by default.
     type: comma_delimited_list
 
 outputs:
index c37cc03..2cfd43f 100644 (file)
@@ -41,7 +41,7 @@ resources:
             - {get_param: SkipUpgradeConfigTags}
         tags:
           str_replace:
-            template: "stepSTEP"
+            template: "common,stepSTEP"
             params:
               STEP: {get_param: step}
         modulepath: /usr/share/ansible-modules
diff --git a/releasenotes/notes/add-default-ntp-server-696b8568e09be497.yaml b/releasenotes/notes/add-default-ntp-server-696b8568e09be497.yaml
new file mode 100644 (file)
index 0000000..78fdbb5
--- /dev/null
@@ -0,0 +1,6 @@
+---
+issues:
+  - We add a default NTP server to the Overcloud
+    for all Pacemaker and non-Pacemaker deployments,
+    also useful for keeping time diff controlled for
+    Keystone and Ceph.
diff --git a/releasenotes/notes/composable-ha-37e2d7e1f57f5c10.yaml b/releasenotes/notes/composable-ha-37e2d7e1f57f5c10.yaml
new file mode 100644 (file)
index 0000000..e560fe9
--- /dev/null
@@ -0,0 +1,12 @@
+---
+features:
+  - With the composable HA work landed it is now possible
+    to split pacemaker-managed services like galera, rabbit,
+    redis, haproxy and any A/P resource, off to dedicated
+    nodes. These services can be split off to separate nodes
+    either via the normal Pacemaker service (which has a limit
+    of 16 maximum number of nodes) or via the newer PacemakerRemote
+    service (but not both on the same node). Note that until
+    https://bugzilla.redhat.com/show_bug.cgi?id=1417936 is fixed,
+    PacemakerRemote should only be used for Cinder A/P resources
+    and Manila A/P resources.
diff --git a/releasenotes/notes/ha-by-default-55326e699ee8602c.yaml b/releasenotes/notes/ha-by-default-55326e699ee8602c.yaml
new file mode 100644 (file)
index 0000000..edcc125
--- /dev/null
@@ -0,0 +1,5 @@
+---
+deprecations:
+  - The environments/puppet-pacemaker.yaml file is now deprecated and the HA
+    deployment is now the default. In order to get the non-HA deployment use
+    environments/nonha-arch.yaml explicitly.
index 9767dad..43c7770 100644 (file)
@@ -9,6 +9,7 @@ Contents
    :maxdepth: 2
 
    unreleased
+   ocata
 
 
 Indices and tables
diff --git a/releasenotes/source/ocata.rst b/releasenotes/source/ocata.rst
new file mode 100644 (file)
index 0000000..ebe62f4
--- /dev/null
@@ -0,0 +1,6 @@
+===================================
+ Ocata Series Release Notes
+===================================
+
+.. release-notes::
+   :branch: origin/stable/ocata
index 31b1298..9e3b0a1 100644 (file)
 # disable_constraints: (boolean) optional, whether to disable Nova and Glance
 # constraints for each role specified in the templates.
 #
+# disable_upgrade_deployment: (boolean) optional, whether to run the
+# ansible upgrade steps for all services that are deployed on the role. If set
+# to True, the operator will drive the upgrade for this role's nodes.
+#
 # upgrade_batch_size: (number): batch size for upgrades where tasks are
 # specified by services to run in batches vs all nodes at once.
 # This defaults to 1, but larger batches may be specified here.
@@ -47,6 +51,7 @@
     - OS::TripleO::Services::HeatApiCloudwatch
     - OS::TripleO::Services::HeatEngine
     - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL3Agent
     - OS::TripleO::Services::NeutronMetadataAgent
index 0eacbc6..1d0dba0 100755 (executable)
@@ -62,14 +62,12 @@ def validate_mysql_connection(settings):
         return items == ['EndpointMap', 'MysqlInternal', 'protocol']
 
     def client_bind_address(item):
-        return 'bind_address' in item
+        return 'read_default_file' in item and \
+               'read_default_group' in item
 
     def validate_mysql_uri(key, items):
         # Only consider a connection if it targets mysql
-        # TODO(owalsh): skip nova mysql uris,temporary workaround for
-        # tripleo/+bug/1662344
-        if not key.startswith('nova') and \
-           key.endswith('connection') and \
+        if key.endswith('connection') and \
            search(items, mysql_protocol, no_op):
             # Assume the "bind_address" option is one of
             # the token that made up the uri