Retire ansible-role-k8s-cinder

Change-Id: I439f5ee80e6352693f39a8227a7c492421736d1e
This commit is contained in:
Alex Schultz 2019-05-21 09:45:10 -06:00
parent 87661e79ba
commit 57c1b3f30b
21 changed files with 10 additions and 1457 deletions

101
.gitignore vendored
View File

@ -1,101 +0,0 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/

201
LICENSE
View File

@ -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 {yyyy} {name of copyright owner}
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.

View File

@ -1 +1,10 @@
# ansible-role-k8s-cinder
This project is no longer maintained.
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
For any further questions, please email
openstack-discuss@lists.openstack.org or join #openstack-dev on
Freenode.

View File

@ -1,20 +0,0 @@
coe_host: "https://127.0.0.1:8443"
kube_context:
config_file:
action: provision
namespace: openstack
service_account: default
privileged_service_account: openstack-priv
database_password: weakpassword
cinder_db_password: cinderpass
hiera_data: {}
hiera_data_file: ''
cinder_config:
DEFAULT:
public_bind_host: "0.0.0.0"
database:
connection: "mysql+pymysql://root:weakpassword@mariadb:3306/cinder"
enabled_backends: []

View File

@ -1,207 +0,0 @@
- name: Upload config files
template:
src: "{{item}}"
dest: /tmp/{{item}}
backup: yes
mode: 0644
with_items:
- lvm.conf
- name: Read configs into memory
slurp:
src: "/tmp/lvm.conf"
register: "lvm_conf"
- name: Create iscsid configmap
ignore_errors: yes
k8s_v1_config_map:
name: iscsid
namespace: '{{ namespace }}'
state: present
verify_ssl: false
labels:
app: iscsid
service: iscsid
data:
config.json: |
{
"command": "/usr/sbin/iscsid -f",
"config_files": [
{
"source": "/var/lib/kolla/config_files/initiatorname.iscsi",
"dest": "/etc/iscsi/initiatorname.iscsi",
"owner": "root",
"perm": "0600"
}
]
}
initiatorname.iscsi: |
InitiatorName=iqn.1994-05.com.redhat:da4a2a2d0d1
- name: Create cinder-volume-iscsi configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-volume-iscsi
namespace: "{{ namespace }}"
state: present
debug: yes
labels:
service: cinder-volume-iscsi
data:
config.json: |
{
"command": "/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
},
{
"source": "/var/lib/kolla/config_files/lvm.conf",
"dest": "/etc/lvm/lvm.conf",
"owner": "root",
"perm": "0644"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
lvm.conf: |
{{lvm_conf['content'] | b64decode}}
- name: Create Cinder Volume Deployment
k8s_apps_v1beta1_deployment:
name: cinder-volume-iscsi
namespace: "{{ namespace }}"
service_account_name: '{{ privileged_service_account }}'
labels:
app: cinder-volume-iscsi
service: cinder-volume-iscsi
replicas: 1
spec_template_metadata_labels:
app: cinder-volume-iscsi
service: cinder-volume-iscsi
containers:
- name: cinder-volume
securityContext:
privileged: true
image: tripleomaster/centos-binary-cinder-volume:current-tripleo
volumeMounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
- mountPath: /etc/localtime
name: host-etc-localtime
readOnly: true
- mountPath: /run
name: run
- mountPath: /dev
name: dev
- mountPath: /sys/fs/cgroup
name: sys-fs-cgroup
- mountPath: /lib/modules
name: lib-modules
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volumes:
- name: host-etc-localtime
hostPath:
path: /etc/localtime
- name: lib-modules
hostPath:
path: /lib/modules
- name: run
hostPath:
path: /run
- name: dev
hostPath:
path: /dev
- name: sys-fs-cgroup
hostPath:
path: /sys/fs/cgroup
- name: kolla-config
config_map:
name: cinder-volume-iscsi
- name: Create Iscsid Deployment
k8s_apps_v1beta1_deployment:
name: iscsid
namespace: '{{ namespace }}'
service_account_name: '{{ privileged_service_account }}'
node_selector:
controller: "true"
labels:
app: iscsid
service: iscsid
replicas: 1
spec_template_metadata_labels:
app: iscsid
service: iscsid
containers:
- name: iscsid
securityContext:
privileged: true
image: tripleomaster/centos-binary-iscsid:current-tripleo
volumeMounts:
- mountPath: /etc/localtime
name: host-etc-localtime
readOnly: true
- mountPath: /run
name: run
- mountPath: /dev
name: dev
- mountPath: /sys/fs/cgroup
name: sys-fs-cgroup
- mountPath: /lib/modules
name: lib-modules
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volumes:
- name: host-etc-localtime
hostPath:
path: /etc/localtime
- name: lib-modules
hostPath:
path: /lib/modules
- name: run
hostPath:
path: /run
- name: dev
hostPath:
path: /dev
- name: sys-fs-cgroup
hostPath:
path: /sys/fs/cgroup
- name: kolla-config
config_map:
name: iscsid

View File

@ -1,95 +0,0 @@
- name: Generate config files
config_template:
src: rbd/ceph.conf.j2
dest: /tmp/ceph.conf
config_type: ini
- name: Read configs into memory
slurp:
src: "/tmp/ceph.conf"
register: "ceph_conf"
- name: Create cinder-volume-rbd configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-volume-rbd
namespace: "{{ namespace }}"
state: present
debug: yes
labels:
service: cinder-volume-rbd
data:
config.json: |
{
"command": "/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
},
{
"source": "/var/lib/kolla/config_files/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "root",
"perm": "0644"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
ceph.conf: |
{{ceph_conf['content'] | b64decode}}
- name: Create Cinder Volume Deployment
k8s_apps_v1beta1_deployment:
name: cinder-volume-rbd
namespace: "{{ namespace }}"
service_account_name: "{{ service_account }}"
labels:
app: cinder-volume-rbd
service: cinder-volume-rbd
replicas: 1
spec_template_metadata_labels:
app: cinder-volume-rbd
service: cinder-volume-rbd
containers:
- name: cinder-volume
image: tripleomaster/centos-binary-cinder-volume:current-tripleo
volumeMounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
- name: ceph-client-cinder-keyring
mountPath: /etc/ceph/ceph.client.cinder.keyring
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volumes:
- name: kolla-config
config_map:
name: cinder-volume-rbd
- name: ceph-client-cinder-keyring
secret:
secretName: ceph-client-cinder-keyring

View File

@ -1,68 +0,0 @@
- name: Create cinder-volume-xtremio configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-volume-xtremio
namespace: "{{ namespace }}"
state: present
debug: yes
labels:
service: cinder-volume-xtremio
data:
config.json: |
{
"command": "/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
- name: Create Cinder Volume Deployment
k8s_apps_v1beta1_deployment:
name: cinder-volume-xtremio
namespace: "{{ namespace }}"
service_account_name: "{{ service_account }}"
labels:
app: cinder-volume-xtremio
service: cinder-volume-xtremio
replicas: 1
spec_template_metadata_labels:
app: cinder-volume-xtremio
service: cinder-volume-xtremio
containers:
- name: cinder-volume
image: tripleomaster/centos-binary-cinder-volume:current-tripleo
volumeMounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volumes:
- name: kolla-config
config_map:
name: cinder-volume-xtremio

View File

@ -1,110 +0,0 @@
# Upload and create pod specific configmap
- name: Upload config files
template:
src: "{{item}}"
dest: /tmp/{{item}}
backup: yes
mode: 0644
with_items:
- cinder-wsgi.conf
- name: Read configs into memory
slurp:
src: "/tmp/cinder-wsgi.conf"
register: "cinder_wsgi_conf"
- name: Create cinder-api configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-api
namespace: "{{ namespace }}"
state: present
debug: yes
labels:
service: cinder
data:
config.json: |
{
"command": "httpd -DFOREGROUND",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
},
{
"source": "/var/lib/kolla/config_files/cinder-wsgi.conf",
"dest": "/etc/httpd/conf.d/cinder-wsgi.conf",
"owner": "cinder",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
cinder-wsgi.conf: |
{{cinder_wsgi_conf['content'] | b64decode}}
- name: create cinder-api service
k8s_v1_service:
name: cinder
namespace: "{{ namespace }}"
labels:
app: cinder-api
service: cinder-api
selector:
app: cinder-api
service: cinder-api
ports:
- name: cinder-api
port: 8776
target_port: 8776
- name: Create Cinder-api Deployment
k8s_apps_v1beta1_deployment:
name: cinder-api
namespace: "{{ namespace }}"
service_account_name: "{{ service_account }}"
labels:
app: cinder-api
service: cinder-api
replicas: 1
spec_template_metadata_labels:
app: cinder-api
service: cinder-api
containers:
- name: cinder-api
image: tripleomaster/centos-binary-cinder-api:current-tripleo
ports:
- container_port: 8776
protocol: TCP
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volume_mounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
volumes:
- name: kolla-config
config_map:
name: cinder-api

View File

@ -1,68 +0,0 @@
- name: Create cinder-scheduler configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-scheduler
namespace: "{{ namespace }}"
state: present
debug: yes
labels:
service: cinder-scheduler
data:
config.json: |
{
"command": "cinder-scheduler --config-file /var/lib/kolla/config_files/cinder.conf",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
- name: create cinder-scheduler deployment
k8s_apps_v1beta1_deployment:
name: cinder-scheduler
namespace: "{{ namespace }}"
service_account_name: "{{ service_account }}"
labels:
app: cinder-scheduler
service: cinder-scheduler
replicas: 1
spec_template_metadata_labels:
app: cinder-scheduler
service: cinder-scheduler
containers:
- name: cinder-scheduler
image: tripleomaster/centos-binary-cinder-scheduler:current-tripleo
env:
- name: TZ
value: UTC
- name: KOLLA_CONFIG_STRATEGY
value: COPY_ALWAYS
- name: KOLLA_KUBERNETES
value: ""
volume_mounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
volumes:
- name: kolla-config
config_map:
name: cinder-scheduler

View File

@ -1,11 +0,0 @@
# Ensure that there is a 1:1 mapping of cinder-volume
# backend configmap to its corresponding cinder-volume pod
- include: backends/iscsi.yml
when: result.conf_dict['cinder_enable_iscsi_backend']
- include: backends/rbd.yml
when: result.conf_dict['cinder_enable_rbd_backend']
- include: backends/xtremio.yml
when: result.conf_dict['dellemc_xtremio_iscsi_backend']
- include: backends/netapp.yml
when: result.conf_dict['cinder_enable_netapp_backend']

View File

@ -1,61 +0,0 @@
- name: Delete cinder-create-db job
k8s_v1_job:
name: cinder-create-db
namespace: "{{ namespace }}"
state: absent
- name: Delete cinder db-sync job
k8s_v1_job:
name: cinder-create-tables
namespace: "{{ namespace }}"
state: absent
- name: Delete cinder db-sync job
k8s_v1_job:
name: cinder-create-user
namespace: "{{ namespace }}"
state: absent
- name: Delete cinder-api deployment
k8s_apps_v1beta1_deployment:
name: cinder-api
namespace: openstack
state: absent
- name: Delete cinder-scheduler deployment
k8s_apps_v1beta1_deployment:
name: cinder-scheduler
namespace: openstack
state: absent
- name: Delete cinder-volume deployment
k8s_apps_v1beta1_deployment:
name: cinder-volume
namespace: openstack
state: absent
- name: Delete cinder service
k8s_v1_service:
name: cinder
namespace: openstack
state: absent
- name: Delete cinder configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-volume
namespace: openstack
state: absent
- name: Delete cinder configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-scheduler
namespace: openstack
state: absent
- name: Delete cinder configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-api
namespace: openstack
state: absent
debug: yes

View File

@ -1,21 +0,0 @@
# Gather list of enabled backends here
- name: Append backend to enable_backends list
set_fact:
enabled_backends: "{{ enabled_backends }} + [ 'tripleo_ceph' ]"
when: result.conf_dict['cinder_enable_rbd_backend']
- name: Append backend to enable_backends list
set_fact:
enabled_backends: "{{ enabled_backends }} + [ 'tripleo_iscsi' ]"
when: result.conf_dict['cinder_enable_iscsi_backend']
- name: Append backend to enable_backends list
set_fact:
enabled_backends: "{{ enabled_backends }} + [ 'xtremio' ]"
when: result.conf_dict['dellemc_xtremio_iscsi_backend']
- name: Append backend to enable_backends list
set_fact:
enabled_backends: "{{ enabled_backends }} + [ 'tripleo_netapp' ]"
when: result.conf_dict['cinder_enable_netapp_backend']

View File

@ -1,81 +0,0 @@
- name: Translate hieradata
include_role:
name: 'ansible-role-k8s-tripleo'
vars:
schema:
cinder::auth_strategy: DEFAULT.auth_strategy
cinder::api::bind_port: bind_port
cinder::rabbit_userid: oslo_messaging_rabbit.rabbit_userid
cinder::rabbit_port: oslo_messaging_rabbit.rabbit_port
cinder::rabbit_password: oslo_messaging_rabbit.rabbit_password
cinder::rabbit_use_ssl: oslo_messaging_rabbit.rabbit_use_ssl
cinder::rabbit_host: oslo_messaging_rabbit.rabbit_host
cinder::rabbit_heartbeat_timeout_threshold: oslo_messaging_rabbit.rabbit_heartbeat_timeout_threshold
cinder::glance::glance_api_servers: DEFAULT.glance_api_servers
cinder::glance::glance_api_version: DEFAULT.glance_api_version
cinder::database_connection: database.connection
cinder::db::database_max_retries: database.max_retries
cinder::db::database_db_max_retries: database.db_max_retries
cinder::db::mysql::dbname: database.dbname
cinder::db::mysql::host: database.host
cinder::db::mysql::password: database.password
cinder::db::mysql::user: database.user
tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: cinder_enable_iscsi_backend
tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: cinder_enable_nfs_backend
tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: cinder_enable_rbd_backend
tripleo::profile::base::cinder::volume::nfs::cinder_nfs_mount_options: cinder_nfs_mount_options
tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers: cinder_nfs_servers
tripleo::profile::base::cinder::volume::nfs::cinder_nas_secure_file_operations: cinder_nas_secure_file_operations
tripleo::profile::base::cinder::volume::nfs::cinder_nas_secure_file_permissions: cinder_nas_secure_file_permissions
tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: cinder_lvm_loop_device_size
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: cinder_iscsi_helper
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_protocol: cinder_iscsi_protocol
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: cinder_iscsi_address
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: cinder_rbd_pool_name
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: cinder_rbd_user_name
tripleo::profile::base::cinder::volume::dellemc_xtremio_iscsi_backend: dellemc_xtremio_iscsi_backend
cinder::backend::dellemc_xtremio_iscsi::max_over_subscription_ratio: xtremio.max_over_subscription_ratio
cinder::backend::dellemc_xtremio_iscsi::use_multipath_for_image_xfer: xtremio.use_multipath_for_image_xfer
cinder::backend::dellemc_xtremio_iscsi::volume_backend_name: xtremio.volume_backend_name
cinder::backend::dellemc_xtremio_iscsi::san_ip: xtremio.san_ip
cinder::backend::dellemc_xtremio_iscsi::xtremio_cluster_name: xtremio.xtremio_cluster_name
cinder::backend::dellemc_xtremio_iscsi::san_login: xtremio.san_login
cinder::backend::dellemc_xtremio_iscsi::san_password: xtremio.san_password
cinder::backend::dellemc_xtremio_iscsi::image_volume_cache_enabled: xtremio.image_volume_cache_enabled
tripleo::profile::base::ceph::ceph_mon_host: ceph_mon_host
ceph::profile::params::fsid: ceph_cluster_fsid
ceph::profile::params::authentication_type: authentication_type
tripleo::profile::base::cinder::volume::cinder_enable_netapp_backend: cinder_enable_netapp_backend
cinder::backend::netapp::title: tripleo_netapp.title
cinder::backend::netapp::netapp_login: tripleo_netapp.netapp_login
cinder::backend::netapp::netapp_password: tripleo_netapp.netapp_password
cinder::backend::netapp::netapp_server_hostname: tripleo_netapp.netapp_server_hostname
cinder::backend::netapp::netapp_server_port: tripleo_netapp.netapp_server_port
cinder::backend::netapp::netapp_size_multiplier: tripleo_netapp.netapp_size_multiplier
cinder::backend::netapp::netapp_storage_family: tripleo_netapp.netapp_storage_family
cinder::backend::netapp::netapp_storage_protocol: tripleo_netapp.netapp_storage_protocol
cinder::backend::netapp::netapp_transport_type: tripleo_netapp.netapp_transport_type
cinder::backend::netapp::netapp_vfiler: tripleo_netapp.netapp_vfiler
cinder::backend::netapp::netapp_volume_list: tripleo_netapp.netapp_volume_list
cinder::backend::netapp::netapp_vserver: tripleo_netapp.netapp_vserver
cinder::backend::netapp::netapp_partner_backend_name: tripleo_netapp.netapp_partner_backend_name
cinder::backend::netapp::nfs_shares: tripleo_netapp.nfs_shares
cinder::backend::netapp::nfs_shares_config: tripleo_netapp.nfs_shares_config
cinder::backend::netapp::nfs_mount_options: tripleo_netapp.nfs_mount_options
cinder::backend::netapp::netapp_copyoffload_tool_path: tripleo_netapp.netapp_copyoffload_tool_path
cinder::backend::netapp::netapp_controller_ips: tripleo_netapp.netapp_controller_ips
cinder::backend::netapp::netapp_sa_password: tripleo_netapp.netapp_sa_password
cinder::backend::netapp::netapp_storage_pools: tripleo_netapp.netapp_storage_pools
cinder::backend::netapp::netapp_host_type: tripleo_netapp.netapp_host_type
cinder::backend::netapp::netapp_webservice_path: tripleo_netapp.netapp_webservice_path
cinder::backend::netapp::nas_secure_file_operations: tripleo_netapp.nas_secure_file_operations
cinder::backend::netapp::nas_secure_file_permissions: tripleo_netapp.nas_secure_file_permissions
default: '{{cinder_config}}'
fact_variable: 'cinder_config'

View File

@ -1,130 +0,0 @@
# List of init jobs for the pod go here
- name: Create cinder-init-job configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-init-job
namespace: "{{ namespace }}"
state: present
debug: yes
data:
config.json: |
{
"command": "cinder-scheduler --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/var/lib/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/lib/cinder",
"owner": "cinder:cinder",
"recurse": true
},
{
"path": "/var/log/kolla/cinder",
"owner": "cinder:cinder",
"recurse": true
}
]
}
cinder.conf: |
{{cinder_conf['content'] | b64decode}}
- name: Create Cinder Database
k8s_v1_job:
name: cinder-create-db
namespace: "{{ namespace }}"
restart_policy: OnFailure
containers:
- name: cinder-create-db
image: tripleomaster/centos-binary-kolla-toolbox:current-tripleo
image_pull_policy: IfNotPresent
command: ["sh", "-c"]
args:
- ansible localhost -m mysql_db -a
"login_host='mariadb'
login_port='3306'
login_user='root'
login_password='$DATABASE_PASSWORD'
name='cinder'"
env:
- name: DATABASE_PASSWORD
value: "{{ database_password }}"
- name: "TZ"
value: "UTC"
register: db_create
- name: Create Cinder User in the database
k8s_v1_job:
name: cinder-create-user
namespace: "{{ namespace }}"
restart_policy: OnFailure
containers:
- name: cinder-create-db
image: tripleomaster/centos-binary-kolla-toolbox:current-tripleo
image_pull_policy: IfNotPresent
command: ["sh", "-c"]
args:
- ansible localhost -m mysql_user -a
"login_host='mariadb'
login_port='3306'
login_user='root'
login_password='$DATABASE_PASSWORD'
name='cinder'
password='$CINDER_DATABASE_PASSWORD'
host='%'
priv='cinder.*:ALL'
append_privs='yes'"
env:
- name: CINDER_DATABASE_PASSWORD
value: "{{ cinder_db_password }}"
- name: DATABASE_PASSWORD
value: "{{database_password}}"
- name: "TZ"
value: "UTC"
when: db_create|succeeded
# Cinder Scheduler won't start without cinder tables present
- name: Create Cinder Tables
k8s_v1_job:
name: cinder-create-tables
namespace: "{{ namespace }}"
restart_policy: OnFailure
containers:
- name: cinder-create-db
image: tripleomaster/centos-binary-cinder-api:current-tripleo
image_pull_policy: IfNotPresent
# command: ["/usr/bin/cinder-manage", "db", "sync"]
env:
- name: KOLLA_KUBERNETES
value: ""
- name: KOLLA_BOOTSTRAP
value: ""
- name: KOLLA_CONFIG_STRATEGY
value: "COPY_ONCE"
- name: "TZ"
value: "UTC"
volume_mounts:
- name: kolla-config
mountPath: /var/lib/kolla/config_files/
volumes:
- name: kolla-config
config_map:
name: cinder-init-job
when: db_create|succeeded
register: cinder_bootstrap
# Remove the init-job configmap.
- name: Delete cinder-init-job configmaps
ignore_errors: yes
k8s_v1_config_map:
name: cinder-init-job
namespace: "{{namespace}}"
state: absent
when: cinder_bootstrap|succeeded

View File

@ -1 +0,0 @@
- include: "{{ action }}.yml"

View File

@ -1,21 +0,0 @@
- include: hiera.yml
- include: enabled_backends.yml
- name: Generate config files
config_template:
src: cinder.conf.j2
dest: /tmp/cinder.conf
config_overrides: '{{cinder_config}}'
config_type: ini
- name: Read configs into memory
slurp:
src: "/tmp/cinder.conf"
register: "cinder_conf"
- include: init-jobs.yml
- include: cinder-api.yml
- include: cinder-scheduler.yml
- include: cinder-volume.yml

View File

@ -1,30 +0,0 @@
command: "/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf"
config_files:
- source: "/var/lib/kolla/config_files/cinder.conf"
dest: "/etc/cinder/cinder.conf"
owner: cinder
perm: '0600'
{% if result.conf_dict['cinder_enable_rbd_backend'] %}
- source: "/var/lib/kolla/config_files/ceph.conf"
dest: "/etc/ceph/ceph.conf"
owner: root
perm: '0644'
- source: "/var/lib/kolla/config_files/ceph.client.{{result.conf_dict['cinder_rbd_user_name']}}.keyring"
dest: "/etc/ceph/ceph.client.{{result.conf_dict['cinder_rbd_user_name']}}.keyring"
owner: root
perm: '0644'
{% endif %}
{% if result.conf_dict['cinder_enable_iscsi_backend'] %}
- source: "/var/lib/kolla/config_files/lvm.conf"
dest: "/etc/lvm/lvm.conf"
owner: root
perm: '0644'
{% endif %}
permissions:
- path: "/var/lib/cinder"
owner: cinder:cinder
recurse: true
- path: "/var/log/kolla/cinder"
owner: cinder:cinder
recurse: true

View File

@ -1,17 +0,0 @@
Listen 0.0.0.0:8776
TraceEnable off
<VirtualHost *:8776>
WSGIDaemonProcess cinder-api processes=5 threads=1 user=cinder group=cinder display-name=%{GROUP} python-path=/usr/lib/python2.7/site-packages
WSGIProcessGroup cinder-api
WSGIScriptAlias / /var/www/cgi-bin/cinder/cinder-wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/kolla/cinder/cinder-api.log
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat
</VirtualHost>

View File

@ -1,86 +0,0 @@
[DEFAULT]
glance_api_servers={{result.conf_dict['DEFAULT']['glance_api_servers']}}
glance_api_version={{result.conf_dict['DEFAULT']['glance_api_version']}}
enable_v3_api=True
storage_availability_zone=nova
default_availability_zone=nova
auth_strategy={{result.conf_dict['DEFAULT']['auth_strategy']}}
enabled_backends={{ enabled_backends | join(",") }}
nova_catalog_info=compute:nova:internalURL
nova_catalog_admin_info=compute:nova:adminURL
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler
osapi_volume_listen=0.0.0.0
osapi_volume_workers=2
log_dir=/var/log/cinder
transport_url=rabbit://{{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}@rabbitmq:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}/?ssl=0
rpc_backend=rabbit
control_exchange=openstack
api_paste_config=/etc/cinder/api-paste.ini
[database]
connection=mysql+pymysql://{{result.conf_dict['database']['user']}}:{{result.conf_dict['database']['password']}}@{{result.conf_dict['database']['host']}}:3306/{{result.conf_dict['database']['dbname']}}
max_retries=-1
db_max_retries=-1
[oslo_concurrency]
lock_path=/var/lib/cinder/tmp
[oslo_messaging_notifications]
driver=messagingv2
transport_url=rabbit://{{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}@rabbitmq:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}/?ssl=0
[oslo_messaging_rabbit]
ssl={{result.conf_dict['oslo_messaging_rabbit']['rabbit_use_ssl']}}
rabbit_port={{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}
rabbit_userid={{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}
rabbit_password={{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}
heartbeat_timeout_threshold={{result.conf_dict['oslo_messaging_rabbit']['rabbit_heartbeat_timeout_threshold']}}
[oslo_middleware]
enable_proxy_headers_parsing=True
[oslo_policy]
policy_file=/etc/cinder/policy.json
{% if result.conf_dict['cinder_enable_iscsi_backend'] %}
[tripleo_iscsi]
volume_backend_name=tripleo_iscsi
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
iscsi_ip_address=iscsid
iscsi_helper=lioadm
volumes_dir=/var/lib/cinder/cinder-volumes
iscsi_protocol=iscsi
{% endif %}
{% if result.conf_dict['dellemc_xtremio_iscsi_backend'] %}
[xtremio]
max_over_subscription_ratio = {{result.conf_dict['xtremio']['max_over_subscription_ratio']}}
use_multipath_for_image_xfer= {{result.conf_dict['xtremio']['use_multipath_for_image_xfer']}}
volume_backend_name=xtremio
volume_driver=cinder.volume.drivers.emc.xtremio.XtremIOISCSIDriver
san_ip={{result.conf_dict['xtremio']['san_ip']}}
xtremio_cluster_name={{result.conf_dict['xtremio']['xtremio_cluster_name']}}
san_login={{result.conf_dict['xtremio']['san_login']}}
san_password={{result.conf_dict['xtremio']['san_password']}}
image_volume_cache_enabled={{result.conf_dict['xtremio']['image_volume_cache_enabled']}}
{% endif %}
{% if result.conf_dict['cinder_enable_rbd_backend'] %}
[tripleo_ceph]
volume_backend_name=tripleo_ceph
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user={{ result.conf_dict['cinder_rbd_user_name'] }}
rbd_pool={{ result.conf_dict['cinder_rbd_pool_name'] }}
rbd_secret_uuid={{ result.conf_dict['ceph_cluster_fsid'] }}
backend_host=hostgroup
{% endif %}
{% if result.conf_dict['cinder_enable_netapp_backend'] %}
[tripleo_netapp]
title = tripleo_netapp
netapp_login = {{result.conf_dict['tripleo_netapp']['netapp_login']}}
netapp_password = {{result.conf_dict['tripleo_netapp']['netapp_password']}}
netapp_server_hostname = {{result.conf_dict['tripleo_netapp']['netapp_server_hostname']}}
{% endif %}

View File

@ -1,117 +0,0 @@
config {
checks = 1
abort_on_errors = 0
profile_dir = "/etc/lvm/profile"
}
devices {
dir = "/dev"
scan = [ "/dev" ]
obtain_device_list_from_udev = 1
external_device_info_source = "none"
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
cache_dir = "/etc/lvm/cache"
cache_file_prefix = ""
write_cache_state = 1
sysfs_scan = 1
multipath_component_detection = 1
md_component_detection = 1
fw_raid_component_detection = 0
md_chunk_alignment = 1
data_alignment_detection = 1
data_alignment = 0
data_alignment_offset_detection = 1
ignore_suspended_devices = 0
ignore_lvm_mirrors = 1
disable_after_error_count = 0
require_restorefile_with_uuid = 1
pv_min_size = 2048
issue_discards = 0
allow_changes_with_duplicate_pvs = 1
}
allocation {
maximise_cling = 1
use_blkid_wiping = 1
wipe_signatures_when_zeroing_new_lvs = 1
mirror_logs_require_separate_pvs = 0
cache_pool_metadata_require_separate_pvs = 0
thin_pool_metadata_require_separate_pvs = 0
}
log {
verbose = 0
silent = 0
syslog = 1
overwrite = 0
level = 0
indent = 1
command_names = 0
prefix = " "
activation = 0
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
backup {
backup = 1
backup_dir = "/etc/lvm/backup"
archive = 1
archive_dir = "/etc/lvm/archive"
retain_min = 10
}
shell {
history_size = 100
}
global {
umask = 077
test = 0
units = "h"
si_unit_consistency = 1
suffix = 1
activation = 1
proc = "/proc"
etc = "/etc"
locking_type = 1
wait_for_locks = 1
fallback_to_clustered_locking = 1
fallback_to_local_locking = 1
locking_dir = "/run/lock/lvm"
prioritise_write_locks = 1
abort_on_internal_errors = 0
detect_internal_vg_cache_corruption = 0
metadata_read_only = 0
mirror_segtype_default = "raid1"
raid10_segtype_default = "raid10"
sparse_segtype_default = "thin"
use_lvmetad = 1
use_lvmlockd = 0
system_id_source = "none"
use_lvmpolld = 1
notify_dbus = 1
}
activation {
checks = 0
udev_sync = 0
udev_rules = 0
verify_udev_operations = 0
retry_deactivation = 1
missing_stripe_filler = "error"
use_linear_target = 1
reserved_stack = 64
reserved_memory = 8192
process_priority = -18
raid_region_size = 512
readahead = "auto"
raid_fault_policy = "warn"
mirror_image_fault_policy = "remove"
mirror_log_fault_policy = "allocate"
snapshot_autoextend_threshold = 100
snapshot_autoextend_percent = 20
thin_pool_autoextend_threshold = 100
thin_pool_autoextend_percent = 20
use_mlockall = 0
monitoring = 1
polling_interval = 15
activation_mode = "degraded"
}
dmeventd {
mirror_library = "libdevmapper-event-lvm2mirror.so"
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
thin_library = "libdevmapper-event-lvm2thin.so"
}

View File

@ -1,10 +0,0 @@
[global]
fsid = {{result.conf_dict['ceph_cluster_fsid']}}
mon_host = {{result.conf_dict['ceph_mon_host']}}
auth_cluster_required = {{result.conf_dict['authentication_type']}}
auth_service_required = {{result.conf_dict['authentication_type']}}
auth_client_required = {{result.conf_dict['authentication_type']}}
auth_supported = {{result.conf_dict['authentication_type']}}
[client]
rbd_default_features = 1