Skip to content

Instantly share code, notes, and snippets.

@lbragstad
Last active February 9, 2018 17:31
Show Gist options
  • Save lbragstad/b68ec025e96a5f99732719f8ef1f498f to your computer and use it in GitHub Desktop.
Save lbragstad/b68ec025e96a5f99732719f8ef1f498f to your computer and use it in GitHub Desktop.
#!/bin/bash
export IP=`hostname -I | tr -d "\n\r" | tr -d " "`
# re-create the database
mysql -uroot -ppassword -e "DROP DATABASE IF EXISTS keystone"
mysql -uroot -ppassword -e "CREATE DATABASE keystone"
source ~/keystone-venv/bin/activate
# run database migrations
keystone-manage db_sync
# bootstrap fernet key repositories (only applicable for fresh installs)
keystone-manage fernet_setup
keystone-manage credential_setup
# bootstrap
keystone-manage bootstrap \
--bootstrap-username admin \
--bootstrap-password password \
--bootstrap-project-name admin \
--bootstrap-role-name admin \
--bootstrap-service-name keystone \
--bootstrap-region-id RegionOne \
--bootstrap-admin-url "http://$IP:35357/" \
--bootstrap-public-url "http://$IP:35357/"
#!/bin/bash
export IP=`hostname -I | tr -d "\n\r" | tr -d " "`
source ~/keystone-venv/bin/activate
uwsgi --http $IP:35357 --wsgi-file $(which keystone-wsgi-admin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment