Ceph roles cleanup

Since we don't have ceph-ansible anymore, we can rework the existing
tripleo-ansible ceph roles removing some unused content. For this
reason this patch removes the tripleo_ceph_work_dir role since most
of the tasks that are supposed to prepare the cephadm environment
are executed using the tripleo_run_cephadm role.

Change-Id: I1ffb37b81807119ad41bc899b12c1a331ee06e7d
This commit is contained in:
Francesco Pantano 2021-07-07 09:23:42 +02:00
parent 69dcd53747
commit d154001572
No known key found for this signature in database
GPG Key ID: 0458D4D1F41BD75C
12 changed files with 4 additions and 251 deletions

View File

@ -1,42 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- hosts: Undercloud
tasks:
# tripleo heat templates call these on step1
- name: include common ceph defaults
include_role:
name: tripleo_ceph_common
- name: create ceph-ansible working directory
include_role:
name: tripleo_ceph_work_dir
tasks_from: prepare
- name: prepare for ceph-ansible uuid gathering
include_role:
name: tripleo_ceph_uuid
tasks_from: prepare
# tripleo heat templates call these on step2
- name: get ssh private key
include_role:
name: tripleo_ceph_work_dir
tasks_from: get_ssh_private_key
- name: run nodes-uuid
include_role:
name: tripleo_ceph_uuid
tasks_from: gather
- name: run ceph-ansible
include_role:
name: tripleo_ceph_run_ansible

View File

@ -1,37 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
galaxy_info:
author: OpenStack
description: TripleO OpenStack Role -- tripleo_ceph_work_dir
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.7
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 7
- 8
galaxy_tags:
- tripleo

View File

@ -1,37 +0,0 @@
# Molecule managed
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi
{% for pkg in item.easy_install | default([]) %}
# install pip for centos where there is no python-pip rpm in default repos
RUN easy_install {{ pkg }}
{% endfor %}
CMD ["sh", "-c", "while true; do sleep 10000; done"]

View File

@ -1,21 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Converge
hosts: all
roles:
- role: "tripleo_ceph_work_dir"

View File

@ -1,51 +0,0 @@
---
driver:
name: podman
log: true
platforms:
- name: ubi8
hostname: ubi8
image: ubi8/ubi-init
registry:
url: registry.access.redhat.com
dockerfile: Dockerfile
pkg_extras: python*setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
- /etc/pki/rpm-gpg:/etc/pki/rpm-gpg
- /opt/yum.repos.d:/etc/yum.repos.d:rw
- /etc/dnf/vars:/etc/dnf/vars
privileged: true
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host
provisioner:
name: ansible
inventory:
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
vars:
ansible_user: root
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- verify
- destroy
verifier:
name: testinfra

View File

@ -1,21 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Prepare
hosts: all
roles:
- role: test_deps

View File

@ -1,15 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -1,17 +0,0 @@
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
# This inventory is only used to configure members of the ceph clients role
[clients]
{% for host in mon_client_hosts|unique %}
{% if hostvars[host]['ansible_ssh_user'] is defined and hostvars[host]['ansible_ssh_user']|length > 0 %}
{{ hostvars[host]['ansible_host'] }} ansible_ssh_user={{ hostvars[host]['ansible_ssh_user'] }}
{% else %}
{{ hostvars[host]['ansible_host'] }}
{% endif %}
{% endfor %}
[mons]
[osds]
[rgws]
[mdss]
[grafana-server]

View File

@ -23,7 +23,7 @@
tags:
- run_cephadm
- name: symbolic link to tripleo inventory from ceph-ansible work directory
- name: symbolic link to tripleo inventory from cephadm work directory
file:
src: "{{ inventory_file }}"
dest: "{{ playbook_dir }}/cephadm/inventory.yml"
@ -53,9 +53,7 @@
when:
- tripleo_enabled_services | intersect(['ceph_grafana'])
- include_role:
name: tripleo_ceph_work_dir
tasks_from: build_pools.yml
- include_tasks: build_pools.yml
vars:
tripleo_pool_images: "{{ ceph_pools.glance_pool.enabled }}"
tripleo_pool_vms: "{{ ceph_pools.nova_pool.enabled }}"
@ -63,13 +61,9 @@
tripleo_pool_backup: "{{ ceph_pools.cinder_backup_pool.enabled }}"
tripleo_pool_metrics: "{{ ceph_pools.gnocchi_pool.enabled }}"
- include_role:
name: tripleo_ceph_work_dir
tasks_from: build_keys.yml
- include_tasks: build_keys.yml
- include_role:
name: tripleo_ceph_work_dir
tasks_from: build_config_overrides.yml
- include_tasks: build_config_overrides.yml
- name: generate heat cephadm-extra-vars for running tripleo_cephadm role
copy: