Merge "Nova-libvirt needs to bind to /sys/fs/cgroup"
[apex-tripleo-heat-templates.git] / docker / README-containers.md
1 # Using Docker Containers With TripleO
2
3 ## Configuring TripleO with to use a container based compute node.
4
5 Steps include:
6 - Adding a base OS image to glance
7 - Deploy an overcloud configured to use the docker compute heat templates
8
9 ## Getting base OS image working.
10
11 Download the fedora atomic image into glance:
12
13 ```
14 wget https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Atomic-22-20150521.x86_64.qcow2
15 glance image-create --name atomic-image --file Fedora-Cloud-Atomic-22-20150521.x86_64.qcow2 --disk-format qcow2 --container-format bare
16 ```
17
18 ## Configuring TripleO
19
20 You can use the tripleo.sh script up until the point of running the Overcloud.
21 https://github.com/openstack/tripleo-common/blob/master/scripts/tripleo.sh
22
23 Create the Overcloud:
24 ```
25 $ openstack overcloud deploy --templates=tripleo-heat-templates -e tripleo-heat-templates/environments/docker-rdo.yaml --libvirt-type=qemu
26 ```
27
28 Source the overcloudrc and then you can use the overcloud.
29
30 ## Debugging
31
32 You can ssh into the controller/compute nodes by using the heat key, eg:
33 ```
34 nova list
35 ssh heat-admin@<compute_node_ip>
36 ```
37
38 You can check to see what docker containers are running:
39 ```
40 sudo docker ps -a
41 ```
42
43 To enter a container that doesn't seem to be working right:
44 ```
45 sudo docker exec -ti <container name> /bin/bash
46 ```
47
48 Then you can check logs etc.
49
50 You can also just do a 'docker logs' on a given container.