diff options
| author | root <root@host118.rhc.lab.eng.bos.redhat.com> | 2014-09-17 22:03:46 -0400 |
|---|---|---|
| committer | root <root@host118.rhc.lab.eng.bos.redhat.com> | 2014-09-17 22:03:46 -0400 |
| commit | 2a27886421570fd78fcc3f847cb640464b8377ef (patch) | |
| tree | 64f0ad4bbfa3349baf27f6770192f21dd5f6e15b /docker/keystone/start | |
| parent | cabedebe1a5ee81210fb6c4ac291b87d32691195 (diff) | |
| download | kolla-2a27886421570fd78fcc3f847cb640464b8377ef.tar.gz kolla-2a27886421570fd78fcc3f847cb640464b8377ef.zip | |
adding things
Diffstat (limited to 'docker/keystone/start')
| -rwxr-xr-x | docker/keystone/start | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docker/keystone/start b/docker/keystone/start new file mode 100755 index 000000000..bff03803c --- /dev/null +++ b/docker/keystone/start @@ -0,0 +1,32 @@ +#!/bin/bash -e + +env > /root/ENV + +socat UNIX-LISTEN:/var/lib/mysql/mysql.sock,fork,reuseaddr,unlink-early,user=mysql,group=mysql,mode=777 TCP:127.0.0.1:3306 & + +/usr/bin/openstack-db --service keystone --init --yes --rootpw ${DB_ROOT_PASSWORD} --password redhat + + +sed -ri 's/#driver=keystone.identity.backends.sql.Identity/driver=keystone.identity.backends.sql.Identity/' /etc/keystone/keystone.conf +sed -ri 's/#idle_timeout=3600/idle_timeout=200/' /etc/keystone/keystone.conf + +/usr/bin/keystone-manage db_sync + +/usr/bin/keystone-all & +PID=$! + +/bin/sleep 5 + +export SERVICE_TOKEN=`cat /root/ks_admin_token` +export SERVICE_ENDPOINT="http://127.0.0.1:35357/v2.0" + +/bin/keystone user-create --name admin --pass redhat +/bin/keystone role-create --name admin +/bin/keystone tenant-create --name admin +/bin/keystone user-role-add --user admin --role admin --tenant admin + +kill -TERM $PID + + +echo "Exec-ing keystone-all.." +exec /usr/bin/keystone-all |
