<commit_before>echo "Running: $0 $@"
source $(dirname $0)/config-parameters.sh
if [ $# -lt 5 ]
	then
		echo "Correct Syntax: $0 <keystone-db-password> <mysql-username> <mysql-password> <controller-host-name> <admin-tenant-password>"
		exit 1
fi
echo "Configuring MySQL for Keystone..."
mysql_command="CREATE DATABASE IF NOT EXISTS keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$1'; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$1';"
echo "MySQL DB Command is: "$mysql_command 
sleep 5
mysql -u "$2" -p"$3" -e "$mysql_command"

service keystone stop

echo "Configuring Keystone..."
sleep 2

crudini --set /etc/keystone/keystone.conf database connection mysql+pymysql://keystone:$1@$4/keystone
crudini --set /etc/keystone/keystone.conf token provider fernet
grep "mysql" /etc/keystone/keystone.conf
echo_and_sleep "Configured KeyStone Conf File" 2

echo_and_sleep "Populate Identity Service Database" 2
keystone-manage db_sync
echo_and_sleep "Setup Fernet" 2
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

keystone-manage bootstrap --bootstrap-password $5 \
  --bootstrap-admin-url http://$4:35357/v3/ \
  --bootstrap-internal-url http://$4:35357/v3/ \
  --bootstrap-public-url http://$4:5000/v3/ \
  --bootstrap-region-id RegionOne
<commit_msg>Updated Keystone config steps for Newton<commit_after>echo "Running: $0 $@"
source $(dirname $0)/config-parameters.sh
if [ $# -lt 5 ]
	then
		echo "Correct Syntax: $0 <keystone-db-password> <mysql-username> <mysql-password> <controller-host-name> <admin-tenant-password>"
		exit 1
fi
echo "Configuring MySQL for Keystone..."
mysql_command="CREATE DATABASE IF NOT EXISTS keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$1'; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$1';"
echo "MySQL DB Command is: "$mysql_command 
sleep 3
mysql -u "$2" -p"$3" -e "$mysql_command"

echo_and_sleep "Configuring Keystone..." 2

crudini --set /etc/keystone/keystone.conf database connection mysql+pymysql://keystone:$1@$4/keystone
crudini --set /etc/keystone/keystone.conf token provider fernet
grep "mysql" /etc/keystone/keystone.conf
echo_and_sleep "Configured KeyStone Conf File" 2

echo_and_sleep "Executing Keystone DB Sync" 2
keystone-manage db_sync
echo_and_sleep "Setup Fernet" 2
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

keystone-manage bootstrap --bootstrap-password $5 \
  --bootstrap-admin-url http://$4:35357/v3/ \
  --bootstrap-internal-url http://$4:35357/v3/ \
  --bootstrap-public-url http://$4:5000/v3/ \
  --bootstrap-region-id RegionOne
echo_and_sleep "Executed Keystone Bootstrap" 2

{'fraction_non_alphanumeric': 0.1319516407599309, 'fraction_numerical': 0.025906735751295335, 'mean_word_length': 4.67843137254902, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4706956', 'n_tokens_mistral': 1109, 'n_tokens_neox': 980, 'n_words': 270}