diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/cinder-controller')
9 files changed, 0 insertions, 292 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml b/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml deleted file mode 100644 index 5791cd18..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/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 control serveice - service: name={{ item }} state=restarted enabled=yes - with_items: "{{ services | union(services_noarch) }}" diff --git a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml deleted file mode 100644 index 12af52f1..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_config.yml +++ /dev/null @@ -1,18 +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: upload cinder conf - template: src=cinder.conf dest=/etc/cinder/cinder.conf - -- name: sync cinder db - shell: su -s /bin/sh -c 'cinder-manage db sync' cinder - ignore_errors: true - changed_when: true - notify: - - restart cinder control serveice diff --git a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml deleted file mode 100644 index 0a0d57f3..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml +++ /dev/null @@ -1,34 +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: 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 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 common cinder service list - lineinfile: dest=/opt/service create=yes line='{{ item }}' - with_items: "{{ services | union(services_noarch) }}" - -- name: upload cinder conf - template: src=cinder.conf dest=/etc/cinder/cinder.conf - notify: - - restart cinder control serveice diff --git a/deploy/adapters/ansible/roles/cinder-controller/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-controller/tasks/main.yml deleted file mode 100644 index c719ca28..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/tasks/main.yml +++ /dev/null @@ -1,25 +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" - -- include: cinder_install.yml - tags: - - install - - cinder-install - - cinder - -- include: cinder_config.yml - when: inventory_hostname == groups['controller'][0] - tags: - - config - - cinder-config - - cinder - -- meta: flush_handlers diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/api-paste.ini b/deploy/adapters/ansible/roles/cinder-controller/templates/api-paste.ini deleted file mode 100644 index 0eb04e29..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/templates/api-paste.ini +++ /dev/null @@ -1,71 +0,0 @@ -############# -# OpenStack # -############# - -[composite:osapi_volume] -use = call:cinder.api:root_app_factory -/: apiversions -/v1: openstack_volume_api_v1 -/v2: openstack_volume_api_v2 - -[composite:openstack_volume_api_v1] -use = call:cinder.api.middleware.auth:pipeline_factory -noauth = request_id faultwrap sizelimit osprofiler noauth apiv1 -keystone = request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv1 -keystone_nolimit = request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv1 - -[composite:openstack_volume_api_v2] -use = call:cinder.api.middleware.auth:pipeline_factory -noauth = request_id faultwrap sizelimit osprofiler noauth apiv2 -keystone = request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv2 -keystone_nolimit = request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv2 - -[filter:request_id] -paste.filter_factory = cinder.openstack.common.middleware.request_id:RequestIdMiddleware.factory - -[filter:faultwrap] -paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory - -[filter:osprofiler] -paste.filter_factory = osprofiler.web:WsgiMiddleware.factory -hmac_keys = SECRET_KEY -enabled = yes - -[filter:noauth] -paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory - -[filter:sizelimit] -paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory - -[app:apiv1] -paste.app_factory = cinder.api.v1.router:APIRouter.factory - -[app:apiv2] -paste.app_factory = cinder.api.v2.router:APIRouter.factory - -[pipeline:apiversions] -pipeline = faultwrap osvolumeversionapp - -[app:osvolumeversionapp] -paste.app_factory = cinder.api.versions:Versions.factory - -[filter:authtoken] -paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory -# auth_host = 127.0.0.1 -# auth_port = 35357 -# auth_protocol = http -auth_uri = http://{{ internal_vip.ip }}:5000/v2.0 -identity_uri = http://{{ internal_vip.ip }}:35357 -admin_tenant_name = service -admin_user = cinder -admin_password = {{ CINDER_PASS }} - -########## -# Shared # -########## - -[filter:keystonecontext] -paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory - -[filter:authtoken] -paste.filter_factory = keystonemiddleware.auth_token:filter_factory diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf deleted file mode 100644 index 4ad2da2e..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf +++ /dev/null @@ -1,86 +0,0 @@ -{% set memcached_servers = [] %} -{% for host in haproxy_hosts.values() %} -{% set _ = memcached_servers.append('%s:11211'% host) %} -{% endfor %} -{% set memcached_servers = memcached_servers|join(',') %} - -[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 = {{ VERBOSE }} -debug = {{ DEBUG }} -auth_strategy = keystone -state_path = /var/lib/cinder -lock_path = /var/lock/cinder -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 }} - -glance_host = {{ internal_vip.ip }} -glance_port = 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 -osapi_volume_workers = {{ api_workers }} - -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 -volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver - -[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 -memcached_servers = {{ memcached_servers }} -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 }} - -[keymgr] -encryption_auth_url=http://{{ internal_vip.ip }}:5000/v3 - -[oslo_messaging_rabbit] -rabbit_host = {{ rabbit_host }} -rabbit_port = 5672 -rabbit_userid = {{ RABBIT_USER }} -rabbit_password = {{ RABBIT_PASS }} - -[oslo_concurrency] -lock_path = /var/lib/cinder/tmp diff --git a/deploy/adapters/ansible/roles/cinder-controller/vars/Debian.yml b/deploy/adapters/ansible/roles/cinder-controller/vars/Debian.yml deleted file mode 100644 index 801296b3..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/vars/Debian.yml +++ /dev/null @@ -1,17 +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-api - - cinder-scheduler - -services: - - cinder-api - - cinder-scheduler diff --git a/deploy/adapters/ansible/roles/cinder-controller/vars/RedHat.yml b/deploy/adapters/ansible/roles/cinder-controller/vars/RedHat.yml deleted file mode 100644 index e11bef97..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/vars/RedHat.yml +++ /dev/null @@ -1,16 +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 - - python-oslo-db - -services: - - openstack-cinder-api - - openstack-cinder-scheduler diff --git a/deploy/adapters/ansible/roles/cinder-controller/vars/main.yml b/deploy/adapters/ansible/roles/cinder-controller/vars/main.yml deleted file mode 100644 index ebde9470..00000000 --- a/deploy/adapters/ansible/roles/cinder-controller/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: - - python-cinderclient - -services_noarch: [] |