Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debian9 (stretch) images #31

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ before_install:
- docker build -t ansible_trusty ubuntu14.04
- docker build -t ansible_precise ubuntu12.04
- docker build -t ansible_jessie debian8
- docker build -t ansible_stretch debian9
- docker build -t ansible_wheezy debian7
- docker build -t ansible_centos7 centos7
- docker build -t ansible_centos6 centos6
Expand All @@ -19,6 +20,7 @@ before_install:
- docker build -t ansible_trusty_onbuild ubuntu14.04-onbuild
- docker build -t ansible_precise_onbuild ubuntu12.04-onbuild
- docker build -t ansible_jessie_onbuild debian8-onbuild
- docker build -t ansible_stretch_onbuild debian9-onbuild
- docker build -t ansible_wheezy_onbuild debian7-onbuild
- docker build -t ansible_centos7_onbuild centos7-onbuild
- docker build -t ansible_centos6_onbuild centos6-onbuild
Expand All @@ -28,6 +30,7 @@ before_install:
- docker build -t ansible_1.9_trusty 1.9-ubuntu14.04
- docker build -t ansible_1.9_precise 1.9-ubuntu12.04
- docker build -t ansible_1.9_jessie 1.9-debian8
- docker build -t ansible_1.9_stretch 1.9-debian9
- docker build -t ansible_1.9_wheezy 1.9-debian7
- docker build -t ansible_1.9_centos7 1.9-centos7
- docker build -t ansible_1.9_centos6 1.9-centos6
Expand All @@ -36,6 +39,7 @@ before_install:
- docker build -t ansible_1.9_trusty_onbuild 1.9-ubuntu14.04-onbuild
- docker build -t ansible_1.9_precise_onbuild 1.9-ubuntu12.04-onbuild
- docker build -t ansible_1.9_jessie_onbuild 1.9-debian8-onbuild
- docker build -t ansible_1.9_stretch_onbuild 1.9-debian9-onbuild
- docker build -t ansible_1.9_wheezy_onbuild 1.9-debian7-onbuild
- docker build -t ansible_1.9_centos7_onbuild 1.9-centos7-onbuild
- docker build -t ansible_1.9_centos6_onbuild 1.9-centos6-onbuild
Expand All @@ -46,6 +50,7 @@ before_install:
- docker build -t ansible_master_trusty master-ubuntu14.04
- docker build -t ansible_master_precise master-ubuntu12.04
- docker build -t ansible_master_jessie master-debian8
- docker build -t ansible_master_stretch master-debian9
- docker build -t ansible_master_wheezy master-debian7
- docker build -t ansible_master_centos7 master-centos7
- docker build -t ansible_master_centos6 master-centos6
Expand All @@ -54,22 +59,26 @@ before_install:
- docker build -t ansible_master_trusty_onbuild master-ubuntu14.04-onbuild
- docker build -t ansible_master_precise_onbuild master-ubuntu12.04-onbuild
- docker build -t ansible_master_jessie_onbuild master-debian8-onbuild
- docker build -t ansible_master_stretch_onbuild master-debian9-onbuild
- docker build -t ansible_master_wheezy_onbuild master-debian7-onbuild
- docker build -t ansible_master_centos7_onbuild master-centos7-onbuild
- docker build -t ansible_master_centos6_onbuild master-centos6-onbuild


- docker build -t ansible_mini_alpine3 mini-alpine3
- docker build -t ansible_mini_debian8 mini-debian8
- docker build -t ansible_mini_debian9 mini-debian9
- docker build -t nginx_alpine3 -f mini-test/Dockerfile.alpine3 mini-test
- docker build -t nginx_debian8 -f mini-test/Dockerfile.debian8 mini-test
- docker build -t nginx_debian8 -f mini-test/Dockerfile.debian8 mini-test


script:
- docker run -i ansible_xenial > result-ubuntu16.04
- docker run -i ansible_trusty > result-ubuntu14.04
- docker run -i ansible_precise > result-ubuntu12.04
- docker run -i ansible_jessie > result-debian8
- docker run -i ansible_stretch > result-debian9
- docker run -i ansible_wheezy > result-debian7
- docker run -i ansible_centos7 > result-centos7
- docker run -i ansible_centos6 > result-centos6
Expand All @@ -78,6 +87,7 @@ script:
- docker run -i ansible_trusty_onbuild > result-ubuntu14.04-onbuild
- docker run -i ansible_precise_onbuild > result-ubuntu12.04-onbuild
- docker run -i ansible_jessie_onbuild > result-debian8-onbuild
- docker run -i ansible_stretch_onbuild > result-debian9-onbuild
- docker run -i ansible_wheezy_onbuild > result-debian7-onbuild
- docker run -i ansible_centos7_onbuild > result-centos7-onbuild
- docker run -i ansible_centos6_onbuild > result-centos6-onbuild
Expand All @@ -87,13 +97,15 @@ script:
- docker run -i ansible_1.9_trusty > result-1.9-ubuntu14.04
- docker run -i ansible_1.9_precise > result-1.9-ubuntu12.04
- docker run -i ansible_1.9_jessie > result-1.9-debian8
- docker run -i ansible_1.9_stretch > result-1.9-debian9
- docker run -i ansible_1.9_wheezy > result-1.9-debian7
- docker run -i ansible_1.9_centos7 > result-1.9-centos7
- docker run -i ansible_1.9_centos6 > result-1.9-centos6
- docker run -i ansible_1.9_alpine3 > result-1.9-alpine3
- docker run -i ansible_1.9_trusty_onbuild > result-1.9-ubuntu14.04-onbuild
- docker run -i ansible_1.9_precise_onbuild > result-1.9-ubuntu12.04-onbuild
- docker run -i ansible_1.9_jessie_onbuild > result-1.9-debian8-onbuild
- docker run -i ansible_1.9_stretch_onbuild > result-1.9-debian9-onbuild
- docker run -i ansible_1.9_wheezy_onbuild > result-1.9-debian7-onbuild
- docker run -i ansible_1.9_centos7_onbuild > result-1.9-centos7-onbuild
- docker run -i ansible_1.9_centos6_onbuild > result-1.9-centos6-onbuild
Expand All @@ -104,27 +116,31 @@ script:
- docker run -i ansible_master_trusty > result-master-ubuntu14.04
- docker run -i ansible_master_precise > result-master-ubuntu12.04
- docker run -i ansible_master_jessie > result-master-debian8
- docker run -i ansible_master_stretch > result-master-debian9
- docker run -i ansible_master_wheezy > result-master-debian7
- docker run -i ansible_master_centos7 > result-master-centos7
- docker run -i ansible_master_centos6 > result-master-centos6
- docker run -i ansible_master_xenial_onbuild > result-master-ubuntu16.04-onbuild
- docker run -i ansible_master_trusty_onbuild > result-master-ubuntu14.04-onbuild
- docker run -i ansible_master_precise_onbuild > result-master-ubuntu12.04-onbuild
- docker run -i ansible_master_jessie_onbuild > result-master-debian8-onbuild
- docker run -i ansible_master_stretch_onbuild > result-master-debian9-onbuild
- docker run -i ansible_master_wheezy_onbuild > result-master-debian7-onbuild
- docker run -i ansible_master_centos7_onbuild > result-master-centos7-onbuild
- docker run -i ansible_master_centos6_onbuild > result-master-centos6-onbuild


- docker run -i nginx_alpine3 2> result-nginx-alpine3
- docker run -i nginx_debian8 2> result-nginx-debian8
- docker run -i nginx_debian9 2> result-nginx-debian9


- echo "==> Validating the test results..."
- sh -c "[ -s result-ubuntu16.04 ]"
- sh -c "[ -s result-ubuntu14.04 ]"
- sh -c "[ -s result-ubuntu12.04 ]"
- sh -c "[ -s result-debian8 ]"
- sh -c "[ -s result-debian9 ]"
- sh -c "[ -s result-debian7 ]"
- sh -c "[ -s result-centos7 ]"
- sh -c "[ -s result-centos6 ]"
Expand All @@ -133,20 +149,23 @@ script:
- sh -c "[ -s result-ubuntu14.04-onbuild ]"
- sh -c "[ -s result-ubuntu12.04-onbuild ]"
- sh -c "[ -s result-debian8-onbuild ]"
- sh -c "[ -s result-debian9-onbuild ]"
- sh -c "[ -s result-debian7-onbuild ]"
- sh -c "[ -s result-centos7-onbuild ]"
- sh -c "[ -s result-centos6-onbuild ]"
- sh -c "[ -s result-alpine3-onbuild ]"

- sh -c "[ -s result-1.9-ubuntu14.04 ]"
- sh -c "[ -s result-1.9-ubuntu12.04 ]"
- sh -c "[ -s result-1.9-debian9 ]"
- sh -c "[ -s result-1.9-debian8 ]"
- sh -c "[ -s result-1.9-debian7 ]"
- sh -c "[ -s result-1.9-centos7 ]"
- sh -c "[ -s result-1.9-centos6 ]"
- sh -c "[ -s result-1.9-alpine3 ]"
- sh -c "[ -s result-1.9-ubuntu14.04-onbuild ]"
- sh -c "[ -s result-1.9-ubuntu12.04-onbuild ]"
- sh -c "[ -s result-1.9-debian9-onbuild ]"
- sh -c "[ -s result-1.9-debian8-onbuild ]"
- sh -c "[ -s result-1.9-debian7-onbuild ]"
- sh -c "[ -s result-1.9-centos7-onbuild ]"
Expand All @@ -156,17 +175,20 @@ script:
- sh -c "[ -s result-master-ubuntu16.04 ]"
- sh -c "[ -s result-master-ubuntu14.04 ]"
- sh -c "[ -s result-master-ubuntu12.04 ]"
- sh -c "[ -s result-master-debian9 ]"
- sh -c "[ -s result-master-debian8 ]"
- sh -c "[ -s result-master-debian7 ]"
- sh -c "[ -s result-master-centos7 ]"
- sh -c "[ -s result-master-centos6 ]"
- sh -c "[ -s result-master-ubuntu16.04-onbuild ]"
- sh -c "[ -s result-master-ubuntu14.04-onbuild ]"
- sh -c "[ -s result-master-ubuntu12.04-onbuild ]"
- sh -c "[ -s result-master-debian9-onbuild ]"
- sh -c "[ -s result-master-debian8-onbuild ]"
- sh -c "[ -s result-master-debian7-onbuild ]"
- sh -c "[ -s result-master-centos7-onbuild ]"
- sh -c "[ -s result-master-centos6-onbuild ]"

- sh -c "[ -s result-nginx-alpine3 ]"
- sh -c "[ -s result-nginx-debian8 ]"
- sh -c "[ -s result-nginx-debian9 ]"
56 changes: 56 additions & 0 deletions 1.9-debian9-onbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Dockerfile for building Ansible 1.9 image for Debian 9 (stretch), with as few additional software as possible.
#
# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
#
# Version 1.0
#


# pull base image
FROM debian:stretch

MAINTAINER William Yeh <[email protected]>


RUN echo "===> Installing python, sudo, and supporting tools..." && \
apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
\
\
echo "===> Removing unused APT resources..." && \
apt-get -f -y --auto-remove remove \
gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \
mkdir -p /etc/ansible && \
echo 'localhost' > /etc/ansible/hosts


COPY ansible-playbook-wrapper /usr/local/bin/

ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
echo "===> Updating TLS certificates..." && \
apt-get install -y openssl ca-certificates

ONBUILD WORKDIR /tmp
ONBUILD COPY . /tmp
ONBUILD RUN \
echo "===> Diagnosis: host information..." && \
ansible -c local -m setup all



# default command: display Ansible version
CMD [ "ansible-playbook", "--version" ]
50 changes: 50 additions & 0 deletions 1.9-debian9-onbuild/ansible-playbook-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
#
# Simple wrapper for executing ansible-galaxy and ansible-playbook
# with local connection.
#
# USAGE:
# ansible-playbook-wrapper [other ansible-playbook arguments]
#
# ENVIRONMENT VARIABLES:
#
# - REQUIREMENTS: requirements filename; default = "requirements.yml"
# - PLAYBOOK: playbook filename; default = "playbook.yml"
# - INVENTORY: inventory filename; default = "/etc/ansible/hosts"
#


#
# install Galaxy roles, if any
#

if [ -z "$REQUIREMENTS" ]; then
REQUIREMENTS=requirements.yml
fi

if [ -f "$REQUIREMENTS" ]; then
apt-get install -y git
ansible-galaxy install -r $REQUIREMENTS
fi


#
# execute playbook
#

if [ -z "$PLAYBOOK" ]; then
PLAYBOOK=playbook.yml
fi


if [ -z "$INVENTORY" ]; then
exec ansible-playbook \
$PLAYBOOK \
--connection=local \
"$@"
else
exec ansible-playbook \
-i $INVENTORY $PLAYBOOK \
--connection=local \
"$@"
fi
46 changes: 46 additions & 0 deletions 1.9-debian9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Dockerfile for building Ansible 1.9 image for Debian 9 (stretch), with as few additional software as possible.
#
# @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
#
# Version 1.0
#


# pull base image
FROM debian:stretch

MAINTAINER William Yeh <[email protected]>


RUN echo "===> Installing python, sudo, and supporting tools..." && \
apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
apt-get install -y sshpass openssh-client && \
\
\
echo "===> Removing unused APT resources..." && \
apt-get -f -y --auto-remove remove \
gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
\
\
echo "===> Adding hosts for convenience..." && \
mkdir -p /etc/ansible && \
echo 'localhost' > /etc/ansible/hosts


# default command: display Ansible version
CMD [ "ansible-playbook", "--version" ]
Loading