mirror of https://github.com/ceph/ceph-ansible.git
remove restapi role
As of `mimic`, restapi is no longer available because of manager daemon. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3275/head
parent
f52344300a
commit
d8d3e55006
|
@ -8,7 +8,6 @@ group_vars/mons
|
||||||
group_vars/osds
|
group_vars/osds
|
||||||
group_vars/mdss
|
group_vars/mdss
|
||||||
group_vars/rgws
|
group_vars/rgws
|
||||||
group_vars/restapis
|
|
||||||
group_vars/agent
|
group_vars/agent
|
||||||
group_vars/*.yml
|
group_vars/*.yml
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
|
|
@ -54,7 +54,6 @@ It means if you are pushing a patch modifying one of these files:
|
||||||
- `./roles/ceph-iscsi-gw/defaults/main.yml`
|
- `./roles/ceph-iscsi-gw/defaults/main.yml`
|
||||||
- `./roles/ceph-mon/defaults/main.yml`
|
- `./roles/ceph-mon/defaults/main.yml`
|
||||||
- `./roles/ceph-rgw/defaults/main.yml`
|
- `./roles/ceph-rgw/defaults/main.yml`
|
||||||
- `./roles/ceph-restapi/defaults/main.yml`
|
|
||||||
- `./roles/ceph-docker-common/defaults/main.yml`
|
- `./roles/ceph-docker-common/defaults/main.yml`
|
||||||
- `./roles/ceph-common-coreos/defaults/main.yml`
|
- `./roles/ceph-common-coreos/defaults/main.yml`
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ NOSDS = settings['osd_vms']
|
||||||
NMDSS = settings['mds_vms']
|
NMDSS = settings['mds_vms']
|
||||||
NRGWS = settings['rgw_vms']
|
NRGWS = settings['rgw_vms']
|
||||||
NNFSS = settings['nfs_vms']
|
NNFSS = settings['nfs_vms']
|
||||||
RESTAPI = settings['restapi']
|
|
||||||
NRBD_MIRRORS = settings['rbd_mirror_vms']
|
NRBD_MIRRORS = settings['rbd_mirror_vms']
|
||||||
CLIENTS = settings['client_vms']
|
CLIENTS = settings['client_vms']
|
||||||
NISCSI_GWS = settings['iscsi_gw_vms']
|
NISCSI_GWS = settings['iscsi_gw_vms']
|
||||||
|
@ -59,10 +58,6 @@ ansible_provision = proc do |ansible|
|
||||||
'mgrs' => (0..MGRS - 1).map { |j| "#{LABEL_PREFIX}mgr#{j}" }
|
'mgrs' => (0..MGRS - 1).map { |j| "#{LABEL_PREFIX}mgr#{j}" }
|
||||||
}
|
}
|
||||||
|
|
||||||
if RESTAPI then
|
|
||||||
ansible.groups['restapis'] = (0..NMONS - 1).map { |j| "#{LABEL_PREFIX}mon#{j}" }
|
|
||||||
end
|
|
||||||
|
|
||||||
ansible.extra_vars = {
|
ansible.extra_vars = {
|
||||||
cluster_network: "#{CLUSTER_SUBNET}.0/24",
|
cluster_network: "#{CLUSTER_SUBNET}.0/24",
|
||||||
journal_size: 100,
|
journal_size: 100,
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
# VARIABLES
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
LOCAL_BRANCH=$(cd $BASEDIR && git rev-parse --abbrev-ref HEAD)
|
||||||
|
ROLES="ceph-common ceph-mon ceph-osd ceph-mds ceph-rgw ceph-agent ceph-fetch-keys ceph-rbd-mirror ceph-client ceph-docker-common ceph-mgr ceph-defaults ceph-config"
|
||||||
|
|
||||||
|
|
||||||
|
# FUNCTIONS
|
||||||
|
function goto_basedir {
|
||||||
|
TOP_LEVEL=$(cd $BASEDIR && git rev-parse --show-toplevel)
|
||||||
|
if [[ "$(pwd)" != "$TOP_LEVEL" ]]; then
|
||||||
|
pushd "$TOP_LEVEL"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_existing_remote {
|
||||||
|
if ! git remote show "$1" &> /dev/null; then
|
||||||
|
git remote add "$1" git@github.com:/ceph/ansible-"$1".git
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function pull_origin {
|
||||||
|
git pull origin master
|
||||||
|
}
|
||||||
|
|
||||||
|
function reset_hard_origin {
|
||||||
|
# let's bring everything back to normal
|
||||||
|
git checkout "$LOCAL_BRANCH"
|
||||||
|
git fetch origin --prune
|
||||||
|
git fetch --tags
|
||||||
|
git reset --hard origin/master
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_git_status {
|
||||||
|
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
|
||||||
|
echo "It looks like the following changes haven't been committed yet"
|
||||||
|
echo ""
|
||||||
|
git status --short
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Do you really want to continue?"
|
||||||
|
echo "Press ENTER to continue or CTRL C to break"
|
||||||
|
read -r
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function compare_tags {
|
||||||
|
# compare local tags (from https://github.com/ceph/ceph-ansible/) with distant tags (from https://github.com/ceph/ansible-ceph-$ROLE)
|
||||||
|
local tag_local
|
||||||
|
local tag_remote
|
||||||
|
for tag_local in $(git tag | grep -oE '^v[2-9].[0-9]*.[0-9]*$' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n); do
|
||||||
|
tags_array+=("$tag_local")
|
||||||
|
done
|
||||||
|
for tag_remote in $(git ls-remote --tags "$1" | grep -oE 'v[2-9].[0-9]*.[0-9]*$' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n); do
|
||||||
|
remote_tags_array+=("$tag_remote")
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in "${tags_array[@]}"; do
|
||||||
|
skip=
|
||||||
|
for j in "${remote_tags_array[@]}"; do
|
||||||
|
[[ "$i" == "$j" ]] && { skip=1; break; }
|
||||||
|
done
|
||||||
|
[[ -n $skip ]] || tag_to_apply+=("$i")
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# MAIN
|
||||||
|
goto_basedir
|
||||||
|
check_git_status
|
||||||
|
trap reset_hard_origin EXIT
|
||||||
|
trap reset_hard_origin ERR
|
||||||
|
pull_origin
|
||||||
|
|
||||||
|
for ROLE in $ROLES; do
|
||||||
|
# For readability we use 2 variables with the same content
|
||||||
|
# so we always make sure we 'push' to a remote and 'filter' a role
|
||||||
|
REMOTE=$ROLE
|
||||||
|
check_existing_remote "$REMOTE"
|
||||||
|
reset_hard_origin
|
||||||
|
# First we filter branches by rewriting master with the content of roles/$ROLE
|
||||||
|
# this gives us a new commit history
|
||||||
|
for BRANCH in $(git branch --list --remotes "origin/stable-*" "origin/master" "origin/ansible-1.9" | cut -d '/' -f2); do
|
||||||
|
git checkout -B "$BRANCH" origin/"$BRANCH"
|
||||||
|
# use || true to avoid exiting in case of 'Found nothing to rewrite'
|
||||||
|
git filter-branch -f --prune-empty --subdirectory-filter roles/"$ROLE" || true
|
||||||
|
git push -f "$REMOTE" "$BRANCH"
|
||||||
|
done
|
||||||
|
reset_hard_origin
|
||||||
|
# then we filter tags starting from version 2.0 and push them
|
||||||
|
compare_tags "$ROLE"
|
||||||
|
if [[ ${#tag_to_apply[@]} == 0 ]]; then
|
||||||
|
echo "No new tag to push."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
for TAG in "${tag_to_apply[@]}"; do
|
||||||
|
# use || true to avoid exiting in case of 'Found nothing to rewrite'
|
||||||
|
git filter-branch -f --prune-empty --subdirectory-filter roles/"$ROLE" "$TAG" || true
|
||||||
|
git push -f "$REMOTE" "$TAG"
|
||||||
|
reset_hard_origin
|
||||||
|
done
|
||||||
|
done
|
||||||
|
trap - EXIT ERR
|
||||||
|
popd &> /dev/null
|
|
@ -13,9 +13,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
#restapi: false
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.0
|
public_subnet: 192.168.0
|
||||||
cluster_subnet: 192.168.1
|
cluster_subnet: 192.168.1
|
||||||
|
|
|
@ -29,9 +29,6 @@ rbd_mirror_vms: 0
|
||||||
client_vms: 0
|
client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# The sync directory changes based on vagrant box
|
# The sync directory changes based on vagrant box
|
||||||
# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
|
# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
|
||||||
# vagrant_sync_dir: /home/vagrant/sync
|
# vagrant_sync_dir: /home/vagrant/sync
|
||||||
|
|
|
@ -13,9 +13,6 @@ rbd_mirror_vms: 0
|
||||||
client_vms: 0
|
client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
#restapi: false
|
|
||||||
|
|
||||||
# SUBNET TO USE FOR THE VMS
|
# SUBNET TO USE FOR THE VMS
|
||||||
# Use whatever private subnet your Openstack VMs are given
|
# Use whatever private subnet your Openstack VMs are given
|
||||||
public_subnet: 172.17.72
|
public_subnet: 172.17.72
|
||||||
|
|
|
@ -60,12 +60,6 @@ to follow (most of them are 1 line settings).
|
||||||
mon_vms: 1
|
mon_vms: 1
|
||||||
osd_vms: 1
|
osd_vms: 1
|
||||||
|
|
||||||
* **RESTAPI**: (bool) Deploy RESTAPI on each of the monitor(s)
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
* **CEPH SOURCE**: (string) indicate whether a ``dev`` or ``stable`` release is
|
* **CEPH SOURCE**: (string) indicate whether a ``dev`` or ``stable`` release is
|
||||||
needed. A ``stable`` release will use the latest stable release of Ceph,
|
needed. A ``stable`` release will use the latest stable release of Ceph,
|
||||||
a ``dev`` will use ``shaman`` (http://shaman.ceph.com)
|
a ``dev`` will use ``shaman`` (http://shaman.ceph.com)
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
- name: ceph-common
|
||||||
|
src: https://github.com/ceph/ansible-ceph-common.git
|
||||||
|
#version:
|
||||||
|
- name: ceph-mon
|
||||||
|
src: https://github.com/ceph/ansible-ceph-mon.git
|
||||||
|
#version:
|
||||||
|
- name: ceph-osd
|
||||||
|
src: https://github.com/ceph/ansible-ceph-osd.git
|
||||||
|
#version:
|
||||||
|
- name: ceph-mds
|
||||||
|
src: https://github.com/ceph/ansible-ceph-mds.git
|
||||||
|
#version:
|
||||||
|
- name: ceph-rgw
|
||||||
|
src: https://github.com/ceph/ansible-ceph-rgw.git
|
||||||
|
#version:
|
|
@ -50,7 +50,6 @@ dummy:
|
||||||
#rgw_group_name: rgws
|
#rgw_group_name: rgws
|
||||||
#mds_group_name: mdss
|
#mds_group_name: mdss
|
||||||
#nfs_group_name: nfss
|
#nfs_group_name: nfss
|
||||||
#restapi_group_name: restapis
|
|
||||||
#rbdmirror_group_name: rbdmirrors
|
#rbdmirror_group_name: rbdmirrors
|
||||||
#client_group_name: clients
|
#client_group_name: clients
|
||||||
#iscsi_gw_group_name: iscsigws
|
#iscsi_gw_group_name: iscsigws
|
||||||
|
@ -68,7 +67,6 @@ dummy:
|
||||||
#ceph_rgw_firewall_zone: public
|
#ceph_rgw_firewall_zone: public
|
||||||
#ceph_mds_firewall_zone: public
|
#ceph_mds_firewall_zone: public
|
||||||
#ceph_nfs_firewall_zone: public
|
#ceph_nfs_firewall_zone: public
|
||||||
#ceph_restapi_firewall_zone: public
|
|
||||||
#ceph_rbdmirror_firewall_zone: public
|
#ceph_rbdmirror_firewall_zone: public
|
||||||
#ceph_iscsi_firewall_zone: public
|
#ceph_iscsi_firewall_zone: public
|
||||||
|
|
||||||
|
@ -410,11 +408,6 @@ dummy:
|
||||||
# Rados Gateway options
|
# Rados Gateway options
|
||||||
#email_address: foo@bar.com
|
#email_address: foo@bar.com
|
||||||
|
|
||||||
## REST API options
|
|
||||||
#
|
|
||||||
#restapi_interface: "{{ monitor_interface }}"
|
|
||||||
#restapi_address: "{{ monitor_address }}"
|
|
||||||
#restapi_port: 5000
|
|
||||||
|
|
||||||
## Testing mode
|
## Testing mode
|
||||||
# enable this mode _only_ when you have a single node
|
# enable this mode _only_ when you have a single node
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
# Variables here are applicable to all host groups NOT roles
|
|
||||||
|
|
||||||
# This sample file generated by generate_group_vars_sample.sh
|
|
||||||
|
|
||||||
# Dummy variable to avoid error because ansible does not recognize the
|
|
||||||
# file as a good configuration file when no variable in it.
|
|
||||||
dummy:
|
|
||||||
|
|
||||||
|
|
||||||
###########
|
|
||||||
# GENERAL #
|
|
||||||
###########
|
|
||||||
|
|
||||||
##########
|
|
||||||
# DOCKER #
|
|
||||||
##########
|
|
||||||
|
|
||||||
#ceph_restapi_docker_interface: eth0
|
|
||||||
#ceph_restapi_port: 5000
|
|
||||||
#ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
|
|
||||||
#ceph_config_keys: [] # DON'T TOUCH ME
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ fetch_directory: ~/ceph-ansible-keys
|
||||||
#rgw_group_name: rgws
|
#rgw_group_name: rgws
|
||||||
#mds_group_name: mdss
|
#mds_group_name: mdss
|
||||||
#nfs_group_name: nfss
|
#nfs_group_name: nfss
|
||||||
#restapi_group_name: restapis
|
|
||||||
#rbdmirror_group_name: rbdmirrors
|
#rbdmirror_group_name: rbdmirrors
|
||||||
#client_group_name: clients
|
#client_group_name: clients
|
||||||
#iscsi_gw_group_name: iscsigws
|
#iscsi_gw_group_name: iscsigws
|
||||||
|
@ -68,7 +67,6 @@ fetch_directory: ~/ceph-ansible-keys
|
||||||
#ceph_rgw_firewall_zone: public
|
#ceph_rgw_firewall_zone: public
|
||||||
#ceph_mds_firewall_zone: public
|
#ceph_mds_firewall_zone: public
|
||||||
#ceph_nfs_firewall_zone: public
|
#ceph_nfs_firewall_zone: public
|
||||||
#ceph_restapi_firewall_zone: public
|
|
||||||
#ceph_rbdmirror_firewall_zone: public
|
#ceph_rbdmirror_firewall_zone: public
|
||||||
#ceph_iscsi_firewall_zone: public
|
#ceph_iscsi_firewall_zone: public
|
||||||
|
|
||||||
|
@ -410,11 +408,6 @@ ceph_rhcs_version: 3
|
||||||
# Rados Gateway options
|
# Rados Gateway options
|
||||||
#email_address: foo@bar.com
|
#email_address: foo@bar.com
|
||||||
|
|
||||||
## REST API options
|
|
||||||
#
|
|
||||||
#restapi_interface: "{{ monitor_interface }}"
|
|
||||||
#restapi_address: "{{ monitor_address }}"
|
|
||||||
#restapi_port: 5000
|
|
||||||
|
|
||||||
## Testing mode
|
## Testing mode
|
||||||
# enable this mode _only_ when you have a single node
|
# enable this mode _only_ when you have a single node
|
||||||
|
|
|
@ -447,7 +447,6 @@
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
restapi_group_name: restapis
|
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
|
@ -439,13 +439,6 @@
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove restapi container
|
|
||||||
docker_container:
|
|
||||||
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
|
||||||
name: "ceph-restapi-{{ ansible_hostname }}"
|
|
||||||
state: absent
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: remove ceph mon service
|
- name: remove ceph mon service
|
||||||
file:
|
file:
|
||||||
path: /etc/systemd/system/ceph-mon@.service
|
path: /etc/systemd/system/ceph-mon@.service
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
health_mon_check_delay: 15
|
health_mon_check_delay: 15
|
||||||
containerized_deployment: true
|
containerized_deployment: true
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
restapi_group_name: restapis
|
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
- mdss
|
- mdss
|
||||||
- rgws
|
- rgws
|
||||||
- nfss
|
- nfss
|
||||||
- restapis
|
|
||||||
- rbdmirrors
|
- rbdmirrors
|
||||||
- clients
|
- clients
|
||||||
- mgrs
|
- mgrs
|
||||||
|
|
|
@ -28,7 +28,6 @@ class CallbackModule(CallbackBase):
|
||||||
'installer_phase_ceph_mds',
|
'installer_phase_ceph_mds',
|
||||||
'installer_phase_ceph_rgw',
|
'installer_phase_ceph_rgw',
|
||||||
'installer_phase_ceph_nfs',
|
'installer_phase_ceph_nfs',
|
||||||
'installer_phase_ceph_restapi',
|
|
||||||
'installer_phase_ceph_rbdmirror',
|
'installer_phase_ceph_rbdmirror',
|
||||||
'installer_phase_ceph_client',
|
'installer_phase_ceph_client',
|
||||||
'installer_phase_ceph_iscsi_gw',
|
'installer_phase_ceph_iscsi_gw',
|
||||||
|
@ -64,10 +63,6 @@ class CallbackModule(CallbackBase):
|
||||||
'title': 'Install Ceph NFS',
|
'title': 'Install Ceph NFS',
|
||||||
'playbook': 'roles/ceph-nfs/tasks/main.yml'
|
'playbook': 'roles/ceph-nfs/tasks/main.yml'
|
||||||
},
|
},
|
||||||
'installer_phase_ceph_restapi': {
|
|
||||||
'title': 'Install Ceph REST API',
|
|
||||||
'playbook': 'roles/ceph-restapi/tasks/main.yml'
|
|
||||||
},
|
|
||||||
'installer_phase_ceph_rbdmirror': {
|
'installer_phase_ceph_rbdmirror': {
|
||||||
'title': 'Install Ceph RBD Mirror',
|
'title': 'Install Ceph RBD Mirror',
|
||||||
'playbook': 'roles/ceph-rbd-mirror/tasks/main.yml'
|
'playbook': 'roles/ceph-rbd-mirror/tasks/main.yml'
|
||||||
|
|
|
@ -228,14 +228,3 @@ log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname']
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if inventory_hostname in groups.get(restapi_group_name, []) %}
|
|
||||||
[client.restapi]
|
|
||||||
{% if restapi_interface != "interface" %}
|
|
||||||
{% include 'client_restapi_interface.j2' %}
|
|
||||||
{% else %}
|
|
||||||
{% include 'client_restapi_address.j2' %}
|
|
||||||
{% endif %}
|
|
||||||
keyring = /var/lib/ceph/restapi/ceph-restapi/keyring
|
|
||||||
log file = /var/log/ceph/ceph-restapi.log
|
|
||||||
{% endif %}
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
public addr = {{ hostvars[inventory_hostname]['restapi_address'] if hostvars[inventory_hostname]['restapi_address'] is defined else restapi_address }}:{{ restapi_port }}
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
public addr = {{ hostvars[inventory_hostname]['ansible_' + restapi_interface]['ipv4']['address'] }}:{{ restapi_port }}
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ osd_group_name: osds
|
||||||
rgw_group_name: rgws
|
rgw_group_name: rgws
|
||||||
mds_group_name: mdss
|
mds_group_name: mdss
|
||||||
nfs_group_name: nfss
|
nfs_group_name: nfss
|
||||||
restapi_group_name: restapis
|
|
||||||
rbdmirror_group_name: rbdmirrors
|
rbdmirror_group_name: rbdmirrors
|
||||||
client_group_name: clients
|
client_group_name: clients
|
||||||
iscsi_gw_group_name: iscsigws
|
iscsi_gw_group_name: iscsigws
|
||||||
|
@ -60,7 +59,6 @@ ceph_osd_firewall_zone: public
|
||||||
ceph_rgw_firewall_zone: public
|
ceph_rgw_firewall_zone: public
|
||||||
ceph_mds_firewall_zone: public
|
ceph_mds_firewall_zone: public
|
||||||
ceph_nfs_firewall_zone: public
|
ceph_nfs_firewall_zone: public
|
||||||
ceph_restapi_firewall_zone: public
|
|
||||||
ceph_rbdmirror_firewall_zone: public
|
ceph_rbdmirror_firewall_zone: public
|
||||||
ceph_iscsi_firewall_zone: public
|
ceph_iscsi_firewall_zone: public
|
||||||
|
|
||||||
|
@ -402,11 +400,6 @@ radosgw_keystone_ssl: false # activate this when using keystone PKI keys
|
||||||
# Rados Gateway options
|
# Rados Gateway options
|
||||||
email_address: foo@bar.com
|
email_address: foo@bar.com
|
||||||
|
|
||||||
## REST API options
|
|
||||||
#
|
|
||||||
restapi_interface: "{{ monitor_interface }}"
|
|
||||||
restapi_address: "{{ monitor_address }}"
|
|
||||||
restapi_port: 5000
|
|
||||||
|
|
||||||
## Testing mode
|
## Testing mode
|
||||||
# enable this mode _only_ when you have a single node
|
# enable this mode _only_ when you have a single node
|
||||||
|
|
|
@ -136,22 +136,6 @@
|
||||||
tags:
|
tags:
|
||||||
- firewall
|
- firewall
|
||||||
|
|
||||||
- name: open restapi ports
|
|
||||||
firewalld:
|
|
||||||
port: "{{ restapi_port }}/tcp"
|
|
||||||
zone: "{{ ceph_restapi_firewall_zone }}"
|
|
||||||
source: "{{ public_network }}"
|
|
||||||
permanent: true
|
|
||||||
immediate: true
|
|
||||||
state: enabled
|
|
||||||
notify: restart firewalld
|
|
||||||
when:
|
|
||||||
- restapi_group_name is defined
|
|
||||||
- restapi_group_name in group_names
|
|
||||||
- (firewalld_pkg_query.get('rc', 1) == 0 or is_atomic)
|
|
||||||
tags:
|
|
||||||
- firewall
|
|
||||||
|
|
||||||
- name: open rbdmirror ports
|
- name: open rbdmirror ports
|
||||||
firewalld:
|
firewalld:
|
||||||
service: ceph
|
service: ceph
|
||||||
|
|
|
@ -45,19 +45,6 @@
|
||||||
- is_initial_mon_keyring_in_kv.rc != 0
|
- is_initial_mon_keyring_in_kv.rc != 0
|
||||||
- cephx
|
- cephx
|
||||||
|
|
||||||
- name: create ceph rest api keyring when mon is not containerized
|
|
||||||
ceph_key:
|
|
||||||
name: client.restapi
|
|
||||||
state: present
|
|
||||||
caps:
|
|
||||||
mon: allow *
|
|
||||||
osd: allow *
|
|
||||||
cluster: "{{ cluster }}"
|
|
||||||
when:
|
|
||||||
- cephx
|
|
||||||
- groups.get(restapi_group_name, []) | length > 0
|
|
||||||
- inventory_hostname == groups[mon_group_name]|last
|
|
||||||
|
|
||||||
- name: create ceph mgr keyring(s) when mon is not containerized
|
- name: create ceph mgr keyring(s) when mon is not containerized
|
||||||
ceph_key:
|
ceph_key:
|
||||||
name: "mgr.{{ hostvars[item]['ansible_hostname'] }}"
|
name: "mgr.{{ hostvars[item]['ansible_hostname'] }}"
|
||||||
|
|
|
@ -81,18 +81,6 @@
|
||||||
run_once: true
|
run_once: true
|
||||||
when: not containerized_deployment_with_kv
|
when: not containerized_deployment_with_kv
|
||||||
|
|
||||||
- name: create ceph rest api keyring when mon is containerized
|
|
||||||
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring"
|
|
||||||
args:
|
|
||||||
creates: "{{ ceph_conf_key_directory }}/{{ cluster }}.client.restapi.keyring"
|
|
||||||
changed_when: false
|
|
||||||
when:
|
|
||||||
- cephx
|
|
||||||
- containerized_deployment
|
|
||||||
- groups[restapi_group_name] is defined
|
|
||||||
- "{{ inventory_hostname == groups[mon_group_name] | last }}"
|
|
||||||
- not containerized_deployment_with_kv
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: create ceph mgr keyring(s) when mon is containerized
|
- name: create ceph mgr keyring(s) when mon is containerized
|
||||||
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} auth get-or-create mgr.{{ hostvars[item]['ansible_hostname'] }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o /etc/ceph/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring"
|
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} auth get-or-create mgr.{{ hostvars[item]['ansible_hostname'] }} mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o /etc/ceph/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring"
|
||||||
|
|
|
@ -1,201 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [2014] [Sébastien Han]
|
|
||||||
|
|
||||||
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.
|
|
|
@ -1,3 +0,0 @@
|
||||||
# Ansible role: ceph-restapi
|
|
||||||
|
|
||||||
Documentation is available at http://docs.ceph.com/ceph-ansible/.
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
###########
|
|
||||||
# GENERAL #
|
|
||||||
###########
|
|
||||||
|
|
||||||
##########
|
|
||||||
# DOCKER #
|
|
||||||
##########
|
|
||||||
|
|
||||||
ceph_restapi_docker_interface: eth0
|
|
||||||
ceph_restapi_port: 5000
|
|
||||||
ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
|
|
||||||
ceph_config_keys: [] # DON'T TOUCH ME
|
|
|
@ -1,19 +0,0 @@
|
||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
author: Sébastien Han
|
|
||||||
description: Installs Ceph RESTAPI
|
|
||||||
license: Apache
|
|
||||||
min_ansible_version: 2.3
|
|
||||||
platforms:
|
|
||||||
- name: Ubuntu
|
|
||||||
versions:
|
|
||||||
- xenial
|
|
||||||
- name: EL
|
|
||||||
versions:
|
|
||||||
- 7
|
|
||||||
- name: opensuse
|
|
||||||
versions:
|
|
||||||
- 42.3
|
|
||||||
categories:
|
|
||||||
- system
|
|
||||||
dependencies: []
|
|
|
@ -1,30 +0,0 @@
|
||||||
---
|
|
||||||
- name: set_fact ceph_config_keys
|
|
||||||
set_fact:
|
|
||||||
ceph_config_keys:
|
|
||||||
- /etc/ceph/{{ cluster }}.client.admin.keyring
|
|
||||||
|
|
||||||
- name: stat for ceph config and keys
|
|
||||||
local_action:
|
|
||||||
module: stat
|
|
||||||
path: "{{ fetch_directory }}/{{ fsid }}/{{ item }}"
|
|
||||||
with_items: "{{ ceph_config_keys }}"
|
|
||||||
changed_when: false
|
|
||||||
become: false
|
|
||||||
ignore_errors: true
|
|
||||||
register: statconfig
|
|
||||||
check_mode: no
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
|
||||||
copy:
|
|
||||||
src: "{{ playbook_dir }}/{{ fetch_directory }}/{{ fsid }}/{{ item.0 }}"
|
|
||||||
dest: "{{ item.0 }}"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
changed_when: false
|
|
||||||
with_together:
|
|
||||||
- "{{ ceph_config_keys }}"
|
|
||||||
- "{{ statconfig.results }}"
|
|
||||||
when:
|
|
||||||
- item.1.stat.exists == true
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: include copy_configs.yml
|
|
||||||
include_tasks: copy_configs.yml
|
|
||||||
|
|
||||||
- name: include start_docker_restapi.yml
|
|
||||||
include_tasks: start_docker_restapi.yml
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- name: run the ceph rest api docker image
|
|
||||||
docker_container:
|
|
||||||
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
|
||||||
name: "ceph-restapi-{{ ansible_hostname }}"
|
|
||||||
network: host
|
|
||||||
expose: "{{ ceph_restapi_port }}"
|
|
||||||
state: running
|
|
||||||
env: "RESTAPI_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_restapi_docker_interface]['ipv4']['address'] }},CEPH_DAEMON=RESTAPI,{{ ceph_restapi_docker_extra_env }}"
|
|
||||||
volumes: "/etc/ceph:/etc/ceph,/etc/localtime:/etc/localtime:ro"
|
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
- name: set_fact docker_exec_cmd
|
|
||||||
set_fact:
|
|
||||||
docker_exec_cmd: "docker exec ceph-restapi-{{ ansible_hostname }}"
|
|
||||||
when:
|
|
||||||
- containerized_deployment
|
|
||||||
|
|
||||||
- name: include pre_requisite.yml
|
|
||||||
include_tasks: pre_requisite.yml
|
|
||||||
when:
|
|
||||||
- not containerized_deployment
|
|
||||||
|
|
||||||
- name: include start_restapi.yml
|
|
||||||
include_tasks: start_restapi.yml
|
|
||||||
when:
|
|
||||||
- not containerized_deployment
|
|
||||||
|
|
||||||
- name: include docker/main.yml
|
|
||||||
include_tasks: docker/main.yml
|
|
||||||
when:
|
|
||||||
- containerized_deployment
|
|
|
@ -1,62 +0,0 @@
|
||||||
---
|
|
||||||
- name: create ceph rest api directory
|
|
||||||
file:
|
|
||||||
path: /var/lib/ceph/restapi/ceph-restapi
|
|
||||||
state: directory
|
|
||||||
owner: "ceph"
|
|
||||||
group: "ceph"
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: copy ceph rest api keyring
|
|
||||||
copy:
|
|
||||||
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.restapi.keyring"
|
|
||||||
dest: "/var/lib/ceph/restapi/ceph-restapi/keyring"
|
|
||||||
owner: "ceph"
|
|
||||||
group: "ceph"
|
|
||||||
mode: "0600"
|
|
||||||
when:
|
|
||||||
- cephx
|
|
||||||
|
|
||||||
- name: activate ceph rest api with upstart
|
|
||||||
file:
|
|
||||||
path: /var/lib/ceph/restapi/{{ item }}
|
|
||||||
state: touch
|
|
||||||
owner: "ceph"
|
|
||||||
group: "ceph"
|
|
||||||
mode: "0644"
|
|
||||||
with_items:
|
|
||||||
- done
|
|
||||||
- upstart
|
|
||||||
changed_when: false
|
|
||||||
when:
|
|
||||||
- ansible_distribution == 'Ubuntu'
|
|
||||||
|
|
||||||
- name: activate ceph rest api with sysvinit
|
|
||||||
file:
|
|
||||||
path: /var/lib/ceph/restapi/{{ item }}
|
|
||||||
state: touch
|
|
||||||
owner: "ceph"
|
|
||||||
group: "ceph"
|
|
||||||
mode: "0644"
|
|
||||||
with_items:
|
|
||||||
- done
|
|
||||||
- sysvinit
|
|
||||||
when:
|
|
||||||
- ansible_distribution != 'Ubuntu'
|
|
||||||
|
|
||||||
# NOTE (leseb): will uncomment this when this https://github.com/ceph/ceph/pull/4144 lands
|
|
||||||
#- name: start and add that the Ceph REST API service to the init sequence (Ubuntu)
|
|
||||||
# service: >
|
|
||||||
# name=ceph-restapi
|
|
||||||
# state=started
|
|
||||||
# enabled=yes
|
|
||||||
# args="id={{ ansible_hostname }}"
|
|
||||||
# when: ansible_distribution == "Ubuntu"
|
|
||||||
#
|
|
||||||
#- name: start and add that the Ceph REST API service to the init sequence
|
|
||||||
# service: >
|
|
||||||
# name=ceph
|
|
||||||
# state=started
|
|
||||||
# enabled=yes
|
|
||||||
# args=restapi
|
|
||||||
# when: ansible_distribution != "Ubuntu"
|
|
|
@ -1,13 +0,0 @@
|
||||||
---
|
|
||||||
- name: check if ceph rest api is already started
|
|
||||||
shell: "pgrep -f ceph-rest-api"
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
check_mode: no
|
|
||||||
register: restapi_status
|
|
||||||
|
|
||||||
- name: start ceph rest api
|
|
||||||
shell: "nohup ceph-rest-api --conf /etc/ceph/{{ cluster }}.conf &"
|
|
||||||
changed_when: false
|
|
||||||
when:
|
|
||||||
- restapi_status.rc != 0
|
|
|
@ -8,7 +8,6 @@
|
||||||
- mdss
|
- mdss
|
||||||
- rgws
|
- rgws
|
||||||
- nfss
|
- nfss
|
||||||
- restapis
|
|
||||||
- rbdmirrors
|
- rbdmirrors
|
||||||
- clients
|
- clients
|
||||||
- iscsigws
|
- iscsigws
|
||||||
|
@ -272,38 +271,6 @@
|
||||||
status: "Complete"
|
status: "Complete"
|
||||||
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
|
|
||||||
- hosts: restapis
|
|
||||||
become: True
|
|
||||||
gather_facts: false
|
|
||||||
pre_tasks:
|
|
||||||
- name: set ceph rest api install 'In Progress'
|
|
||||||
run_once: true
|
|
||||||
set_stats:
|
|
||||||
data:
|
|
||||||
installer_phase_ceph_restapi:
|
|
||||||
status: "In Progress"
|
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
|
||||||
tags: ['ceph_update_config']
|
|
||||||
- role: ceph-handler
|
|
||||||
- role: ceph-docker-common
|
|
||||||
- role: ceph-config
|
|
||||||
tags: ['ceph_update_config']
|
|
||||||
when:
|
|
||||||
- ceph_release_num[ceph_release] <= ceph_release_num.luminous
|
|
||||||
- role: ceph-restapi
|
|
||||||
when:
|
|
||||||
- ceph_release_num[ceph_release] <= ceph_release_num.luminous
|
|
||||||
post_tasks:
|
|
||||||
- name: set ceph rest api install 'Complete'
|
|
||||||
run_once: true
|
|
||||||
set_stats:
|
|
||||||
data:
|
|
||||||
installer_phase_ceph_restapi:
|
|
||||||
status: "Complete"
|
|
||||||
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
||||||
|
|
||||||
- hosts: clients
|
- hosts: clients
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
- mdss
|
- mdss
|
||||||
- rgws
|
- rgws
|
||||||
- nfss
|
- nfss
|
||||||
- restapis
|
|
||||||
- rbdmirrors
|
- rbdmirrors
|
||||||
- clients
|
- clients
|
||||||
- mgrs
|
- mgrs
|
||||||
|
@ -274,38 +273,6 @@
|
||||||
status: "Complete"
|
status: "Complete"
|
||||||
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
|
|
||||||
- hosts: restapis
|
|
||||||
gather_facts: false
|
|
||||||
become: True
|
|
||||||
pre_tasks:
|
|
||||||
- name: set ceph rest api install 'In Progress'
|
|
||||||
run_once: true
|
|
||||||
set_stats:
|
|
||||||
data:
|
|
||||||
installer_phase_ceph_restapi:
|
|
||||||
status: "In Progress"
|
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
|
||||||
tags: ['ceph_update_config']
|
|
||||||
- role: ceph-handler
|
|
||||||
- role: ceph-common
|
|
||||||
- role: ceph-config
|
|
||||||
tags: ['ceph_update_config']
|
|
||||||
when:
|
|
||||||
- ceph_release_num[ceph_release] <= ceph_release_num.luminous
|
|
||||||
- role: ceph-restapi
|
|
||||||
when:
|
|
||||||
- ceph_release_num[ceph_release] <= ceph_release_num.luminous
|
|
||||||
post_tasks:
|
|
||||||
- name: set ceph rest api install 'Complete'
|
|
||||||
run_once: true
|
|
||||||
set_stats:
|
|
||||||
data:
|
|
||||||
installer_phase_ceph_restapi:
|
|
||||||
status: "Complete"
|
|
||||||
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
||||||
|
|
||||||
- hosts: rbdmirrors
|
- hosts: rbdmirrors
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 2
|
||||||
iscsi_gw_vms: 1
|
iscsi_gw_vms: 1
|
||||||
mgr_vms: 1
|
mgr_vms: 1
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.15
|
public_subnet: 192.168.15
|
||||||
cluster_subnet: 192.168.16
|
cluster_subnet: 192.168.16
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 2
|
||||||
iscsi_gw_vms: 1
|
iscsi_gw_vms: 1
|
||||||
mgr_vms: 1
|
mgr_vms: 1
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.17
|
public_subnet: 192.168.17
|
||||||
cluster_subnet: 192.168.18
|
cluster_subnet: 192.168.18
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 3
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.95
|
public_subnet: 192.168.95
|
||||||
cluster_subnet: 192.168.96
|
cluster_subnet: 192.168.96
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: false
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: false
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.73
|
public_subnet: 192.168.73
|
||||||
cluster_subnet: 192.168.74
|
cluster_subnet: 192.168.74
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 1
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 1
|
mgr_vms: 1
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# INSTALL SOURCE OF CEPH
|
# INSTALL SOURCE OF CEPH
|
||||||
# valid values are 'stable' and 'dev'
|
# valid values are 'stable' and 'dev'
|
||||||
ceph_install_source: stable
|
ceph_install_source: stable
|
||||||
|
|
|
@ -14,9 +14,6 @@ client_vms: 0
|
||||||
iscsi_gw_vms: 0
|
iscsi_gw_vms: 0
|
||||||
mgr_vms: 0
|
mgr_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
|
||||||
restapi: true
|
|
||||||
|
|
||||||
# SUBNETS TO USE FOR THE VMS
|
# SUBNETS TO USE FOR THE VMS
|
||||||
public_subnet: 192.168.42
|
public_subnet: 192.168.42
|
||||||
cluster_subnet: 192.168.43
|
cluster_subnet: 192.168.43
|
||||||
|
|
Loading…
Reference in New Issue