blob: 34926b91697ee37bf02b7074c611b5e420506368 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Keystone container
## build keystone image
### without proxy:
```bash
docker build -t keystone:mitaka .
```
### with a proxy:
```bash
docker build --build-arg https_proxy=http://proxy:3128 --build-arg http_proxy=http://proxy:3128 -t keystone:mitaka .
```
## set up an execution environment
### clean up if necessary
```bash
docker container rm -f $(docker ps -a | grep moon | cut -d " " -f 1) 2>/dev/null
docker container rm -f messenger db keystone 2>/dev/null
```
### create a network
```bash
docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 moon
```
### Start RabbitMQ
```bash
docker container run -dti --net=moon --hostname messenger --name messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -e RABBITMQ_HIPE_COMPILE=1 -p 5671:5671 -p 5672:5672 -p 8080:15672 rabbitmq:3-management
```
### Start MySQL server
```bash
docker container run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
```
## launch a Keystone container
```bash
docker container run -dti --net moon --hostname keystone --name keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone:mitaka
```
## check
### log
```bash
docker logs keystone
```
### access to the container
```bash
docker container exec -ti keystone /bin/bash
export OS_USERNAME=admin
export OS_PASSWORD=p4ssw0rd
export OS_REGION_NAME=Orange
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://localhost:5000/v3
export OS_DOMAIN_NAME=Default
openstack project list
```
|