fuel-ccp-keystone/service/keystone.yaml

95 lines
3.4 KiB
YAML

dsl_version: 0.4.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: "/"
volumes:
- name: keystone-logs
path: "/var/log/ccp/keystone"
type: host
readOnly: False
pre:
- name: chown-logs-dir
command: "sudo /bin/chown keystone:keystone /var/log/ccp/keystone"
- name: keystone-db-create
dependencies:
- {{ service.database }}
type: single
command:
mysql -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e "create database {{ keystone.db.name }};
create user '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
{% if percona.tls.enabled %} require ssl {% endif %};
grant all privileges on {{ keystone.db.name }}.* to '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
{% if percona.tls.enabled %} require ssl {% endif %};
grant super on *.* to '{{ keystone.db.username }}'@'%' identified by '{{ keystone.db.password }}'
{% if percona.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
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 -%}
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
# {%- endif %}
files:
- keystone-conf
- wsgi-keystone-conf
- fernet-key
- credential-key
command: daemon.sh
post:
- name: keystone-create-project
type: single
command: openstack project create service
files:
keystone-conf:
path: /etc/keystone/keystone.conf
content: keystone.conf.j2
wsgi-keystone-conf:
path: /etc/apache2/conf-enabled/wsgi-keystone.conf
content: wsgi-keystone.conf.j2
fernet-key:
path: /etc/keystone/fernet-keys/1
content: fernet-key.j2
perm: "0600"
user: keystone
credential-key:
path: /etc/keystone/credential-keys/1
content: credential-key.j2
perm: "0600"
user: keystone