diff --git a/ci/environments/scenario001-multinode-containers.yaml b/ci/environments/scenario001-multinode-containers.yaml index 0c16d68ea3..07eca1f04c 100644 --- a/ci/environments/scenario001-multinode-containers.yaml +++ b/ci/environments/scenario001-multinode-containers.yaml @@ -20,7 +20,7 @@ resource_registry: OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml OS::TripleO::Services::Keepalived: OS::Heat::None #Needs to run scenario001 - OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml # NOTE(mmagr): We need to disable Sensu client deployment for now as the container health check is based # on successful RabbitMQ connection, which does not happen in this case. We can enable it again when we # will implement default connection to overcloud RabbitMQ instance, diff --git a/ci/environments/scenario001-standalone.yaml b/ci/environments/scenario001-standalone.yaml index 6437164a8e..d4722d6ed1 100644 --- a/ci/environments/scenario001-standalone.yaml +++ b/ci/environments/scenario001-standalone.yaml @@ -32,7 +32,7 @@ resource_registry: OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml OS::TripleO::Services::Keepalived: OS::Heat::None #Needs to run scenario001 - OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml # NOTE(mmagr): We need to disable Sensu client deployment for now as the container health check is based # on successful RabbitMQ connection, which does not happen in this case. We can enable it again when we # will implement default connection to overcloud RabbitMQ instance, diff --git a/ci/environments/scenario002-multinode-containers.yaml b/ci/environments/scenario002-multinode-containers.yaml index f365958a57..8bcab730b6 100644 --- a/ci/environments/scenario002-multinode-containers.yaml +++ b/ci/environments/scenario002-multinode-containers.yaml @@ -20,7 +20,7 @@ resource_registry: # Some infra instances don't pass the ping test but are otherwise working. # Since the OVB jobs also test this functionality we can shut it off here. OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml - OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml parameter_defaults: ControllerServices: diff --git a/ci/environments/scenario002-standalone.yaml b/ci/environments/scenario002-standalone.yaml index 3324fd9a3f..e0063abe65 100644 --- a/ci/environments/scenario002-standalone.yaml +++ b/ci/environments/scenario002-standalone.yaml @@ -31,7 +31,7 @@ resource_registry: # Some infra instances don't pass the ping test but are otherwise working. # Since the OVB jobs also test this functionality we can shut it off here. OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml - OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml OS::TripleO::Services::Horizon: OS::Heat::None parameter_defaults: diff --git a/puppet/services/logging/fluentd-config.yaml b/deployment/logging/fluentd-config.yaml similarity index 100% rename from puppet/services/logging/fluentd-config.yaml rename to deployment/logging/fluentd-config.yaml diff --git a/docker/services/fluentd.yaml b/deployment/logging/fluentd-container-puppet.yaml similarity index 69% rename from docker/services/fluentd.yaml rename to deployment/logging/fluentd-container-puppet.yaml index 4f58bcb3df..2b670ce127 100644 --- a/docker/services/fluentd.yaml +++ b/deployment/logging/fluentd-container-puppet.yaml @@ -41,32 +41,56 @@ parameters: resources: ContainersCommon: - type: ./containers-common.yaml + type: ../../docker/services/containers-common.yaml - FluentdClientBase: - type: ../../puppet/services/logging/fluentd.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} + LoggingConfiguration: + type: OS::TripleO::LoggingConfiguration outputs: role_data: description: Role data for the fluentd role. value: - service_name: {get_attr: [FluentdClientBase, role_data, service_name]} + service_name: fluentd config_settings: - map_merge: - - {get_attr: [FluentdClientBase, role_data, config_settings]} + fluentd::package_name: fluentd + fluentd::service_name: fluentd + fluentd::config_file: /etc/fluentd/fluent.conf + fluentd::config_owner: fluentd + fluentd::config_group: fluentd + fluentd::config_path: /etc/fluentd/config.d + fluentd::plugin_provider: yum + fluentd::service_provider: systemd + fluentd::repo_install: false + tripleo::profile::base::logging::fluentd::fluentd_servers: + get_attr: [LoggingConfiguration, LoggingServers] + tripleo::profile::base::logging::fluentd::fluentd_default_format: + get_attr: [LoggingConfiguration, LoggingDefaultFormat] + tripleo::profile::base::logging::fluentd::fluentd_filters: + yaql: + expression: > + $.data.filters.flatten().where($) + data: + filters: + - get_attr: [LoggingConfiguration, LoggingDefaultFilters] + - get_attr: [LoggingConfiguration, LoggingExtraFilters] + tripleo::profile::base::logging::fluentd::fluentd_pos_file_path: + get_attr: [LoggingConfiguration, LoggingPosFilePath] + tripleo::profile::base::logging::fluentd::fluentd_use_ssl: + get_attr: [LoggingConfiguration, LoggingUsesSSL] + tripleo::profile::base::logging::fluentd::fluentd_ssl_certificate: + get_attr: [LoggingConfiguration, LoggingSSLCertificate] + tripleo::profile::base::logging::fluentd::fluentd_ssl_key: + get_attr: [LoggingConfiguration, LoggingSSLKey] + tripleo::profile::base::logging::fluentd::fluentd_ssl_key_passphrase: + get_attr: [LoggingConfiguration, LoggingSSLKeyPassphrase] + tripleo::profile::base::logging::fluentd::fluentd_shared_key: + get_attr: [LoggingConfiguration, LoggingSharedKey] # BEGIN DOCKER SETTINGS puppet_config: config_volume: fluentd puppet_tags: config - step_config: - get_attr: [FluentdClientBase, role_data, step_config] + step_config: | + include ::tripleo::profile::base::logging::fluentd config_image: {get_param: DockerFluentdConfigImage} kolla_config: /var/lib/kolla/config_files/fluentd.json: diff --git a/environments/computealt.yaml b/environments/computealt.yaml index 11b081d696..fffac9211e 100644 --- a/environments/computealt.yaml +++ b/environments/computealt.yaml @@ -6,7 +6,7 @@ resource_registry: OS::TripleO::Services::ComputeNeutronOvsAgentAlt: ../deployment/neutron/neutron-ovs-agent-container-puppet.yaml OS::TripleO::Services::FluentdAlt: OS::Heat::None # If enabling fluentd you'll need provide the following in a specific resource_registry - # OS::TripleO::Services::FluentdAlt: ../puppet/services/logging/fluentd.yaml + # OS::TripleO::Services::FluentdAlt: ../deployment/logging/fluentd-container-puppet.yaml OS::TripleO::Services::IscsidAlt: ../deployment/iscsid/iscsid-container-puppet.yaml OS::TripleO::Services::NovaComputeAlt: ../deployment/nova/nova-compute-container-puppet.yaml OS::TripleO::Services::NovaLibvirtAlt: ../deployment/nova/nova-libvirt-container-puppet.yaml diff --git a/environments/logging-environment.yaml b/environments/logging-environment.yaml index 16a34763e4..1c23177b21 100644 --- a/environments/logging-environment.yaml +++ b/environments/logging-environment.yaml @@ -2,7 +2,7 @@ ## logging agents resource_registry: - OS::TripleO::Services::Fluentd: ../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../deployment/logging/fluentd-container-puppet.yaml #parameter_defaults: diff --git a/environments/services-baremetal/fluentd.yaml b/environments/services-baremetal/fluentd.yaml index 4ee5921c0e..7e1c174343 100644 --- a/environments/services-baremetal/fluentd.yaml +++ b/environments/services-baremetal/fluentd.yaml @@ -1,2 +1,2 @@ resource_registry: - OS::TripleO::Services::Fluentd: ../../puppet/services/logging/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml diff --git a/environments/services/fluentd.yaml b/environments/services/fluentd.yaml index 8e486e00e1..7e1c174343 100644 --- a/environments/services/fluentd.yaml +++ b/environments/services/fluentd.yaml @@ -1,2 +1,2 @@ resource_registry: - OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml + OS::TripleO::Services::Fluentd: ../../deployment/logging/fluentd-container-puppet.yaml diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index 48c043cbac..de9bdd3252 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -243,7 +243,7 @@ resource_registry: OS::TripleO::Services::TripleoValidations: OS::Heat::None OS::TripleO::Services::UndercloudUpgrade: OS::Heat::None OS::TripleO::Services::Collectd: OS::Heat::None - OS::TripleO::LoggingConfiguration: puppet/services/logging/fluentd-config.yaml + OS::TripleO::LoggingConfiguration: deployment/logging/fluentd-config.yaml OS::TripleO::Services::ManilaApi: OS::Heat::None OS::TripleO::Services::ManilaScheduler: OS::Heat::None OS::TripleO::Services::ManilaShare: OS::Heat::None diff --git a/puppet/services/logging/fluentd.yaml b/puppet/services/logging/fluentd.yaml deleted file mode 100644 index 617884134e..0000000000 --- a/puppet/services/logging/fluentd.yaml +++ /dev/null @@ -1,82 +0,0 @@ -heat_template_version: rocky - -description: > - Fluentd client configured with Puppet. - This service is deprecated and will be removed in future releases. - -parameters: - 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 - EndpointMap: - default: {} - description: > - Mapping of service endpoint -> protocol. Typically set - via parameter_defaults in the resource registry. - type: json - -resources: - - LoggingConfiguration: - type: OS::TripleO::LoggingConfiguration - -outputs: - role_data: - description: Role data for the Fluentd client role. - value: - service_name: fluentd - config_settings: - fluentd::package_name: fluentd - fluentd::service_name: fluentd - fluentd::config_file: /etc/fluentd/fluent.conf - fluentd::config_owner: fluentd - fluentd::config_group: fluentd - fluentd::config_path: /etc/fluentd/config.d - fluentd::plugin_provider: yum - fluentd::service_provider: systemd - fluentd::repo_install: false - tripleo::profile::base::logging::fluentd::fluentd_servers: - get_attr: [LoggingConfiguration, LoggingServers] - tripleo::profile::base::logging::fluentd::fluentd_default_format: - get_attr: [LoggingConfiguration, LoggingDefaultFormat] - tripleo::profile::base::logging::fluentd::fluentd_filters: - yaql: - expression: > - $.data.filters.flatten().where($) - data: - filters: - - get_attr: [LoggingConfiguration, LoggingDefaultFilters] - - get_attr: [LoggingConfiguration, LoggingExtraFilters] - tripleo::profile::base::logging::fluentd::fluentd_pos_file_path: - get_attr: [LoggingConfiguration, LoggingPosFilePath] - tripleo::profile::base::logging::fluentd::fluentd_use_ssl: - get_attr: [LoggingConfiguration, LoggingUsesSSL] - tripleo::profile::base::logging::fluentd::fluentd_ssl_certificate: - get_attr: [LoggingConfiguration, LoggingSSLCertificate] - tripleo::profile::base::logging::fluentd::fluentd_ssl_key: - get_attr: [LoggingConfiguration, LoggingSSLKey] - tripleo::profile::base::logging::fluentd::fluentd_ssl_key_passphrase: - get_attr: [LoggingConfiguration, LoggingSSLKeyPassphrase] - tripleo::profile::base::logging::fluentd::fluentd_shared_key: - get_attr: [LoggingConfiguration, LoggingSharedKey] - step_config: | - include ::tripleo::profile::base::logging::fluentd - upgrade_tasks: []