blob: 011e8dd636d02c470e9d532e1e80bba072e723f9 [file] [log] [blame]
David K. Bainbridge9c24cbf2015-12-03 11:49:01 -08001FROM xosproject/xos
Tony Mack3bcbee82015-11-16 20:41:49 +00002
Tony Mack3bcbee82015-11-16 20:41:49 +00003RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
4 openssh-client \
5 python-crypto \
6 python-jinja2 \
7 python-paramiko \
8 python-yaml \
9 python-httplib2 \
Andy Bavierf34b99a2016-01-07 16:38:26 -050010 rsync \
Tony Mack3bcbee82015-11-16 20:41:49 +000011 supervisor
12
Tony Mack80ed9e82015-12-16 17:40:00 +000013RUN pip install -U \
14 jinja2
15
Andy Bavierf34b99a2016-01-07 16:38:26 -050016# Install custom Ansible
Tony Mack3bcbee82015-11-16 20:41:49 +000017RUN \
18 git clone -b release1.8.2 git://github.com/ansible/ansible.git /opt/ansible && \
19 git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/lib/ansible/modules/extras && \
20 git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/v2/ansible/modules/extras && \
21 git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/lib/ansible/modules/core && \
22 git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/v2/ansible/modules/core && \
23 # git clone uses cached copy, doesn't pick up latest
24 git -C /opt/ansible pull && \
25 git -C /opt/ansible/lib/ansible/modules/core pull && \
26 git -C /opt/ansible/v2/ansible/modules/core pull
27
28
29# For Observer
30RUN mkdir -p /usr/local/share /bin /etc/ansible
31
Andy Bavier44120082016-01-06 16:40:00 -050032COPY conf/ansible-hosts /etc/ansible/hosts
Tony Mack3bcbee82015-11-16 20:41:49 +000033
34ADD http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2 /usr/local/share/
35
36RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum && \
37 cd /tmp/fofum; python setup.py install && \
38 rm -rf /tmp/fofum && \
39 tar jxvf /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 -C /usr/local/share/ && \
40 rm -f /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 && \
41 ln -s /usr/local/share/phantomjs-1.7.0-linux-x86_64 /usr/local/share/phantomjs && \
42 ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs
43
44
45# Supervisor
Andy Bavier44120082016-01-06 16:40:00 -050046COPY conf/synchronizer.conf /etc/supervisor/conf.d/
Tony Mack3bcbee82015-11-16 20:41:49 +000047
Tony Mack80ed9e82015-12-16 17:40:00 +000048CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf