Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docker:

name: docker-ce
service:
name: dockerd
name: docker
env: ''
suffix: tgz
commands:
Expand Down
2 changes: 1 addition & 1 deletion docker/files/default/systemd.ini.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description={{ desc }}
Wants=network-online.target
After=
Documentation=https://github.com/saltstack-formulas/prometheus-formula
Documentation=https://docs.docker.com

[Service]
User={{ user }}
Expand Down
2 changes: 1 addition & 1 deletion docker/software/archive/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
workdir: {{ d.dir.lib }}
env: {{ d.pkg.docker.service.env }}
stop: ''
start: {{ d.pkg.docker.path }}/{{ d.pkg.docker.service.name }}
start: {{ d.pkg.docker.path }}/dockerd
cmd.run:
- name: systemctl daemon-reload
- require:
Expand Down
9 changes: 5 additions & 4 deletions docker/software/service/running.sls
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ include:
{%- endif %}
- enable: True
{%- if grains.kernel|lower == 'linux' %}
- onlyif: systemctl list-unit-files | grep {{ d.pkg.docker.service.name }} >/dev/null 2>&1

{{ formula }}-software-service-running-docker-fail-notify:
test.show_notification:
- text: |
* Rebooting your host is recommended!
test.fail_without_changes:
- comment: |
Formula is trying to start '{{ d.pkg.docker.service.name }}' service
but failed, is it a correct name for Docker service in your OS?

In certain circumstances the docker service will not start.
Your kernel is missing some modules, or not in ideal state.
See https://github.com/moby/moby/blob/master/contrib/check-config.sh
Expand Down
1 change: 1 addition & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ docker:
pkg:
docker:
service:
name: docker
env: HTTP_PROXY=http://YOUR_PROXY_IP_ADDRESS:PROXY_PORT
environ:
# yamllint disable-line rule:line-length
Expand Down
4 changes: 2 additions & 2 deletions test/integration/archive/controls/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
control 'Docker service' do
title 'should be running and enabled'

describe service('dockerd') do
describe service('docker') do
it { should be_installed }
it { should be_enabled }
# it { should be_running }
it { should be_running } unless %w[fedora suse].include? platform[:family]
end
end
9 changes: 5 additions & 4 deletions test/integration/package/controls/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
control 'Docker service' do
title 'should be running and enabled'

# describe service(name) do
# it { should be_enabled }
# it { should be_running }
# end
describe service('docker') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
end