Merge "Convert Ceph to kolla_docker"
This commit is contained in:
commit
912ecd0dfc
@ -35,20 +35,12 @@
|
|||||||
always_run: True
|
always_run: True
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Ceph Monitor data container
|
- name: Starting ceph-mon-data container
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
net: host
|
common_options: "{{ docker_common_options }}"
|
||||||
pull: "{{ docker_pull_policy }}"
|
|
||||||
restart_policy: "{{ docker_restart_policy }}"
|
|
||||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
name: ceph_mon_data
|
|
||||||
image: "{{ ceph_data_image_full }}"
|
image: "{{ ceph_data_image_full }}"
|
||||||
|
name: "ceph_mon_data"
|
||||||
volumes:
|
volumes:
|
||||||
- "/etc/ceph/"
|
- "/etc/ceph/"
|
||||||
- "/var/lib/ceph/"
|
- "/var/lib/ceph/"
|
||||||
|
@ -24,82 +24,40 @@
|
|||||||
osds_cache_bootstrap: "{{ (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
osds_cache_bootstrap: "{{ (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
||||||
|
|
||||||
- name: Bootstrapping Ceph OSDs
|
- name: Bootstrapping Ceph OSDs
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
net: host
|
common_options: "{{ docker_common_options }}"
|
||||||
pull: "{{ docker_pull_policy }}"
|
detach: False
|
||||||
restart_policy: "no"
|
environment:
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
privileged: True
|
|
||||||
name: "bootstrap_osd_{{ item.0 }}"
|
|
||||||
image: "{{ ceph_osd_image_full }}"
|
|
||||||
volumes:
|
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
|
||||||
- "/dev/:/dev/"
|
|
||||||
env:
|
|
||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
OSD_DEV: "{{ item.1.device }}"
|
OSD_DEV: "{{ item.1.device }}"
|
||||||
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
||||||
with_indexed_items: osds_bootstrap|default([])
|
image: "{{ ceph_osd_image_full }}"
|
||||||
|
|
||||||
# https://github.com/ansible/ansible-modules-core/pull/1031
|
|
||||||
- name: Waiting for bootstrap containers to exit
|
|
||||||
command: docker wait "bootstrap_osd_{{ item.0 }}"
|
|
||||||
register: bootstrap_result
|
|
||||||
run_once: True
|
|
||||||
failed_when: bootstrap_result.stdout != "0"
|
|
||||||
with_indexed_items: osds_bootstrap|default([])
|
|
||||||
|
|
||||||
- name: Cleaning up bootstrap containers
|
|
||||||
docker:
|
|
||||||
tty: True
|
|
||||||
name: "bootstrap_osd_{{ item.0 }}"
|
name: "bootstrap_osd_{{ item.0 }}"
|
||||||
image: "{{ ceph_osd_image_full }}"
|
|
||||||
state: absent
|
|
||||||
with_indexed_items: osds_bootstrap|default([])
|
|
||||||
|
|
||||||
- name: Bootstrapping Ceph Cache OSDs
|
|
||||||
docker:
|
|
||||||
tty: True
|
|
||||||
net: host
|
|
||||||
pull: "{{ docker_pull_policy }}"
|
|
||||||
restart_policy: "no"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
privileged: True
|
privileged: True
|
||||||
name: "bootstrap_osd_cache_{{ item.0 }}"
|
restart_policy: "never"
|
||||||
image: "{{ ceph_osd_image_full }}"
|
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
- "/dev/:/dev/"
|
- "/dev/:/dev/"
|
||||||
env:
|
with_indexed_items: osds_bootstrap|default([])
|
||||||
|
|
||||||
|
- name: Bootstrapping Ceph Cache OSDs
|
||||||
|
kolla_docker:
|
||||||
|
action: "start_container"
|
||||||
|
common_options: "{{ docker_common_options }}"
|
||||||
|
detach: False
|
||||||
|
environment:
|
||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
CEPH_CACHE:
|
CEPH_CACHE:
|
||||||
OSD_DEV: "{{ item.1.device }}"
|
OSD_DEV: "{{ item.1.device }}"
|
||||||
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
||||||
with_indexed_items: osds_cache_bootstrap|default([])
|
|
||||||
|
|
||||||
# https://github.com/ansible/ansible-modules-core/pull/1031
|
|
||||||
- name: Waiting for bootstrap containers to exit
|
|
||||||
command: docker wait "bootstrap_osd_cache_{{ item.0 }}"
|
|
||||||
register: bootstrap_result
|
|
||||||
run_once: True
|
|
||||||
failed_when: bootstrap_result.stdout != "0"
|
|
||||||
with_indexed_items: osds_cache_bootstrap|default([])
|
|
||||||
|
|
||||||
- name: Cleaning up bootstrap containers
|
|
||||||
docker:
|
|
||||||
tty: True
|
|
||||||
name: "bootstrap_osd_cache_{{ item.0 }}"
|
|
||||||
image: "{{ ceph_osd_image_full }}"
|
image: "{{ ceph_osd_image_full }}"
|
||||||
state: absent
|
name: "bootstrap_osd_cache_{{ item.0 }}"
|
||||||
|
privileged: True
|
||||||
|
restart_policy: "never"
|
||||||
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
|
- "/dev/:/dev/"
|
||||||
with_indexed_items: osds_cache_bootstrap|default([])
|
with_indexed_items: osds_cache_bootstrap|default([])
|
||||||
|
@ -1,25 +1,17 @@
|
|||||||
---
|
---
|
||||||
- name: Generating Initial Ceph keyrings and monmap
|
- name: Generating initial Ceph keyrings and monmap
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
detach: False
|
common_options: "{{ docker_common_options }}"
|
||||||
net: host
|
environment:
|
||||||
pull: "{{ docker_pull_policy }}"
|
|
||||||
restart_policy: "no"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
name: ceph_mon
|
|
||||||
image: "{{ ceph_mon_image_full }}"
|
|
||||||
volumes: "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
|
||||||
volumes_from:
|
|
||||||
- "ceph_mon_data"
|
|
||||||
env:
|
|
||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
MON_IP: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
MON_IP: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||||
|
image: "{{ ceph_mon_image_full }}"
|
||||||
|
name: "ceph_mon"
|
||||||
|
restart_policy: "never"
|
||||||
|
volumes: "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||||
|
volumes_from: "ceph_mon_data"
|
||||||
|
|
||||||
- name: Waiting for a few settings for cluster to generate keys
|
- name: Waiting for a few settings for cluster to generate keys
|
||||||
command: sleep 3
|
command: sleep 3
|
||||||
|
@ -1,21 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Starting ceph-mon container
|
- name: Starting ceph-mon container
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
net: host
|
common_options: "{{ docker_common_options }}"
|
||||||
pull: "{{ docker_pull_policy }}"
|
|
||||||
restart_policy: "{{ docker_restart_policy }}"
|
|
||||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
name: ceph_mon
|
|
||||||
image: "{{ ceph_mon_image_full }}"
|
image: "{{ ceph_mon_image_full }}"
|
||||||
|
name: "ceph_mon"
|
||||||
volumes: "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
volumes: "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||||
volumes_from:
|
volumes_from: "ceph_mon_data"
|
||||||
- "ceph_mon_data"
|
|
||||||
env:
|
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
||||||
when: inventory_hostname in groups['ceph-mon']
|
when: inventory_hostname in groups['ceph-mon']
|
||||||
|
@ -26,30 +26,22 @@
|
|||||||
changed_when: False
|
changed_when: False
|
||||||
failed_when: id.rc != 0
|
failed_when: id.rc != 0
|
||||||
|
|
||||||
- name: Starting ceph-osds container
|
- name: Starting ceph-osd container
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
net: host
|
common_options: "{{ docker_common_options }}"
|
||||||
pull: "{{ docker_pull_policy }}"
|
environment:
|
||||||
restart_policy: "{{ docker_restart_policy }}"
|
|
||||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
pid: host
|
|
||||||
privileged: True
|
|
||||||
name: "ceph_osd_{{ item.0.stdout }}"
|
|
||||||
image: "{{ ceph_osd_image_full }}"
|
|
||||||
volumes:
|
|
||||||
- "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
|
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
|
||||||
- "/dev/:/dev/"
|
|
||||||
env:
|
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
OSD_ID: "{{ item.0.stdout }}"
|
OSD_ID: "{{ item.0.stdout }}"
|
||||||
OSD_DEV: "{{ item.1['device'] }}"
|
OSD_DEV: "{{ item.1['device'] }}"
|
||||||
|
image: "{{ ceph_osd_image_full }}"
|
||||||
|
name: "ceph_osd_{{ item.0.stdout }}"
|
||||||
|
pid: "host"
|
||||||
|
privileged: True
|
||||||
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
|
- "/dev/:/dev/"
|
||||||
|
- "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
|
||||||
with_together:
|
with_together:
|
||||||
- id.results
|
- id.results
|
||||||
- osds
|
- osds
|
||||||
|
@ -1,19 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: Starting ceph-rgw container
|
- name: Starting ceph-rgw container
|
||||||
docker:
|
kolla_docker:
|
||||||
tty: True
|
action: "start_container"
|
||||||
net: host
|
common_options: "{{ docker_common_options }}"
|
||||||
pull: "{{ docker_pull_policy }}"
|
|
||||||
restart_policy: "{{ docker_restart_policy }}"
|
|
||||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
|
||||||
state: reloaded
|
|
||||||
registry: "{{ docker_registry }}"
|
|
||||||
username: "{{ docker_registry_username }}"
|
|
||||||
password: "{{ docker_registry_password }}"
|
|
||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
|
||||||
name: ceph_rgw
|
|
||||||
image: "{{ ceph_rgw_image_full }}"
|
image: "{{ ceph_rgw_image_full }}"
|
||||||
|
name: "ceph_rgw"
|
||||||
volumes: "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro"
|
volumes: "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro"
|
||||||
env:
|
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
||||||
when: inventory_hostname in groups['ceph-rgw']
|
when: inventory_hostname in groups['ceph-rgw']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user