Merge "Remove mongodb supported for panko backend"

This commit is contained in:
Zuul 2020-06-18 20:09:23 +00:00 committed by Gerrit Code Review
commit e6584532d2
7 changed files with 4 additions and 37 deletions

View File

@ -839,13 +839,6 @@ glance_api_hosts: "{{ [groups['glance-api']|first] if glance_backend_file | bool
barbican_crypto_plugin: "simple_crypto" barbican_crypto_plugin: "simple_crypto"
barbican_library_path: "/usr/lib/libCryptoki2_64.so" barbican_library_path: "/usr/lib/libCryptoki2_64.so"
########################
### Panko options
########################
# Valid options are [ mongodb, mysql ]
panko_database_type: "mysql"
################# #################
# Gnocchi options # Gnocchi options
################# #################

View File

@ -27,8 +27,6 @@ panko_services:
#################### ####################
panko_database_name: "panko" panko_database_name: "panko"
panko_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}panko{% endif %}" panko_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}panko{% endif %}"
panko_database_port: "{{ mongodb_port if panko_database_type == 'mongodb' else database_port }}"
panko_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ panko_database_port }}{% if not loop.last %},{% endif %}{% endfor %}"
panko_database_mysql_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}" panko_database_mysql_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
#################### ####################

View File

@ -1,18 +1,4 @@
--- ---
- name: Creating Panko MongoDB database
become: true
command: >
docker exec -t mongodb mongo --host {{ mongodb_replication_set_name }}/{{ panko_database_mongodb_address }} --eval
'db = db.getSiblingDB("{{ panko_database_name }}");
db.createUser({user':' "{{ panko_database_user }}", pwd':' "{{ panko_database_password }}", roles':' [ "readWrite", "dbAdmin" ]})'
register: mongodb_panko_database
run_once: true
changed_when: mongodb_panko_database.stdout.find('already') == -1
failed_when: mongodb_panko_database.stdout.split()[4] != 'connecting'
delegate_to: "{{ groups['mongodb'][0] }}"
when:
- panko_database_type == "mongodb"
- name: Creating Panko mysql database - name: Creating Panko mysql database
become: true become: true
kolla_toolbox: kolla_toolbox:
@ -27,7 +13,6 @@
delegate_to: "{{ groups['panko-api'][0] }}" delegate_to: "{{ groups['panko-api'][0] }}"
when: when:
- not use_preconfigured_databases | bool - not use_preconfigured_databases | bool
- panko_database_type == "mysql"
- name: Creating Panko mysql database user and setting permissions - name: Creating Panko mysql database user and setting permissions
become: true become: true
@ -47,6 +32,5 @@
delegate_to: "{{ groups['panko-api'][0] }}" delegate_to: "{{ groups['panko-api'][0] }}"
when: when:
- not use_preconfigured_databases | bool - not use_preconfigured_databases | bool
- panko_database_type == "mysql"
- include_tasks: bootstrap_service.yml - include_tasks: bootstrap_service.yml

View File

@ -10,7 +10,6 @@
environment: environment:
KOLLA_BOOTSTRAP: KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
PANKO_DATABASE_TYPE: "{{ panko_database_type }}"
image: "{{ panko_api.image }}" image: "{{ panko_api.image }}"
labels: labels:
BOOTSTRAP: BOOTSTRAP:

View File

@ -8,13 +8,8 @@ log_file = /var/log/kolla/panko/panko-api.log
[database] [database]
{% if panko_database_type == "mongodb" %}
connection = mongodb://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mongodb_address }}/{{ panko_database_name }}
metering_connection = mongodb://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mongodb_address }}/{{ panko_database_name }}
{% elif panko_database_type == "mysql" %}
connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }} connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }}
metering_connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }} metering_connection = mysql+pymysql://{{ panko_database_user }}:{{ panko_database_password }}@{{ panko_database_mysql_address }}/{{ panko_database_name }}
{% endif %}
[keystone_authtoken] [keystone_authtoken]
www_authenticate_uri = {{ keystone_internal_url }} www_authenticate_uri = {{ keystone_internal_url }}

View File

@ -453,12 +453,6 @@
#barbican_crypto_plugin: "simple_crypto" #barbican_crypto_plugin: "simple_crypto"
#barbican_library_path: "/usr/lib/libCryptoki2_64.so" #barbican_library_path: "/usr/lib/libCryptoki2_64.so"
################
## Panko options
################
# Valid options are [ mongodb, mysql ]
#panko_database_type: "mysql"
################# #################
# Gnocchi options # Gnocchi options
################# #################

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support mongodb for panko as backend has been removed.