Zack Williams | 6f54b16 | 2016-04-19 15:53:54 -0700 | [diff] [blame] | 1 | FROM ubuntu:14.04.4 |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 2 | |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 3 | # XXX Workaround for docker bug: |
4 | # https://github.com/docker/docker/issues/6345 | ||||
5 | # Kernel 3.15 breaks docker, uss the line below as a workaround | ||||
6 | # until there is a fix | ||||
7 | RUN ln -s -f /bin/true /usr/bin/chfn | ||||
8 | # XXX End workaround | ||||
9 | |||||
10 | # Install. | ||||
Tony Mack | 2998d96 | 2015-10-31 18:34:35 +0000 | [diff] [blame] | 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 12 | curl \ |
13 | gcc \ | ||||
14 | geoip-database \ | ||||
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 15 | git \ |
16 | graphviz \ | ||||
17 | graphviz-dev \ | ||||
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 18 | libgeoip1 \ |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 19 | libxslt1.1 \ |
20 | libxslt1-dev \ | ||||
21 | libyaml-dev \ | ||||
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 22 | m4 \ |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 23 | pkg-config \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 24 | python-dev \ |
25 | python-httplib2 \ | ||||
26 | python-pip \ | ||||
27 | python-psycopg2 \ | ||||
28 | python-pycurl \ | ||||
29 | python-setuptools \ | ||||
30 | tar \ | ||||
31 | wget \ | ||||
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 32 | ##### observer dependencies |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 33 | python-keystoneclient \ |
34 | python-novaclient \ | ||||
35 | python-neutronclient \ | ||||
36 | python-glanceclient \ | ||||
37 | python-ceilometerclient | ||||
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 38 | |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 39 | RUN pip install \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 40 | django==1.7 \ |
41 | django-bitfield \ | ||||
42 | django-crispy-forms \ | ||||
43 | django-encrypted-fields \ | ||||
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 44 | django-extensions \ |
Andy Bavier | c3218b6 | 2016-01-08 10:42:00 -0500 | [diff] [blame] | 45 | django-filter==0.11.0 \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 46 | django-geoposition \ |
47 | django-ipware \ | ||||
48 | django_rest_swagger \ | ||||
David K. Bainbridge | cbf7c01 | 2015-12-09 09:55:59 -0800 | [diff] [blame] | 49 | django-suit==0.3a1 \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 50 | django-timezones \ |
Scott Baker | 9dca629 | 2016-03-28 10:07:46 -0700 | [diff] [blame] | 51 | djangorestframework==3.3.3 \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 52 | dnslib \ |
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 53 | lxml \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 54 | markdown \ |
55 | netaddr \ | ||||
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 56 | pyOpenSSL \ |
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 57 | psycopg2 \ |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 58 | python-ceilometerclient \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 59 | python-dateutil \ |
60 | python-keyczar \ | ||||
Andy Bavier | b923b60 | 2016-04-06 14:23:02 -0400 | [diff] [blame] | 61 | python-logstash \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 62 | pygraphviz \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 63 | pytz \ |
64 | pyyaml \ | ||||
65 | requests | ||||
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 66 | |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 67 | RUN easy_install --upgrade httplib2 |
68 | |||||
69 | RUN easy_install \ | ||||
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 70 | python_gflags \ |
71 | google_api_python_client \ | ||||
72 | httplib2.ca_certs_locater | ||||
73 | |||||
Andy Bavier | 92a1ca6 | 2016-01-28 12:59:07 -0500 | [diff] [blame] | 74 | ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/ |
Andy Bavier | f74a26f | 2016-01-04 10:06:29 -0500 | [diff] [blame] | 75 | |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 76 | # Install XOS |
Tony Mack | 8d42f97 | 2015-10-31 19:06:58 +0000 | [diff] [blame] | 77 | RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \ |
78 | mv /tmp/xos/xos /opt/ && \ | ||||
Scott Baker | dc90a24 | 2016-01-14 09:38:34 -0800 | [diff] [blame] | 79 | chmod +x /opt/xos/tools/xos-manage && \ |
80 | /opt/xos/tools/xos-manage genkeys | ||||
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 81 | |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 82 | # install Tosca engine |
Tony Mack | e30ebd8 | 2015-12-16 18:13:00 +0000 | [diff] [blame] | 83 | RUN chmod +x /opt/xos/tosca/run.py |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 84 | RUN bash /opt/xos/tosca/install_tosca.sh |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 85 | |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 86 | EXPOSE 8000 |
87 | |||||
88 | # Set environment variables. | ||||
89 | ENV HOME /root | ||||
90 | |||||
91 | # Define working directory. | ||||
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 92 | WORKDIR /opt/xos |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 93 | |
94 | # Define default command. | ||||
Andy Bavier | 92a1ca6 | 2016-01-28 12:59:07 -0500 | [diff] [blame] | 95 | CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations |