2016-11-17 18:30:30 +01: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::
|
|
|
|
|
2017-01-05 06:07:13 +01:00
|
|
|
docker run -ti --rm -p 80:80 -p 443:443 --name httptester ansible/ansible:httptester /services.sh
|
2016-11-17 18:30:30 +01:00
|
|
|
|
|
|
|
docker build
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-01-05 06:07:13 +01:00
|
|
|
docker build -t ansible/ansible:httptester .
|
2016-11-17 18:30:30 +01:00
|
|
|
|
|
|
|
packer
|
|
|
|
^^^^^^
|
|
|
|
|
|
|
|
The packer build will use ``ansible-playbook`` to perform the
|
2017-01-05 06:07:13 +01:00
|
|
|
configuration, and will tag the image as ``ansible/ansible:httptester``
|
2016-11-17 18:30:30 +01:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
packer build packer.json
|
|
|
|
|
|
|
|
Ansible
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
ansible-playbook -i hosts -v httptester.yml
|
|
|
|
|