1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/utils/docker/httptester
2016-11-17 17:30:30 +00:00
..
Dockerfile Add httptester docker container files and update run_tests.sh to use ansible/httptester 2016-05-26 13:09:28 -05:00
httptester.yml Add playbook and packer file for building httptester (#18107) 2016-11-17 17:30:30 +00:00
nginx.sites.conf Add httptester docker container files and update run_tests.sh to use ansible/httptester 2016-05-26 13:09:28 -05:00
packer.json Add playbook and packer file for building httptester (#18107) 2016-11-17 17:30:30 +00:00
README.rst Add playbook and packer file for building httptester (#18107) 2016-11-17 17:30:30 +00:00
services.sh Add httptester docker container files and update run_tests.sh to use ansible/httptester 2016-05-26 13:09:28 -05:00

httptester
==========

HTTP Testing endpoint which provides httpbin, nginx, SSL and SNI
capabilities, for providing a local HTTP endpoint for testing

Building
--------

Docker
~~~~~~

Both ways of building docker utilize the ``nginx:alpine`` image, but can
be customized for ``Fedora``, ``Red Hat``, ``CentOS``, ``Ubuntu``,
``Debian`` and other variants of ``Alpine``

When utilizing ``packer`` or configuring with ``ansible-playbook``
the services will not automtically start on launch, and will have to be
manually started using::

    $ /services.sh

Such as when starting a docker container::

    docker run -ti --rm -p 80:80 -p 443:443 --name httptester ansible/httptester /services.sh

docker build
^^^^^^^^^^^^

::

    docker build -t ansible/httptester .

packer
^^^^^^

The packer build will use ``ansible-playbook`` to perform the
configuration, and will tag the image as ``ansible/httptester``

::

    packer build packer.json

Ansible
~~~~~~~

::

    ansible-playbook -i hosts -v httptester.yml