Ansible-Container playbooks for the FutureGateway.
There are two variable files in ansible
:
vars.yml
: variables used in templating the container orchestrationvars-fg-stack.yml
: variables used by themain.yml
playbook which is run by ansible-container.
The former is used to template the containter orchestration and should contain variables related only to the deployment. For the deployment and configuration of the services, see the latter. This is loaded int the stack
variable.
This builds three containers and one data volume. See container.yml
for more information
-
db
: The database container. -
fgapiserver
: API server container. db-data
: Derives from alpine, merely contains the persistent db volume.
See the Ansble Container documentation
- Building the containers:
ansible-container --var-file=vars.yml build
- Running the application :
ansible-container --var-file=vars.yml run -d
will start the applications and run them in background (detached) mode.
We define two registries - docker hub and quay; quay is preferred.
To push the built images :
ansible-container --var-file=vars.yml push --push-to=quay