+++ /dev/null
----
-# This playbook is used to add a new OSD to
-# an existing cluster without the need for running
-# the ceph-container-common or ceph-common and ceph-mon role again against all
-# of the existing monitors.
-#
-# It can run from any machine. Even if the fetch directory is not present
-# it will be created.
-#
-# Ensure that all monitors are present in the mons
-# group in your inventory so that the ceph configuration file
-# is created correctly for the new OSD(s).
-#
-# It is expected to edit your inventory file to only point to the OSD hosts
-# you want to play the playbook on. So you need to comment already deployed OSD
-# and let uncommented the new OSDs.
-#
-- hosts:
- - mons
- - osds
-
- gather_facts: False
- become: true
-
- vars:
- delegate_facts_host: True
-
- pre_tasks:
- - import_tasks: "{{ playbook_dir }}/../raw_install_python.yml"
-
- - name: gather facts
- setup:
- gather_subset:
- - 'all'
- - '!facter'
- - '!ohai'
- when: not delegate_facts_host | bool
-
- - import_role:
- name: ceph-defaults
-
- - name: gather and delegate facts
- setup:
- gather_subset:
- - 'all'
- - '!facter'
- - '!ohai'
- delegate_to: "{{ item }}"
- delegate_facts: True
- with_items:
- - "{{ groups[mon_group_name] }}"
- - "{{ groups[osd_group_name] }}"
- run_once: True
- when: delegate_facts_host | bool
-
- tasks:
- - import_role:
- name: ceph-facts
-
- - import_role:
- name: ceph-validate
-
-- hosts: osds
- gather_facts: False
- become: True
-
- vars:
- delegate_facts_host: True
-
- pre_tasks:
-
- - name: gather facts
- setup:
- gather_subset:
- - 'all'
- - '!facter'
- - '!ohai'
- when: not delegate_facts_host | bool
-
- - import_role:
- name: ceph-defaults
-
- - name: gather and delegate facts
- setup:
- gather_subset:
- - 'all'
- - '!facter'
- - '!ohai'
- delegate_to: "{{ item }}"
- delegate_facts: True
- with_items:
- - "{{ groups[mon_group_name] }}"
- - "{{ groups[osd_group_name] }}"
- run_once: True
- when: delegate_facts_host | bool
-
- - import_role:
- name: ceph-facts
- - import_role:
- name: ceph-handler
- - import_role:
- name: ceph-infra
- - import_role:
- name: ceph-container-engine
- when: containerized_deployment | bool
- - import_role:
- name: ceph-container-common
- when: containerized_deployment | bool
- - import_role:
- name: ceph-common
- when: not containerized_deployment | bool
-
- # this task is needed so we can skip the openstack_config.yml include in roles/ceph-osd
- - name: set_fact add_osd
- set_fact:
- add_osd: True
-
- - name: set noup flag
- command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set noup"
- delegate_to: "{{ groups['mons'][0] }}"
- run_once: True
- changed_when: False
-
- tasks:
- - import_role:
- name: ceph-facts
- - import_role:
- name: ceph-handler
- - import_role:
- name: ceph-config
- - import_role:
- name: ceph-osd
-
- post_tasks:
- - name: unset noup flag
- command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
- delegate_to: "{{ groups['mons'][0] }}"
- run_once: True
- changed_when: False
-
- - name: warn user about deprecation
- debug:
- msg: |
- Playbook has complete.
- However, note that it will be deprecated in a future release.
- You can achieve the same goal using the main playbook with --limit
\ No newline at end of file
[tox]
-envlist = {centos,ubuntu}-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_osd,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_osds,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt}
- {centos,ubuntu}-container-{ooo_collocation}
- {centos,ubuntu}-non_container-{switch_to_containers}
+envlist = centos-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_osd,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt}
+ centos-non_container-{switch_to_containers}
infra_lv_create
migrate_ceph_disk_to_ceph_volume
"
py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
-[add-osds]
-commands=
- ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/setup.yml
- ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/lvm_setup.yml
- ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
- ireallymeanit=yes \
- fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
- ceph_stable_release={env:CEPH_STABLE_RELEASE:octopus} \
- ceph_docker_registry_auth=True \
- ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
- ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
- "
- py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
-
[add-mgrs]
commands=
ansible-playbook -vv -i {changedir}/hosts-2 --limit mgrs {toxinidir}/tests/functional/setup.yml
lvm_batch: {toxinidir}/tests/functional/lvm-batch{env:CONTAINER_DIR:}
ooo_collocation: {toxinidir}/tests/functional/ooo-collocation
add_mons: {toxinidir}/tests/functional/add-mons{env:CONTAINER_DIR:}
- add_osds: {toxinidir}/tests/functional/add-osds{env:CONTAINER_DIR:}
add_mgrs: {toxinidir}/tests/functional/add-mgrs{env:CONTAINER_DIR:}
add_mdss: {toxinidir}/tests/functional/add-mdss{env:CONTAINER_DIR:}
add_rbdmirrors: {toxinidir}/tests/functional/add-rbdmirrors{env:CONTAINER_DIR:}
shrink_mds: {[shrink-mds]commands}
shrink_rbdmirror: {[shrink-rbdmirror]commands}
shrink_rgw: {[shrink-rgw]commands}
- add_osds: {[add-osds]commands}
add_mons: {[add-mons]commands}
add_mgrs: {[add-mgrs]commands}
add_mdss: {[add-mdss]commands}