Remove mongodb integration

more info: a6c97d7284

Change-Id: I778d472cc7f6ca19852482a3e309d793973d75a6
Co-Authored-By: jacky06 <zhang.min@99cloud.net>
This commit is contained in:
gugug 2020-06-11 09:34:01 +08:00 committed by jacky06
parent e6584532d2
commit 66ea6e099f
33 changed files with 4 additions and 376 deletions

View File

@ -105,7 +105,6 @@ Kolla-Ansible deploys containers for the following infrastructure components:
- `MariaDB and Galera Cluster <https://mariadb.com/kb/en/mariadb/galera-cluster/>`__
for highly available MySQL databases.
- `Memcached <https://memcached.org/>`__ a distributed memory object caching system.
- `MongoDB <https://www.mongodb.org/>`__ as a database back end for Panko.
- `Open vSwitch <https://openvswitch.org/>`__ and Linuxbridge backends for Neutron.
- `RabbitMQ <https://www.rabbitmq.com/>`__ as a messaging backend for
communication between services.

View File

@ -350,9 +350,6 @@ monasca_agent_forwarder_port: "17123"
monasca_agent_statsd_port: "8125"
monasca_grafana_server_port: "3001"
mongodb_port: "27017"
mongodb_web_port: "28017"
murano_api_port: "8082"
neutron_internal_fqdn: "{{ kolla_internal_fqdn }}"
@ -627,7 +624,6 @@ enable_mariabackup: "no"
enable_masakari: "no"
enable_mistral: "no"
enable_monasca: "no"
enable_mongodb: "no"
enable_multipathd: "no"
enable_murano: "no"
enable_neutron_vpnaas: "no"

View File

@ -101,9 +101,6 @@ monitoring
[storm:children]
monitoring
[mongodb:children]
control
[keystone:children]
control

View File

@ -126,9 +126,6 @@ monitoring
[storm:children]
monitoring
[mongodb:children]
control
[keystone:children]
control

View File

@ -154,8 +154,6 @@ fluentd_input_openstack_services:
enabled: "{{ enable_mistral | bool }}"
- name: monasca
enabled: "{{ enable_monasca | bool }}"
- name: mongodb
enabled: "{{ enable_mongodb | bool }}"
- name: murano
enabled: "{{ enable_murano | bool }}"
- name: neutron

View File

@ -317,7 +317,6 @@
- { name: "masakari", enabled: "{{ enable_masakari }}" }
- { name: "mistral", enabled: "{{ enable_mistral }}" }
- { name: "monasca", enabled: "{{ enable_monasca }}" }
- { name: "mongodb", enabled: "{{ enable_mongodb }}" }
- { name: "murano", enabled: "{{ enable_murano }}" }
- { name: "neutron", enabled: "{{ enable_neutron }}" }
- { name: "nova", enabled: "{{ enable_nova }}" }

View File

@ -1,3 +0,0 @@
"/var/log/kolla/mongodb/*.log"
{
}

View File

@ -38,7 +38,6 @@
( 'masakari', enable_masakari ),
( 'mistral', enable_mistral ),
( 'monasca', enable_monasca ),
( 'mongodb', enable_mongodb ),
( 'murano', enable_murano ),
( 'neutron', enable_neutron ),
( 'nova', enable_nova ),

View File

@ -610,19 +610,6 @@
- haproxy_stat.find('monasca_grafana_server_external') == -1
- haproxy_vip_prechecks
- name: Checking free port for Mongodb HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ mongodb_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- enable_mongodb | bool
- inventory_hostname in groups['haproxy']
- haproxy_stat.find('mongodb') == -1
- haproxy_vip_prechecks
- name: Checking free port for Murano API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"

View File

@ -1,41 +0,0 @@
---
project_name: "mongodb"
mongodb_services:
mongodb:
container_name: mongodb
group: mongodb
enabled: true
privileged: True
image: "{{ mongodb_image_full }}"
volumes: "{{ mongodb_default_volumes + mongodb_extra_volumes }}"
dimensions: "{{ mongodb_dimensions }}"
haproxy:
mongodb:
enabled: "{{ enable_mongodb }}"
mode: "http"
external: false
port: "{{ mongodb_port }}"
####################
# Docker
####################
mongodb_install_type: "{{ kolla_install_type }}"
mongodb_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mongodb_install_type }}-mongodb"
mongodb_tag: "{{ openstack_tag }}"
mongodb_image_full: "{{ mongodb_image }}:{{ mongodb_tag }}"
mongodb_dimensions: "{{ default_container_dimensions }}"
mongodb_default_volumes:
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
- "kolla_logs:/var/log/kolla/"
- "mongodb:/var/lib/mongodb"
mongodb_extra_volumes: "{{ default_extra_volumes }}"
####################
# Mongodb
####################
mongodb_replication_set_name: "rs0"

View File

@ -1,35 +0,0 @@
---
- name: Restart mongodb container
vars:
service_name: "mongodb"
service: "{{ mongodb_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
privileged: "{{ service.privileged | default(False) }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
notify:
- Waiting for the mongodb startup
- Checking current replication status
- Bootstrap cluster
- name: Waiting for the mongodb startup
wait_for: host={{ 'api' | kolla_address }} port={{ mongodb_port }}
- name: Checking current replication status
become: true
command: "docker exec -t mongodb mongo --host {{ 'api' | kolla_address }} --port {{ mongodb_port }} --quiet --eval rs.status().ok"
register: mongodb_replication_status
changed_when: false
delegate_to: "{{ groups['mongodb'][0] }}"
run_once: True
- name: Bootstrap cluster
include_tasks: bootstrap_cluster.yml
when: mongodb_replication_status.stdout != "1"

View File

@ -1,3 +0,0 @@
---
dependencies:
- { role: common }

View File

@ -1,18 +0,0 @@
---
- name: Starting mongodb bootstrap container
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
detach: False
environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
image: "{{ mongodb_image_full }}"
name: "bootstrap_mongodb"
restart_policy: no
volumes:
- "{{ node_config_directory }}/mongodb/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "mongodb:/var/lib/mongodb/"

View File

@ -1,26 +0,0 @@
---
- name: Copying the mongodb replication set bootstrap script
template:
src: bootstrap_cluster.js.j2
dest: /tmp/mongodb_bootstrap_replication_set.js
delegate_to: localhost
run_once: True
- name: Bootstrapping the mongodb replication set
become: true
command: >
docker exec -t mongodb mongo --host {{ api_interface_address }} --port {{ mongodb_port }} --quiet --eval
'{{ lookup('file','/tmp/mongodb_bootstrap_replication_set.js') }}'
register: bootstrap_mongodb_cluster
failed_when: (bootstrap_mongodb_cluster.stdout|from_json).ok != 1
delegate_to: "{{ groups['mongodb'][0] }}"
run_once: True
- name: Deleting the mongodb replication set bootstrap script
file:
path: /tmp/mongodb_bootstrap_replication_set.js
state: absent
delegate_to: localhost
changed_when: false
failed_when: false
run_once: True

View File

@ -1,17 +0,0 @@
---
- name: Check mongodb containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
privileged: "{{ item.value.privileged|default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mongodb_services }}"
notify:
- Restart mongodb container

View File

@ -1 +0,0 @@
---

View File

@ -1,46 +0,0 @@
---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item.key }}"
state: "directory"
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
mode: "0770"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mongodb_services }}"
- name: Copying over config.json files for services
template:
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mongodb_services }}"
notify:
- Restart mongodb container
- name: Copying over mongodb.conf
merge_yaml:
sources:
- "{{ role_path }}/templates/{{ item.key }}.conf.j2"
- "{{ node_custom_config }}/mongodb.conf"
- "{{ node_custom_config }}/mongodb/{{ item.key }}.conf"
- "{{ node_custom_config }}/mongodb/{{ inventory_hostname }}/{{ item.key }}.conf"
dest: "{{ node_config_directory }}/mongodb/{{ item.key }}.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mongodb_services }}"
notify:
- Restart mongodb container
- include_tasks: check-containers.yml
when: kolla_action != "config"

View File

@ -1,2 +0,0 @@
---
- import_tasks: check-containers.yml

View File

@ -1,7 +0,0 @@
---
- include_tasks: config.yml
- include_tasks: bootstrap.yml
- name: Flush handlers
meta: flush_handlers

View File

@ -1,7 +0,0 @@
---
- name: "Configure haproxy for {{ project_name }}"
import_role:
name: haproxy-config
vars:
project_services: "{{ mongodb_services }}"
tags: always

View File

@ -1,8 +0,0 @@
---
- name: Warn about deprecation
debug:
msg: >
MongoDB deployment role is deprecated in Ussuri and will be removed in
Victoria. Please read release notes for more background.
- include_tasks: "{{ kolla_action }}.yml"

View File

@ -1,35 +0,0 @@
---
- import_role:
name: service-precheck
vars:
service_precheck_services: "{{ mongodb_services }}"
service_name: "{{ project_name }}"
- name: Get container facts
become: true
kolla_container_facts:
name:
- mongodb
register: container_facts
- name: Checking free port for Mongodb
wait_for:
host: "{{ api_interface_address }}"
port: "{{ mongodb_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- container_facts['mongodb'] is not defined
- inventory_hostname in groups['mongodb']
- name: Checking free port for Mongodb Web
wait_for:
host: "{{ api_interface_address }}"
port: "{{ mongodb_web_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- container_facts['mongodb'] is not defined
- inventory_hostname in groups['mongodb']

View File

@ -1,11 +0,0 @@
---
- name: Pulling mongodb image
become: true
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ item.value.image }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ mongodb_services }}"

View File

@ -1,2 +0,0 @@
---
- include_tasks: deploy.yml

View File

@ -1,6 +0,0 @@
---
- import_role:
name: service-stop
vars:
project_services: "{{ mongodb_services }}"
service_name: "{{ project_name }}"

View File

@ -1,5 +0,0 @@
---
- include_tasks: config.yml
- name: Flush handlers
meta: flush_handlers

View File

@ -1,14 +0,0 @@
printjson(rs.initiate(
{
"_id" : "{{ mongodb_replication_set_name }}",
"version" : 1,
"members" : [
{% for host in groups["mongodb"] %}
{
"_id" : {{ loop.index }},
"host" : "{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ mongodb_port }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
))

View File

@ -1,17 +0,0 @@
systemLog:
destination: file
logAppend: true
path: /var/log/kolla/mongodb/mongodb.log
storage:
dbPath: /var/lib/mongodb
# Enable journaling, http://www.mongodb.org/display/DOCS/Journaling
journal:
enabled: true
net:
bindIp: {{ api_interface_address }}
port: {{ mongodb_port }}
replication:
replSetName: {{ mongodb_replication_set_name }}

View File

@ -1,23 +0,0 @@
{
"command": "/usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongodb.conf run",
"config_files": [
{
"source": "{{ container_config_directory }}/mongodb.conf",
"dest": "/etc/mongodb.conf",
"owner": "mongodb",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/mongodb",
"owner": "mongodb:mongodb",
"recurse": true
},
{
"path": "/var/log/kolla/mongodb",
"owner": "mongodb:mongodb",
"recurse": true
}
]
}

View File

@ -52,7 +52,6 @@
- enable_memcached_{{ enable_memcached | bool }}
- enable_mistral_{{ enable_mistral | bool }}
- enable_monasca_{{ enable_monasca | bool }}
- enable_mongodb_{{ enable_mongodb | bool }}
- enable_multipathd_{{ enable_multipathd | bool }}
- enable_murano_{{ enable_murano | bool }}
- enable_neutron_{{ enable_neutron | bool }}
@ -253,11 +252,6 @@
tasks_from: loadbalancer
tags: monasca
when: enable_monasca | bool
- include_role:
name: mongodb
tasks_from: loadbalancer
tags: mongodb
when: enable_mongodb | bool
- include_role:
name: murano
tasks_from: loadbalancer
@ -864,17 +858,6 @@
tags: sahara,
when: enable_sahara | bool }
- name: Apply role mongodb
gather_facts: false
hosts:
- mongodb
- '&enable_mongodb_True'
serial: '{{ kolla_serial|default("0") }}'
roles:
- { role: mongodb,
tags: mongodb,
when: enable_mongodb | bool }
- name: Apply role panko
gather_facts: false
hosts:

View File

@ -313,7 +313,6 @@
#enable_masakari: "no"
#enable_mistral: "no"
#enable_monasca: "no"
#enable_mongodb: "no"
#enable_multipathd: "no"
#enable_murano: "no"
#enable_neutron_vpnaas: "no"

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for deploying with mongodb integrations has been removed.

View File

@ -140,9 +140,6 @@ monitoring
[storm:children]
monitoring
[mongodb:children]
control
[keystone:children]
control