summaryrefslogtreecommitdiff
path: root/src/three-minute-demo/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/three-minute-demo/README.rst')
-rw-r--r--src/three-minute-demo/README.rst80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/three-minute-demo/README.rst b/src/three-minute-demo/README.rst
new file mode 100644
index 0000000..1247ea1
--- /dev/null
+++ b/src/three-minute-demo/README.rst
@@ -0,0 +1,80 @@
13 Minute Demo of OpenStack Public Clouds
2========================================
3
4This is all the Ansible needed for the 3 minute public cloud demo.
5
6It uses docker containers to avoid the need to install things on the local
7computer. The Dockerfile uses the base ``python`` docker image regardless
8of other distro since it's just a container for installing ansible.
9
10.. note::
11
12 There is nothing docker-specific about the demo, it's just being used as
13 a convenient way to bundle actions without polluting the user's computer.
14 The playbooks themselves can be used directly for people who have the
15 pre-reqs of ansible, shade and diskimage-builder installed or who do not
16 mind installing them globally.
17
18Building Docker Image
19---------------------
20
21Step one is building the docker image:
22
23.. code-block:: bash
24
25 docker build -t three-minute-demo .
26
27A convenience script, ``build-docker-image.sh`` is provided that runs that
28command.
29
30Wrapper Script
31--------------
32
33Once the ``three-minute-demo`` image exists, the ``ansible-playbook.sh`` script
34will user it to run ``ansible-playbook``. By default it will run the
35``run.yaml`` playbook, but that can be overridden by passing parameters to the
36script.
37
38The ``ansible-playbook.sh`` script will also bind-mount the current directory
39as the main work dir and ``~/.config/openstack`` into ``/etc/openstack`` in the
40container so that ``clouds.yaml`` is available.
41
42.. note::
43
44 If ~/.config/openstack doesn't exist but /etc/openstack does,
45 ansible-playbook.sh will mount /etc/openstack instead. If a different setup
46 is desired, you can always run docker commands.
47
48Building and Uploading Images
49-----------------------------
50
51The demo depends on base images existing. The ``prep.yaml`` playbook will
52create the images and upload them to all of the cloud regions.
53
54.. code-block:: bash
55
56 ./ansible-playbook.sh prep.yaml
57
58By default it will create a minimal ubuntu image. That can be changed by
59setting ``distro`` on the ansible-playbook command line to something else, such
60as ``fedora`` or ``centos``.
61
62.. code-block:: bash
63
64 ./ansible-playbook.sh -edistro=fedora prep.yaml
65
66The Demo
67--------
68
69``ansible-playbook.sh`` defaults to running ``demo.yaml``, which will create a
70server in each cloud region, install Apache on that server, write out a json
71file for apache to serve, fetch the contents into a variable and print out the
72FQDN.
73
74If you're thinking "wow, that's not useful" - you're right! This isn't intended
75to be a demo of doing useful things with Ansible. It's intended to be a demo of
76getting servers on a set of cloud regions across multiple public clouds and
77then doing something with them.
78
79Once you can perform a single task on the remote server with Ansible, you can
80do anything with Ansible you want to do.