Createdb job

This commit is contained in:
Flavio Percoco 2017-09-12 14:21:32 -06:00
parent 2427323819
commit 67e5f22d19
3 changed files with 15 additions and 19 deletions

View File

@ -9,6 +9,10 @@ hiera_data_file: ''
clouds_config: 'clouds-secret'
mariadb_config:
host: mariadb
root_password: weakpassword
keystone_config:
DEFAULT:
public_bind_host: "0.0.0.0"

View File

@ -8,6 +8,10 @@
# NOTE(flaper87): Needed for bootstrap
# operations
keystone::admin_password: admin_password
keystone::db::mysql::dbname: db.db_name
keystone::db::mysql::host: db.host
keystone::db::mysql::password: db.password
keystone::db::mysql::user: db.user
keystone::admin_token: DEFAULT.admin_token
keystone::admin_workers: eventlet_server.admin_workers

View File

@ -91,6 +91,13 @@
httpd-keystone-admin.conf: |
{{httpd_keystone_admin_conf['content'] | b64decode}}
- name: Create keystone database
include_role:
name: ansible-role-k8s-tripleo
tasks_from: create-database
vars:
service_name: 'keystone'
database_name: 'keystone'
- name: Create keystone job
k8s_v1_job:
@ -100,25 +107,6 @@
name: keystone-db-sync
namespace: "{{namespace}}"
state: present
spec_template_metadata_annotations:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "keystone-db-create",
"image": "tripleoupstream/centos-binary-mariadb",
"imagePullPolicy": "IfNotPresent",
"restartPolicy": "OnFailure",
"command": [
"mysql",
"-h",
"mariadb",
"-u",
"root",
"--password=weakpassword",
"-e",
"create database if not exists keystone;"
]
}
]'
restart_policy: OnFailure
containers:
- image: tripleoupstream/centos-binary-keystone