forked from saltstack-formulas/docker-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(rewrite): modernize formula and fresh start
- align tom template formula - fix bugs - add Windows support - Add saltstack dockercompose module support - Get rid of confusing old legacy spagetti jinja conditionals - Travis CI (package/archive) is passing - Windows is passing - Fixes/obsoletes: saltstack-formulas#252, saltstack-formulas#249, saltstack-formulas#243, saltstack-formulas#236, saltstack-formulas#234, saltstack-formulas#219, saltstack-formulas#202, saltstack-formulas#191 - Fixes/obsoletes: saltstack-formulas#190, saltstack-formulas#160, saltstack-formulas#95, saltstack-formulas#85, saltstack-formulas#74 - Includes saltstack-formulas#251 and saltstack-formulas#253 - Add Swarm support BREAKING CHANGE: This version is not backwards compatible. Update your states and pillar data to align with new formula. - MacOS was not tested in this PR but hopefully no regression. - docker.containers: sls was simplified (raise PR if regression)
- Loading branch information
1 parent
eb3bc72
commit eb03b30
Showing
137 changed files
with
4,412 additions
and
1,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
{% from "docker/map.jinja" import docker with context %} | ||
|
||
docker-packages-cleaned-service-dead: | ||
service.dead: | ||
- name: docker | ||
{% if "process_signature" in docker %} | ||
- sig: {{ docker.process_signature }} | ||
- onlyif: ps -ef | grep "{{ docker.process_signature }}" ##stop stderr from sig | ||
{% endif %} | ||
- require_in: | ||
- pkg: docker-packages-cleaned | ||
docker-packages-cleaned: | ||
pkg.removed: | ||
- pkgs: | ||
- {{ docker.pkg.old_name if docker.use_old_repo else docker.pkg.name }} | ||
- docker | ||
- docker.io | ||
- docker-client | ||
- docker-client-latest | ||
- docker-common | ||
- docker-latest | ||
- docker-latest-logrotate | ||
- docker-logrotate | ||
- docker-selinux | ||
- docker-engine-selinux | ||
- docker-engine | ||
{# remove pip packages installed by formula #} | ||
docker-pips-removed: | ||
pip.removed: | ||
- onlyif: python -m pip --version >/dev/null 2>&1 | ||
- names: | ||
{% if docker.compose_version -%} | ||
- docker-compose == {{ docker.compose_version }} | ||
{% else -%} | ||
- docker-compose | ||
{% endif -%} | ||
{% if docker.install_docker_py -%} | ||
{% if "python_package" in docker -%} | ||
- {{ docker.python_package }} | ||
{% elif "pip_version" in docker -%} | ||
- docker-py {{ docker.pip_version }} | ||
{% else -%} | ||
- docker-py | ||
{%- endif -%} | ||
{% endif %} | ||
{%- if docker.proxy %} | ||
- proxy: {{ docker.proxy }} | ||
{%- endif %} | ||
include: | ||
# .containers.clean | ||
- .compose.clean | ||
- .software.clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import data as d with context %} | ||
{%- set formula = d.formula %} | ||
{%- if 'applications' in d.compose and d.compose.applications %} | ||
{%- for service in d.compose.applications|unique %} | ||
{%- if 'path' in d.compose[service] and d.compose[service]['path'] %} | ||
{{ formula }}-compose-{{ service }}-build: | ||
module.run: | ||
- name: dockercompose.build | ||
- path: {{ d.compose[service]['path'] }} | ||
{%- if 'services_names' in d.compose[service] and d.compose[service]['service_names'] is iterable %} | ||
- service_names: {{ d.compose[service]['service_names'] }} | ||
{%- endif %} | ||
{% endif %} | ||
{%- endfor %} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .software.clean |
Oops, something went wrong.