blob: 774220dffe93851078b774e720220c5a514c3267 [file] [log] [blame]
Andy Bavier37044342015-02-06 16:39:06 -05001FROM ubuntu:14.04.1
2MAINTAINER Andy Bavier <acb@cs.princeton.edu>
3
4# Install.
5RUN apt-get update
6RUN apt-get install -y git
7RUN apt-get install -y postgresql
8RUN apt-get install -y python-psycopg2
9RUN apt-get install -y graphviz graphviz-dev
10RUN apt-get install -y libxslt1.1 libxslt1-dev
11RUN apt-get install -y python-pip
12RUN apt-get install -y tar
13RUN apt-get install -y gcc
14RUN apt-get install -y python-httplib2
15RUN apt-get install -y geoip-database libgeoip1
16RUN apt-get install -y wget
17RUN apt-get install -y python-dev
18
19RUN pip install django==1.7
20RUN pip install djangorestframework==2.4.4
21RUN pip install markdown # Markdown support for the browseable API.
22RUN pip install pyyaml # YAML content-type support.
23RUN pip install django-filter # Filtering support
24RUN pip install lxml # XML manipulation library
25RUN pip install netaddr # IP Addr library
26RUN pip install pytz
27RUN pip install django-timezones
28RUN pip install requests
29RUN pip install django-crispy-forms
30RUN pip install django-geoposition
31RUN pip install django-extensions
32RUN pip install django-suit
33RUN pip install django-evolution
34RUN pip install django-bitfield
35RUN pip install django-ipware
36RUN pip install django-encrypted-fields
37RUN pip install python-keyczar
38
39RUN apt-get install -y python-keystoneclient
40RUN apt-get install -y python-novaclient
41RUN apt-get install -y python-neutronclient
42RUN apt-get install -y python-glanceclient
43RUN apt-get install -y python-ceilometerclient
44
45RUN pip install django_rest_swagger
46
47RUN apt-get install -y python-setuptools
48RUN easy_install django_evolution
49RUN easy_install python_gflags
50RUN easy_install google_api_python_client
51
52# Set up latest Ansible
53# Need to add our patches too
54RUN apt-get install -y ansible
55# RUN git clone --recursive git://github.com/ansible/ansible.git /opt/ansible
56ADD ansible-hosts /etc/ansible/hosts
57
58ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
59
60# Get XOS
61ADD planetstack /opt/xos
62
63ADD observer-initscript /etc/init.d/plstackobserver
64
65RUN chmod +x /opt/xos/scripts/opencloud
66RUN /opt/xos/scripts/opencloud genkeys
67
68# Set postgres password to match default value in settings.py
69RUN service postgresql start; sudo -u postgres psql -c "alter user postgres with password 'password';"
70
71# Turn DEBUG on so that devel server will serve static files
72RUN sed -i 's/DEBUG = False/DEBUG = True/' /opt/xos/planetstack/settings.py
73
74# Cruft to workaround problems with migrations, should go away...
75RUN /opt/xos/scripts/opencloud dropdb
76RUN rm -rf /opt/xos/*/migrations
77RUN cd /opt/xos; python ./manage.py makemigrations core
78RUN cd /opt/xos; python ./manage.py makemigrations hpc
79RUN cd /opt/xos; python ./manage.py makemigrations requestrouter
80RUN cd /opt/xos; python ./manage.py makemigrations syndicate_storage
81RUN cd /opt/xos; python ./manage.py makemigrations servcomp
82
83RUN /opt/xos/scripts/opencloud initdb
84
85EXPOSE 8000
86
87# Set environment variables.
88ENV HOME /root
89
90# Define working directory.
91WORKDIR /root
92
93# Define default command.
94CMD ["/bin/bash"]