Tony Mack | 4eecc05 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 1 | FROM xos |
| 2 | |
| 3 | # Install custom Ansible |
| 4 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ |
| 5 | openssh-client \ |
| 6 | python-crypto \ |
| 7 | python-jinja2 \ |
| 8 | python-paramiko \ |
| 9 | python-yaml \ |
| 10 | python-httplib2 \ |
| 11 | supervisor |
| 12 | |
| 13 | RUN \ |
| 14 | git clone -b release1.8.2 git://github.com/ansible/ansible.git /opt/ansible && \ |
| 15 | git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/lib/ansible/modules/extras && \ |
| 16 | git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/v2/ansible/modules/extras && \ |
| 17 | git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/lib/ansible/modules/core && \ |
| 18 | git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/v2/ansible/modules/core && \ |
| 19 | # git clone uses cached copy, doesn't pick up latest |
| 20 | git -C /opt/ansible pull && \ |
| 21 | git -C /opt/ansible/lib/ansible/modules/core pull && \ |
| 22 | git -C /opt/ansible/v2/ansible/modules/core pull |
| 23 | |
| 24 | |
| 25 | # For Observer |
| 26 | RUN mkdir -p /usr/local/share /bin /etc/ansible |
| 27 | |
Tony Mack | bbcd778 | 2015-11-16 20:45:39 +0000 | [diff] [blame] | 28 | RUN cp /tmp/xos/containers/synchronizer/conf/ansible-hosts /etc/ansible/hosts |
Tony Mack | 4eecc05 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 29 | |
| 30 | ADD http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2 /usr/local/share/ |
| 31 | |
| 32 | RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum && \ |
| 33 | cd /tmp/fofum; python setup.py install && \ |
| 34 | rm -rf /tmp/fofum && \ |
| 35 | tar jxvf /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 -C /usr/local/share/ && \ |
| 36 | rm -f /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 && \ |
| 37 | ln -s /usr/local/share/phantomjs-1.7.0-linux-x86_64 /usr/local/share/phantomjs && \ |
| 38 | ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs |
| 39 | |
| 40 | |
| 41 | # Supervisor |
Tony Mack | bbcd778 | 2015-11-16 20:45:39 +0000 | [diff] [blame] | 42 | RUN cp /tmp/xos/containers/synchronizer/conf/synchronizer.conf /etc/supervisor/conf.d/ |
Tony Mack | 4eecc05 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 43 | |
Tony Mack | bbcd778 | 2015-11-16 20:45:39 +0000 | [diff] [blame] | 44 | CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf |