Retire ansible-role-k8s-glance
Depends-On: https://review.opendev.org/#/c/660440/ Change-Id: I2fcc046cfbfe742a203ee48f6ba1c4b8bf56a7ae
This commit is contained in:
parent
510c8c1372
commit
6c31b56370
101
.gitignore
vendored
101
.gitignore
vendored
@ -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/
|
37
.zuul.yaml
37
.zuul.yaml
@ -1,37 +0,0 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- ansible-role-k8s-glance-kubernetes-centos
|
||||
- ansible-role-k8s-glance-openshift-centos
|
||||
|
||||
- job:
|
||||
name: ansible-role-k8s-glance-kubernetes-centos
|
||||
parent: ansible-role-k8s-base
|
||||
nodeset: ansible-role-k8s-centos
|
||||
voting: false
|
||||
vars:
|
||||
coe: kubernetes
|
||||
project_name: ansible-role-k8s-glance
|
||||
ansible_role_k8s_required:
|
||||
- ansible-role-k8s-mariadb
|
||||
- ansible-role-k8s-keystone
|
||||
required-projects:
|
||||
- openstack/ansible-role-k8s-mariadb
|
||||
- openstack/ansible-role-k8s-keystone
|
||||
- openstack/ansible-role-k8s-glance
|
||||
|
||||
- job:
|
||||
name: ansible-role-k8s-glance-openshift-centos
|
||||
parent: ansible-role-k8s-base
|
||||
nodeset: ansible-role-k8s-centos
|
||||
voting: false
|
||||
vars:
|
||||
coe: openshift
|
||||
project_name: ansible-role-k8s-glance
|
||||
ansible_role_k8s_required:
|
||||
- ansible-role-k8s-mariadb
|
||||
- ansible-role-k8s-keystone
|
||||
required-projects:
|
||||
- openstack/ansible-role-k8s-mariadb
|
||||
- openstack/ansible-role-k8s-keystone
|
||||
- openstack/ansible-role-k8s-glance
|
176
LICENSE
176
LICENSE
@ -1,176 +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.
|
||||
|
40
README.md
40
README.md
@ -1,34 +1,10 @@
|
||||
K8S glance
|
||||
==========
|
||||
[](https://galaxy.ansible.com/tripleo/k8s-glance)
|
||||
[](https://travis-ci.org/tripleo/ansible-role-k8s-glance)
|
||||
This project is no longer maintained.
|
||||
|
||||
Install glance in a Kubernetes cluster.
|
||||
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".
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Access to Kubernetes cluster
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
| Name | Default Value | Description |
|
||||
|-------------------|---------------------|----------------------|
|
||||
| `action` | `provision` | List of tasks to run. |
|
||||
| `coe_host` | | |
|
||||
| `coe_config_context` | | |
|
||||
| `coe_config_file` | | |
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
- `ansible.kubernetes-modules`
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
- hosts: all
|
||||
roles:
|
||||
- tripleo.k8s-glance
|
||||
For any further questions, please email
|
||||
openstack-discuss@lists.openstack.org or join #openstack-dev on
|
||||
Freenode.
|
||||
|
@ -1,41 +0,0 @@
|
||||
coe_host:
|
||||
coe_config_context:
|
||||
coe_config_file:
|
||||
action: provision
|
||||
namespace: openstack
|
||||
|
||||
tls_enabled: false
|
||||
|
||||
hieradata: {}
|
||||
hieradata_file: ''
|
||||
|
||||
service_name: glance
|
||||
glance_port: 9292
|
||||
glance_hostname: "{{service_name}}"
|
||||
glance_address: "{{glance_hostname}}"
|
||||
glance_use_service_ip: true
|
||||
|
||||
clouds_config: 'clouds-secret'
|
||||
|
||||
glance_config:
|
||||
DEFAULT:
|
||||
debug: true
|
||||
verbose: true
|
||||
public_bind_host: "0.0.0.0"
|
||||
database:
|
||||
connection: "mysql+pymysql://root:weakpassword@mariadb:3306/glance"
|
||||
|
||||
# NOTE(flaper87): Auth section for config file
|
||||
keystone_authtoken:
|
||||
auth_uri: 'http://keystone:35357'
|
||||
auth_url: 'http://keystone:5000/v3'
|
||||
password: weakpassword
|
||||
username: 'glance'
|
||||
project: 'admin'
|
||||
|
||||
# NOTE(flaper87): Required for registering the keystone endpoint
|
||||
keystone_default_domain: 'default'
|
||||
keystone_region: 'regionOne'
|
||||
keystone_project: 'admin'
|
||||
keystone_user_password: 'weakpassword'
|
||||
keystone_username: 'glance'
|
@ -1,37 +0,0 @@
|
||||
- name: Delete glance db-sync job
|
||||
k8s_v1_job:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: glance-db-sync
|
||||
namespace: "{{namespace}}"
|
||||
state: absent
|
||||
|
||||
- name: Delete glance deployment
|
||||
k8s_v1beta1_deployment:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: glance-api
|
||||
namespace: "{{namespace}}"
|
||||
state: absent
|
||||
|
||||
- name: Delete glance service
|
||||
k8s_v1_service:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: glance
|
||||
namespace: "{{namespace}}"
|
||||
state: absent
|
||||
|
||||
- name: Delete glance configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{coe_config_file}}"
|
||||
name: glance
|
||||
namespace: "{{namespace}}"
|
||||
state: absent
|
||||
debug: yes
|
@ -1,69 +0,0 @@
|
||||
- name: Translate hieradata
|
||||
include_role:
|
||||
name: 'ansible-role-k8s-tripleo'
|
||||
vars:
|
||||
schema:
|
||||
# NOTE(flaper87): We should be able to use the connection
|
||||
# str coming from hiera. Let's use k8s' DNS for now.
|
||||
# glance::database_connection: database.connection
|
||||
|
||||
glance_log_file: DEFAULT.log_file
|
||||
# glance::api::debug: DEFAULT.debug
|
||||
glance::api::workers: DEFAULT.workers
|
||||
glance::api::bind_port: DEFAULT.bind_port
|
||||
glance::api::enable_v1_api: DEFAULT.enable_v1_api
|
||||
glance::api::enable_v2_api: DEFAULT.enable_v2_api
|
||||
glance::api::show_image_direct_url: DEFAULT.show_image_direct_url
|
||||
glance::api::show_multiple_locations: DEFAULT.show_multiple_locations
|
||||
|
||||
keystone_auth_uri: keystone_authtoken.auth_uri
|
||||
keystone_identity_uri: keystone_authtoken.auth_url
|
||||
glance::api::authtoken::password: keystone_authtoken.password
|
||||
glance::api::authtoken::username: keystone_authtoken.username
|
||||
glance::api::authtoken::project: keystone_authtoken.project
|
||||
# glance::keystone::authtoken::user_domain_name: 'Default'
|
||||
# glance::keystone::authtoken::project_domain_name: 'Default'
|
||||
|
||||
|
||||
glance::api::os_region_name: glance_store.os_region_name
|
||||
|
||||
glance::api::enable_proxy_headers_parsing: oslo_middleware.enable_proxy_headers_parsing
|
||||
|
||||
glance::api::pipeline: paste_deploy.pipeline
|
||||
|
||||
#glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
|
||||
glance::notify::rabbitmq::rabbit_userid: oslo_messaging_rabbit.rabbit_userid
|
||||
glance::notify::rabbitmq::rabbit_port: oslo_messaging_rabbit.rabbit_port
|
||||
glance::notify::rabbitmq::rabbit_password: oslo_messaging_rabbit.rabbit_password
|
||||
glance::notify::rabbitmq::rabbit_use_ssl: oslo_messaging_rabbit.rabbit_use_ssl
|
||||
glance::notify::rabbitmq::rabbit_host: oslo_messaging_rabbit.rabbit_host
|
||||
|
||||
glance::notify::rabbitmq::notification_driver: {get_param: NotificationDriver}
|
||||
glance::notification_driver: oslo_messaging_notifications.driver
|
||||
glance::notification_topics: oslo_messaging_notifications.topics
|
||||
|
||||
# NOTE(flaper87): Required for registering the keystone endpoint
|
||||
keystone_region: keystone_region
|
||||
keystone_default_domain: keystone_default_domain
|
||||
glance::keystone::auth::tenant: keystone_tenant
|
||||
glance::keystone::auth::public_url: keystone_public_url
|
||||
glance::keystone::auth::internal_url: keystone_internal_url
|
||||
glance::keystone::auth::admin_url: keystone_admin_url
|
||||
glance::keystone::auth::password: keystone_user_password
|
||||
|
||||
default: '{{glance_config}}'
|
||||
fact_variable: 'glance_config'
|
||||
|
||||
# glance::policy::policies: {get_param: GlanceApiPolicies}
|
||||
# glance::backend::swift::swift_store_auth_address: {get_param: [EndpointMap, KeystoneV3Internal, uri] }
|
||||
# glance::backend::swift::swift_store_user: service:glance
|
||||
# glance::backend::swift::swift_store_key: {get_param: GlancePassword}
|
||||
# glance::backend::swift::swift_store_create_container_on_put: true
|
||||
# glance::backend::swift::swift_store_auth_version: 3
|
||||
# glance::backend::rbd::rbd_store_pool: {get_param: GlanceRbdPoolName}
|
||||
# glance::backend::rbd::rbd_store_user: {get_param: CephClientUserName}
|
||||
# glance_backend: {get_param: GlanceBackend}
|
||||
|
||||
# tripleo::profile::base::glance::api::glance_nfs_enabled: {get_param: GlanceNfsEnabled}
|
||||
# tripleo::glance::nfs_mount::share: {get_param: GlanceNfsShare}
|
||||
# tripleo::glance::nfs_mount::options: {get_param: GlanceNfsOptions}
|
@ -1,15 +0,0 @@
|
||||
- name: Register Glance in Keystone
|
||||
include_role:
|
||||
name: ansible-role-k8s-tripleo
|
||||
tasks_from: bootstrap-service-endpoints
|
||||
vars:
|
||||
# service_name: '{{service_name}}'
|
||||
service_type: 'image'
|
||||
service_region: '{{glance_config.keystone_region}}'
|
||||
service_domain: '{{glance_config.keystone_default_domain}}'
|
||||
service_project: '{{glance_config.keystone_authtoken.project}}'
|
||||
service_password: '{{glance_config.keystone_authtoken.password}}'
|
||||
service_username: '{{glance_config.keystone_authtoken.username}}'
|
||||
service_internal_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'
|
||||
service_public_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'
|
||||
service_admin_url: '{{ "https" if tls_enabled else "http"}}://{{glance_address}}:{{glance_port}}'
|
@ -1 +0,0 @@
|
||||
- include: "{{ action }}.yml"
|
@ -1,165 +0,0 @@
|
||||
- name: Upload config files
|
||||
template:
|
||||
src: "{{item}}"
|
||||
dest: /tmp/{{item}}
|
||||
backup: yes
|
||||
mode: 0644
|
||||
with_items:
|
||||
- httpd.conf
|
||||
- httpd-glance-main.conf
|
||||
|
||||
- include: hiera.yml
|
||||
|
||||
- name: Generate config files
|
||||
config_template:
|
||||
src: base.conf.j2
|
||||
dest: /tmp/glance-api.conf
|
||||
config_overrides: '{{glance_config}}'
|
||||
config_type: ini
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/httpd-glance-main.conf"
|
||||
register: "httpd_glance_main_conf"
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/httpd.conf"
|
||||
register: "httpd_conf"
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/glance-api.conf"
|
||||
register: "glance_conf"
|
||||
|
||||
- name: Create glance configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{coe_config_file}}"
|
||||
name: glance
|
||||
namespace: "{{namespace}}"
|
||||
state: present
|
||||
debug: yes
|
||||
labels:
|
||||
service: glance
|
||||
data:
|
||||
config.json: |
|
||||
{
|
||||
"command": "glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf",
|
||||
"config_files": [
|
||||
{
|
||||
"dest": "/etc/httpd/conf/httpd.conf",
|
||||
"owner": "root",
|
||||
"perm": "0644",
|
||||
"source": "/var/lib/kolla/config_files/httpd.conf"
|
||||
},
|
||||
{
|
||||
"dest": "/etc/glance/glance-api.conf",
|
||||
"owner": "glance",
|
||||
"perm": "0644",
|
||||
"source": "/var/lib/kolla/config_files/glance-api.conf"
|
||||
},
|
||||
{
|
||||
"dest": "/etc/httpd/conf.d/10-glance-main.conf",
|
||||
"owner": "root",
|
||||
"perm": "0644",
|
||||
"source": "/var/lib/kolla/config_files/httpd-glance-main.conf"
|
||||
}
|
||||
]
|
||||
}
|
||||
glance-api.conf: |
|
||||
{{glance_conf['content'] | b64decode}}
|
||||
httpd.conf: |
|
||||
{{httpd_conf['content'] | b64decode}}
|
||||
httpd-glance-main.conf: |
|
||||
{{httpd_glance_main_conf['content'] | b64decode}}
|
||||
|
||||
- name: Create glance database
|
||||
include_role:
|
||||
name: ansible-role-k8s-tripleo
|
||||
tasks_from: create-database
|
||||
vars:
|
||||
database_name: 'glance'
|
||||
|
||||
- name: Create glance db-sync job
|
||||
k8s_v1_job:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{coe_config_file}}"
|
||||
name: glance-db-sync
|
||||
namespace: "{{namespace}}"
|
||||
state: present
|
||||
restart_policy: OnFailure
|
||||
containers:
|
||||
- image: tripleoupstream/centos-binary-glance-api
|
||||
name: glance-db-sync
|
||||
env:
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: COPY_ALWAYS
|
||||
- name: KOLLA_BOOTSTRAP
|
||||
value: ''
|
||||
volume_mounts:
|
||||
- name: kolla-config
|
||||
mountPath: /var/lib/kolla/config_files/
|
||||
volumes:
|
||||
- name: kolla-config
|
||||
config_map:
|
||||
name: glance
|
||||
state: present
|
||||
|
||||
- name: Create glance service
|
||||
k8s_v1_service:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{coe_config_file}}"
|
||||
name: "{{glance_hostname}}"
|
||||
namespace: "{{namespace}}"
|
||||
state: present
|
||||
ports:
|
||||
- port: 9292
|
||||
name: glance-api
|
||||
selector:
|
||||
app: glance-api
|
||||
register: glance_service
|
||||
|
||||
- set_fact:
|
||||
glance_address: "{{glance_service.service.spec.cluster_ip}}"
|
||||
when: glance_use_service_ip
|
||||
|
||||
- name: Create glance deployment
|
||||
k8s_apps_v1beta1_deployment:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{coe_config_context}}"
|
||||
kubeconfig: "{{coe_config_file}}"
|
||||
name: glance-api
|
||||
namespace: "{{namespace}}"
|
||||
replicas: 1
|
||||
spec_revision_history_limit: 3
|
||||
spec_template_metadata_labels:
|
||||
app: glance-api
|
||||
containers:
|
||||
- name: glance-api
|
||||
image: tripleoupstream/centos-binary-glance-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: COPY_ALWAYS
|
||||
- name: KOLLA_KUBERNETES
|
||||
value: ""
|
||||
ports:
|
||||
- name: glance-api
|
||||
containerPort: 9292
|
||||
volume_mounts:
|
||||
- name: kolla-config
|
||||
mountPath: /var/lib/kolla/config_files/
|
||||
volumes:
|
||||
- name: kolla-config
|
||||
config_map:
|
||||
name: glance
|
||||
state: present
|
||||
|
||||
# NOTE(flaper87): we should do this iff the keystone-secret exists and keystone
|
||||
# is enabled. Add checks for each.
|
||||
- include: keystone.yml
|
@ -1,22 +0,0 @@
|
||||
<VirtualHost *:5000>
|
||||
## Vhost docroot
|
||||
DocumentRoot "/var/www/cgi-bin/glance"
|
||||
|
||||
## Directories, there should at least be a declaration for /var/www/cgi-bin/glance
|
||||
|
||||
<Directory "/var/www/cgi-bin/glance">
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
## Logging
|
||||
# ErrorLog "/var/log/httpd/glance_wsgi_main_error.log"
|
||||
ServerSignature Off
|
||||
# CustomLog "/var/log/httpd/glance_wsgi_main_access.log" combined
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIDaemonProcess glance_main display-name=glance-main group=glance processes=2 threads=1 user=glance
|
||||
WSGIProcessGroup glance_main
|
||||
WSGIScriptAlias / "/var/www/cgi-bin/glance/main"
|
||||
WSGIPassAuthorization On
|
||||
</VirtualHost>
|
@ -1,113 +0,0 @@
|
||||
Listen *:5000
|
||||
Listen *:35357
|
||||
|
||||
ServerRoot "/etc/httpd"
|
||||
DocumentRoot "/var/www/html"
|
||||
User apache
|
||||
Group apache
|
||||
|
||||
Include conf.modules.d/*.conf
|
||||
|
||||
<Directory />
|
||||
AllowOverride none
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
<Directory "/var/www">
|
||||
AllowOverride None
|
||||
# Allow open access:
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory "/var/www/cgi-bin">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.html
|
||||
</IfModule>
|
||||
|
||||
<Files ".ht*">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
ErrorLog /dev/stderr
|
||||
<IfModule log_config_module>
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
|
||||
<IfModule logio_module>
|
||||
# You need to enable mod_logio.c to use %I and %O
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||
</IfModule>
|
||||
|
||||
CustomLog /dev/stdout combined
|
||||
</IfModule>
|
||||
|
||||
<IfModule mime_module>
|
||||
#
|
||||
# TypesConfig points to the file containing the list of mappings from
|
||||
# filename extension to MIME-type.
|
||||
#
|
||||
TypesConfig /etc/mime.types
|
||||
|
||||
#
|
||||
# AddType allows you to add to or override the MIME configuration
|
||||
# file specified in TypesConfig for specific file types.
|
||||
#
|
||||
#AddType application/x-gzip .tgz
|
||||
#
|
||||
# AddEncoding allows you to have certain browsers uncompress
|
||||
# information on the fly. Note: Not all browsers support this.
|
||||
#
|
||||
#AddEncoding x-compress .Z
|
||||
#AddEncoding x-gzip .gz .tgz
|
||||
#
|
||||
# If the AddEncoding directives above are commented-out, then you
|
||||
# probably should define those extensions to indicate media types:
|
||||
#
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
|
||||
#
|
||||
# AddHandler allows you to map certain file extensions to "handlers":
|
||||
# actions unrelated to filetype. These can be either built into the server
|
||||
# or added with the Action directive (see below)
|
||||
#
|
||||
# To use CGI scripts outside of ScriptAliased directories:
|
||||
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||
#
|
||||
#AddHandler cgi-script .cgi
|
||||
|
||||
# For type maps (negotiated resources):
|
||||
#AddHandler type-map var
|
||||
|
||||
#
|
||||
# Filters allow you to process content before it is sent to the client.
|
||||
#
|
||||
# To parse .shtml files for server-side includes (SSI):
|
||||
# (You will also need to add "Includes" to the "Options" directive.)
|
||||
#
|
||||
AddType text/html .shtml
|
||||
AddOutputFilter INCLUDES .shtml
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
<IfModule mime_magic_module>
|
||||
#
|
||||
# The mod_mime_magic module allows the server to use various hints from the
|
||||
# contents of the file itself to determine its type. The MIMEMagicFile
|
||||
# directive tells the module where the hint definitions are located.
|
||||
#
|
||||
MIMEMagicFile conf/magic
|
||||
</IfModule>
|
||||
|
||||
EnableSendfile on
|
||||
|
||||
# Supplemental configuration
|
||||
#
|
||||
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
||||
IncludeOptional conf.d/*.conf
|
@ -1,38 +0,0 @@
|
||||
[DEFAULT]
|
||||
debug = true
|
||||
|
||||
[auth]
|
||||
# Roles to assign to all users created by tempest (list value)
|
||||
tempest_roles = _member_
|
||||
|
||||
use_dynamic_credentials = true
|
||||
|
||||
# Roles to assign to all users created by tempest (list value)
|
||||
#tempest_roles =
|
||||
default_credentials_domain_name = Default
|
||||
|
||||
admin_username = admin
|
||||
admin_project_name = admin
|
||||
admin_password = weakpassword
|
||||
admin_domain_name = Default
|
||||
|
||||
[identity]
|
||||
admin_username = admin
|
||||
admin_tenant_name = admin
|
||||
admin_domain_name = Default
|
||||
disable_ssl_certificate_validation = true
|
||||
catalog_type = identity
|
||||
uri = http://{{keystone_ip}}:5000/v3
|
||||
uri_v3 = http://{{keystone_ip}}:5000/v3
|
||||
auth_version = v3
|
||||
region = RegionOne
|
||||
admin_role = admin
|
||||
default_domain_id = default
|
||||
admin_password = weakpassword
|
||||
|
||||
[service_available]
|
||||
cinder = false
|
||||
neutron = false
|
||||
glance = true
|
||||
swift = false
|
||||
nova = false
|
@ -1,67 +0,0 @@
|
||||
---
|
||||
- name: Get keystone cluster ip
|
||||
shell:
|
||||
cmd: |
|
||||
kubectl get service keystone --namespace {{namespace}} --template={%raw%}{{.spec.clusterIP}}{%endraw%}
|
||||
executable: /bin/bash
|
||||
register: keystone_ip
|
||||
|
||||
- set_fact:
|
||||
keystone_ip: "{{keystone_ip.stdout}}"
|
||||
|
||||
- name: Get glance cluster ip
|
||||
shell:
|
||||
cmd: |
|
||||
kubectl get service glance --namespace {{namespace}} --template={%raw%}{{.spec.clusterIP}}{%endraw%}
|
||||
executable: /bin/bash
|
||||
register: glance_ip
|
||||
|
||||
- set_fact:
|
||||
glance_ip: "{{glance_ip.stdout}}"
|
||||
|
||||
- name: Wait for glance to become available
|
||||
wait_for:
|
||||
host: "{{glance_ip}}"
|
||||
port: "{{item}}"
|
||||
delay: 2
|
||||
timeout: 300
|
||||
with_items:
|
||||
- 9292
|
||||
|
||||
- name: Test glance jobs completion
|
||||
shell:
|
||||
cmd: |
|
||||
set -ex
|
||||
|
||||
rst=$(kubectl --namespace {{namespace}} get jobs {{item}} --template={%raw%}"{{.status.succeeded}}"{%endraw%})
|
||||
if [ "$rst" == "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
||||
executable: /bin/bash
|
||||
retries: 6
|
||||
delay: 5
|
||||
register: task_result
|
||||
until: task_result.rc == 0
|
||||
with_items:
|
||||
- glance-createdb
|
||||
- glance-db-sync
|
||||
|
||||
|
||||
- name: Copy tempests config
|
||||
become: true
|
||||
template:
|
||||
src: templates/tempest.conf
|
||||
dest: /etc/tempest/tempest.conf
|
||||
|
||||
- name: Run tempest
|
||||
shell:
|
||||
cmd: |
|
||||
set -x
|
||||
set -e
|
||||
tempest init tempest
|
||||
cd tempest
|
||||
tempest run -r image
|
||||
executable: /bin/bash
|
||||
ignore_errors: true
|
||||
register: tempest_output
|
Loading…
x
Reference in New Issue
Block a user