From 9d9feaf72a3c0fc28e892726daac035273f0225d Mon Sep 17 00:00:00 2001 From: Jill Rouleau Date: Mon, 11 Feb 2019 15:26:01 -0700 Subject: [PATCH] flatten collectd service configuration This change combines the previous puppet and docker files into a single file that performs the docker service installation and configuration. Change-Id: I64fc4aae0bfe41f3b9467ab497c79a52aefe5acf --- ci/environments/scenario001-standalone.yaml | 2 +- .../metrics/collectd-container-puppet.yaml | 545 ++++++++++++++++++ docker/services/metrics/collectd.yaml | 166 ------ environments/collectd-environment.yaml | 2 +- environments/computealt.yaml | 2 +- environments/services-baremetal/collectd.yaml | 2 +- environments/services/collectd.yaml | 2 +- 7 files changed, 550 insertions(+), 171 deletions(-) create mode 100644 deployment/metrics/collectd-container-puppet.yaml delete mode 100644 docker/services/metrics/collectd.yaml diff --git a/ci/environments/scenario001-standalone.yaml b/ci/environments/scenario001-standalone.yaml index c6089027d5..97e7d3f98d 100644 --- a/ci/environments/scenario001-standalone.yaml +++ b/ci/environments/scenario001-standalone.yaml @@ -11,7 +11,7 @@ resource_registry: OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml OS::TripleO::Services::PankoApi: ../../deployment/panko/panko-api-container-puppet.yaml - OS::TripleO::Services::Collectd: ../../docker/services/metrics/collectd.yaml + OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml diff --git a/deployment/metrics/collectd-container-puppet.yaml b/deployment/metrics/collectd-container-puppet.yaml new file mode 100644 index 0000000000..4912ae6719 --- /dev/null +++ b/deployment/metrics/collectd-container-puppet.yaml @@ -0,0 +1,545 @@ +heat_template_version: rocky + +description: > + Containerized collectd service + +parameters: + DockerCollectdImage: + description: image + type: string + DockerCollectdConfigImage: + description: The container image to use for the collectd config_volume + type: string + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + ServiceData: + default: {} + description: Dictionary packing service data + type: json + ServiceNetMap: + default: {} + description: Mapping of service_name -> network name. Typically set + via parameter_defaults in the resource registry. This + mapping overrides those in ServiceNetMapDefaults. + type: json + DefaultPasswords: + default: {} + type: json + RoleName: + default: '' + description: Role name on which the service is applied + type: string + RoleParameters: + default: {} + description: Parameters specific to the role + type: json + UpgradeRemoveUnusedPackages: + default: false + description: Remove package if the service is being disabled during upgrade + type: boolean + GnocchiPassword: + type: string + description: The password for the gnocchi service and db account. + hidden: true + KeystoneRegion: + type: string + description: Keystone region for endpoint + default: 'regionOne' + MetricsQdrPort: + default: '5666' + description: Service name or port number on which the qdrouterd will accept + connections. This argument must be string, even if the numeric + form is used. + type: string + MetricsQdrUsername: + default: 'guest' + description: Username which should be used to authenticate to the deployed + qdrouterd. + type: string + MetricsQdrPassword: + default: 'guest' + description: Password which should be used to authenticate to the deployed + qdrouterd. + type: string + hidden: true + CollectdConnectionType: + default: 'gnocchi' + description: Define which write plugin should collectd use. Currently + supported are 'amqp1', 'network' and 'gnocchi'. + type: string + CollectdDefaultPollingInterval: + default: 120 + type: number + description: > + Controls how often registered read functions are called and with that + the resolution of the collected data. This value can be overridden per + plugin(per role) by setting "::collectd::plugin::::interval" + key in ExtraConfig(ExtraConfig). + CollectdDefaultPlugins: + default: + - cpu + - disk + - interface + - load + - memory + - processes + - tcpconns + - unixsock + type: comma_delimited_list + description: > + List of collectd plugins to activate on all overcloud hosts. See + the documentation for the puppet-collectd module for a list plugins + supported by the module (https://github.com/voxpupuli/puppet-collectd). + Set this key to override the default list of plugins. Use + CollectdExtraPlugins if you want to load additional plugins without + overriding the defaults. + CollectdExtraPlugins: + default: [] + type: comma_delimited_list + description: > + List of collectd plugins to activate on all overcloud hosts. See + the documentation for the puppet-collectd module for a list plugins + supported by the module (https://github.com/voxpupuli/puppet-collectd). + Set this key to load plugins in addition to those in + CollectdDefaultPlugins. + CollectdServer: + type: string + description: > + Address of remote collectd server to which we will send + metrics. + default: '' + CollectdServerPort: + type: number + default: 25826 + description: > + Port on remote collectd server to which we will send + metrics. + CollectdUsername: + type: string + description: > + Username for authenticating to the remote collectd server. The default + is to not configure any authentication. + default: '' + CollectdPassword: + type: string + hidden: true + description: > + Password for authenticating to the remote collectd server. The + default is to not configure any authentication. + default: '' + CollectdSecurityLevel: + type: string + description: > + Security level setting for remote collectd connection. If it is + set to Sign or Encrypt the CollectdPassword and CollectdUsername + parameters need to be set. + default: 'None' + constraints: + - allowed_values: + - None + - Sign + - Encrypt + CollectdGnocchiAuthMode: + type: string + description: > + Type of authentication Gnocchi server is using. Supported values are + 'basic' and 'keystone'. + default: 'keystone' + CollectdGnocchiProtocol: + type: string + description: API protocol Gnocchi server is using. + default: 'http' + CollectdGnocchiServer: + type: string + description: > + The name or address of a gnocchi endpoint to which we should + send metrics. + default: nil + CollectdGnocchiPort: + type: number + description: The port to which we will connect on the Gnocchi server. + default: 8041 + CollectdGnocchiUser: + type: string + description: > + Username for authenticating to the remote Gnocchi server using simple + authentication. + default: nil + CollectdGnocchiKeystoneAuthUrl: + type: string + description: Keystone endpoint URL to authenticate to. + default: nil + CollectdGnocchiKeystoneUserName: + type: string + description: Username for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneUserId: + type: string + description: User ID for authenticating to Keystone. + default: nil + CollectdGnocchiKeystonePassword: + type: string + description: Password for authenticating to Keystone + default: nil + hidden: true + CollectdGnocchiKeystoneProjectId: + type: string + description: Project ID for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneProjectName: + type: string + description: Project name for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneUserDomainId: + type: string + description: User domain ID for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneUserDomainName: + type: string + description: User domain name for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneProjectDomainId: + type: string + description: Project domain ID for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneProjectDomainName: + type: string + description: Project domain name for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneRegionName: + type: string + description: Region name for authenticating to Keystone. + default: nil + CollectdGnocchiKeystoneInterface: + type: string + description: Type of Keystone endpoint to authenticate to. + default: nil + CollectdGnocchiKeystoneEndpoint: + type: string + description: > + Explicitly state Gnocchi server URL if you want to override + Keystone value + default: nil + CollectdGnocchiResourceType: + type: string + description: > + Default resource type created by the collectd-gnocchi plugin in Gnocchi + to store hosts. + default: 'collectd' + CollectdGnocchiBatchSize: + type: number + description: Minimum number of values Gnocchi should batch. + default: 10 + CollectdAmqpHost: + type: string + description: Hostname or IP address of the AMQP 1.0 intermediary. + default: nil + CollectdAmqpPort: + type: string + description: > + Service name or port number on which the AMQP 1.0 intermediary accepts + connections. This argument must be a string, even if the numeric form + is used. + default: '5666' + CollectdAmqpUser: + type: string + description: > + User part of credentials used to authenticate to the AMQP 1.0 intermediary. + default: guest + CollectdAmqpPassword: + type: string + description: > + Password part of credentials used to authenticate to the AMQP 1.0 intermediary. + default: guest + hidden: true + CollectdAmqpTransportName: + type: string + description: Name of the AMQP 1.0 transport. + default: metrics + CollectdAmqpAddress: + type: string + description: > + This option specifies the prefix for the send-to value in the message. + default: collectd + CollectdAmqpInstances: + type: json + description: > + Hash of hashes. Each inner hash represent Instance block in plugin + configuration file. Key of outter hash represents instance name. + The 'address' value concatenated with the 'name' given will be used + as the send-to address for communications over the messaging link. + default: {} + CollectdAmqpRetryDelay: + type: number + description: > + When the AMQP 1.0 connection is lost, defines the time in seconds to wait + before attempting to reconnect. + default: 1 + CollectdAmqpInterval: + type: number + description: > + Interval on which metrics should be sent to AMQP intermediary. If not set + the default for all collectd plugins is used. + default: -666 + +conditions: + amqp_connection: + equals: [{get_param: CollectdConnectionType}, 'amqp1'] + amqp_default_connection: + equals: [{get_param: CollectdAmqpHost}, nil] + amqp_default_interval: + equals: [{get_param: CollectdAmqpInterval}, -666] + collectd_connection: + equals: [{get_param: CollectdConnectionType}, 'network'] + gnocchi_connection: + equals: [{get_param: CollectdConnectionType}, 'gnocchi'] + gnocchi_auth_basic: + equals: [{get_param: CollectdGnocchiAuthMode}, 'basic'] + gnocchi_default_connection: + and: + - equals: [{get_param: CollectdGnocchiServer}, nil] + - equals: [{get_param: CollectdGnocchiKeystoneEndpoint}, nil] + +resources: + + ContainersCommon: + type: ../../docker/services/containers-common.yaml + +outputs: + role_data: + description: Role data for the collectd role. + value: + service_name: collectd + config_settings: + map_merge: + - tripleo::profile::base::metrics::collectd::enable_file_logging: true + collectd::plugin::logfile::log_file: /var/log/collectd/collectd.log + - collectd::manage_repo: false + collectd::purge: true + collectd::recurse: true + collectd::purge_config: true + collectd::minimum_version: "5.7" + collectd::plugin::unixsock::socketgroup: root + collectd::plugin::unixsock::socketfile: /var/run/collectd-socket + collectd::plugin::unixsock::deletesocket: true + collectd::interval: {get_param: CollectdDefaultPollingInterval} + tripleo.collectd.plugins.collectd: + yaql: + data: + default_plugins: {get_param: CollectdDefaultPlugins} + extra_plugins: {get_param: CollectdExtraPlugins} + expression: > + ($.data.default_plugins + $.data.extra_plugins) + .flatten().distinct() + - if: # Collectd connected to QDR + - amqp_connection + - map_merge: + - tripleo::profile::base::metrics::collectd::amqp_transport_name: + get_param: CollectdAmqpTransportName + tripleo::profile::base::metrics::collectd::amqp_address: + get_param: CollectdAmqpAddress + tripleo::profile::base::metrics::collectd::amqp_instances: + get_param: CollectdAmqpInstances + tripleo::profile::base::metrics::collectd::amqp_retry_delay: + get_param: CollectdAmqpRetryDelay + - if: + - amqp_default_interval + - {} + - tripleo::profile::base::metrics::collectd::amqp_interval: + get_param: CollectdAmqpInterval + - if: + - amqp_default_connection + - tripleo::profile::base::metrics::collectd::amqp_host: + str_replace: + template: + "%{hiera('$NETWORK')}" + params: + $NETWORK: {get_param: [ServiceNetMap, MetricsQdrNetwork]} + tripleo::profile::base::metrics::collectd::amqp_port: + get_param: MetricsQdrPort + tripleo::profile::base::metrics::collectd::amqp_user: + get_param: MetricsQdrUsername + tripleo::profile::base::metrics::collectd::amqp_password: + get_param: MetricsQdrPassword + - tripleo::profile::base::metrics::collectd::amqp_host: + get_param: CollectdAmqpHost + tripleo::profile::base::metrics::collectd::amqp_port: + get_param: CollectdAmqpPort + tripleo::profile::base::metrics::collectd::amqp_user: + get_param: CollectdAmqpUser + tripleo::profile::base::metrics::collectd::amqp_password: + get_param: CollectdAmqpPassword + - {} + - if: # Collectd connected to external collectd instance + - collectd_connection + - tripleo::profile::base::metrics::collectd::collectd_server: + get_param: CollectdServer + tripleo::profile::base::metrics::collectd::collectd_port: + get_param: CollectdServerPort + tripleo::profile::base::metrics::collectd::collectd_username: + get_param: CollectdUsername + tripleo::profile::base::metrics::collectd::collectd_password: + get_param: CollectdPassword + tripleo::profile::base::metrics::collectd::collectd_securitylevel: + get_param: CollectdSecurityLevel + - {} + - if: # Collectd connected directly to Gnocchi DB + - gnocchi_connection + - map_merge: + - tripleo::profile::base::metrics::collectd::gnocchi_auth_mode: + get_param: CollectdGnocchiAuthMode + tripleo::profile::base::metrics::collectd::gnocchi_resource_type: + get_param: CollectdGnocchiResourceType + tripleo::profile::base::metrics::collectd::gnocchi_batch_size: + get_param: CollectdGnocchiBatchSize + - if: + - gnocchi_default_connection # use overcloud gnocchi instance or user provided instance? + - tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint: + get_param: [EndpointMap, GnocchiInternal, uri] + tripleo::profile::base::metrics::collectd::gnocchi_keystone_auth_url: + get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_name: 'gnocchi' + tripleo::profile::base::metrics::collectd::gnocchi_keystone_password: + get_param: GnocchiPassword + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_name: 'service' + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_domain_name: 'Default' + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_domain_name: 'Default' + tripleo::profile::base::metrics::collectd::gnocchi_keystone_region_name: + get_param: KeystoneRegion + - if: + - gnocchi_auth_basic # use basic auth or keystone auth? + - tripleo::profile::base::metrics::collectd::gnocchi_protocol: + get_param: CollectdGnocchiProtocol + tripleo::profile::base::metrics::collectd::gnocchi_server: + get_param: CollectdGnocchiServer + tripleo::profile::base::metrics::collectd::gnocchi_port: + get_param: CollectdGnocchiPort + tripleo::profile::base::metrics::collectd::gnocchi_user: + get_param: CollectdGnocchiUser + - tripleo::profile::base::metrics::collectd::gnocchi_keystone_auth_url: + get_param: CollectdGnocchiKeystoneAuthUrl + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_name: + get_param: CollectdGnocchiKeystoneUserName + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_id: + get_param: CollectdGnocchiKeystoneUserId + tripleo::profile::base::metrics::collectd::gnocchi_keystone_password: + get_param: CollectdGnocchiKeystonePassword + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_id: + get_param: CollectdGnocchiKeystoneProjectId + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_name: + get_param: CollectdGnocchiKeystoneProjectName + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_domain_id: + get_param: CollectdGnocchiKeystoneUserDomainId + tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_domain_name: + get_param: CollectdGnocchiKeystoneUserDomainName + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_domain_id: + get_param: CollectdGnocchiKeystoneProjectDomainId + tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_domain_name: + get_param: CollectdGnocchiKeystoneProjectDomainName + tripleo::profile::base::metrics::collectd::gnocchi_keystone_region_name: + get_param: CollectdGnocchiKeystoneRegionName + tripleo::profile::base::metrics::collectd::gnocchi_keystone_interface: + get_param: CollectdGnocchiKeystoneInterface + tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint: + get_param: CollectdGnocchiKeystoneEndpoint + - {} + service_config_settings: {} + # BEGIN DOCKER SETTINGS + puppet_config: + config_volume: collectd + puppet_tags: collectd_client_config + step_config: include ::tripleo::profile::base::metrics::collectd + config_image: {get_param: DockerCollectdConfigImage} + kolla_config: + /var/lib/kolla/config_files/collectd.json: + command: /usr/sbin/collectd -f + config_files: + - source: "/var/lib/kolla/config_files/src/*" + dest: "/" + merge: true + preserve_properties: true + - source: "/var/lib/kolla/config_files/src/etc/collectd.d" + dest: "/etc/" + merge: false + preserve_properties: true + permissions: + - path: /var/log/collectd + owner: collectd:collectd + recurse: true + docker_config: + step_5: + collectd: + image: {get_param: DockerCollectdImage} + net: host + pid: host + privileged: true + user: root + restart: always + healthcheck: + test: /openstack/healthcheck + volumes: + list_concat: + - {get_attr: [ContainersCommon, volumes]} + - + - /var/lib/kolla/config_files/collectd.json:/var/lib/kolla/config_files/config.json:ro + - /var/lib/config-data/puppet-generated/collectd/:/var/lib/kolla/config_files/src:ro + - /var/log/containers/collectd:/var/log/collectd:rw,z + - /var/run/openvswitch:/var/run/openvswitch:ro + - /var/run/ceph:/var/run/ceph:ro + - /var/run/libvirt:/var/run/libvirt:ro + environment: + - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS + host_prep_tasks: + - name: create persistent directories + file: + path: "{{ item.path }}" + state: directory + setype: "{{ item.setype }}" + with_items: + - { 'path': /var/log/containers/collectd, 'setype': svirt_sandbox_file_t } + - { 'path': /var/log/collectd, 'setype': svirt_sandbox_file_t } + - name: collectd logs readme + copy: + dest: /var/log/collectd/readme.txt + content: | + Log files from collectd containers can be found under + /var/log/containers/collectd. + ignore_errors: true + upgrade_tasks: + - when: step|int == 3 + block: + - name: Set fact for removal of collectd package + set_fact: + remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages} + - name: Remove collectd package if operator requests it + package: name=collectd state=removed + ignore_errors: True + when: remove_collectd_package|bool + fast_forward_upgrade_tasks: + - when: + - step|int == 0 + - release == 'ocata' + block: + - name: Check if collectd.service is deployed + command: systemctl is-enabled --quiet collectd.service + ignore_errors: True + register: collectd_enabled_result + - name: Set fact collectd_enabled + set_fact: + collectd_enabled: "{{ collectd_enabled_result.rc == 0 }}" + - name: Stop collectd service + service: name=collectd.service state=stopped enabled=no + when: + - step|int == 1 + - release == 'ocata' + - collectd_enabled|bool + post_upgrade_tasks: + - when: step|int == 1 + import_role: + name: tripleo-docker-rm + vars: + containers_to_rm: + - collectd diff --git a/docker/services/metrics/collectd.yaml b/docker/services/metrics/collectd.yaml deleted file mode 100644 index ea8242f0ce..0000000000 --- a/docker/services/metrics/collectd.yaml +++ /dev/null @@ -1,166 +0,0 @@ -heat_template_version: rocky - -description: > - Containerized collectd service - -parameters: - DockerCollectdImage: - description: image - type: string - DockerCollectdConfigImage: - description: The container image to use for the collectd config_volume - type: string - EndpointMap: - default: {} - description: Mapping of service endpoint -> protocol. Typically set - via parameter_defaults in the resource registry. - type: json - ServiceData: - default: {} - description: Dictionary packing service data - type: json - ServiceNetMap: - default: {} - description: Mapping of service_name -> network name. Typically set - via parameter_defaults in the resource registry. This - mapping overrides those in ServiceNetMapDefaults. - type: json - DefaultPasswords: - default: {} - type: json - RoleName: - default: '' - description: Role name on which the service is applied - type: string - RoleParameters: - default: {} - description: Parameters specific to the role - type: json - UpgradeRemoveUnusedPackages: - default: false - description: Remove package if the service is being disabled during upgrade - type: boolean - -resources: - - ContainersCommon: - type: ../containers-common.yaml - - CollectdBase: - type: ../../../puppet/services/metrics/collectd.yaml - properties: - EndpointMap: {get_param: EndpointMap} - ServiceData: {get_param: ServiceData} - ServiceNetMap: {get_param: ServiceNetMap} - DefaultPasswords: {get_param: DefaultPasswords} - RoleName: {get_param: RoleName} - RoleParameters: {get_param: RoleParameters} - -outputs: - role_data: - description: Role data for the collectd role. - value: - service_name: {get_attr: [CollectdBase, role_data, service_name]} - config_settings: - map_merge: - - get_attr: [CollectdBase, role_data, config_settings] - - tripleo::profile::base::metrics::collectd::enable_file_logging: true - collectd::plugin::logfile::log_file: /var/log/collectd/collectd.log - service_config_settings: {get_attr: [CollectdBase, role_data, service_config_settings]} - # BEGIN DOCKER SETTINGS - puppet_config: - config_volume: collectd - puppet_tags: collectd_client_config - step_config: - get_attr: [CollectdBase, role_data, step_config] - config_image: {get_param: DockerCollectdConfigImage} - kolla_config: - /var/lib/kolla/config_files/collectd.json: - command: /usr/sbin/collectd -f - config_files: - - source: "/var/lib/kolla/config_files/src/*" - dest: "/" - merge: true - preserve_properties: true - - source: "/var/lib/kolla/config_files/src/etc/collectd.d" - dest: "/etc/" - merge: false - preserve_properties: true - permissions: - - path: /var/log/collectd - owner: collectd:collectd - recurse: true - docker_config: - step_5: - collectd: - image: {get_param: DockerCollectdImage} - net: host - pid: host - privileged: true - user: root - restart: always - healthcheck: - test: /openstack/healthcheck - volumes: - list_concat: - - {get_attr: [ContainersCommon, volumes]} - - - - /var/lib/kolla/config_files/collectd.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/puppet-generated/collectd/:/var/lib/kolla/config_files/src:ro - - /var/log/containers/collectd:/var/log/collectd:rw,z - - /var/run/openvswitch:/var/run/openvswitch:ro - - /var/run/ceph:/var/run/ceph:ro - - /var/run/libvirt:/var/run/libvirt:ro - environment: - - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - host_prep_tasks: - - name: create persistent directories - file: - path: "{{ item.path }}" - state: directory - setype: "{{ item.setype }}" - with_items: - - { 'path': /var/log/containers/collectd, 'setype': svirt_sandbox_file_t } - - { 'path': /var/log/collectd, 'setype': svirt_sandbox_file_t } - - name: collectd logs readme - copy: - dest: /var/log/collectd/readme.txt - content: | - Log files from collectd containers can be found under - /var/log/containers/collectd. - ignore_errors: true - upgrade_tasks: - - when: step|int == 3 - block: - - name: Set fact for removal of collectd package - set_fact: - remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages} - - name: Remove collectd package if operator requests it - package: name=collectd state=removed - ignore_errors: True - when: remove_collectd_package|bool - fast_forward_upgrade_tasks: - - when: - - step|int == 0 - - release == 'ocata' - block: - - name: Check if collectd.service is deployed - command: systemctl is-enabled --quiet collectd.service - ignore_errors: True - register: collectd_enabled_result - - name: Set fact collectd_enabled - set_fact: - collectd_enabled: "{{ collectd_enabled_result.rc == 0 }}" - - name: Stop collectd service - service: name=collectd.service state=stopped enabled=no - when: - - step|int == 1 - - release == 'ocata' - - collectd_enabled|bool - post_upgrade_tasks: - - when: step|int == 1 - import_role: - name: tripleo-docker-rm - vars: - containers_to_rm: - - collectd diff --git a/environments/collectd-environment.yaml b/environments/collectd-environment.yaml index 6fffcbab73..c2ea90a891 100644 --- a/environments/collectd-environment.yaml +++ b/environments/collectd-environment.yaml @@ -1,5 +1,5 @@ resource_registry: - OS::TripleO::Services::Collectd: ../docker/services/metrics/collectd.yaml + OS::TripleO::Services::Collectd: ../deployment/metrics/collectd-container-puppet.yaml # parameter_defaults: # diff --git a/environments/computealt.yaml b/environments/computealt.yaml index e189579ea1..3fabebfcd8 100644 --- a/environments/computealt.yaml +++ b/environments/computealt.yaml @@ -1,7 +1,7 @@ resource_registry: OS::TripleO::Services::CollectdAlt: OS::Heat::None # If enabling collectd you'll need provide the following in a specific resource_registry - # OS::TripleO::Services::CollectdAlt: ../puppet/services/metrics/collectd.yaml + # OS::TripleO::Services::CollectdAlt: ../deployment/metrics/collectd-container-puppet.yaml OS::TripleO::Services::ComputeCeilometerAgentAlt: ../deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml OS::TripleO::Services::ComputeNeutronOvsAgentAlt: ../deployment/neutron/neutron-ovs-agent-container-puppet.yaml OS::TripleO::Services::FluentdAlt: OS::Heat::None diff --git a/environments/services-baremetal/collectd.yaml b/environments/services-baremetal/collectd.yaml index c4ed9b7166..6a6cd4b62d 100644 --- a/environments/services-baremetal/collectd.yaml +++ b/environments/services-baremetal/collectd.yaml @@ -1,2 +1,2 @@ resource_registry: - OS::TripleO::Services::Collectd: ../../puppet/services/metrics/collectd.yaml + OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml diff --git a/environments/services/collectd.yaml b/environments/services/collectd.yaml index 1be33d9957..6a6cd4b62d 100644 --- a/environments/services/collectd.yaml +++ b/environments/services/collectd.yaml @@ -1,2 +1,2 @@ resource_registry: - OS::TripleO::Services::Collectd: ../../docker/services/metrics/collectd.yaml + OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml