Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace) repositories are unused and ready to retire. This change removes all content from the repository and adds the usual README file to point out that the repository is retired following the process from https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project See also http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html Depends-On: https://review.opendev.org/699362 Change-Id: Iaf61f1be5c082af0f602834e86748e667a4273e5
This commit is contained in:
parent
0af2893db1
commit
a497e15a00
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.
|
||||
|
10
README.rst
Normal file
10
README.rst
Normal file
@ -0,0 +1,10 @@
|
||||
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.
|
@ -1,31 +0,0 @@
|
||||
FROM {{ image_spec("openstack-base") }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
#mysql-client only for provisioning need to be removed later
|
||||
#netcat is for mysql alive test
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
apache2 \
|
||||
libapache2-mod-wsgi \
|
||||
mysql-client \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
&& echo > /etc/apache2/ports.conf \
|
||||
&& apt-get clean
|
||||
|
||||
{{ copy_sources("openstack/keystone", "/keystone") }}
|
||||
|
||||
RUN useradd --user-group keystone \
|
||||
&& /var/lib/microservices/venv/bin/pip install ldappool /keystone \
|
||||
&& mkdir -p /etc/keystone/fernet-keys /etc/keystone/credential-keys /etc/keystone/domains /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \
|
||||
&& cp -r /keystone/etc/* /etc/keystone/ \
|
||||
&& cp /var/lib/microservices/venv/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \
|
||||
&& cp /var/lib/microservices/venv/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/public \
|
||||
&& touch /etc/keystone/fernet-keys/.placeholder \
|
||||
&& chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \
|
||||
&& chmod -R 700 /etc/keystone/fernet-keys \
|
||||
&& chmod -R 500 /etc/keystone/credential-keys
|
||||
|
||||
COPY daemon.sh /usr/local/bin/daemon.sh
|
||||
COPY keystone_sudoers /etc/sudoers.d/keystone_sudoers
|
||||
RUN chmod 755 /usr/local/bin/daemon.sh \
|
||||
&& chmod 440 /etc/sudoers.d/keystone_sudoers
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/apache2/envvars
|
||||
/usr/sbin/apache2ctl -D FOREGROUND
|
@ -1 +0,0 @@
|
||||
%microservices ALL=(root) NOPASSWD: /bin/chown keystone\:keystone /var/log/ccp/keystone, /bin/chown keystone\:keystone /etc/keystone/fernet-keys
|
@ -1,19 +0,0 @@
|
||||
{% macro keystone_authtoken(username, password) -%}
|
||||
[keystone_authtoken]
|
||||
auth_uri = {{ address("keystone", keystone.public_port, with_scheme=True) }}
|
||||
auth_url = {{ address("keystone", keystone.admin_port, with_scheme=True) }}
|
||||
auth_type = password
|
||||
project_domain_name = {{ service_account.domain }}
|
||||
user_domain_name = {{ service_account.domain }}
|
||||
project_name = {{ service_account.project }}
|
||||
username = {{ username }}
|
||||
password = {{ password }}
|
||||
memcached_servers = {{ address("memcached", memcached.port) }}
|
||||
{% if keystone.tls.enabled %}
|
||||
cafile = /opt/ccp/etc/tls/ca.pem
|
||||
{% endif %}
|
||||
{% if keystone.encrypt_tokens_in_memcached.enabled %}
|
||||
memcache_security_strategy = ENCRYPT
|
||||
memcache_secret_key = {{ keystone.encrypt_tokens_in_memcached.secret_key }}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
@ -1,9 +0,0 @@
|
||||
actions:
|
||||
- name: keystone-db-sync
|
||||
image: keystone
|
||||
dependencies:
|
||||
- keystone-db-create
|
||||
command: keystone-manage db_sync
|
||||
files:
|
||||
- path: /etc/keystone/keystone.conf
|
||||
content: keystone.conf.j2
|
@ -1,8 +0,0 @@
|
||||
actions:
|
||||
- name: fernet-rotate
|
||||
image: keystone
|
||||
command: "/usr/bin/python /opt/ccp/bin/fernet-manage.py fernet_rotate"
|
||||
files:
|
||||
- path: /opt/ccp/bin/fernet-manage.py
|
||||
content: fernet-manage.py
|
||||
perm: "0700"
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
set -o pipefail
|
||||
BACKUP_FILE="/var/ccp/backup/keystone/backup-$(date "+%Y%m%d%H%M%S").sql"
|
||||
mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address("database") }} \
|
||||
-u {{ keystone.db.username }} -p{{ keystone.db.password }} \
|
||||
--single-transaction {{ keystone.db.name }} > "${BACKUP_FILE}"
|
@ -1 +0,0 @@
|
||||
{{ security.tls.ca_cert }}
|
@ -1 +0,0 @@
|
||||
{{ keystone.credential_key }}
|
@ -1,70 +0,0 @@
|
||||
configs:
|
||||
keystone:
|
||||
debug: false
|
||||
tls:
|
||||
enabled: true
|
||||
public_port:
|
||||
cont: 5000
|
||||
ingress: identity
|
||||
admin_port:
|
||||
cont: 35357
|
||||
|
||||
wsgi:
|
||||
processes: 6
|
||||
threads: 1
|
||||
|
||||
fernet_secret_name: keystone-fernet-keys
|
||||
|
||||
ldap:
|
||||
enabled: false
|
||||
url: ldap://changeme
|
||||
user: "dc=Manager,dc=example,dc=com"
|
||||
suffix: "dc=example,dc=com"
|
||||
|
||||
tls:
|
||||
enabled: false
|
||||
tls_req_cert: demand
|
||||
|
||||
user_tree_dn: "ou=Users,dc=example,dc=com"
|
||||
user_objectclass: inetOrgPerson
|
||||
|
||||
group_tree_dn: "ou=Groups,dc=example,dc=com"
|
||||
group_objectclass: groupOfNames
|
||||
|
||||
notifications:
|
||||
enable: false
|
||||
# format can be basic or cadf:
|
||||
format: cadf
|
||||
|
||||
encrypt_tokens_in_memcached:
|
||||
enabled: true
|
||||
|
||||
secret_configs:
|
||||
keystone:
|
||||
db:
|
||||
password: password
|
||||
name: keystone
|
||||
username: keystone
|
||||
|
||||
credential_key: "2jjLrgOLvI-wj7g-8058SSCw0-ZnL4Ghg5cLuBirxL8="
|
||||
encrypt_tokens_in_memcached:
|
||||
secret_key: password
|
||||
ldap:
|
||||
password: changeme
|
||||
tls:
|
||||
cacert: null
|
||||
|
||||
openstack:
|
||||
user_password: password
|
||||
user_name: admin
|
||||
project_name: admin
|
||||
role_name: admin
|
||||
|
||||
service_account:
|
||||
domain: Default
|
||||
project: service
|
||||
|
||||
sources:
|
||||
openstack/keystone:
|
||||
git_url: https://git.openstack.org/openstack/keystone.git
|
||||
git_ref: stable/newton
|
@ -1,124 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import pykube
|
||||
|
||||
GLOBALS_PATH = '/etc/ccp/globals/globals.json'
|
||||
FERNET_DIR = '/etc/keystone/fernet-keys/'
|
||||
|
||||
LOG_DATEFMT = "%Y-%m-%d %H:%M:%S"
|
||||
LOG_FORMAT = "%(asctime)s.%(msecs)03d - %(levelname)s - %(message)s"
|
||||
logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATEFMT)
|
||||
LOG = logging.getLogger(__name__)
|
||||
LOG.setLevel(logging.INFO)
|
||||
|
||||
def get_config():
|
||||
LOG.info("Getting global variables from %s", GLOBALS_PATH)
|
||||
with open(GLOBALS_PATH) as f:
|
||||
global_conf = json.load(f)
|
||||
return global_conf
|
||||
|
||||
def get_pykube_client():
|
||||
os.environ['KUBERNETES_SERVICE_HOST'] = 'kubernetes.default'
|
||||
config = pykube.KubeConfig.from_service_account()
|
||||
return pykube.HTTPClient(config)
|
||||
|
||||
def get_secret_definition(name):
|
||||
client = get_pykube_client()
|
||||
obj_dict = {
|
||||
'metadata': {
|
||||
'name': name,
|
||||
'namespace': NAMESPACE
|
||||
}
|
||||
}
|
||||
secret = pykube.Secret(client, obj_dict)
|
||||
return secret
|
||||
|
||||
def read_from_files():
|
||||
keys = filter(
|
||||
lambda name: os.path.isfile(FERNET_DIR + name) and re.match("^\d+$", name),
|
||||
os.listdir(FERNET_DIR)
|
||||
)
|
||||
data = {}
|
||||
for key in keys:
|
||||
with open(FERNET_DIR + key, 'r') as f:
|
||||
data[key] = f.read()
|
||||
if len(keys):
|
||||
LOG.debug("Keys read from files: %s", keys)
|
||||
else:
|
||||
LOG.warn("No keys were read from files.")
|
||||
return data
|
||||
|
||||
def get_keys_data():
|
||||
keys = PROVIDED_KEYS or read_from_files()
|
||||
return dict([(key, base64.b64encode(value.encode()).decode())
|
||||
for (key, value) in six.iteritems(keys)])
|
||||
|
||||
def write_to_files(data):
|
||||
for (key, value) in six.iteritems(data):
|
||||
with open(FERNET_DIR + key, 'w') as f:
|
||||
decoded_value = base64.b64decode(value).decode()
|
||||
f.write(decoded_value)
|
||||
LOG.debug("Key %s: %s", key, decoded_value)
|
||||
LOG.info("%s keys were written", len(data))
|
||||
|
||||
def set_globals():
|
||||
LOG.info("Setting up global variables")
|
||||
global NAMESPACE, SECRET_NAME, PROVIDED_KEYS
|
||||
config = get_config()
|
||||
|
||||
NAMESPACE = config['namespace']
|
||||
LOG.debug("Namespace: %s", NAMESPACE)
|
||||
|
||||
SECRET_NAME = config['keystone']['fernet_secret_name']
|
||||
LOG.debug("Secret name: %s", SECRET_NAME)
|
||||
|
||||
PROVIDED_KEYS = None
|
||||
if 'fernet_keys' in config['keystone']:
|
||||
PROVIDED_KEYS = config['keystone']['fernet_keys']
|
||||
LOG.debug("Fernet keys: %s", PROVIDED_KEYS)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('command', choices=['fernet_setup', 'fernet_rotate'])
|
||||
args = parser.parse_args()
|
||||
|
||||
secret = get_secret_definition(SECRET_NAME)
|
||||
if not secret.exists():
|
||||
LOG.error("Secret '%s' does not exist.", SECRET_NAME)
|
||||
sys.exit(1)
|
||||
|
||||
secret.reload()
|
||||
if not PROVIDED_KEYS:
|
||||
LOG.info("No fernet keys were provided in the config.")
|
||||
if args.command == 'fernet_rotate':
|
||||
LOG.info("Copying existing fernet keys from secret '%s' to %s.", SECRET_NAME, FERNET_DIR)
|
||||
write_to_files(secret.obj['data'])
|
||||
|
||||
LOG.info("Executing 'keystone-manage %s --keystone-user=keystone --keystone-group=keystone' command.",
|
||||
args.command)
|
||||
subprocess.call(['keystone-manage', args.command, '--keystone-user=keystone', '--keystone-group=keystone'])
|
||||
|
||||
LOG.info("Updating data for '%s' secret.", SECRET_NAME)
|
||||
updated_keys = get_keys_data()
|
||||
secret.obj['data'] = None
|
||||
secret.update()
|
||||
secret.obj['data'] = updated_keys
|
||||
secret.update()
|
||||
LOG.info("%s fernet keys have been placed to secret '%s'", len(updated_keys), SECRET_NAME)
|
||||
LOG.debug("Placed keys: %s", updated_keys)
|
||||
LOG.info("Fernet keys %s has been completed", "rotation" if args.command == 'fernet_rotate' else "generation")
|
||||
|
||||
if __name__ == "__main__":
|
||||
set_globals()
|
||||
main()
|
@ -1,39 +0,0 @@
|
||||
[DEFAULT]
|
||||
debug = {{ keystone.debug }}
|
||||
use_syslog = False
|
||||
use_stderr = True
|
||||
max_token_size = 255
|
||||
{% if keystone.notifications.enable %}
|
||||
notification_format = {{ keystone.notifications.format }}
|
||||
{% endif %}
|
||||
|
||||
[database]
|
||||
connection = mysql+pymysql://{{ keystone.db.username }}:{{ keystone.db.password }}@{{ address("database") }}/{{ keystone.db.name }}{% if db.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %}
|
||||
max_retries = -1
|
||||
max_overflow = 60
|
||||
|
||||
[cache]
|
||||
enabled = True
|
||||
backend = oslo_cache.memcache_pool
|
||||
memcache_servers = {{ address('memcached', memcached.port) }}
|
||||
memcache_dead_retry = 60
|
||||
memcache_socket_timeout = 1
|
||||
memcache_pool_maxsize = 30
|
||||
|
||||
[token]
|
||||
provider = fernet
|
||||
|
||||
[assignment]
|
||||
driver = sql
|
||||
|
||||
[identity]
|
||||
domain_specific_drivers_enabled = true
|
||||
|
||||
{% if keystone.notifications.enable %}
|
||||
[oslo_messaging_notifications]
|
||||
driver = messagingv2
|
||||
{% endif %}
|
||||
|
||||
{# rpc config required for notifications in stable/mitaka #}
|
||||
{{ oslo_messaging[messaging.backend.rpc]('rpc_config') }}
|
||||
{{ oslo_messaging[messaging.backend.notifications]('notifications_config') }}
|
@ -1 +0,0 @@
|
||||
{{ keystone.ldap.tls.cacert }}
|
@ -1,18 +0,0 @@
|
||||
[identity]
|
||||
driver = ldap
|
||||
|
||||
[ldap]
|
||||
url = {{ keystone.ldap.url }}
|
||||
user = {{ keystone.ldap.user }}
|
||||
password = {{ keystone.ldap.password }}
|
||||
suffix = {{ keystone.ldap.suffix }}
|
||||
|
||||
use_tls = {{ keystone.ldap.tls.enabled }}
|
||||
tls_req_cert = {{ keystone.ldap.tls.tls_req_cert }}
|
||||
tls_cacertfile = /etc/keystone/ldap_tls_cacert.pem
|
||||
|
||||
user_tree_dn = {{ keystone.ldap.user_tree_dn }}
|
||||
user_objectclass = {{ keystone.ldap.user_objectclass }}
|
||||
|
||||
group_tree_dn = {{ keystone.ldap.group_tree_dn }}
|
||||
group_objectclass = {{ keystone.ldap.group_objectclass }}
|
@ -1 +0,0 @@
|
||||
{{ security.tls.server_cert }}
|
@ -1 +0,0 @@
|
||||
{{ security.tls.server_key }}
|
@ -1,18 +0,0 @@
|
||||
server {
|
||||
listen {{ network_topology["private"]["address"] }}:{{ keystone.admin_port.cont }} ssl;
|
||||
include common/ssl.conf;
|
||||
|
||||
location / {
|
||||
proxy_pass http://keystone_admin;
|
||||
include common/proxy-headers.conf;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen {{ network_topology["private"]["address"] }}:{{ keystone.public_port.cont }} ssl;
|
||||
include common/ssl.conf;
|
||||
|
||||
location / {
|
||||
proxy_pass http://keystone_public;
|
||||
include common/proxy-headers.conf;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
upstream keystone_admin {
|
||||
server 127.0.0.1:{{ keystone.admin_port.cont }};
|
||||
}
|
||||
upstream keystone_public {
|
||||
server 127.0.0.1:{{ keystone.public_port.cont }};
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
{% set venv_path = '/var/lib/microservices/venv/lib/python2.7/site-packages' %}
|
||||
|
||||
{% if keystone.tls.enabled %}
|
||||
Listen 127.0.0.1:{{ keystone.public_port.cont }}
|
||||
Listen 127.0.0.1:{{ keystone.admin_port.cont }}
|
||||
{% else %}
|
||||
Listen {{ keystone.public_port.cont }}
|
||||
Listen {{ keystone.admin_port.cont }}
|
||||
{% endif %}
|
||||
|
||||
{% if keystone.tls.enabled %}
|
||||
<VirtualHost 127.0.0.1:{{ keystone.public_port.cont }}>
|
||||
{% else %}
|
||||
<VirtualHost *:{{ keystone.public_port.cont }}>
|
||||
{% endif %}
|
||||
WSGIDaemonProcess keystone-public processes={{ keystone.wsgi.processes }} threads={{ keystone.wsgi.threads }} user=keystone group=keystone display-name=%{GROUP} python-path={{ venv_path }}
|
||||
WSGIProcessGroup keystone-public
|
||||
WSGIScriptAlias / /var/www/cgi-bin/keystone/public
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
ErrorLogFormat "%M"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" access
|
||||
# w00t? Well, we want keystone to log to stdout, for heka stuff, so docker logs could see it, for example.
|
||||
# In docker env only the pid 1 stdout\err logs are passing to docker, so we need this hack,
|
||||
# since the pid 1 in this case is a dumb init. FIXME in future.
|
||||
ErrorLog /proc/1/fd/2
|
||||
CustomLog "/var/log/ccp/keystone/keystone-access.log" access
|
||||
</VirtualHost>
|
||||
|
||||
{% if keystone.tls.enabled %}
|
||||
<VirtualHost 127.0.0.1:{{ keystone.admin_port.cont }}>
|
||||
{% else %}
|
||||
<VirtualHost *:{{ keystone.admin_port.cont }}>
|
||||
{% endif %}
|
||||
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ venv_path }}
|
||||
WSGIProcessGroup keystone-admin
|
||||
WSGIScriptAlias / /var/www/cgi-bin/keystone/admin
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
ErrorLogFormat "%M"
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" access
|
||||
# Check the comment above.
|
||||
ErrorLog /proc/1/fd/2
|
||||
CustomLog "/var/log/ccp/keystone/keystone-access.log" access
|
||||
</VirtualHost>
|
@ -1,178 +0,0 @@
|
||||
dsl_version: 0.9.0
|
||||
service:
|
||||
name: keystone
|
||||
ports:
|
||||
- {{ keystone.public_port }}
|
||||
- {{ keystone.admin_port }}
|
||||
annotations:
|
||||
service:
|
||||
prometheus.io/probe: "true"
|
||||
prometheus.io/probe_path: "/v3"
|
||||
containers:
|
||||
- name: keystone
|
||||
image: keystone
|
||||
probes:
|
||||
readiness:
|
||||
type: "httpGet"
|
||||
port: {{ keystone.admin_port.cont }}
|
||||
path: "/"
|
||||
# {% if keystone.tls.enabled %}
|
||||
scheme: "https"
|
||||
# {% endif %}
|
||||
volumes:
|
||||
- name: keystone-logs
|
||||
path: "/var/log/ccp/keystone"
|
||||
type: host
|
||||
readOnly: False
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["apachectl", "-k", "graceful"]
|
||||
pre:
|
||||
- name: chown-logs-dir
|
||||
command: "sudo /bin/chown keystone:keystone /var/log/ccp/keystone"
|
||||
- name: chown-fernet-dir
|
||||
command: "sudo /bin/chown keystone:keystone /etc/keystone/fernet-keys"
|
||||
- name: fernet-dir-permissions
|
||||
command: "/bin/chmod 0700 /etc/keystone/fernet-keys"
|
||||
- name: keystone-generate-fernet-keys
|
||||
command: "/usr/bin/python /opt/ccp/bin/fernet-manage.py fernet_setup"
|
||||
type: single
|
||||
files:
|
||||
- fernet-manage
|
||||
- name: keystone-db-create
|
||||
dependencies:
|
||||
- database
|
||||
type: single
|
||||
command:
|
||||
mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e "create database {{ keystone.db.name }};
|
||||
create user '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
|
||||
{% if db.tls.enabled %} require ssl {% endif %};
|
||||
grant all privileges on {{ keystone.db.name }}.* to '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
|
||||
{% if db.tls.enabled %} require ssl {% endif %};
|
||||
grant super on *.* to '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
|
||||
{% if db.tls.enabled %} require ssl {% endif %};"
|
||||
- name: keystone-db-sync
|
||||
files:
|
||||
- keystone-conf
|
||||
dependencies:
|
||||
- keystone-db-create
|
||||
type: single
|
||||
command: keystone-manage db_sync
|
||||
- name: keystone-db-bootstrap
|
||||
files:
|
||||
- keystone-conf
|
||||
dependencies:
|
||||
- keystone-db-sync
|
||||
- keystone-generate-fernet-keys
|
||||
type: single
|
||||
command: keystone-manage bootstrap
|
||||
--bootstrap-password {{ openstack.user_password }}
|
||||
--bootstrap-username {{ openstack.user_name }}
|
||||
--bootstrap-project-name {{ openstack.project_name }}
|
||||
--bootstrap-role-name {{ openstack.role_name }}
|
||||
--bootstrap-service-name keystone --bootstrap-region-id RegionOne
|
||||
--bootstrap-admin-url {{ address('keystone', keystone.admin_port, with_scheme=True) }}
|
||||
--bootstrap-public-url {{ address('keystone', keystone.public_port, external=True, with_scheme=True) }}
|
||||
--bootstrap-internal-url {{ address('keystone', keystone.public_port, with_scheme=True) }}
|
||||
daemon:
|
||||
dependencies:
|
||||
- memcached
|
||||
# {% if keystone.notifications.enable -%}
|
||||
- notifications
|
||||
# {%- endif %}
|
||||
files:
|
||||
- keystone-conf
|
||||
# {% if keystone.ldap.enabled %}
|
||||
- keystone-ldap-conf
|
||||
# {% if keystone.ldap.tls.enabled %}
|
||||
- keystone-ldap-cacert
|
||||
# {% endif %}
|
||||
# {% endif %}
|
||||
- wsgi-keystone-conf
|
||||
- credential-key
|
||||
# {% if keystone.tls.enabled %}
|
||||
- ca_cert
|
||||
# {% endif %}
|
||||
secrets:
|
||||
- keystone-fernet
|
||||
command: daemon.sh
|
||||
post:
|
||||
- name: keystone-create-domain
|
||||
type: single
|
||||
command: openstack domain create --or-show {{ service_account.domain }}
|
||||
- name: keystone-create-project
|
||||
type: single
|
||||
dependencies:
|
||||
- keystone-create-domain
|
||||
command: openstack project create --domain {{ service_account.domain }} {{ service_account.project }}
|
||||
- name: keystone-create-admin-role
|
||||
type: single
|
||||
command: openstack role add {{ openstack.role_name }} --user {{ openstack.user_name }} --domain default
|
||||
# {% if keystone.ldap.enabled %}
|
||||
- name: keystone-create-ldap-domain
|
||||
type: single
|
||||
command: openstack domain create ldap
|
||||
# {% endif %}
|
||||
|
||||
# {% if keystone.tls.enabled %}
|
||||
- name: nginx-keystone
|
||||
image: nginx
|
||||
daemon:
|
||||
files:
|
||||
- upstreams
|
||||
- servers
|
||||
- server-cert
|
||||
- server-key
|
||||
command: nginx
|
||||
# {% endif %}
|
||||
|
||||
files:
|
||||
keystone-conf:
|
||||
path: /etc/keystone/keystone.conf
|
||||
content: keystone.conf.j2
|
||||
keystone-ldap-conf:
|
||||
path: /etc/keystone/domains/keystone.ldap.conf
|
||||
content: keystone.ldap.conf.j2
|
||||
keystone-ldap-cacert:
|
||||
path: /etc/keystone/ldap_tls_cacert.pem
|
||||
content: keystone.ldap.cacert.j2
|
||||
wsgi-keystone-conf:
|
||||
path: /etc/apache2/conf-enabled/wsgi-keystone.conf
|
||||
content: wsgi-keystone.conf.j2
|
||||
credential-key:
|
||||
path: /etc/keystone/credential-keys/1
|
||||
content: credential-key.j2
|
||||
perm: "0600"
|
||||
user: keystone
|
||||
fernet-manage:
|
||||
path: /opt/ccp/bin/fernet-manage.py
|
||||
content: fernet-manage.py
|
||||
perm: "0400"
|
||||
user: keystone
|
||||
# {% if keystone.tls.enabled %}
|
||||
servers:
|
||||
path: /etc/nginx/conf.d/servers.conf
|
||||
content: servers.conf.j2
|
||||
perm: "0400"
|
||||
upstreams:
|
||||
path: /etc/nginx/conf.d/upstreams.conf
|
||||
content: upstreams.conf.j2
|
||||
perm: "0400"
|
||||
ca_cert:
|
||||
path: /opt/ccp/etc/tls/ca.pem
|
||||
content: ca-cert.pem.j2
|
||||
server-cert:
|
||||
path: /opt/ccp/etc/tls/server-cert.pem
|
||||
content: server-cert.pem.j2
|
||||
perm: "0400"
|
||||
server-key:
|
||||
path: /opt/ccp/etc/tls/server-key.pem
|
||||
content: server-key.pem.j2
|
||||
perm: "0400"
|
||||
# {% endif %}
|
||||
secrets:
|
||||
keystone-fernet:
|
||||
path: "/etc/keystone/fernet-keys"
|
||||
secret:
|
||||
secretName: {{ keystone.fernet_secret_name }}
|
@ -1,36 +0,0 @@
|
||||
upgrade:
|
||||
name: upgrade-keystone
|
||||
image: keystone
|
||||
steps:
|
||||
- name: backup
|
||||
command: /opt/ccp/bin/backup.sh
|
||||
files:
|
||||
- backup-sh
|
||||
volumes:
|
||||
- name: backup-dir
|
||||
path: /var/ccp/backup/keystone
|
||||
type: host
|
||||
readOnly: false
|
||||
topology_key: backup
|
||||
- name: expand
|
||||
files:
|
||||
- keystone-conf
|
||||
command: keystone-manage db_sync --expand
|
||||
- name: migrate
|
||||
files:
|
||||
- keystone-conf
|
||||
command: keystone-manage db_sync --migrate
|
||||
- name: roll
|
||||
type: rolling-upgrade
|
||||
- name: contract
|
||||
files:
|
||||
- keystone-conf
|
||||
command: keystone-manage db_sync --contract
|
||||
files:
|
||||
keystone-conf:
|
||||
path: /etc/keystone/keystone.conf
|
||||
content: keystone.conf.j2
|
||||
backup-sh:
|
||||
path: /opt/ccp/bin/backup.sh
|
||||
content: backup.sh.j2
|
||||
perm: "500"
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
workdir=$(dirname $0)
|
||||
yamllint -c $workdir/yamllint.yaml $(find . -not -path '*/\.*' -type f -name '*.yaml')
|
@ -1,21 +0,0 @@
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
comments:
|
||||
level: error
|
||||
comments-indentation:
|
||||
level: warning
|
||||
document-end:
|
||||
present: no
|
||||
document-start:
|
||||
level: error
|
||||
present: no
|
||||
empty-lines:
|
||||
max: 1
|
||||
max-start: 0
|
||||
max-end: 0
|
||||
line-length:
|
||||
level: warning
|
||||
max: 120
|
17
tox.ini
17
tox.ini
@ -1,17 +0,0 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = linters,bashate
|
||||
skipsdist = True
|
||||
|
||||
[testenv:linters]
|
||||
deps = yamllint
|
||||
commands =
|
||||
{toxinidir}/tools/yamllint.sh
|
||||
|
||||
[testenv:bashate]
|
||||
deps = bashate>=0.2
|
||||
whitelist_externals = bash
|
||||
commands = bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v"
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
Loading…
x
Reference in New Issue
Block a user