AAA: Keystone Authentication
[integration/test.git] / csit / suites / aaa / keystone / start_keystone.sh
1 #/bin/bash
2
3 set -x
4
5 docker pull clearlinux/keystone
6
7 # set a couple of useful env. vars
8 YOUR_HOST=`hostname -f`
9 MYSQL_DATA_DIR=/var/lib/mysql/
10 echo "$YOUR_HOST"
11 # generate certificates
12 echo "START Artifact Generation"
13 CERT_PATH=`pwd`
14 CERT_NAME=keystone_cert
15 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout keystone_key.pem \
16     -out $CERT_NAME.pem -subj "/CN=$YOUR_HOST"
17 echo "END Artifact Generation"
18
19
20 echo "START Starting Container"
21 # start the container
22 docker run -d -it --name keystone -p 5000:5000 -p 35357:35357 \
23        -h $YOUR_HOST \
24        -e IDENTITY_HOST="$YOUR_HOST" \
25        -e KEYSTONE_ADMIN_PASSWORD="secret" \
26        -v $MYSQL_DATA_DIR:/var/lib/mysql \
27        -v `pwd`/keystone_cert.pem:/etc/nginx/ssl/keystone_cert.pem \
28        -v `pwd`/keystone_key.pem:/etc/nginx/ssl/keystone_key.pem \
29        clearlinux/keystone
30
31
32 echo "END Starting Container"