An Ansible module that enables Continuous Delivery with Red Hat 3scale API Management Platform (3scale AMP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
1.3 KiB

FROM centos:7
MAINTAINER Nicolas Masse <nmasse@redhat.com>
LABEL io.k8s.display-name="Ansible role nmasse-itix.threescale-cicd" \
io.k8s.description="Deploys an API to 3scale API Management." \
io.openshift.tags="3scale"
ARG THREESCALE_CICD_GIT_REPOSITORY=https://github.com/nmasse-itix/threescale-cicd.git
# This one is by convention used by the Docker Build services.
# See https://docs.docker.com/docker-hub/builds/advanced/
ARG SOURCE_BRANCH=master
RUN yum --enablerepo=extras install -y epel-release centos-release-scl && \
yum-config-manager --enable rhel-server-rhscl-7-rpms && \
yum install -y ansible git python27-python-pip && \
scl enable python27 "pip install --install-option='--install-purelib=/usr/lib/python2.7/site-packages/' jinja2" && \
yum clean all && \
rm -rf /var/cache/yum && \
mkdir -p /opt/ansible/threescale-cicd && \
git clone -b ${SOURCE_BRANCH} -- ${THREESCALE_CICD_GIT_REPOSITORY} /opt/ansible/threescale-cicd && \
cd /opt/ansible/threescale-cicd/support/docker && mkdir api && \
ansible-playbook install.yaml
WORKDIR /opt/ansible/threescale-cicd/support/docker
VOLUME [ "/opt/ansible/threescale-cicd/support/docker/api" ]
ENTRYPOINT [ "/usr/bin/ansible-playbook", "deploy-api.yaml" ]
CMD [ ]