mirror of https://github.com/ceph/ceph-ansible.git
commit
8320c14191
|
@ -63,7 +63,7 @@
|
||||||
- name: remove ceph mds container
|
- name: remove ceph mds container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-mds-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
- name: remove ceph rgw container
|
- name: remove ceph rgw container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-rgw-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
- name: remove ceph rbd-mirror container
|
- name: remove ceph rbd-mirror container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-rbd-mirror-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
- name: remove ceph nfs container
|
- name: remove ceph nfs container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-nfs-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
- name: remove ceph osd prepare container
|
- name: remove ceph osd prepare container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-osd-prepare-{{ item | regex_replace('/', '') }}"
|
name: "ceph-osd-prepare-{{ ansible_hostname }}-dev{{ item | regex_replace('/', '') }}"
|
||||||
state: absent
|
state: absent
|
||||||
with_items: "{{ ceph_osd_docker_devices }}"
|
with_items: "{{ ceph_osd_docker_devices }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
- name: remove ceph osd container
|
- name: remove ceph osd container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}"
|
name: "ceph-osd-{{ ansible_hostname }}-dev{{ item | regex_replace('/', '') }}"
|
||||||
state: absent
|
state: absent
|
||||||
with_items: "{{ ceph_osd_docker_devices }}"
|
with_items: "{{ ceph_osd_docker_devices }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
@ -242,7 +242,7 @@
|
||||||
shell: |
|
shell: |
|
||||||
docker run \
|
docker run \
|
||||||
--privileged=true \
|
--privileged=true \
|
||||||
--name {{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }} \
|
--name ceph-osd-zap-{{ ansible_hostname }}-dev{{ item | regex_replace('/', '') }} \
|
||||||
-v /dev/:/dev/ \
|
-v /dev/:/dev/ \
|
||||||
-e OSD_DEVICE={{ item }} \
|
-e OSD_DEVICE={{ item }} \
|
||||||
{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
|
{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
|
|
||||||
- name: wait until the zap containers die
|
- name: wait until the zap containers die
|
||||||
shell: |
|
shell: |
|
||||||
docker ps | grep -sq {{ ansible_hostname }}-osd-zap
|
docker ps | grep -sq ceph-osd-zap-{{ ansible_hostname }}-dev
|
||||||
register: zap_alive
|
register: zap_alive
|
||||||
failed_when: false
|
failed_when: false
|
||||||
until: zap_alive.rc != 0
|
until: zap_alive.rc != 0
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
- name: remove ceph osd zap disk container
|
- name: remove ceph osd zap disk container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }}"
|
name: "ceph-osd-zap-{{ ansible_hostname }}-dev{{ item | regex_replace('/', '') }}"
|
||||||
state: absent
|
state: absent
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ ceph_osd_docker_devices }}"
|
- "{{ ceph_osd_docker_devices }}"
|
||||||
|
@ -303,14 +303,14 @@
|
||||||
- name: remove ceph mon container
|
- name: remove ceph mon container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-mon-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove restapi container
|
- name: remove restapi container
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-ceph-restapi"
|
name: "ceph-restapi-{{ ansible_hostname }}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
- name: waiting for the containerized monitor to join the quorum...
|
- name: waiting for the containerized monitor to join the quorum...
|
||||||
shell: |
|
shell: |
|
||||||
docker exec {{ hostvars[mon_host]['ansible_hostname'] }} ceph -s --cluster {{ cluster }} | grep quorum | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
docker exec ceph-mon-{{ hostvars[mon_host]['ansible_hostname'] }} ceph -s --cluster {{ cluster }} | grep quorum | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
||||||
register: result
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
retries: "{{ health_mon_check_retries }}"
|
retries: "{{ health_mon_check_retries }}"
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
|
|
||||||
- name: set containerized osd flags
|
- name: set containerized osd flags
|
||||||
command: |
|
command: |
|
||||||
docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph osd set {{ item }} --cluster {{ cluster }}
|
docker exec ceph-osd-{{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph osd set {{ item }} --cluster {{ cluster }}
|
||||||
with_items:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
- noscrub
|
- noscrub
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
|
|
||||||
- name: container - waiting for clean pgs...
|
- name: container - waiting for clean pgs...
|
||||||
shell: |
|
shell: |
|
||||||
test "$(docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph pg stat --cluster {{ cluster }} | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph pg stat --cluster {{ cluster }} | sed 's/pgs.*//;s/^.*://;s/ //')" && docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph health --cluster {{ cluster }} | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
test "$(docker exec ceph-osd-{{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph pg stat --cluster {{ cluster }} | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph pg stat --cluster {{ cluster }} | sed 's/pgs.*//;s/^.*://;s/ //')" && docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph health --cluster {{ cluster }} | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
||||||
register: result
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
retries: "{{ health_osd_check_retries }}"
|
retries: "{{ health_osd_check_retries }}"
|
||||||
|
@ -295,7 +295,7 @@
|
||||||
|
|
||||||
- name: unset containerized osd flags
|
- name: unset containerized osd flags
|
||||||
command: |
|
command: |
|
||||||
docker exec {{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph osd unset {{ item }} --cluster {{ cluster }}
|
docker exec ceph-osd-{{ hostvars[groups.mons[0]]['ansible_hostname'] }} ceph osd unset {{ item }} --cluster {{ cluster }}
|
||||||
with_items:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
- noscrub
|
- noscrub
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
- name: start ceph mon container image
|
- name: start ceph mon container image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-mon-{{ ansible_hostname }}"
|
||||||
net: "host"
|
net: "host"
|
||||||
state: "running"
|
state: "running"
|
||||||
privileged: "{{ mon_docker_privileged }}"
|
privileged: "{{ mon_docker_privileged }}"
|
||||||
|
@ -243,7 +243,7 @@
|
||||||
- name: start ceph osd container image(s)
|
- name: start ceph osd container image(s)
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}"
|
name: "ceph-osd-{{ ansible_hostname }}-dev{{ item | regex_replace('/', '') }}"
|
||||||
net: host
|
net: host
|
||||||
pid: host
|
pid: host
|
||||||
state: started
|
state: started
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
- name: start ceph metadata container image
|
- name: start ceph metadata container image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: ceph-{{ ansible_hostname }}-mds
|
name: ceph-mds-{{ ansible_hostname }}
|
||||||
net: host
|
net: host
|
||||||
state: running
|
state: running
|
||||||
env: "CEPH_DAEMON=MDS,CEPHFS_CREATE=1,{{ ceph_mds_docker_extra_env }}"
|
env: "CEPH_DAEMON=MDS,CEPHFS_CREATE=1,{{ ceph_mds_docker_extra_env }}"
|
||||||
|
@ -358,7 +358,7 @@
|
||||||
- name: start ceph rados gateway container image
|
- name: start ceph rados gateway container image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: ceph-{{ ansible_hostname }}-rgw
|
name: ceph-rgw-{{ ansible_hostname }}
|
||||||
expose: "{{ ceph_rgw_civetweb_port }}"
|
expose: "{{ ceph_rgw_civetweb_port }}"
|
||||||
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
||||||
state: running
|
state: running
|
||||||
|
@ -410,7 +410,7 @@
|
||||||
- name: start ceph rbd mirror container image
|
- name: start ceph rbd mirror container image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-rbd-mirror-{{ ansible_hostname }}"
|
||||||
net: host
|
net: host
|
||||||
state: running
|
state: running
|
||||||
volumes: "/etc/ceph:/etc/ceph,/etc/localtime:/etc/localtime:ro"
|
volumes: "/etc/ceph:/etc/ceph,/etc/localtime:/etc/localtime:ro"
|
||||||
|
@ -460,7 +460,7 @@
|
||||||
- name: start ceph nfs container image
|
- name: start ceph nfs container image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}"
|
name: "ceph-nfs-{{ ansible_hostname }}"
|
||||||
net: "host"
|
net: "host"
|
||||||
state: "running"
|
state: "running"
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
|
@ -4,8 +4,8 @@ After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-mds-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not mds_containerized_deployment_with_kv -%}
|
{% if not mds_containerized_deployment_with_kv -%}
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
|
@ -15,13 +15,12 @@ ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
-e KV_IP={{kv_endpoint}} \
|
-e KV_IP={{kv_endpoint}} \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
--privileged \
|
|
||||||
-e CEPH_DAEMON=MDS \
|
-e CEPH_DAEMON=MDS \
|
||||||
-e CEPHFS_CREATE=1 \
|
-e CEPHFS_CREATE=1 \
|
||||||
{{ ceph_mds_docker_extra_env }} \
|
{{ ceph_mds_docker_extra_env }} \
|
||||||
--name={{ ansible_hostname }} \
|
--name=ceph-mds-{{ ansible_hostname }} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-mds-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
- include: start_docker_monitor.yml
|
- include: start_docker_monitor.yml
|
||||||
|
|
||||||
- name: wait for monitor socket to exist
|
- name: wait for monitor socket to exist
|
||||||
command: docker exec {{ ansible_hostname }} stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok
|
command: docker exec ceph-mon-{{ ansible_hostname }} stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok
|
||||||
register: monitor_socket
|
register: monitor_socket
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
until: monitor_socket.rc == 0
|
until: monitor_socket.rc == 0
|
||||||
|
|
||||||
- name: force peer addition as potential bootstrap peer for cluster bringup
|
- name: force peer addition as potential bootstrap peer for cluster bringup
|
||||||
command: docker exec {{ ansible_hostname }} ceph --admin-daemon /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok add_bootstrap_peer_hint {{ hostvars[item]['ansible_' + ceph_mon_docker_interface].ipv4.address }}
|
command: docker exec ceph-mon-{{ ansible_hostname }} ceph --admin-daemon /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok add_bootstrap_peer_hint {{ hostvars[item]['ansible_' + ceph_mon_docker_interface].ipv4.address }}
|
||||||
with_items: "{{ groups.mons }}"
|
with_items: "{{ groups.mons }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
when: not mon_containerized_deployment_with_kv
|
when: not mon_containerized_deployment_with_kv
|
||||||
|
|
||||||
- name: create ceph rest api keyring when mon is containerized
|
- name: create ceph rest api keyring when mon is containerized
|
||||||
command: docker exec {{ ansible_hostname }} ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring
|
command: docker exec ceph-mon-{{ ansible_hostname }} ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring
|
||||||
args:
|
args:
|
||||||
creates: /etc/ceph/{{ cluster }}.client.restapi.keyring
|
creates: /etc/ceph/{{ cluster }}.client.restapi.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -4,9 +4,9 @@ After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker rm %i
|
ExecStartPre=-/usr/bin/docker rm ceph-mon-%i
|
||||||
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
|
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
|
||||||
ExecStart=/usr/bin/docker run --rm --name %i --net=host \
|
ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
|
||||||
{% if not mon_containerized_deployment_with_kv -%}
|
{% if not mon_containerized_deployment_with_kv -%}
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
-v /etc/ceph:/etc/ceph \
|
-v /etc/ceph:/etc/ceph \
|
||||||
|
@ -27,7 +27,7 @@ ExecStart=/usr/bin/docker run --rm --name %i --net=host \
|
||||||
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
|
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
|
||||||
{{ ceph_mon_docker_extra_env }} \
|
{{ ceph_mon_docker_extra_env }} \
|
||||||
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop %i
|
ExecStopPost=-/usr/bin/docker stop ceph-mon-%i
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- name: create the nfs rgw user
|
- name: create the nfs rgw user
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: ceph-{{ ansible_hostname }}-rgw-user
|
name: ceph-rgw-user-{{ ansible_hostname }}
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname }}"
|
||||||
expose: "{{ ceph_rgw_civetweb_port }}"
|
expose: "{{ ceph_rgw_civetweb_port }}"
|
||||||
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
when: nfs_obj_gw
|
when: nfs_obj_gw
|
||||||
|
|
||||||
- name: get user create output
|
- name: get user create output
|
||||||
command: docker logs ceph-{{ ansible_hostname }}-rgw-user
|
command: docker logs ceph-rgw-user-{{ ansible_hostname }}
|
||||||
always_run: true
|
always_run: true
|
||||||
register: rgwuser
|
register: rgwuser
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker rm %i
|
ExecStartPre=-/usr/bin/docker rm ceph-nfs-%i
|
||||||
ExecStartPre=/usr/bin/mkdir -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha
|
ExecStartPre=/usr/bin/mkdir -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not mon_containerized_deployment_with_kv -%}
|
{% if not mon_containerized_deployment_with_kv -%}
|
||||||
|
@ -19,9 +19,9 @@ ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
--privileged \
|
--privileged \
|
||||||
-e CEPH_DAEMON=NFS \
|
-e CEPH_DAEMON=NFS \
|
||||||
{{ ceph_nfs_docker_extra_env }} \
|
{{ ceph_nfs_docker_extra_env }} \
|
||||||
--name=nfs-{{ ansible_hostname }} \
|
--name=ceph-nfs-{{ ansible_hostname }} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop %i
|
ExecStopPost=-/usr/bin/docker stop ceph-nfs-%i
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
docker run --net=host \
|
docker run --net=host \
|
||||||
--pid=host \
|
--pid=host \
|
||||||
--privileged=true \
|
--privileged=true \
|
||||||
--name="{{ ansible_hostname }}-osd-prepare-{{ item.0 | regex_replace('/', '') }}" \
|
--name="ceph-osd-prepare-{{ ansible_hostname }}-dev{{ item.0 | regex_replace('/', '') }}" \
|
||||||
-v /etc/ceph:/etc/ceph \
|
-v /etc/ceph:/etc/ceph \
|
||||||
-v /var/lib/ceph/:/var/lib/ceph/ \
|
-v /var/lib/ceph/:/var/lib/ceph/ \
|
||||||
-v /dev:/dev \
|
-v /dev:/dev \
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
docker run --net=host \
|
docker run --net=host \
|
||||||
--pid=host \
|
--pid=host \
|
||||||
--privileged=true \
|
--privileged=true \
|
||||||
--name="{{ ansible_hostname }}-osd-prepare-{{ item.0 | regex_replace('/', '') }}" \
|
--name="ceph-osd-prepare-{{ ansible_hostname }}-dev-{{ item.0 | regex_replace('/', '') }}" \
|
||||||
-v /dev:/dev \
|
-v /dev:/dev \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
-e "OSD_DEVICE={{ item.0 }}" \
|
-e "OSD_DEVICE={{ item.0 }}" \
|
||||||
|
|
|
@ -46,5 +46,5 @@ fi
|
||||||
-e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE \
|
-e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE \
|
||||||
-e OSD_DEVICE=/dev/${1} \
|
-e OSD_DEVICE=/dev/${1} \
|
||||||
{{ ceph_osd_docker_extra_env }} \
|
{{ ceph_osd_docker_extra_env }} \
|
||||||
--name={{ ansible_hostname }}-osd-dev${1} \
|
--name=ceph-osd-{{ ansible_hostname }}-dev${1} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
|
|
|
@ -6,9 +6,9 @@ After=docker.service
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
|
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
|
||||||
ExecStartPre=-/usr/bin/docker rm -f {{ ansible_hostname }}-osd-dev%i
|
ExecStartPre=-/usr/bin/docker rm -f ceph-osd-{{ ansible_hostname }}-dev%i
|
||||||
ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
|
ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
|
||||||
ExecStop=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
|
ExecStop=-/usr/bin/docker stop ceph-osd-{{ ansible_hostname }}-dev%i
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
|
@ -4,8 +4,8 @@ After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-rdb-mirror-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-rdb-mirror-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not rbd_mirror_containerized_deployment_with_kv -%}
|
{% if not rbd_mirror_containerized_deployment_with_kv -%}
|
||||||
-v /etc/ceph:/etc/ceph \
|
-v /etc/ceph:/etc/ceph \
|
||||||
|
@ -14,11 +14,10 @@ ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
-e KV_IP={{kv_endpoint}} \
|
-e KV_IP={{kv_endpoint}} \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
--privileged \
|
|
||||||
-e CEPH_DAEMON=RBD_MIRROR \
|
-e CEPH_DAEMON=RBD_MIRROR \
|
||||||
--name={{ ansible_hostname }} \
|
--name=ceph-rdb-mirror-{{ ansible_hostname }} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-rdb-mirror-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- name: run the ceph rest api docker image
|
- name: run the ceph rest api docker image
|
||||||
docker:
|
docker:
|
||||||
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
name: "{{ ansible_hostname }}-ceph-restapi"
|
name: "ceph-restapi-{{ ansible_hostname }}"
|
||||||
net: host
|
net: host
|
||||||
expose: "{{ ceph_restapi_port }}"
|
expose: "{{ ceph_restapi_port }}"
|
||||||
state: running
|
state: running
|
||||||
|
|
|
@ -4,8 +4,8 @@ After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker stop ceph-rgw-{{ ansible_hostname }}
|
||||||
ExecStartPre=-/usr/bin/docker rm {{ ansible_hostname }}
|
ExecStartPre=-/usr/bin/docker rm ceph-rgw-{{ ansible_hostname }}
|
||||||
ExecStart=/usr/bin/docker run --rm --net=host \
|
ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
{% if not rgw_containerized_deployment_with_kv -%}
|
{% if not rgw_containerized_deployment_with_kv -%}
|
||||||
-v /var/lib/ceph:/var/lib/ceph \
|
-v /var/lib/ceph:/var/lib/ceph \
|
||||||
|
@ -18,9 +18,9 @@ ExecStart=/usr/bin/docker run --rm --net=host \
|
||||||
--privileged \
|
--privileged \
|
||||||
-e CEPH_DAEMON=RGW \
|
-e CEPH_DAEMON=RGW \
|
||||||
{{ ceph_rgw_docker_extra_env }} \
|
{{ ceph_rgw_docker_extra_env }} \
|
||||||
--name={{ ansible_hostname }} \
|
--name=ceph-rgw-{{ ansible_hostname }} \
|
||||||
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
|
||||||
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
|
ExecStopPost=-/usr/bin/docker stop ceph-rgw-{{ ansible_hostname }}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStartSec=120
|
TimeoutStartSec=120
|
||||||
|
|
Loading…
Reference in New Issue