diff options
Diffstat (limited to 'ansible/roles/gnocchi')
21 files changed, 0 insertions, 704 deletions
diff --git a/ansible/roles/gnocchi/defaults/main.yml b/ansible/roles/gnocchi/defaults/main.yml deleted file mode 100644 index cd80d1695..000000000 --- a/ansible/roles/gnocchi/defaults/main.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -project_name: "gnocchi" - - -#################### -# Ceph -#################### -ceph_gnocchi_pool_type: "{{ ceph_pool_type }}" -ceph_gnocchi_cache_mode: "{{ ceph_cache_mode }}" - -# Due to Ansible issues on include, you cannot override these variables. Please -# override the variables they reference instead. -gnocchi_pool_name: "{{ ceph_gnocchi_pool_name }}" -gnocchi_pool_type: "{{ ceph_gnocchi_pool_type }}" -gnocchi_cache_mode: "{{ ceph_gnocchi_cache_mode }}" - - -#################### -# Database -#################### -gnocchi_database_name: "gnocchi" -gnocchi_database_user: "gnocchi" -gnocchi_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" - - -#################### -# Docker -#################### -gnocchi_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-api" -gnocchi_api_tag: "{{ openstack_release }}" -gnocchi_api_image_full: "{{ gnocchi_api_image }}:{{ gnocchi_api_tag }}" - -gnocchi_statsd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-statsd" -gnocchi_statsd_tag: "{{ openstack_release }}" -gnocchi_statsd_image_full: "{{ gnocchi_statsd_image }}:{{ gnocchi_statsd_tag }}" - -gnocchi_metricd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-metricd" -gnocchi_metricd_tag: "{{ openstack_release }}" -gnocchi_metricd_image_full: "{{ gnocchi_metricd_image }}:{{ gnocchi_metricd_tag }}" - -#################### -# OpenStack -#################### -gnocchi_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}" -gnocchi_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}" -gnocchi_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ gnocchi_api_port }}" - -gnocchi_logging_debug: "{{ openstack_logging_debug }}" - -gnocchi_keystone_user: "gnocchi" - -openstack_gnocchi_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}','domain_name':'default'}" diff --git a/ansible/roles/gnocchi/meta/main.yml b/ansible/roles/gnocchi/meta/main.yml deleted file mode 100644 index 6b4fff8fe..000000000 --- a/ansible/roles/gnocchi/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - { role: common } diff --git a/ansible/roles/gnocchi/tasks/bootstrap.yml b/ansible/roles/gnocchi/tasks/bootstrap.yml deleted file mode 100644 index 70611b85d..000000000 --- a/ansible/roles/gnocchi/tasks/bootstrap.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- name: Creating gnocchi database - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_db - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ gnocchi_database_name }}'" - register: database - changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and - (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['gnocchi-api'][0] }}" - -- name: Reading json from variable - set_fact: - database_created: "{{ (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - -- name: Creating gnocchi database user and setting permissions - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_user - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ gnocchi_database_name }}' - password='{{ gnocchi_database_password }}' - host='%' - priv='{{ gnocchi_database_name }}.*:ALL' - append_privs='yes'" - register: database_user_create - changed_when: "{{ database_user_create.stdout.find('localhost | SUCCESS => ') != -1 and - (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database_user_create.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['gnocchi-api'][0] }}" - -- include: bootstrap_service.yml - when: database_created diff --git a/ansible/roles/gnocchi/tasks/bootstrap_service.yml b/ansible/roles/gnocchi/tasks/bootstrap_service.yml deleted file mode 100644 index 91e140cf7..000000000 --- a/ansible/roles/gnocchi/tasks/bootstrap_service.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Running gnocchi bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ gnocchi_api_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_gnocchi" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "gnocchi:/var/lib/gnocchi/" - - "kolla_logs:/var/log/kolla/" - run_once: True - delegate_to: "{{ groups['gnocchi-api'][0] }}" diff --git a/ansible/roles/gnocchi/tasks/ceph.yml b/ansible/roles/gnocchi/tasks/ceph.yml deleted file mode 100644 index e5c6d9a16..000000000 --- a/ansible/roles/gnocchi/tasks/ceph.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -- name: Ensuring config directory exists - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" - -- name: Copying over config(s) - template: - src: roles/ceph/templates/ceph.conf.j2 - dest: "{{ node_config_directory }}/{{ item }}/ceph.conf" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" - -- include: ../../ceph_pools.yml - vars: - pool_name: "{{ gnocchi_pool_name }}" - pool_type: "{{ gnocchi_pool_type }}" - cache_mode: "{{ gnocchi_cache_mode }}" - -# TODO(SamYaple): Improve changed_when tests -- name: Pulling cephx keyring - command: docker exec ceph_mon ceph auth get-or-create client.gnocchi mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_gnocchi_pool_name }}, allow rwx pool={{ ceph_gnocchi_pool_name }}-cache' - register: cephx_key - delegate_to: "{{ groups['ceph-mon'][0] }}" - changed_when: False - run_once: True - -- name: Pushing cephx keyring - copy: - content: "{{ cephx_key.stdout }}\n\r" - dest: "{{ node_config_directory }}/{{ item }}/ceph.client.gnocchi.keyring" - mode: "0600" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" diff --git a/ansible/roles/gnocchi/tasks/config.yml b/ansible/roles/gnocchi/tasks/config.yml deleted file mode 100644 index 5e74dca26..000000000 --- a/ansible/roles/gnocchi/tasks/config.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - recurse: yes - with_items: - - "gnocchi-api" - - "gnocchi-statsd" - - "gnocchi-metricd" - -- name: Copying over config.json files for services - template: - src: "{{ item }}.json.j2" - dest: "{{ node_config_directory }}/{{ item }}/config.json" - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" - -- name: Copying over api-paste.ini - merge_configs: - sources: - - "{{ role_path }}/templates/api-paste.ini.j2" - - "{{ node_custom_config }}/gnocchi/api-paste.ini" - - "{{ node_custom_config }}/gnocchi/{{ inventory_hostname }}/api-paste.ini" - dest: "{{ node_config_directory }}/gnocchi-api/api-paste.ini" - -- name: Copying over gnocchi.conf - merge_configs: - vars: - service_name: "{{ item }}" - sources: - - "{{ role_path }}/templates/gnocchi.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/database.conf" - - "{{ node_custom_config }}/messaging.conf" - - "{{ node_custom_config }}/gnocchi.conf" - - "{{ node_custom_config }}/gnocchi/{{ item }}.conf" - - "{{ node_custom_config }}/gnocchi/{{ inventory_hostname }}/gnocchi.conf" - dest: "{{ node_config_directory }}/{{ item }}/gnocchi.conf" - with_items: - - "gnocchi-api" - - "gnocchi-statsd" - - "gnocchi-metricd" - -- name: Copying over wsgi-gnocchi.conf - template: - src: "wsgi-gnocchi.conf.j2" - dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf" - with_items: - - "gnocchi-api" - -- name: Check if policies shall be overwritten - local_action: stat path="{{ node_custom_config }}/gnocchi/policy.json" - register: gnocchi_policy - -- name: Copying over existing policy.json - template: - src: "{{ node_custom_config }}/gnocchi/policy.json" - dest: "{{ node_config_directory }}/{{ item }}/policy.json" - with_items: - - "gnocchi-api" - - "gnocchi-statsd" - - "gnocchi-metricd" - when: - gnocchi_policy.stat.exists diff --git a/ansible/roles/gnocchi/tasks/deploy.yml b/ansible/roles/gnocchi/tasks/deploy.yml deleted file mode 100644 index 0fb27eca9..000000000 --- a/ansible/roles/gnocchi/tasks/deploy.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- include: ceph.yml - when: - - enable_ceph|bool - - gnocchi_backend_storage == 'ceph' - -- include: external_ceph.yml - when: - - enable_ceph|bool == False - - gnocchi_backend_storage == 'ceph' - -- include: register.yml - when: inventory_hostname in groups['gnocchi-api'] - -- include: config.yml - when: inventory_hostname in groups['gnocchi-statsd'] or - inventory_hostname in groups['gnocchi-api'] or - inventory_hostname in groups['gnocchi-metricd'] - -- include: bootstrap.yml - when: inventory_hostname in groups['gnocchi-api'] - -- include: start.yml - when: inventory_hostname in groups['gnocchi-statsd'] or - inventory_hostname in groups['gnocchi-api'] or - inventory_hostname in groups['gnocchi-metricd'] diff --git a/ansible/roles/gnocchi/tasks/external_ceph.yml b/ansible/roles/gnocchi/tasks/external_ceph.yml deleted file mode 100644 index 623ed8007..000000000 --- a/ansible/roles/gnocchi/tasks/external_ceph.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: Ensuring config directory exists - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" - -- name: Copy over ceph.conf file - copy: - src: "{{ node_custom_config }}/{{ item }}/ceph.conf" - dest: "{{ node_config_directory }}/{{ item }}/ceph.conf" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" - -- name: Copy over ceph gnocchi keyring - copy: - src: "{{ node_custom_config }}/{{ item }}/ceph.client.gnocchi.keyring" - dest: "{{ node_config_directory }}/{{ item }}/ceph.client.gnocchi.keryring" - when: inventory_hostname in groups[item] - with_items: - - "gnocchi-api" - - "gnocchi-metricd" - - "gnocchi-statsd" diff --git a/ansible/roles/gnocchi/tasks/main.yml b/ansible/roles/gnocchi/tasks/main.yml deleted file mode 100644 index b017e8b4a..000000000 --- a/ansible/roles/gnocchi/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: "{{ action }}.yml" diff --git a/ansible/roles/gnocchi/tasks/precheck.yml b/ansible/roles/gnocchi/tasks/precheck.yml deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/gnocchi/tasks/precheck.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/gnocchi/tasks/pull.yml b/ansible/roles/gnocchi/tasks/pull.yml deleted file mode 100644 index caefd8aaf..000000000 --- a/ansible/roles/gnocchi/tasks/pull.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Pulling gnocchi-api image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_api_image_full }}" - when: inventory_hostname in groups['gnocchi-api'] - -- name: Pulling gnocchi-metricd image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_metricd_image_full }}" - when: inventory_hostname in groups['gnocchi-metricd'] - -- name: Pulling gnocchi-statsd image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_statsd_image_full }}" - when: inventory_hostname in groups['gnocchi-statsd'] diff --git a/ansible/roles/gnocchi/tasks/reconfigure.yml b/ansible/roles/gnocchi/tasks/reconfigure.yml deleted file mode 100644 index 39798455c..000000000 --- a/ansible/roles/gnocchi/tasks/reconfigure.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- -- name: Ensuring the containers up - kolla_docker: - name: "{{ item.name }}" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: inventory_hostname in groups[item.group] - with_items: - - { name: gnocchi_api, group: gnocchi-api } - - { name: gnocchi_metricd, group: gnocchi-metricd } - - { name: gnocchi_statsd, group: gnocchi-statsd } - -- include: config.yml - -- name: Check the configs - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: check_results - when: inventory_hostname in groups[item.group] - with_items: - - { name: gnocchi_api, group: gnocchi-api } - - { name: gnocchi_metricd, group: gnocchi-metricd } - - { name: gnocchi_statsd, group: gnocchi-statsd } - -# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS' -# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', -# just remove the container and start again -- name: Containers config strategy - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: container_envs - when: inventory_hostname in groups[item.group] - with_items: - - { name: gnocchi_api, group: gnocchi-api } - - { name: gnocchi_metricd, group: gnocchi-metricd } - - { name: gnocchi_statsd, group: gnocchi-statsd } - -- name: Remove the containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_containers - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: gnocchi_api, group: gnocchi-api }, - { name: gnocchi_metricd, group: gnocchi-metricd }, - { name: gnocchi_statsd, group: gnocchi-statsd }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" - -- include: start.yml - when: remove_containers.changed - -- name: Restart containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "restart_container" - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == 'COPY_ALWAYS' - - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: gnocchi_api, group: gnocchi-api }, - { name: gnocchi_metricd, group: gnocchi-metricd }, - { name: gnocchi_statsd, group: gnocchi-statsd }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" diff --git a/ansible/roles/gnocchi/tasks/register.yml b/ansible/roles/gnocchi/tasks/register.yml deleted file mode 100644 index 5b60ff22f..000000000 --- a/ansible/roles/gnocchi/tasks/register.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- name: Creating the gnocchi service and endpoint - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_service - -a "service_name=gnocchi - service_type=metric - description='OpenStack Metric Service' - endpoint_region={{ openstack_region_name }} - url='{{ item.url }}' - interface='{{ item.interface }}' - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_gnocchi_auth }}' }}" - -e "{'openstack_gnocchi_auth':{{ openstack_gnocchi_auth }}}" - register: gnocchi_endpoint - changed_when: "{{ gnocchi_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (gnocchi_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: gnocchi_endpoint.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True - with_items: - - {'interface': 'admin', 'url': '{{ gnocchi_admin_endpoint }}'} - - {'interface': 'internal', 'url': '{{ gnocchi_internal_endpoint }}'} - - {'interface': 'public', 'url': '{{ gnocchi_public_endpoint }}'} - -- name: Creating the gnocchi project, user, and role - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_user - -a "project=service - user=gnocchi - password={{ gnocchi_keystone_password }} - role=admin - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_gnocchi_auth }}' }}" - -e "{'openstack_gnocchi_auth':{{ openstack_gnocchi_auth }}}" - register: gnocchi_user - changed_when: "{{ gnocchi_user.stdout.find('localhost | SUCCESS => ') != -1 and (gnocchi_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: gnocchi_user.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True diff --git a/ansible/roles/gnocchi/tasks/start.yml b/ansible/roles/gnocchi/tasks/start.yml deleted file mode 100644 index 5d0231fe4..000000000 --- a/ansible/roles/gnocchi/tasks/start.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- name: Starting gnocchi-api container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_api_image_full }}" - name: "gnocchi_api" - volumes: - - "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "gnocchi:/var/lib/gnocchi/" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['gnocchi-api'] - -- name: Starting gnocchi-metricd container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_metricd_image_full }}" - name: "gnocchi_metricd" - volumes: - - "{{ node_config_directory }}/gnocchi-metricd/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "gnocchi:/var/lib/gnocchi/" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['gnocchi-metricd'] - -- name: Starting gnocchi-statsd container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ gnocchi_statsd_image_full }}" - name: "gnocchi_statsd" - volumes: - - "{{ node_config_directory }}/gnocchi-statsd/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "gnocchi:/var/lib/gnocchi/" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['gnocchi-statsd'] diff --git a/ansible/roles/gnocchi/tasks/upgrade.yml b/ansible/roles/gnocchi/tasks/upgrade.yml deleted file mode 100644 index 308053080..000000000 --- a/ansible/roles/gnocchi/tasks/upgrade.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: config.yml - -- include: bootstrap_service.yml - -- include: start.yml diff --git a/ansible/roles/gnocchi/templates/api-paste.ini.j2 b/ansible/roles/gnocchi/templates/api-paste.ini.j2 deleted file mode 100644 index 22b8c44b0..000000000 --- a/ansible/roles/gnocchi/templates/api-paste.ini.j2 +++ /dev/null @@ -1,38 +0,0 @@ -# Use gnocchi+noauth in the pipeline if you don't want keystone authentication -[pipeline:main] -pipeline = gnocchi+auth - -[composite:gnocchi+noauth] -use = egg:Paste#urlmap -/ = gnocchiversions -/v1 = gnocchiv1 - -[composite:gnocchi+auth] -use = egg:Paste#urlmap -/ = gnocchiversions -/v1 = gnocchiv1+auth - -[pipeline:gnocchiv1+auth] -pipeline = healthcheck keystone_authtoken gnocchiv1 - -[app:gnocchiversions] -paste.app_factory = gnocchi.rest.app:app_factory -root = gnocchi.rest.VersionsController - -[app:gnocchiv1] -paste.app_factory = gnocchi.rest.app:app_factory -root = gnocchi.rest.V1Controller - -[filter:healthcheck] -paste.filter_factory = oslo_middleware:Healthcheck.factory -path = /status -backends = disable_by_file - - -[filter:keystone_authtoken] -paste.filter_factory = keystonemiddleware.auth_token:filter_factory -oslo_config_project = gnocchi - -[filter:cors] -paste.filter_factory = oslo_middleware.cors:filter_factory -oslo_config_project = gnocchi diff --git a/ansible/roles/gnocchi/templates/gnocchi-api.json.j2 b/ansible/roles/gnocchi/templates/gnocchi-api.json.j2 deleted file mode 100644 index 583e6e9a2..000000000 --- a/ansible/roles/gnocchi/templates/gnocchi-api.json.j2 +++ /dev/null @@ -1,49 +0,0 @@ -{% set gnocchi_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %} -{% set gnocchi_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %} -{ - "command": "{{ gnocchi_cmd }} -DFOREGROUND", - "config_files": [ - { - "source": "{{ container_config_directory }}/gnocchi.conf", - "dest": "/etc/gnocchi/gnocchi.conf", - "owner": "gnocchi", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/api-paste.ini", - "dest": "/etc/gnocchi/api-paste.ini", - "owner": "gnocchi", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/wsgi-gnocchi.conf", - "dest": "/etc/{{ gnocchi_dir }}/wsgi-gnocchi.conf", - "owner": "gnocchi", - "perm": "0644" - }{% if gnocchi_backend_storage == 'ceph' %}, - { - "source": "{{ container_config_directory }}/ceph.conf", - "dest": "/etc/ceph/ceph.conf", - "owner": "gnocchi", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/ceph.client.gnocchi.keyring", - "dest": "/etc/ceph/ceph.client.gnocchi.keyring", - "owner": "gnocchi", - "perm": "0600" - }{% endif %} - - ], - "permissions": [ - { - "path": "/var/lib/gnocchi", - "owner": "gnocchi:gnocchi", - "recurse": true - }, - { - "path": "/var/log/kolla/gnocchi", - "owner": "gnocchi:kolla" - } - ] -} diff --git a/ansible/roles/gnocchi/templates/gnocchi-metricd.json.j2 b/ansible/roles/gnocchi/templates/gnocchi-metricd.json.j2 deleted file mode 100644 index 9188a1c8e..000000000 --- a/ansible/roles/gnocchi/templates/gnocchi-metricd.json.j2 +++ /dev/null @@ -1,38 +0,0 @@ -{ - "command": "gnocchi-metricd --logfile /var/log/kolla/gnocchi/gnocchi-metricd.log", - "config_files": [ - { - "source": "{{ container_config_directory }}/gnocchi.conf", - "dest": "/etc/gnocchi/gnocchi.conf", - "owner": "gnocchi", - "perm": "0600" - }{% if gnocchi_backend_storage == 'ceph' %}, - { - "source": "{{ container_config_directory }}/ceph.conf", - "dest": "/etc/ceph/ceph.conf", - "owner": "gnocchi", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/ceph.client.gnocchi.keyring", - "dest": "/etc/ceph/ceph.client.gnocchi.keyring", - "owner": "gnocchi", - "perm": "0600" - }{% endif %} - ], - "permissions": [ - { - "path": "/var/lib/gnocchi", - "owner": "gnocchi:gnocchi", - "recurse": true - }, - { - "path": "/var/log/kolla/gnocchi", - "owner": "gnocchi:kolla" - }, - { - "path": "/var/log/kolla/gnocchi/gnocchi-metricd.*", - "owner": "gnocchi:gnocchi" - } - ] -} diff --git a/ansible/roles/gnocchi/templates/gnocchi-statsd.json.j2 b/ansible/roles/gnocchi/templates/gnocchi-statsd.json.j2 deleted file mode 100644 index 83073147b..000000000 --- a/ansible/roles/gnocchi/templates/gnocchi-statsd.json.j2 +++ /dev/null @@ -1,38 +0,0 @@ -{ - "command": "gnocchi-statsd --logfile /var/log/kolla/gnocchi/gnocchi-statsd.log", - "config_files": [ - { - "source": "{{ container_config_directory }}/gnocchi.conf", - "dest": "/etc/gnocchi/gnocchi.conf", - "owner": "gnocchi", - "perm": "0600" - }{% if gnocchi_backend_storage == 'ceph' %}, - { - "source": "{{ container_config_directory }}/ceph.conf", - "dest": "/etc/ceph/ceph.conf", - "owner": "gnocchi", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/ceph.client.gnocchi.keyring", - "dest": "/etc/ceph/ceph.client.gnocchi.keyring", - "owner": "gnocchi", - "perm": "0600" - }{% endif %} - ], - "permissions": [ - { - "path": "/var/lib/gnocchi", - "owner": "gnocchi:gnocchi", - "recurse": true - }, - { - "path": "/var/log/kolla/gnocchi", - "owner": "gnocchi:kolla" - }, - { - "path": "/var/log/kolla/gnocchi/gnocchi-statsd.*", - "owner": "gnocchi:gnocchi" - } - ] -} diff --git a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/gnocchi.conf.j2 deleted file mode 100644 index 30d8e33c1..000000000 --- a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 +++ /dev/null @@ -1,56 +0,0 @@ -[DEFAULT] -debug = {{ gnocchi_logging_debug }} - -log_dir = /var/log/kolla/gnocchi - - -[api] -port = {{ gnocchi_api_port }} -host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -middlewares = keystonemiddleware.auth_token.AuthProtocol - - -[database] -connection = mysql+pymysql://{{ gnocchi_database_user }}:{{ gnocchi_database_password }}@{{ gnocchi_database_address }}/{{ gnocchi_database_name }} -max_pool_size = 50 -max_overflow = 1000 -max_retries = -1 - -[statsd] -resource_id = {{ gnocchi_resource_id }} -user_id = {{ gnocchi_user_id }} -project_id = {{ gnocchi_project_id }} -archive_policy_name = low - -flush_delay=10 - - -[indexer] -url = mysql+pymysql://{{ gnocchi_database_user }}:{{ gnocchi_database_password }}@{{ gnocchi_database_address }}/{{ gnocchi_database_name }} - - -[keystone_authtoken] -auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3 -project_domain_id = default -project_name = service -user_domain_id = default -username = {{ gnocchi_keystone_user }} -password = {{ gnocchi_keystone_password }} -auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} -auth_type = password - -memcache_security_strategy = ENCRYPT -memcache_secret_key = {{ memcache_secret_key }} -memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} - -[storage] -{% if gnocchi_backend_storage == 'file' %} -driver = file -file_basepath = /var/lib/gnocchi -{% elif gnocchi_backend_storage == 'ceph' %} -driver = ceph -ceph_pool = {{ gnocchi_pool_name }} -ceph_username = gnocchi -ceph_keyring = /etc/ceph/ceph.client.gnocchi.keyring -ceph_conffile = /etc/ceph/ceph.conf -{% endif %} diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 deleted file mode 100644 index 3257eb237..000000000 --- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} -Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ gnocchi_api_port }} - -<VirtualHost *:{{ gnocchi_api_port }}> - - ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log" - CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" combined - WSGIApplicationGroup %{GLOBAL} - WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }} - WSGIProcessGroup gnocchi - WSGIScriptAlias / "{{ python_path }}/gnocchi/rest/app.wsgi" - - <Directory "{{ python_path }}/gnocchi/rest"> - Require all granted - </Directory> - -</VirtualHost> |
