Skip to content

himalayan-institute/ansible-role-hi-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HI (Himalayan Institute) App

Deploying docker containers for HI and running them with cron and/or systemd

Role Variables

---
# Application name used in file paths, service actions, etc.
hi_app_name: app

# The type of application to be deployed, either "long-running" or "cron"
# 'cron' should be used for applications that should run on a schedule (e.g. a rake task)
#   A cron entry will be inserted to run this task (as root)
# 'long-running' should be used for applications that behave as services and should always be up
#   A systemd job will be created to run your service (as root)
hi_app_type: long-running

# Environment variable mapping written to /etc/default/{{ hi_app_name }}
# which is passed to `docker run` via `--env-file`
hi_app_env: {}

# Template used for the file written to /etc/default/{{ hi_app_name }}
hi_app_etc_default_template: etc-default.j2

# Equivalent of `CMD` to be passed to `docker run`
hi_app_docker_command: ""

# Repository portion of docker image specification, e.g. "busybox",
# "quay.io/hi/foo"
hi_app_docker_repo: ""

# Tag portion of docker image specification, e.g.: "latest", "master"
hi_app_docker_tag: latest

# Proxy port for docker container, passed via `-p` to `docker run`
hi_app_docker_port: 3000
# Also valid:
# hi_app_docker_port:
# - { host: 3000, container: 80 }
# - { host: 8080, container: 9292, ip: 127.0.0.1 }
# - { container: 22, ip: 127.0.0.1 }
# Invalid (must at least specify container ip):
# - { host: 22, ip: 127.0.0.1 }

# volumes to mount into the docker container
# ensures the directory on the host will be created
hi_app_docker_volumes: []
# Example:
# - { host: /var/lib/redis, container: /var/lib/redis, directory: yes }

# adds the --link option for `docker run` to the templates
hi_app_docker_link: []
# Example:
# - { name: style-gallery, alias: style-gallery }
# # note: alias, if not provided, defaults to the same value as name

# Cron job schedule
hi_app_cron_schedule: "* * * * *"

# Template used for the file written to
# /usr/local/bin/{{ hi_app_name }}-cron-wrapper
hi_app_cron_wrapper_template: cron-wrapper.sh.j2

# Use this with another process that feeds required data to your proccess over STDIN
# E.g. a query running in another container
hi_app_cron_stdin_command: ""

# Template used for the temptate used to set up logrotation
# with logrotated
hi_app_cron_logrotate_template: cron-logrotate.j2

# additional conditions on the systemd service
hi_app_systemd_dependencies: []

# Template used for the file written to /etc/init/{{ hi_app_name }}.conf
hi_app_systemd_conf_template: systemd.service.j2

# Name of the organism running the playbook
hi_app_deployer: ""

# enable healthchecking after a restart
hi_app_healthcheck_enabled: false

hi_app_healthcheck_validate_certs: yes

# defaults for the healthcheck url
hi_app_healthcheck_scheme: "http"
hi_app_healthcheck_port: "80"
hi_app_healthcheck_path: "heartbeat"
hi_app_healthcheck_host: "{{ ansible_fqdn }}"
hi_app_healthcheck_url: "{{ hi_app_healthcheck_scheme }}://{{ hi_app_healthcheck_host }}:{{ hi_app_healthcheck_port }}/{{ hi_app_healthcheck_path }}"
hi_app_healthcheck_timeout: 1
hi_app_healthcheck_delay: 1
# hi_app_healthcheck_retries: 30 # currently not configurable due to https://github.com/ansible/ansible/issues/5865

License

Licensed under the MIT license. See the LICENSE file for details.

About

Shared application role bits

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%