From 95ecdb773c9fa90f9e4f1f792f5cc5dc8328fd6a Mon Sep 17 00:00:00 2001 From: chigang Date: Fri, 30 Jun 2017 20:24:25 +0800 Subject: 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 --- .../ansible/roles/cinder-volume/handlers/main.yml | 12 ---- .../ansible/roles/cinder-volume/tasks/main.yml | 38 ----------- .../roles/cinder-volume/templates/cinder.conf | 76 ---------------------- .../ansible/roles/cinder-volume/vars/Debian.yml | 15 ----- .../ansible/roles/cinder-volume/vars/RedHat.yml | 20 ------ .../ansible/roles/cinder-volume/vars/main.yml | 13 ---- 6 files changed, 174 deletions(-) delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/templates/cinder.conf delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/vars/Debian.yml delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/vars/RedHat.yml delete mode 100644 deploy/adapters/ansible/roles/cinder-volume/vars/main.yml (limited to 'deploy/adapters/ansible/roles/cinder-volume') diff --git a/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml b/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml deleted file mode 100644 index c7ec8d8e..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml +++ /dev/null @@ -1,12 +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: restart cinder-volume services - service: name={{ item }} state=restarted enabled=yes - with_items: "{{ services | union(services_noarch) }}" diff --git a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml deleted file mode 100644 index 5394b8e8..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml +++ /dev/null @@ -1,38 +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_vars: "{{ ansible_os_family }}.yml" - -- name: disable auto start - copy: - content: "#!/bin/sh\nexit 101" - dest: "/usr/sbin/policy-rc.d" - mode: 0755 - when: ansible_os_family == "Debian" - -- name: install cinder-volume and lvm2 packages - action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" - with_items: "{{ packages | union(packages_noarch) }}" - -- name: enable auto start - file: - path=/usr/sbin/policy-rc.d - state=absent - when: ansible_os_family == "Debian" - -- name: generate cinder volume service list - lineinfile: dest=/opt/service create=yes line='{{ item }}' - with_items: "{{ services | union(services_noarch) }}" - -- name: upload cinder-volume configuration - template: src=cinder.conf dest=/etc/cinder/cinder.conf backup=yes - notify: - - restart cinder-volume services - -- meta: flush_handlers diff --git a/deploy/adapters/ansible/roles/cinder-volume/templates/cinder.conf b/deploy/adapters/ansible/roles/cinder-volume/templates/cinder.conf deleted file mode 100644 index 9a5ca005..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/templates/cinder.conf +++ /dev/null @@ -1,76 +0,0 @@ -[DEFAULT] -rootwrap_config = /etc/cinder/rootwrap.conf -api_paste_confg = /etc/cinder/api-paste.ini -iscsi_helper = tgtadm -volume_name_template = volume-%s -volume_group = storage-volumes -verbose = True -auth_strategy = keystone -state_path = /var/lib/cinder -lock_path = /var/lib/cinder/tmp -notification_driver=cinder.openstack.common.notifier.rpc_notifier -volumes_dir = /var/lib/cinder/volumes -transport_url = rabbit://{{ RABBIT_USER }}:{{ RABBIT_PASS }}@{{ rabbit_host }} -log_file=/var/log/cinder/cinder.log - -control_exchange = cinder -rpc_backend = rabbit -my_ip = {{ storage_controller_host }} - -enabled_backends = lvm - -glance_host = {{ internal_vip.ip }} -glance_port = 9292 -glance_api_servers = http://{{ internal_vip.ip }}:9292 -api_rate_limit = False -storage_availability_zone = nova - -quota_volumes = 10 -quota_gigabytes = 1000 -quota_driver = cinder.quota.DbQuotaDriver - -osapi_volume_listen = {{ storage_controller_host }} -osapi_volume_listen_port = 8776 - -db_backend = sqlalchemy -volume_name_template = volume-%s -snapshot_name_template = snapshot-%s - -max_gigabytes = 10000 - -volume_clear = zero -volume_clear_size = 10 - -iscsi_ip_address = {{ storage_controller_host }} -iscsi_port=3260 -iscsi_helper=tgtadm - -volumes_dir=/var/lib/cinder/volumes - -[database] -connection = mysql://cinder:{{ CINDER_DBPASS }}@{{ db_host }}/cinder -idle_timeout = 30 - -[keystone_authtoken] -auth_uri = http://{{ internal_vip.ip }}:5000 -auth_url = http://{{ internal_vip.ip }}:35357 -auth_type = password -project_domain_name = default -user_domain_name = default -project_name = service -username = cinder -password = {{ CINDER_PASS }} - -identity_uri = http://{{ internal_vip.ip }}:35357 -admin_tenant_name = service -admin_user = cinder -admin_password = {{ CINDER_PASS }} - -[lvm] -volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver -volume_group = storage-volumes -iscsi_protocol = iscsi -iscsi_helper = tgtadm - -[oslo_concurrency] -lock_path = /var/lib/cinder/tmp diff --git a/deploy/adapters/ansible/roles/cinder-volume/vars/Debian.yml b/deploy/adapters/ansible/roles/cinder-volume/vars/Debian.yml deleted file mode 100644 index 8c3cb728..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/vars/Debian.yml +++ /dev/null @@ -1,15 +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 -############################################################################## ---- -packages: - - cinder-volume - -services: - - cinder-volume - - tgt diff --git a/deploy/adapters/ansible/roles/cinder-volume/vars/RedHat.yml b/deploy/adapters/ansible/roles/cinder-volume/vars/RedHat.yml deleted file mode 100644 index 892c66d8..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/vars/RedHat.yml +++ /dev/null @@ -1,20 +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 -############################################################################## ---- -packages: - - openstack-cinder - - targetcli - - python-oslo-db - - MySQL-python - - lvm2 - -services: - - openstack-cinder-volume - - lvm2-lvmetad - - target diff --git a/deploy/adapters/ansible/roles/cinder-volume/vars/main.yml b/deploy/adapters/ansible/roles/cinder-volume/vars/main.yml deleted file mode 100644 index e564e6c5..00000000 --- a/deploy/adapters/ansible/roles/cinder-volume/vars/main.yml +++ /dev/null @@ -1,13 +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 -############################################################################## ---- -packages_noarch: - - lvm2 - -services_noarch: [] -- cgit 1.2.3-korg