aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-config
diff options
context:
space:
mode:
authorchigang <chigang@huawei.com>2017-06-30 20:24:25 +0800
committerchigang <chigang@huawei.com>2017-07-03 21:19:28 +0800
commit95ecdb773c9fa90f9e4f1f792f5cc5dc8328fd6a (patch)
tree1b012703eb52f78fe35119a4f9eba98b221f69d9 /deploy/adapters/ansible/roles/ceph-config
parentd529e77a45c77c10ac6970ca9e733e92e89d138f (diff)
Remove obsoleted code
JIRA:- use OpenStack-ansible deploy openstack, so remove obsoleted code. Some of the enhanced features will be added in later versions Change-Id: Ie92b92b5de234a7d7d03b578b0bc15fd0218b3b3 Signed-off-by: chigang <chigang@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-config')
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/files/create_osd.sh39
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml94
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/tasks/main.yml14
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/templates/ceph.j225
-rw-r--r--deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j25
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/templates/dump_var.j28
6 files changed, 0 insertions, 185 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-config/files/create_osd.sh b/deploy/adapters/ansible/roles/ceph-config/files/create_osd.sh
deleted file mode 100755
index dd815c22..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/files/create_osd.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-if [ -d "/var/local/osd" ]; then
-echo "clear /var/local/osd"
-rm -r /var/local/osd/
-umount /var/local/osd
-rm -r /var/local/osd
-fi
-
-
-#safe check
-ps -ef |grep lvremove |awk '{print $2}' |xargs kill -9
-ps -ef |grep vgremove |awk '{print $2}' |xargs kill -9
-ps -ef |grep vgcreate |awk '{print $2}' |xargs kill -9
-ps -ef |grep lvcreate |awk '{print $2}' |xargs kill -9
-
-if [ -L "/dev/storage-volumes/ceph0" ]; then
-echo "remove lv vg"
-lvremove -f /dev/storage-volumes/ceph0
-fi
-
-
-echo "lvcreate"
-lvcreate -l 100%FREE -nceph0 storage-volumes
-echo "mkfs"
-mkfs.xfs -f /dev/storage-volumes/ceph0
-
-if [ ! -d "/var/local/osd" ]; then
-echo "mount osd"
-mkdir -p /var/local/osd
-mount /dev/storage-volumes/ceph0 /var/local/osd
-fi
-
diff --git a/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml b/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml
deleted file mode 100755
index b0be0f2e..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml
+++ /dev/null
@@ -1,94 +0,0 @@
----
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-- name: gen ceph fsid
- shell: uuidgen
- register: ceph_fsid
- when: inventory_hostname in groups['ceph_adm']
-
-- name: gen ceph conf
- local_action:
- module: "template"
- src: "ceph.j2"
- dest: "/tmp/ceph.conf"
- when: inventory_hostname in groups['ceph_adm']
-
-- name: fetch ceph conf from ceph_adm
- fetch: src="/etc/ceph/ceph.conf" dest="/tmp/ceph.conf" flat=yes
- delegate_to: "{{ public_vip.ip }}"
- when: compute_expansion
-
-- name: "make directory for ceph config file"
- file: path="/etc/ceph" state="directory"
-
-- name: copy ceph conf to dest mon node
- copy: src="/tmp/ceph.conf" dest="/etc/ceph/ceph.conf"
-
-- name: install ceph-related packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items:
- - ceph
-
-- name: gen create monmap script
- local_action: template src="create_monmap.j2" dest="/tmp/create_monmap.sh" mode=0755
- when: inventory_hostname in groups['ceph_adm']
-
-- name: create monmap
- script: /tmp/create_monmap.sh
- when: inventory_hostname in groups['ceph_mon']
-
-- name: create mon.keyring
- shell: "ceph-authtool --create-keyring /tmp/ceph.mon.keyring \
- --gen-key -n mon. --cap mon 'allow *'"
- when: inventory_hostname in groups['ceph_adm']
-
-- name: create admin.keyring
- shell: "ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring \
- --gen-key -n client.admin --set-uid=0 \
- --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow'"
- when: inventory_hostname in groups['ceph_adm']
-
-- name: Add the client.admin key to the ceph.mon.keyring
- shell: "ceph-authtool /tmp/ceph.mon.keyring \
- --import-keyring /etc/ceph/ceph.client.admin.keyring"
- when: inventory_hostname in groups['ceph_adm']
-
-- name: fetch mon.keyring to local
- fetch: src="/tmp/ceph.mon.keyring" dest="/tmp/ceph.mon.keyring" flat=yes
- when: inventory_hostname in groups['ceph_adm']
-
-- name: fetch mon.keyring from ceph_adm
- fetch: src="/tmp/ceph.mon.keyring" dest="/tmp/ceph.mon.keyring" flat=yes
- delegate_to: "{{ public_vip.ip }}"
- when: compute_expansion
-
-- name: fetch client.admin.keyring to local
- fetch:
- src: "/etc/ceph/ceph.client.admin.keyring"
- dest: "/tmp/ceph.client.admin.keyring"
- flat: "yes"
- when: inventory_hostname in groups['ceph_adm']
-
-- name: fetch mon.keyring from ceph_adm
- fetch:
- src: "/etc/ceph/ceph.client.admin.keyring"
- dest: "/tmp/ceph.client.admin.keyring"
- flat: "yes"
- delegate_to: "{{ public_vip.ip }}"
- when: compute_expansion
-
-- name: copy mon.keyring to remote nodes
- copy: src="/tmp/ceph.mon.keyring" dest="/tmp/ceph.mon.keyring"
-
-- name: copy admin.keyring to remote nodes
- copy:
- src: "/tmp/ceph.client.admin.keyring"
- dest: "/etc/ceph/ceph.client.admin.keyring"
-
-- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml b/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml
deleted file mode 100755
index 49feab61..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-- include: create_config.yml
- tags:
- - ceph_config
- - ceph_deploy
- - ceph_mon
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2
deleted file mode 100755
index bd0e3f5d..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2
+++ /dev/null
@@ -1,25 +0,0 @@
-[global]
-fsid = {{ ceph_fsid.stdout }}
-mon initial members = {{ groups["ceph_mon"] | join(", ")}}
-mon host =
-{%- for host in groups["ceph_mon"] -%}
-{{ ', ' if not loop.first else ''}}{{ ip_settings[host].mgmt.ip }}
-{%- endfor %}
-
-public network = {{ mgmt_cidr }}
-cluster network = {{ storage_cidr }}
-
-auth cluster required = cephx
-auth service required = cephx
-auth client required = cephx
-
-osd journal size = 1024
-filestore xattr use omap = true
-osd pool default size = 1
-osd pool default min size = 1
-osd pool default pg num = 333
-osd pool default pgp num = 333
-osd crush chooseleaf type = 1
-
-debug mon = 1
-debug ms = 0
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2
deleted file mode 100644
index 7d1eb9d7..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-monmaptool --create --clobber --fsid {{ ceph_fsid.stdout }}
-{%- for host in groups['ceph_mon']%}
- --add {{host}} {{ ip_settings[host].mgmt.ip }}:6789
-{%- endfor %}
- /tmp/monmap
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2
deleted file mode 100755
index a4a9b155..00000000
--- a/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2
+++ /dev/null
@@ -1,8 +0,0 @@
-HOSTVARS (ANSIBLE GATHERED, group_vars, host_vars) :
-
-{{ hostvars[inventory_hostname] | to_yaml }}
-
-PLAYBOOK VARS:
-
-{{ vars | to_yaml }}
-