<commit_before>#!/bin/bash -x

# Commenting out for now.  DB will just get remade each time in the container.
#rm -rf /var/lib/mysql
#mkdir -p /var/lib/mysql

setenforce 0
modprobe ebtables

MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') |
    awk '$4 == "src" {print $5}')

MY_DEV=$(ip route get $(ip route | awk '$1 == "default" {print $3}') |
    awk '$4 == "src" {print $3}')

echo MY_IP=$MY_IP
echo MY_DEV=$MY_DEV

# Cleanup from previous runs.  Just for iteration purposes for now.
containers=`docker ps -q`
if [ ! -z "$containers" ]; then
    docker ps -q | xargs docker stop
fi

containers=`docker ps -qa`
if [ ! -z "$containers" ]; then
    docker ps -qa | xargs docker rm
fi


firewall-cmd --add-service=mysql

# Database
HOST_IP=$MY_IP
MYSQL_ROOT_PASSWORD=<PASSWORD>
PASSWORD=<PASSWORD>

# Host
ADMIN_TENANT_NAME=admin
PUBLIC_IP=$HOST_IP

# RabbitMQ
RABBITMQ_SERVICE_HOST=$HOST_IP

# Keystone
KEYSTONE_ADMIN_TOKEN=$PASSWORD
KEYSTONE_DB_PASSWORD=<PASSWORD>
KEYSTONE_ADMIN_PASSWORD=$PASSWORD
KEYSTONE_PUBLIC_SERVICE_HOST=$HOST_IP
KEYSTONE_ADMIN_SERVICE_HOST=$HOST_IP
KEYSTONE_AUTH_PROTOCOL=http

# Glance
GLANCE_DB_NAME=glance
GLANCE_DB_USER=glance
GLANCE_DB_PASSWORD=<PASSWORD>
GLANCE_KEYSTONE_USER=glance
GLANCE_KEYSTONE_PASSWORD=glance
GLANCE_API_SERVICE_HOST=$HOST_IP

# Nova
NOVA_DB_PASSWORD=nova
NOVA_DB_NAME=nova
NOVA_DB_USER=nova
NOVA_KEYSTONE_USER=nova
NOVA_KEYSTONE_PASSWORD=<PASSWORD>
NOVA_API_SERVICE_HOST=$HOST_IP
NOVA_EC2_SERVICE_HOST=$HOST_IP
NOVA_PUBLIC_INTERFACE=$MY_DEV
NOVA_FLAT_INTERFACE=$MY_DEV
CONFIG_NETWORK=True

# We need these for the external setup commands.
yum -y install openstack-keystone openstack-glance openstack-nova

cat > openrc <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
export OS_USERNAME=$ADMIN_TENANT_NAME
export OS_PASSWORD=$PASSWORD
export OS_TENANT_NAME=$ADMIN_TENANT_NAME
EOF<commit_msg>install mariadb<commit_after>#!/bin/bash -x

# Commenting out for now.  DB will just get remade each time in the container.
#rm -rf /var/lib/mysql
#mkdir -p /var/lib/mysql

setenforce 0
modprobe ebtables

MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') |
    awk '$4 == "src" {print $5}')

MY_DEV=$(ip route get $(ip route | awk '$1 == "default" {print $3}') |
    awk '$4 == "src" {print $3}')

echo MY_IP=$MY_IP
echo MY_DEV=$MY_DEV

# Cleanup from previous runs.  Just for iteration purposes for now.
containers=`docker ps -q`
if [ ! -z "$containers" ]; then
    docker ps -q | xargs docker stop
fi

containers=`docker ps -qa`
if [ ! -z "$containers" ]; then
    docker ps -qa | xargs docker rm
fi


firewall-cmd --add-service=mysql

# Database
HOST_IP=$MY_IP
MYSQL_ROOT_PASSWORD=<PASSWORD>
PASSWORD=<PASSWORD>

# Host
ADMIN_TENANT_NAME=admin
PUBLIC_IP=$HOST_IP

# RabbitMQ
RABBITMQ_SERVICE_HOST=$HOST_IP

# Keystone
KEYSTONE_ADMIN_TOKEN=$PASSWORD
KEYSTONE_DB_PASSWORD=<PASSWORD>
KEYSTONE_ADMIN_PASSWORD=$PASSWORD
KEYSTONE_PUBLIC_SERVICE_HOST=$HOST_IP
KEYSTONE_ADMIN_SERVICE_HOST=$HOST_IP
KEYSTONE_AUTH_PROTOCOL=http

# Glance
GLANCE_DB_NAME=glance
GLANCE_DB_USER=glance
GLANCE_DB_PASSWORD=<PASSWORD>
GLANCE_KEYSTONE_USER=glance
GLANCE_KEYSTONE_PASSWORD=<PASSWORD>
GLANCE_API_SERVICE_HOST=$HOST_IP

# Nova
NOVA_DB_PASSWORD=<PASSWORD>
NOVA_DB_NAME=nova
NOVA_DB_USER=nova
NOVA_KEYSTONE_USER=nova
NOVA_KEYSTONE_PASSWORD=<PASSWORD>
NOVA_API_SERVICE_HOST=$HOST_IP
NOVA_EC2_SERVICE_HOST=$HOST_IP
NOVA_PUBLIC_INTERFACE=$MY_DEV
NOVA_FLAT_INTERFACE=$MY_DEV
CONFIG_NETWORK=True

# We need these for the external setup commands.
yum -y install openstack-keystone openstack-glance openstack-nova mariadb

cat > openrc <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
export OS_USERNAME=$ADMIN_TENANT_NAME
export OS_PASSWORD=$PASSWORD
export OS_TENANT_NAME=$ADMIN_TENANT_NAME
EOF
{'fraction_non_alphanumeric': 0.10708661417322834, 'fraction_numerical': 0.008398950131233596, 'mean_word_length': 6.457925636007828, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, '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': '441449', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1520, 'n_words': 321}