Andy Bavier | 3704434 | 2015-02-06 16:39:06 -0500 | [diff] [blame] | 1 | The Dockerfile in this directory will build a Docker image for running |
Andy Bavier | c8d77f5 | 2015-02-06 16:52:21 -0500 | [diff] [blame] | 2 | XOS using the Django development server. It copies whatever files are |
| 3 | in the local repository into the image. Here's how to do it: |
Andy Bavier | 3704434 | 2015-02-06 16:39:06 -0500 | [diff] [blame] | 4 | |
Scott Baker | b8efcfa | 2015-02-09 10:17:33 -0800 | [diff] [blame] | 5 | 1. A minimal initial_data.json is provided. The login credentials |
| 6 | for this initial_data.json are username=padmin@vicci.org, |
| 7 | password=letmein. |
Andy Bavier | 3704434 | 2015-02-06 16:39:06 -0500 | [diff] [blame] | 8 | |
Scott Baker | b8efcfa | 2015-02-09 10:17:33 -0800 | [diff] [blame] | 9 | This initial_data.json doesn't contain any nodes and is suitable |
| 10 | for fresh installations. To obtain an initial_data.json (for demo |
| 11 | purposes) that contains an interesting set of Nodes and Slices, |
| 12 | a dump can be made on portal.opencloud.us: |
| 13 | |
| 14 | 1) log in to portal, and run: |
| 15 | $ sudo /opt/xos/scripts/opencloud dumpdata |
| 16 | |
| 17 | 2) replace the initial_data.json file with the dumpdata |
| 18 | file produced above. |
Andy Bavier | 3704434 | 2015-02-06 16:39:06 -0500 | [diff] [blame] | 19 | |
| 20 | 2. $ docker build -t xos . |
| 21 | |
| 22 | 3. $ docker run -t -i -p 8000:8000 xos |
| 23 | |
| 24 | 4. Now you will have a bash prompt as root inside the XOS container. |
| 25 | Start up XOS: |
| 26 | |
| 27 | # /opt/xos/scripts/opencloud runserver |
| 28 | |
| 29 | You can access the XOS login at http:<server>:8000, where <server> is |
Andy Bavier | d7d317c | 2015-02-06 16:49:59 -0500 | [diff] [blame] | 30 | the name of the server running Docker. |
| 31 | |
S.Çağlar Onur | 4afb903 | 2015-02-12 15:19:45 -0500 | [diff] [blame] | 32 | 5. From another terminal window, you can run following command to find |
| 33 | the running container id |
S.Çağlar Onur | dac881c | 2015-02-12 15:18:13 -0500 | [diff] [blame] | 34 | |
| 35 | $ docker ps |
| 36 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 37 | a3b668454d21 xos:latest "/bin/bash" 3 hours ago Up 3 hours 0.0.0.0:8000->8000/tcp romantic_bohr |
| 38 | |
S.Çağlar Onur | 4afb903 | 2015-02-12 15:19:45 -0500 | [diff] [blame] | 39 | and then you can have another bash prompt (in a different TTY) as root inside the XOS container. |
S.Çağlar Onur | dac881c | 2015-02-12 15:18:13 -0500 | [diff] [blame] | 40 | |
| 41 | $ docker exec -it a3b668454d21 bash |
| 42 | |
| 43 | and start observer |
| 44 | |
| 45 | # python /opt/xos/xos-observer.py |
| 46 | |
Andy Bavier | d7d317c | 2015-02-06 16:49:59 -0500 | [diff] [blame] | 47 | STILL TO DO |
| 48 | ----------- |
| 49 | * Test Observer |