diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ba07ed8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,113 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a packager
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.kitchen
+.kitchen.local.yml
+kitchen.local.yml
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# dotenv
+.env
+
+# virtualenv
+.venv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+
+# Bundler
+Gemfile.lock
+
+# copied `.md` files used for conversion to `.rst` using `m2r`
+docs/*.md
+
+# Vim
+*.sw?
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..88bfda2
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,90 @@
+stages:
+ - test
+ - commitlint
+ - name: release
+ if: branch = master AND type != pull_request
+
+sudo: required
+cache: bundler
+language: ruby
+
+services:
+ - docker
+
+dist: xenial
+
+# Make sure the instances listed below match up with
+# the `platforms` defined in `kitchen.yml`
+# NOTE: Please try to select up to six instances that add some meaningful
+# testing of the formula's behaviour. If possible, try to refrain from
+# the classical "chosing all the instances because I want to test on
+# another/all distro/s" trap: it will just add time to the testing (see
+# the discussion on #121). As an example, the set chosen below covers
+# the most used distros families, systemd and non-systemd and the latest
+# three supported Saltstack versions with python2 and 3."
+# As for `kitchen.yml`, that should still contain all of the platforms,
+# to allow for comprehensive local testing
+# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
+# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
+env:
+ matrix:
+ - INSTANCE: default-debian-9-develop-py3
+ # - INSTANCE: default-ubuntu-1804-develop-py3
+ # - INSTANCE: default-centos-7-develop-py3
+ # - INSTANCE: default-fedora-29-develop-py3
+ # - INSTANCE: default-opensuse-leap-15-develop-py3
+ # - INSTANCE: default-debian-9-2019-2-py3
+ - INSTANCE: default-ubuntu-1804-2019-2-py3
+ - INSTANCE: default-centos-7-2019-2-py3
+ # - INSTANCE: default-fedora-29-2019-2-py3
+ - INSTANCE: default-opensuse-leap-15-2019-2-py3
+ # - INSTANCE: default-debian-9-2018-3-py2
+ # - INSTANCE: default-ubuntu-1604-2018-3-py2
+ # - INSTANCE: default-centos-7-2018-3-py2
+ - INSTANCE: default-fedora-29-2018-3-py2
+ # TODO: Use this when fixed instead of `opensuse-leap-42`
+ # Ref: https://github.com/netmanagers/salt-image-builder/issues/2
+ # - INSTANCE: default-opensuse-leap-15-2018-3-py2
+ - INSTANCE: default-opensuse-leap-42-2018-3-py2
+ # - INSTANCE: default-debian-8-2017-7-py2
+ # - INSTANCE: default-ubuntu-1604-2017-7-py2
+ # TODO: Enable after improving the formula to work with other than `systemd`
+ #- INSTANCE: default-centos-6-2017-7-py2
+ # - INSTANCE: default-fedora-28-2017-7-py2
+ #- INSTANCE: default-opensuse-leap-42-2017-7-py2
+
+script:
+ - bundle exec kitchen verify ${INSTANCE}
+
+jobs:
+ include:
+ # Define the commitlint stage
+ - stage: commitlint
+ language: node_js
+ node_js: lts/*
+ before_install: skip
+ script:
+ - npm install @commitlint/config-conventional -D
+ - npm install @commitlint/travis-cli -D
+ - commitlint-travis
+ # Define the release stage that runs semantic-release
+ - stage: release
+ language: node_js
+ node_js: lts/*
+ before_install: skip
+ script:
+ # Update `AUTHORS.md`
+ - export MAINTAINER_TOKEN=${GH_TOKEN}
+ - go get github.com/myii/maintainer
+ - maintainer contributor
+
+ # Install all dependencies required for `semantic-release`
+ - npm install @semantic-release/changelog@3 -D
+ - npm install @semantic-release/exec@3 -D
+ - npm install @semantic-release/git@7 -D
+ deploy:
+ provider: script
+ skip_cleanup: true
+ script:
+ # Run `semantic-release`
+ - npx semantic-release@15
diff --git a/AUTHORS.md b/AUTHORS.md
new file mode 100644
index 0000000..7526d62
--- /dev/null
+++ b/AUTHORS.md
@@ -0,0 +1,12 @@
+# Authors
+
+This list is sorted by the number of commits per contributor in _descending_ order.
+
+Avatar|Contributor|Contributions
+:-:|---|:-:
+|[@noelmcloughlin](https://github.com/noelmcloughlin)|2
+|[@alxwr](https://github.com/alxwr)|1
+
+---
+
+Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-06-05.
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..e69de29
diff --git a/FORMULA b/FORMULA
new file mode 100644
index 0000000..4df8cbd
--- /dev/null
+++ b/FORMULA
@@ -0,0 +1,9 @@
+name: deepsea
+os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, SmartOS
+os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD
+version: 1.0.0
+release: 1
+minimum_version: 2016.11
+summary: deepsea formula
+description: Formula to download and install/remove deepsea software.
+top_level_dir: deepsea
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..2346e07
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,7 @@
+source "https://rubygems.org"
+
+gem 'kitchen-docker', '>= 2.9'
+gem 'kitchen-salt', '>= 0.6.0'
+gem 'kitchen-inspec', '>= 1.1'
+gem 'net-ssh', '>= 5.2.0'
+
diff --git a/LICENSE b/LICENSE
index d919c41..57caf8d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
- Copyright (c) 2013-2015 Salt Stack Formulas
+ Copyright (c) 2019 Salt Stack Formulas
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.rst b/README.rst
deleted file mode 100644
index f11727c..0000000
--- a/README.rst
+++ /dev/null
@@ -1,116 +0,0 @@
-========
-deepsea
-========
-
-Salt formula to deploy DeepSea (software defined storage) framework on GNU Linux.
-
-.. note::
-
- See the full `Salt Formulas installation and usage instructions
- `_.
-
-Available states
-================
-
-.. contents::
- :local:
-
-``deepsea``
-------------
-
-Meta-state runs all other states (except remove).
-
-Afterwards, consult official DeepSea documentation at and
-
-``deepsea.install``
--------------------
-
-Install DeepSea software on GNU Linux. Support git repo (default) or package repo (suse only). Includes the `config` and `service` states.
-
-``deepsea.config``
------------------
-
-Deepsea DEV_ENV=[true|false] support.
-
-``deepsea.services``
------------------
-
-Enable services needed by DeepSea, and disable services incompatible with DeepSea.
-
-``deepsea.remove``
------------------
-
-Basic remove state (suse only)
-
-
-
-Testing
-================
-
-DeepSea deployment verification on GNU Linux: Ubuntu, Centos, and Fedora with python2.
-
-TODO: DeepSea runtime verification (ensure deepsea commands work).
-
-
-Integration with other formulae
-===============================
-
-The following formulae pillars support DeepSea-
-
-`firewalld-formula `_
-
-.. code-block:: yaml
-
- extends:
- firewalld:
- services:
- deepsea-formula:
- short: deepsea
- description: DeepSea firewall rules
- ports:
- tcp:
- - 4505
- - 4506
- udp:
- - 4505
- - 4506
- zones:
- public:
- services:
- - deepsea
-
-
-`packages-formula
- `_
-
-.. code-block:: bash
-
- extends:
- packages:
- pips:
- wanted:
- - tox
- - click
- pkgs:
- unwanted:
- - unattended-upgrades {# recommendation #}
- wanted:
- - python-setuptools
- - salt-api
- - git
- - make
- {% if grains.os_family == 'FreeBSD' %}
- - devel/py-pip
- {% elif grains.os_family == 'Debian' %}
- - python-pip
- {% elif grains.os_family == 'RedHat' %}
- - python2-pip
- - python-click
- - python-tox
- {% elif grains.os_family == 'Suse' %}
- - python-pip
- {% elif grains.os_family == 'Arch' %}
- - python2-pip
- {% endif %}
-
-
diff --git a/bin/kitchen b/bin/kitchen
new file mode 100755
index 0000000..1cd44f3
--- /dev/null
+++ b/bin/kitchen
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+#
+# This file was generated by Bundler.
+#
+# The application 'kitchen' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require "pathname"
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
+ Pathname.new(__FILE__).realpath)
+
+bundle_binstub = File.expand_path("../bundle", __FILE__)
+
+if File.file?(bundle_binstub)
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
+ load(bundle_binstub)
+ else
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
+Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
+ end
+end
+
+require "rubygems"
+require "bundler/setup"
+
+load Gem.bin_path("test-kitchen", "kitchen")
diff --git a/commitlint.config.js b/commitlint.config.js
new file mode 100644
index 0000000..2f9d1aa
--- /dev/null
+++ b/commitlint.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ extends: ['@commitlint/config-conventional'],
+};
diff --git a/deepsea/clean.sls b/deepsea/clean.sls
new file mode 100644
index 0000000..21ba697
--- /dev/null
+++ b/deepsea/clean.sls
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .service.clean
+ - .config.clean
+ - .package.clean
+ - .source.clean
diff --git a/deepsea/config.sls b/deepsea/config.sls
deleted file mode 100644
index 3564ea8..0000000
--- a/deepsea/config.sls
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- coding: utf-8 -*-
-# vim: ft=yaml
-
-{% from "deepsea/map.jinja" import deepsea with context -%}
-
-deepsea-config-global:
- file.line:
- - name: {{ deepsea.config.global }}
- - mode: ensure
- - indent: True
- - content: DEV_ENV={{ deepsea.config.dev_env }}
- - onlyif: test -f {{ deepsea.config.global }}
diff --git a/deepsea/config/clean.sls b/deepsea/config/clean.sls
new file mode 100644
index 0000000..dd9fc39
--- /dev/null
+++ b/deepsea/config/clean.sls
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+{%- set sls_source_clean = tplroot ~ '.source.clean' %}
+{%- set sls_package_clean = tplroot ~ '.package.clean' %}
+{%- set sls_service_clean = tplroot ~ '.service.clean' %}
+
+include:
+ - {{ sls_service_clean }}
+ - {{ sls_source_clean if deepsea.pkg.use_upstream_source else sls_package_clean }}
+
+deepsea-config-clean-file-absent:
+ file.absent:
+ - names:
+ - {{ deepsea.environ_file }}
+ - require:
+ - sls: {{ sls_service_clean }}
+ - sls: {{ sls_source_clean if deepsea.pkg.use_upstream_source else sls_package_clean }}
diff --git a/deepsea/config/environ.sls b/deepsea/config/environ.sls
new file mode 100644
index 0000000..a0dd753
--- /dev/null
+++ b/deepsea/config/environ.sls
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_source_install = tplroot ~ '.source.install' %}
+{%- set sls_package_install = tplroot ~ '.package.install' %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
+
+include:
+ - {{ sls_source_install if deepsea.pkg.use_upstream_source else sls_package_install }}
+
+deepsea-config-file-file-managed-environ_file:
+ file.managed:
+ - name: {{ deepsea.environ_file }}
+ - source: {{ files_switch(['environ.sh.jinja'],
+ lookup='deepsea-config-file-file-managed-environ_file'
+ )
+ }}
+ - mode: 640
+ - user: root
+ - group: {{ deepsea.rootgroup }}
+ - makedirs: True
+ - template: jinja
+ - context:
+ config: {{ deepsea.environ|yaml }}
+ - require:
+ - sls: {{ sls_source_install if deepsea.pkg.use_upstream_source else sls_package_install }}
diff --git a/deepsea/config/init.sls b/deepsea/config/init.sls
new file mode 100644
index 0000000..4528c0e
--- /dev/null
+++ b/deepsea/config/init.sls
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .environ
diff --git a/deepsea/defaults.yaml b/deepsea/defaults.yaml
index 9dc01c7..8cfe34b 100644
--- a/deepsea/defaults.yaml
+++ b/deepsea/defaults.yaml
@@ -1,42 +1,47 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
-
+---
deepsea:
- release: luminous
- package: deepsea
- use_upstream_pkgrepo: False
- use_upstream_gitrepo: True
- tmpdir: /tmp/deepsea_tmp
- user: root
- group: root
-
- repo:
- base_uri:
- base_url:
- git_url: https://github.com/SUSE/DeepSea.git
- git_rev: master
-
- services:
- running:
- - salt-minion
- dead:
- - apparmor
-
- config:
- global: /srv/pillar/ceph/stack/global.yml
- dev_env: True
-
- packages:
- # Should this formula manage package dependencies? True means yes; False NO.
- # Ideally `DeepSea` (or `packages-formula`) should handle package dependencies.
- managed: False
- required:
- - python-setuptools
- - python3-boto
- - python3-rados
+ dir: /usr/local
+ version: '0.9.22'
+ pkg:
+ name: deepsea
+ deps:
- lsscsi
- jq
- pciutils
- salt-api
- - git
- - make
+ - tar
+ - gzip
+ use_upstream_repo: False
+ use_upstream_source: True
+ repo:
+ comments:
+ - installed by salt
+ source:
+ name: /tmp/deepsea
+ uri: 'https://github.com/SUSE/DeepSea/archive/'
+ source: None
+ source_hash: 88faf687a56060bf08da6ec3cf26917351e843efc4de0489139391d7e6985733 #linux amd64 tarball
+ trim_output: True {# works in 2018.3.2. onwards #}
+ archive_suffix: tar.gz
+ archive_format: tar
+ enforce_toplevel: False
+ options: '--strip-components=1'
+
+ kernel: ''
+ arch: ''
+ rootgroup: root
+ environ_file: /etc/default/deepsea.sh
+ environ:
+ export DEV_ENV=False
+
+ service:
+ user: salt
+ group: salt
+ name: salt-minion
+ dead: []
+
+ linux:
+ #'Alternatives system' priority: zero disables (default)
+ altpriority: 0
diff --git a/deepsea/files/default/Makefile b/deepsea/files/default/Makefile
new file mode 100755
index 0000000..31cff9a
--- /dev/null
+++ b/deepsea/files/default/Makefile
@@ -0,0 +1,1005 @@
+# Override this to install docs somewhere else
+DOCDIR = /usr/share/doc/packages
+VERSION ?= $(shell (git describe --tags --long --match 'v*' 2>/dev/null || echo '0.0.0') | sed -e 's/^v//' -e 's/-/+/' -e 's/-/./')
+
+DEEPSEA_DEPS=salt-api
+PYTHON_DEPS=python3-setuptools python3-click python3-tox python3-configobj
+PYTHON=python3
+SET_PYTHON=true
+
+OS=$(shell source /etc/os-release 2>/dev/null ; echo $$ID)
+suse=
+ifneq (,$(findstring opensuse,$(OS)))
+suse=yes
+endif
+ifeq ($(OS), sles)
+suse=yes
+endif
+ifeq ($(suse), yes)
+USER=salt
+GROUP=salt
+PKG_INSTALL=zypper -n install
+else
+USER=root
+GROUP=root
+ifeq ($(OS), centos)
+PKG_INSTALL=yum install -y
+PYTHON_DEPS=rh-python36-setuptools python36-click tox python36-configobj
+else
+ifeq ($(OS), fedora)
+PKG_INSTALL=yum install -y
+else
+debian := $(wildcard /etc/debian_version)
+ifneq ($(strip $(debian)),)
+PKG_INSTALL=apt-get install -y
+SET_PYTHON=rm /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
+PYTHON_DEPS=python3-setuptools python3-click tox python3-configobj
+endif
+endif
+endif
+endif
+
+
+usage:
+ @echo "Usage:"
+ @echo -e "\tmake install\tInstall DeepSea on this host"
+ @echo -e "\tmake rpm\tBuild an RPM for installation elsewhere"
+ @echo -e "\tmake test\tRun unittests"
+
+version:
+ @echo "version: "$(VERSION)
+
+setup.py:
+ sed "s/DEVVERSION/"$(VERSION)"/" setup.py.in > setup.py
+
+pyc: setup.py
+ #make sure to create bytecode with the correct version
+ find srv/ -name '*.py' -exec $(PYTHON) -m py_compile {} \;
+ find cli/ -name '*.py' -exec $(PYTHON) -m py_compile {} \;
+
+copy-files:
+ # salt-master config files
+ install -d -m 755 $(DESTDIR)/etc/salt/master.d
+ install -m 644 etc/salt/master.d/modules.conf $(DESTDIR)/etc/salt/master.d/
+ install -m 644 etc/salt/master.d/reactor.conf $(DESTDIR)/etc/salt/master.d/
+ install -m 644 etc/salt/master.d/output.conf $(DESTDIR)/etc/salt/master.d/
+ install -m 600 etc/salt/master.d/eauth.conf $(DESTDIR)/etc/salt/master.d/
+ install -m 644 etc/salt/master.d/salt-api.conf $(DESTDIR)/etc/salt/master.d/
+ install -m 600 srv/salt/ceph/salt-api/files/sharedsecret.conf.j2 $(DESTDIR)/etc/salt/master.d/sharedsecret.conf
+ # tests
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/keyrings
+ install -m 644 srv/salt/ceph/tests/keyrings/*.sls $(DESTDIR)/srv/salt/ceph/tests/keyrings
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/openstack
+ install -m 644 srv/salt/ceph/tests/openstack/*.sls $(DESTDIR)/srv/salt/ceph/tests/openstack
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/orchestrator
+ install -m 644 srv/salt/ceph/tests/orchestrator/*.sls $(DESTDIR)/srv/salt/ceph/tests/orchestrator
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/os_switch
+ install -m 644 srv/salt/ceph/tests/os_switch/*.sls $(DESTDIR)/srv/salt/ceph/tests/os_switch
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/quiescent
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/quiescent/timeout
+ install -m 644 srv/salt/ceph/tests/quiescent/*.sls $(DESTDIR)/srv/salt/ceph/tests/quiescent
+ install -m 644 srv/salt/ceph/tests/quiescent/timeout/*.sls $(DESTDIR)/srv/salt/ceph/tests/quiescent/timeout
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/migrate
+ install -m 644 srv/salt/ceph/tests/migrate/*.sls $(DESTDIR)/srv/salt/ceph/tests/migrate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/remove
+ install -m 644 srv/salt/ceph/tests/remove/*.sls $(DESTDIR)/srv/salt/ceph/tests/remove
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/replace
+ install -m 644 srv/salt/ceph/tests/replace/*.sls $(DESTDIR)/srv/salt/ceph/tests/replace
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mon/change
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mon/forced
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mon/nochange
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mds/change
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mds/forced
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mds/nochange
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/change
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/forced
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/nochange
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/change
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/forced
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/nochange
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/tuned
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/tuned/off
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tests/symlink
+ install -m 644 srv/salt/ceph/tests/restart/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart
+ install -m 644 srv/salt/ceph/tests/restart/mon/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mon
+ install -m 644 srv/salt/ceph/tests/restart/mon/change/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mon/change
+ install -m 644 srv/salt/ceph/tests/restart/mon/forced/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mon/forced
+ install -m 644 srv/salt/ceph/tests/restart/mon/nochange/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mon/nochange
+ install -m 644 srv/salt/ceph/tests/restart/mds/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mds
+ install -m 644 srv/salt/ceph/tests/restart/mds/change/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mds/change
+ install -m 644 srv/salt/ceph/tests/restart/mds/forced/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mds/forced
+ install -m 644 srv/salt/ceph/tests/restart/mds/nochange/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mds/nochange
+ install -m 644 srv/salt/ceph/tests/restart/mgr/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mgr
+ install -m 644 srv/salt/ceph/tests/restart/mgr/change/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/change
+ install -m 644 srv/salt/ceph/tests/restart/mgr/forced/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/forced
+ install -m 644 srv/salt/ceph/tests/restart/mgr/nochange/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/mgr/nochange
+ install -m 644 srv/salt/ceph/tests/restart/rgw/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/rgw
+ install -m 644 srv/salt/ceph/tests/restart/rgw/change/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/change
+ install -m 644 srv/salt/ceph/tests/restart/rgw/forced/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/forced
+ install -m 644 srv/salt/ceph/tests/restart/rgw/nochange/*.sls $(DESTDIR)/srv/salt/ceph/tests/restart/rgw/nochange
+ install -m 644 srv/salt/ceph/tests/tuned/*.sls $(DESTDIR)/srv/salt/ceph/tests/tuned
+ install -m 644 srv/salt/ceph/tests/tuned/off/*.sls $(DESTDIR)/srv/salt/ceph/tests/tuned/off
+ install -m 644 srv/salt/ceph/tests/symlink/*.sls $(DESTDIR)/srv/salt/ceph/tests/symlink
+ # functests/1node
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node
+ install -m 644 srv/salt/ceph/functests/1node/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/apparmor
+ install -m 644 srv/salt/ceph/functests/1node/apparmor/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/apparmor
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/keyrings
+ install -m 644 srv/salt/ceph/functests/1node/keyrings/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/keyrings
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/macros
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/macros/os_switch
+ install -m 644 srv/salt/ceph/functests/1node/macros/os_switch/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/macros/os_switch
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/openstack
+ install -m 644 srv/salt/ceph/functests/1node/openstack/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/openstack
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/orchestrator
+ install -m 644 srv/salt/ceph/functests/1node/orchestrator/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/orchestrator
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/quiescent
+ install -m 644 srv/salt/ceph/functests/1node/quiescent/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/quiescent
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/filestore
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/filestore2
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore2
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore3
+ install -m 644 srv/salt/ceph/functests/1node/migrate/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate
+ install -m 644 srv/salt/ceph/functests/1node/migrate/filestore/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/filestore
+ install -m 644 srv/salt/ceph/functests/1node/migrate/filestore2/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/filestore2
+ install -m 644 srv/salt/ceph/functests/1node/migrate/bluestore/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore
+ install -m 644 srv/salt/ceph/functests/1node/migrate/bluestore2/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore2
+ install -m 644 srv/salt/ceph/functests/1node/migrate/bluestore3/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/migrate/bluestore3
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/rebuild
+ install -m 644 srv/salt/ceph/functests/1node/rebuild/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/rebuild
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/replace
+ install -m 644 srv/salt/ceph/functests/1node/replace/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/replace
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/remove
+ install -m 644 srv/salt/ceph/functests/1node/remove/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/remove
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/restart
+ install -m 644 srv/salt/ceph/functests/1node/restart/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/terminate
+ install -m 644 srv/salt/ceph/functests/1node/terminate/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/terminate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/tuned/off
+ install -m 644 srv/salt/ceph/functests/1node/tuned/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/tuned
+ install -m 644 srv/salt/ceph/functests/1node/tuned/off/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/tuned/off
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/functests/1node/symlink
+ install -m 644 srv/salt/ceph/functests/1node/symlink/*.sls $(DESTDIR)/srv/salt/ceph/functests/1node/symlink
+ # docs
+ install -d -m 755 $(DESTDIR)$(DOCDIR)/deepsea
+ install -m 644 LICENSE $(DESTDIR)$(DOCDIR)/deepsea/
+ install -m 644 README.md $(DESTDIR)$(DOCDIR)/deepsea/
+ # examples
+ install -d -m 755 $(DESTDIR)$(DOCDIR)/deepsea/examples
+ install -m 644 doc/examples/* $(DESTDIR)$(DOCDIR)/deepsea/examples/
+ # pillar
+ install -d -m 755 $(DESTDIR)$(DOCDIR)/deepsea/pillar
+ install -m 644 doc/pillar/* $(DESTDIR)$(DOCDIR)/deepsea/pillar/
+ # stacky.py (included in salt 2016.3)
+ install -d -m 755 $(DESTDIR)/srv/modules/pillar
+ install -m 644 srv/modules/pillar/stack.py $(DESTDIR)/srv/modules/pillar/
+ # modules
+ install -d -m 755 $(DESTDIR)/srv/modules/modules
+ install -m 644 srv/modules/modules/*.py* $(DESTDIR)/srv/modules/modules/
+ # runners
+ install -d -m 755 $(DESTDIR)/srv/modules/runners
+ install -m 644 srv/modules/runners/*.py* $(DESTDIR)/srv/modules/runners/
+ sed -i "s/DEVVERSION/"$(VERSION)"/" $(DESTDIR)/srv/modules/runners/deepsea.py
+ # utils
+ install -d -m 755 $(DESTDIR)/srv/modules/utils
+ install -m 644 srv/modules/utils/*.py* $(DESTDIR)/srv/modules/utils
+ # pillar
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph/benchmarks
+ install -m 644 srv/pillar/ceph/benchmarks/config.yml $(DESTDIR)/srv/pillar/ceph/benchmarks/config.yml
+ install -m 644 srv/pillar/ceph/benchmarks/benchmark.cfg $(DESTDIR)/srv/pillar/ceph/benchmarks/benchmark.cfg
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph/benchmarks/collections
+ install -m 644 srv/pillar/ceph/benchmarks/collections/*.yml $(DESTDIR)/srv/pillar/ceph/benchmarks/collections
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph/benchmarks/fio
+ install -m 644 srv/pillar/ceph/benchmarks/fio/*.yml $(DESTDIR)/srv/pillar/ceph/benchmarks/fio/
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph/benchmarks/templates
+ install -m 644 srv/pillar/ceph/benchmarks/templates/*.j2 $(DESTDIR)/srv/pillar/ceph/benchmarks/templates/
+ install -m 644 srv/pillar/ceph/README $(DESTDIR)/srv/pillar/ceph/
+ install -m 644 srv/pillar/ceph/init.sls $(DESTDIR)/srv/pillar/ceph/
+ install -m 644 srv/pillar/ceph/deepsea_minions.sls $(DESTDIR)/srv/pillar/ceph/
+ install -m 644 srv/pillar/ceph/blacklist.sls $(DESTDIR)/srv/pillar/ceph/
+ install -m 644 srv/pillar/ceph/disk_led.sls $(DESTDIR)/srv/pillar/ceph/
+ install -d -m 755 $(DESTDIR)/srv/pillar/ceph/stack
+ install -m 644 srv/pillar/ceph/stack/stack.cfg $(DESTDIR)/srv/pillar/ceph/stack/stack.cfg
+ install -m 644 srv/pillar/top.sls $(DESTDIR)/srv/pillar/
+ # man pages
+ install -d -m 755 $(DESTDIR)/usr/share/man/man7
+ install -m 644 man/deepsea*.7 $(DESTDIR)/usr/share/man/man7
+ install -d -m 755 $(DESTDIR)/usr/share/man/man5
+ install -m 644 man/deepsea*.5 $(DESTDIR)/usr/share/man/man5
+ install -d -m 755 $(DESTDIR)/usr/share/man/man1
+ install -m 644 man/deepsea*.1 $(DESTDIR)/usr/share/man/man1
+ # modules
+ install -d -m 755 $(DESTDIR)/srv/salt/_modules
+ install -m 644 srv/salt/_modules/*.py* $(DESTDIR)/srv/salt/_modules/
+ # state modules
+ install -d -m 755 $(DESTDIR)/srv/salt/_states
+ install -m 644 srv/salt/_states/*.py* $(DESTDIR)/srv/salt/_states/
+ # state files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/admin
+ install -m 644 srv/salt/ceph/admin/*.sls $(DESTDIR)/srv/salt/ceph/admin/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/admin/key
+ install -m 644 srv/salt/ceph/admin/key/*.sls $(DESTDIR)/srv/salt/ceph/admin/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/admin/files
+ install -m 644 srv/salt/ceph/admin/files/*.j2 $(DESTDIR)/srv/salt/ceph/admin/files/
+ # state files apparmor
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/apparmor
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/apparmor/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/apparmor/files/ceph.d
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/apparmor/install
+ install -m 644 srv/salt/ceph/apparmor/*.sls $(DESTDIR)/srv/salt/ceph/apparmor/
+ install -m 644 srv/salt/ceph/apparmor/files/usr* $(DESTDIR)/srv/salt/ceph/apparmor/files/
+ install -m 644 srv/salt/ceph/apparmor/files/ceph.d/* $(DESTDIR)/srv/salt/ceph/apparmor/files/ceph.d/
+ install -m 644 srv/salt/ceph/apparmor/install/*.sls $(DESTDIR)/srv/salt/ceph/apparmor/install/
+ # state files benchmarks
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/benchmarks
+ install -m 644 srv/salt/ceph/benchmarks/*.sls $(DESTDIR)/srv/salt/ceph/benchmarks/
+ # state files cephfs
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/cephfs
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/cephfs/benchmarks
+ install -m 644 srv/salt/ceph/cephfs/benchmarks/*.sls $(DESTDIR)/srv/salt/ceph/cephfs/benchmarks/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/cephfs/benchmarks/files
+ install -m 644 srv/salt/ceph/cephfs/benchmarks/files/keyring.j2 $(DESTDIR)/srv/salt/ceph/cephfs/benchmarks/files/
+ # state files tools
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tools/fio
+ install -m 644 srv/salt/ceph/tools/fio/*.sls $(DESTDIR)/srv/salt/ceph/tools/fio
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tools/fio/files
+ install -m 644 srv/salt/ceph/tools/fio/files/fio.service $(DESTDIR)/srv/salt/ceph/tools/fio/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tools/benchmarks
+ install -m 644 srv/salt/ceph/tools/benchmarks/*.sls $(DESTDIR)/srv/salt/ceph/tools/benchmarks
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/configuration
+ install -m 644 srv/salt/ceph/configuration/*.sls $(DESTDIR)/srv/salt/ceph/configuration/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/configuration/check
+ install -m 644 srv/salt/ceph/configuration/check/*.sls $(DESTDIR)/srv/salt/ceph/configuration/check/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/configuration/create
+ install -m 644 srv/salt/ceph/configuration/create/*.sls $(DESTDIR)/srv/salt/ceph/configuration/create/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/configuration/files
+ install -m 644 srv/salt/ceph/configuration/files/*.j2 $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/rbd.conf $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/rgw.conf $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/rgw-ssl.conf $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/ceph.conf.import $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/drive_groups.yml $(DESTDIR)/srv/salt/ceph/configuration/files/
+ install -m 644 srv/salt/ceph/configuration/files/deprecated_map.yml $(DESTDIR)/srv/salt/ceph/configuration/files/
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.import || true
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.d
+ install -m 644 srv/salt/ceph/configuration/files/ceph.conf.d/README $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.d
+ # state files - ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha
+ install -m 644 srv/salt/ceph/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/auth
+ install -m 644 srv/salt/ceph/ganesha/auth/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/auth
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/files
+ install -m 644 srv/salt/ceph/ganesha/files/*.j2 $(DESTDIR)/srv/salt/ceph/ganesha/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/config
+ install -m 644 srv/salt/ceph/ganesha/config/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/config/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/configure
+ install -m 644 srv/salt/ceph/ganesha/configure/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/configure/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/key
+ install -m 644 srv/salt/ceph/ganesha/key/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/keyring
+ install -m 644 srv/salt/ceph/ganesha/keyring/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/install
+ install -m 644 srv/salt/ceph/ganesha/install/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/install/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/service
+ install -m 644 srv/salt/ceph/ganesha/service/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/service/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/restart
+ install -m 644 srv/salt/ceph/ganesha/restart/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/restart/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/restart/force
+ install -m 644 srv/salt/ceph/ganesha/restart/force/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ganesha/restart/controlled
+ install -m 644 srv/salt/ceph/ganesha/restart/controlled/*.sls $(DESTDIR)/srv/salt/ceph/ganesha/restart/controlled
+ # state files - igw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw
+ install -m 644 srv/salt/ceph/igw/*.sls $(DESTDIR)/srv/salt/ceph/igw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/files
+ install -m 644 srv/salt/ceph/igw/files/*.j2 $(DESTDIR)/srv/salt/ceph/igw/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/config
+ install -m 644 srv/salt/ceph/igw/config/*.sls $(DESTDIR)/srv/salt/ceph/igw/config/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/key
+ install -m 644 srv/salt/ceph/igw/key/*.sls $(DESTDIR)/srv/salt/ceph/igw/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/auth
+ install -m 644 srv/salt/ceph/igw/auth/*.sls $(DESTDIR)/srv/salt/ceph/igw/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/keyring
+ install -m 644 srv/salt/ceph/igw/keyring/*.sls $(DESTDIR)/srv/salt/ceph/igw/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/restart
+ install -m 644 srv/salt/ceph/igw/restart/*.sls $(DESTDIR)/srv/salt/ceph/igw/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/restart/force
+ install -m 644 srv/salt/ceph/igw/restart/force/*.sls $(DESTDIR)/srv/salt/ceph/igw/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/igw/restart/controlled
+ install -m 644 srv/salt/ceph/igw/restart/controlled/*.sls $(DESTDIR)/srv/salt/ceph/igw/restart/controlled
+ # state files - macros
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/macros
+ install -m 644 srv/salt/ceph/macros/*.sls $(DESTDIR)/srv/salt/ceph/macros/
+ # state files - dashboard
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/dashboard
+ install -m 644 srv/salt/ceph/dashboard/*.sls $(DESTDIR)/srv/salt/ceph/dashboard/
+ # state files - mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds
+ install -m 644 srv/salt/ceph/mds/*.sls $(DESTDIR)/srv/salt/ceph/mds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/key
+ install -m 644 srv/salt/ceph/mds/key/*.sls $(DESTDIR)/srv/salt/ceph/mds/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/auth
+ install -m 644 srv/salt/ceph/mds/auth/*.sls $(DESTDIR)/srv/salt/ceph/mds/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/keyring
+ install -m 644 srv/salt/ceph/mds/keyring/*.sls $(DESTDIR)/srv/salt/ceph/mds/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/pools
+ install -m 644 srv/salt/ceph/mds/pools/*.sls $(DESTDIR)/srv/salt/ceph/mds/pools/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/files
+ install -m 644 srv/salt/ceph/mds/files/*.j2 $(DESTDIR)/srv/salt/ceph/mds/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/restart
+ install -m 644 srv/salt/ceph/mds/restart/*.sls $(DESTDIR)/srv/salt/ceph/mds/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/restart/force
+ install -m 644 srv/salt/ceph/mds/restart/force/*.sls $(DESTDIR)/srv/salt/ceph/mds/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mds/restart/controlled
+ install -m 644 srv/salt/ceph/mds/restart/controlled/*.sls $(DESTDIR)/srv/salt/ceph/mds/restart/controlled
+ # state files - metapackage
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/metapackage
+ install -m 644 srv/salt/ceph/metapackage/*.sls $(DESTDIR)/srv/salt/ceph/metapackage/
+ # state files - mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr
+ install -m 644 srv/salt/ceph/mgr/*.sls $(DESTDIR)/srv/salt/ceph/mgr/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/key
+ install -m 644 srv/salt/ceph/mgr/key/*.sls $(DESTDIR)/srv/salt/ceph/mgr/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/dashboard
+ install -m 644 srv/salt/ceph/mgr/dashboard/*.sls $(DESTDIR)/srv/salt/ceph/mgr/dashboard/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/auth
+ install -m 644 srv/salt/ceph/mgr/auth/*.sls $(DESTDIR)/srv/salt/ceph/mgr/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/keyring
+ install -m 644 srv/salt/ceph/mgr/keyring/*.sls $(DESTDIR)/srv/salt/ceph/mgr/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/files
+ install -m 644 srv/salt/ceph/mgr/files/*.j2 $(DESTDIR)/srv/salt/ceph/mgr/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/orchestrator
+ install -m 644 srv/salt/ceph/mgr/orchestrator/*.sls $(DESTDIR)/srv/salt/ceph/mgr/orchestrator/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/restart
+ install -m 644 srv/salt/ceph/mgr/restart/*.sls $(DESTDIR)/srv/salt/ceph/mgr/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/restart/force
+ install -m 644 srv/salt/ceph/mgr/restart/force/default.sls $(DESTDIR)/srv/salt/ceph/mgr/restart/force
+ install -m 644 srv/salt/ceph/mgr/restart/force/init.sls $(DESTDIR)/srv/salt/ceph/mgr/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mgr/restart/controlled
+ install -m 644 srv/salt/ceph/mgr/restart/controlled/default.sls $(DESTDIR)/srv/salt/ceph/mgr/restart/controlled
+ install -m 644 srv/salt/ceph/mgr/restart/controlled/init.sls $(DESTDIR)/srv/salt/ceph/mgr/restart/controlled
+ # state files - salt-api
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt-api
+ install -m 644 srv/salt/ceph/salt-api/*.sls $(DESTDIR)/srv/salt/ceph/salt-api
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt-api/files
+ install -m 644 srv/salt/ceph/salt-api/files/*.conf* $(DESTDIR)/srv/salt/ceph/salt-api/files
+
+ # state files - migrate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/migrate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/migrate/osds
+ install -m 644 srv/salt/ceph/migrate/osds/*.sls $(DESTDIR)/srv/salt/ceph/migrate/osds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/migrate/nodes
+ install -m 644 srv/salt/ceph/migrate/nodes/*.sls $(DESTDIR)/srv/salt/ceph/migrate/nodes/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/migrate/policy
+ install -m 644 srv/salt/ceph/migrate/policy/*.sls $(DESTDIR)/srv/salt/ceph/migrate/policy/
+ # state files - mines
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mines
+ install -m 644 srv/salt/ceph/mines/*.sls $(DESTDIR)/srv/salt/ceph/mines/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mines/files
+ install -m 644 srv/salt/ceph/mines/files/* $(DESTDIR)/srv/salt/ceph/mines/files/
+ # state files - mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon
+ install -m 644 srv/salt/ceph/mon/*.sls $(DESTDIR)/srv/salt/ceph/mon/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon/key
+ install -m 644 srv/salt/ceph/mon/key/*.sls $(DESTDIR)/srv/salt/ceph/mon/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon/files
+ install -m 644 srv/salt/ceph/mon/files/*.j2 $(DESTDIR)/srv/salt/ceph/mon/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon/restart
+ install -m 644 srv/salt/ceph/mon/restart/*.sls $(DESTDIR)/srv/salt/ceph/mon/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon/restart/force
+ install -m 644 srv/salt/ceph/mon/restart/force/default.sls $(DESTDIR)/srv/salt/ceph/mon/restart/force
+ install -m 644 srv/salt/ceph/mon/restart/force/init.sls $(DESTDIR)/srv/salt/ceph/mon/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/mon/restart/controlled
+ install -m 644 srv/salt/ceph/mon/restart/controlled/default.sls $(DESTDIR)/srv/salt/ceph/mon/restart/controlled
+ install -m 644 srv/salt/ceph/mon/restart/controlled/init.sls $(DESTDIR)/srv/salt/ceph/mon/restart/controlled
+ # state files - monitoring
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/alertmanager
+ install -m 644 srv/salt/ceph/monitoring/alertmanager/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/alertmanager
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/alertmanager/files
+ install -m 644 srv/salt/ceph/monitoring/alertmanager/files/*.j2 $(DESTDIR)/srv/salt/ceph/monitoring/alertmanager/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/grafana
+ install -m 644 srv/salt/ceph/monitoring/grafana/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/grafana
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/grafana/files
+ install -m 644 srv/salt/ceph/monitoring/grafana/files/*.j2 $(DESTDIR)/srv/salt/ceph/monitoring/grafana/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus
+ install -m 644 srv/salt/ceph/monitoring/prometheus/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/files
+ install -m 644 srv/salt/ceph/monitoring/prometheus/files/*.j2 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/files
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/files/* $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/CentOS
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/CentOS/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/CentOS
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/SLES-15
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/SLES-15/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/SLES-15
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/cron
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/cron/*.sls $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/cron
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/files
+ install -m 644 srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/files/*.py $(DESTDIR)/srv/salt/ceph/monitoring/prometheus/exporters/ceph_rgw_exporter/files
+ # state files - noout
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/noout
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/noout/set
+ install -m 644 srv/salt/ceph/noout/set/*.sls $(DESTDIR)/srv/salt/ceph/noout/set
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/noout/unset
+ install -m 644 srv/salt/ceph/noout/unset/*.sls $(DESTDIR)/srv/salt/ceph/noout/unset
+ # state files - openstack
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack
+ install -m 644 srv/salt/ceph/openstack/*.sls $(DESTDIR)/srv/salt/ceph/openstack/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder
+ install -m 644 srv/salt/ceph/openstack/cinder/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder/auth
+ install -m 644 srv/salt/ceph/openstack/cinder/auth/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder/auth
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder/files
+ install -m 644 srv/salt/ceph/openstack/cinder/files/*.j2 $(DESTDIR)/srv/salt/ceph/openstack/cinder/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder/key
+ install -m 644 srv/salt/ceph/openstack/cinder/key/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder/key
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder/pool
+ install -m 644 srv/salt/ceph/openstack/cinder/pool/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder/pool
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup
+ install -m 644 srv/salt/ceph/openstack/cinder-backup/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/auth
+ install -m 644 srv/salt/ceph/openstack/cinder-backup/auth/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/auth
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/files
+ install -m 644 srv/salt/ceph/openstack/cinder-backup/files/*.j2 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/key
+ install -m 644 srv/salt/ceph/openstack/cinder-backup/key/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/key
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/pool
+ install -m 644 srv/salt/ceph/openstack/cinder-backup/pool/*.sls $(DESTDIR)/srv/salt/ceph/openstack/cinder-backup/pool
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/glance
+ install -m 644 srv/salt/ceph/openstack/glance/*.sls $(DESTDIR)/srv/salt/ceph/openstack/glance
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/glance/auth
+ install -m 644 srv/salt/ceph/openstack/glance/auth/*.sls $(DESTDIR)/srv/salt/ceph/openstack/glance/auth
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/glance/files
+ install -m 644 srv/salt/ceph/openstack/glance/files/*.j2 $(DESTDIR)/srv/salt/ceph/openstack/glance/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/glance/key
+ install -m 644 srv/salt/ceph/openstack/glance/key/*.sls $(DESTDIR)/srv/salt/ceph/openstack/glance/key
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/glance/pool
+ install -m 644 srv/salt/ceph/openstack/glance/pool/*.sls $(DESTDIR)/srv/salt/ceph/openstack/glance/pool
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/nova
+ install -m 644 srv/salt/ceph/openstack/nova/*.sls $(DESTDIR)/srv/salt/ceph/openstack/nova
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/openstack/nova/pool
+ install -m 644 srv/salt/ceph/openstack/nova/pool/*.sls $(DESTDIR)/srv/salt/ceph/openstack/nova/pool
+ # state files - osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd
+ install -m 644 srv/salt/ceph/osd/*.sls $(DESTDIR)/srv/salt/ceph/osd/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/key
+ install -m 644 srv/salt/ceph/osd/key/*.sls $(DESTDIR)/srv/salt/ceph/osd/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/auth
+ install -m 644 srv/salt/ceph/osd/auth/*.sls $(DESTDIR)/srv/salt/ceph/osd/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/keyring
+ install -m 644 srv/salt/ceph/osd/keyring/*.sls $(DESTDIR)/srv/salt/ceph/osd/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/scheduler
+ install -m 644 srv/salt/ceph/osd/scheduler/*.sls $(DESTDIR)/srv/salt/ceph/osd/scheduler/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/takeover
+ install -m 644 srv/salt/ceph/osd/takeover/*.sls $(DESTDIR)/srv/salt/ceph/osd/takeover/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/files
+ install -m 644 srv/salt/ceph/osd/files/*.j2 $(DESTDIR)/srv/salt/ceph/osd/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/restart
+ install -m 644 srv/salt/ceph/osd/restart/default.sls $(DESTDIR)/srv/salt/ceph/osd/restart
+ install -m 644 srv/salt/ceph/osd/restart/init.sls $(DESTDIR)/srv/salt/ceph/osd/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/restart/force
+ install -m 644 srv/salt/ceph/osd/restart/force/default.sls $(DESTDIR)/srv/salt/ceph/osd/restart/force
+ install -m 644 srv/salt/ceph/osd/restart/force/init.sls $(DESTDIR)/srv/salt/ceph/osd/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/restart/controlled
+ install -m 644 srv/salt/ceph/osd/restart/controlled/default.sls $(DESTDIR)/srv/salt/ceph/osd/restart/controlled
+ install -m 644 srv/salt/ceph/osd/restart/controlled/init.sls $(DESTDIR)/srv/salt/ceph/osd/restart/controlled
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/osd/restart/parallel
+ install -m 644 srv/salt/ceph/osd/restart/parallel/default.sls $(DESTDIR)/srv/salt/ceph/osd/restart/parallel
+ install -m 644 srv/salt/ceph/osd/restart/parallel/init.sls $(DESTDIR)/srv/salt/ceph/osd/restart/parallel
+ # state files - packages
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/packages
+ install -m 644 srv/salt/ceph/packages/*.sls $(DESTDIR)/srv/salt/ceph/packages/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/packages/common
+ install -m 644 srv/salt/ceph/packages/common/*.sls $(DESTDIR)/srv/salt/ceph/packages/common/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/packages/remove
+ install -m 644 srv/salt/ceph/packages/remove/*.sls $(DESTDIR)/srv/salt/ceph/packages/remove/
+ # state files - pool
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/pool
+ install -m 644 srv/salt/ceph/pool/*.sls $(DESTDIR)/srv/salt/ceph/pool/
+ # state files - purge
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/purge
+ install -m 644 srv/salt/ceph/purge/*.sls $(DESTDIR)/srv/salt/ceph/purge/
+ # state files - rbd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rbd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rbd/benchmarks
+ install -m 644 srv/salt/ceph/rbd/benchmarks/*.sls $(DESTDIR)/srv/salt/ceph/rbd/benchmarks/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rbd/benchmarks/files
+ install -m 644 srv/salt/ceph/rbd/benchmarks/files/keyring.j2 $(DESTDIR)/srv/salt/ceph/rbd/benchmarks/files/
+ # state files - benchmark-blockdev
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/benchmarks/blockdev/
+ install -m 644 srv/salt/ceph/benchmarks/blockdev/*.sls $(DESTDIR)/srv/salt/ceph/benchmarks/blockdev/
+ # state files - benchmark-fs
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/benchmarks/fs/
+ install -m 644 srv/salt/ceph/benchmarks/fs/*.sls $(DESTDIR)/srv/salt/ceph/benchmarks/fs/
+ # state files - reactor
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/reactor
+ install -m 644 srv/salt/ceph/reactor/*.sls $(DESTDIR)/srv/salt/ceph/reactor/
+ # state files - refresh
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/refresh
+ install -m 644 srv/salt/ceph/refresh/*.sls $(DESTDIR)/srv/salt/ceph/refresh/
+ # state files - redeploy
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/redeploy
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/redeploy/osds
+ install -m 644 srv/salt/ceph/redeploy/osds/*.sls $(DESTDIR)/srv/salt/ceph/redeploy/osds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/redeploy/nodes
+ install -m 644 srv/salt/ceph/redeploy/nodes/*.sls $(DESTDIR)/srv/salt/ceph/redeploy/nodes/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/redeploy/nodes
+ # state files - remove
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/igw/auth
+ install -m 644 srv/salt/ceph/remove/igw/auth/*.sls $(DESTDIR)/srv/salt/ceph/remove/igw/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/mds
+ install -m 644 srv/salt/ceph/remove/mds/*.sls $(DESTDIR)/srv/salt/ceph/remove/mds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/destroyed
+ install -m 644 srv/salt/ceph/remove/destroyed/*.sls $(DESTDIR)/srv/salt/ceph/remove/destroyed/
+ # Renamed for deprecation
+ ln -sf destroyed $(DESTDIR)/srv/salt/ceph/remove/migrated
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/mgr
+ install -m 644 srv/salt/ceph/remove/mgr/*.sls $(DESTDIR)/srv/salt/ceph/remove/mgr/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/mon
+ install -m 644 srv/salt/ceph/remove/mon/*.sls $(DESTDIR)/srv/salt/ceph/remove/mon/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/rgw
+ install -m 644 srv/salt/ceph/remove/rgw/*.sls $(DESTDIR)/srv/salt/ceph/remove/rgw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/ganesha
+ install -m 644 srv/salt/ceph/remove/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/remove/ganesha/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/storage
+ install -m 644 srv/salt/ceph/remove/storage/*.sls $(DESTDIR)/srv/salt/ceph/remove/storage/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/storage/drain
+ install -m 644 srv/salt/ceph/remove/storage/drain/*.sls $(DESTDIR)/srv/salt/ceph/remove/storage/drain
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/remove/openattic
+ install -m 644 srv/salt/ceph/remove/openattic/*.sls $(DESTDIR)/srv/salt/ceph/remove/openattic/
+ # state files - rescind
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind
+ install -m 644 srv/salt/ceph/rescind/*.sls $(DESTDIR)/srv/salt/ceph/rescind/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/alertmanager
+ install -m 644 srv/salt/ceph/rescind/alertmanager/*.sls $(DESTDIR)/srv/salt/ceph/rescind/alertmanager/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/admin
+ install -m 644 srv/salt/ceph/rescind/admin/*.sls $(DESTDIR)/srv/salt/ceph/rescind/admin/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/configuration
+ install -m 644 srv/salt/ceph/rescind/configuration/*.sls $(DESTDIR)/srv/salt/ceph/rescind/configuration/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/client-iscsi
+ install -m 644 srv/salt/ceph/rescind/client-iscsi/*.sls $(DESTDIR)/srv/salt/ceph/rescind/client-iscsi/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/ganesha
+ install -m 644 srv/salt/ceph/rescind/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/rescind/ganesha/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/igw
+ install -m 644 srv/salt/ceph/rescind/igw/*.sls $(DESTDIR)/srv/salt/ceph/rescind/igw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/igw/ceph-iscsi
+ install -m 644 srv/salt/ceph/rescind/igw/ceph-iscsi/*.sls $(DESTDIR)/srv/salt/ceph/rescind/igw/ceph-iscsi/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/igw/keyring
+ install -m 644 srv/salt/ceph/rescind/igw/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/igw/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/master
+ install -m 644 srv/salt/ceph/rescind/master/*.sls $(DESTDIR)/srv/salt/ceph/rescind/master/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/client-cephfs
+ install -m 644 srv/salt/ceph/rescind/client-cephfs/*.sls $(DESTDIR)/srv/salt/ceph/rescind/client-cephfs/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/client-nfs
+ install -m 644 srv/salt/ceph/rescind/client-nfs/*.sls $(DESTDIR)/srv/salt/ceph/rescind/client-nfs/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mds
+ install -m 644 srv/salt/ceph/rescind/mds/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mds/keyring
+ install -m 644 srv/salt/ceph/rescind/mds/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mds/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mgr
+ install -m 644 srv/salt/ceph/rescind/mgr/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mgr/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mgr/keyring
+ install -m 644 srv/salt/ceph/rescind/mgr/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mgr/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mgr/dashboard
+ install -m 644 srv/salt/ceph/rescind/mgr/dashboard/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mgr/dashboard/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/mon
+ install -m 644 srv/salt/ceph/rescind/mon/*.sls $(DESTDIR)/srv/salt/ceph/rescind/mon/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/admin
+ install -m 644 srv/salt/ceph/rescind/admin/*.sls $(DESTDIR)/srv/salt/ceph/rescind/admin/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/client-radosgw
+ install -m 644 srv/salt/ceph/rescind/client-radosgw/*.sls $(DESTDIR)/srv/salt/ceph/rescind/client-radosgw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/benchmark-rbd
+ install -m 644 srv/salt/ceph/rescind/benchmark-rbd/*.sls $(DESTDIR)/srv/salt/ceph/rescind/benchmark-rbd/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/benchmark-blockdev
+ install -m 644 srv/salt/ceph/rescind/benchmark-blockdev/*.sls $(DESTDIR)/srv/salt/ceph/rescind/benchmark-blockdev/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/benchmark-fs
+ install -m 644 srv/salt/ceph/rescind/benchmark-fs/*.sls $(DESTDIR)/srv/salt/ceph/rescind/benchmark-fs/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/rgw
+ install -m 644 srv/salt/ceph/rescind/rgw/*.sls $(DESTDIR)/srv/salt/ceph/rescind/rgw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/rgw/keyring
+ install -m 644 srv/salt/ceph/rescind/rgw/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/rgw/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/rgw/monitoring
+ install -m 644 srv/salt/ceph/rescind/rgw/monitoring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/rgw/monitoring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/storage
+ install -m 644 srv/salt/ceph/rescind/storage/*.sls $(DESTDIR)/srv/salt/ceph/rescind/storage/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/storage/keyring
+ install -m 644 srv/salt/ceph/rescind/storage/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/storage/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/storage/terminate
+ install -m 644 srv/salt/ceph/rescind/storage/terminate/*.sls $(DESTDIR)/srv/salt/ceph/rescind/storage/terminate/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/time
+ install -m 644 srv/salt/ceph/rescind/time/*.sls $(DESTDIR)/srv/salt/ceph/rescind/time/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/time/chrony
+ install -m 644 srv/salt/ceph/rescind/time/chrony/*.sls $(DESTDIR)/srv/salt/ceph/rescind/time/chrony
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/time/ntp
+ install -m 644 srv/salt/ceph/rescind/time/ntp/*.sls $(DESTDIR)/srv/salt/ceph/rescind/time/ntp
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/tuned
+ install -m 644 srv/salt/ceph/rescind/tuned/*.sls $(DESTDIR)/srv/salt/ceph/rescind/tuned/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/openattic
+ install -m 644 srv/salt/ceph/rescind/openattic/*.sls $(DESTDIR)/srv/salt/ceph/rescind/openattic/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/openattic/keyring
+ install -m 644 srv/salt/ceph/rescind/openattic/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rescind/openattic/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/grafana
+ install -m 644 srv/salt/ceph/rescind/grafana/*.sls $(DESTDIR)/srv/salt/ceph/rescind/grafana/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rescind/prometheus
+ install -m 644 srv/salt/ceph/rescind/prometheus/*.sls $(DESTDIR)/srv/salt/ceph/rescind/prometheus/
+ # state files - repo
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/repo
+ install -m 644 srv/salt/ceph/repo/*.sls $(DESTDIR)/srv/salt/ceph/repo/
+ # state files - restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart
+ install -m 644 srv/salt/ceph/restart/*.sls $(DESTDIR)/srv/salt/ceph/restart/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/force
+ install -m 644 srv/salt/ceph/restart/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/force/
+ # state files - restart - mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mon
+ install -m 644 srv/salt/ceph/restart/mon/*.sls $(DESTDIR)/srv/salt/ceph/restart/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mon/force
+ install -m 644 srv/salt/ceph/restart/mon/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/mon/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mon/lax
+ install -m 644 srv/salt/ceph/restart/mon/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/mon/lax
+ # state files - restart - mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mgr
+ install -m 644 srv/salt/ceph/restart/mgr/*.sls $(DESTDIR)/srv/salt/ceph/restart/mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mgr/force
+ install -m 644 srv/salt/ceph/restart/mgr/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/mgr/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mgr/lax
+ install -m 644 srv/salt/ceph/restart/mgr/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/mgr/lax
+ # state files - restart - osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/osd
+ install -m 644 srv/salt/ceph/restart/osd/*.sls $(DESTDIR)/srv/salt/ceph/restart/osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/osd/force
+ install -m 644 srv/salt/ceph/restart/osd/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/osd/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/osd/lax
+ install -m 644 srv/salt/ceph/restart/osd/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/osd/lax
+ # state files - restart - rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/rgw
+ install -m 644 srv/salt/ceph/restart/rgw/*.sls $(DESTDIR)/srv/salt/ceph/restart/rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/rgw/force
+ install -m 644 srv/salt/ceph/restart/rgw/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/rgw/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/rgw/lax
+ install -m 644 srv/salt/ceph/restart/rgw/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/rgw/lax
+ # state files - restart - mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mds
+ install -m 644 srv/salt/ceph/restart/mds/*.sls $(DESTDIR)/srv/salt/ceph/restart/mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/mds/force
+ install -m 644 srv/salt/ceph/restart/mds/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/mds/force
+ # state files - restart - ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/ganesha
+ install -m 644 srv/salt/ceph/restart/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/restart/ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/ganesha/force
+ install -m 644 srv/salt/ceph/restart/ganesha/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/ganesha/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/ganesha/lax
+ install -m 644 srv/salt/ceph/restart/ganesha/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/ganesha/lax
+ # state files - restart - igw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/igw
+ install -m 644 srv/salt/ceph/restart/igw/*.sls $(DESTDIR)/srv/salt/ceph/restart/igw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/igw/force
+ install -m 644 srv/salt/ceph/restart/igw/force/*.sls $(DESTDIR)/srv/salt/ceph/restart/igw/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/igw/lax
+ install -m 644 srv/salt/ceph/restart/igw/lax/*.sls $(DESTDIR)/srv/salt/ceph/restart/igw/lax
+ # state files - restart - grafana
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/grafana
+ install -m 644 srv/salt/ceph/restart/grafana/*.sls $(DESTDIR)/srv/salt/ceph/restart/grafana
+ # state files - restart - prometheus
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/restart/prometheus
+ install -m 644 srv/salt/ceph/restart/prometheus/*.sls $(DESTDIR)/srv/salt/ceph/restart/prometheus
+ # state files - reset
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/reset
+ install -m 644 srv/salt/ceph/reset/*.sls $(DESTDIR)/srv/salt/ceph/reset/
+ # state files - rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw
+ install -m 644 srv/salt/ceph/rgw/*.sls $(DESTDIR)/srv/salt/ceph/rgw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/key
+ install -m 644 srv/salt/ceph/rgw/key/*.sls $(DESTDIR)/srv/salt/ceph/rgw/key/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/auth
+ install -m 644 srv/salt/ceph/rgw/auth/*.sls $(DESTDIR)/srv/salt/ceph/rgw/auth/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/keyring
+ install -m 644 srv/salt/ceph/rgw/keyring/*.sls $(DESTDIR)/srv/salt/ceph/rgw/keyring/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/users
+ install -m 644 srv/salt/ceph/rgw/users/*.sls $(DESTDIR)/srv/salt/ceph/rgw/users/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/users/users.d
+ install -m 644 srv/salt/ceph/rgw/users/users.d/README $(DESTDIR)/srv/salt/ceph/rgw/users/users.d
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/files
+ install -m 644 srv/salt/ceph/rgw/files/*.j2 $(DESTDIR)/srv/salt/ceph/rgw/files/
+ install -m 644 srv/salt/ceph/rgw/files/*.yml $(DESTDIR)/srv/salt/ceph/rgw/files/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/restart
+ install -m 644 srv/salt/ceph/rgw/restart/default.sls $(DESTDIR)/srv/salt/ceph/rgw/restart
+ install -m 644 srv/salt/ceph/rgw/restart/init.sls $(DESTDIR)/srv/salt/ceph/rgw/restart
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/restart/force
+ install -m 644 srv/salt/ceph/rgw/restart/force/*.sls $(DESTDIR)/srv/salt/ceph/rgw/restart/force
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/restart/controlled
+ install -m 644 srv/salt/ceph/rgw/restart/controlled/*.sls $(DESTDIR)/srv/salt/ceph/rgw/restart/controlled
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/rgw/cert/
+ install -m 644 srv/salt/ceph/rgw/cert/*.sls $(DESTDIR)/srv/salt/ceph/rgw/cert/
+ # state files - shutdown
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/shutdown
+ install -m 644 srv/salt/ceph/shutdown/*.sls $(DESTDIR)/srv/salt/ceph/shutdown
+ # state files - ssl
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/ssl
+ install -m 644 srv/salt/ceph/ssl/*.sls $(DESTDIR)/srv/salt/ceph/ssl
+ # state files - startup
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/startup
+ install -m 644 srv/salt/ceph/startup/*.sls $(DESTDIR)/srv/salt/ceph/startup
+ # state files - sysctl
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/sysctl
+ install -m 644 srv/salt/ceph/sysctl/*.sls $(DESTDIR)/srv/salt/ceph/sysctl
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/sysctl/files
+ install -m 644 srv/salt/ceph/sysctl/files/*.conf $(DESTDIR)/srv/salt/ceph/sysctl/files
+ # state files - start
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/igw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/start/storage
+ install -m 644 srv/salt/ceph/start/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/start/ganesha
+ install -m 644 srv/salt/ceph/start/igw/*.sls $(DESTDIR)/srv/salt/ceph/start/igw
+ install -m 644 srv/salt/ceph/start/mds/*.sls $(DESTDIR)/srv/salt/ceph/start/mds
+ install -m 644 srv/salt/ceph/start/mgr/*.sls $(DESTDIR)/srv/salt/ceph/start/mgr
+ install -m 644 srv/salt/ceph/start/mon/*.sls $(DESTDIR)/srv/salt/ceph/start/mon
+ install -m 644 srv/salt/ceph/start/rgw/*.sls $(DESTDIR)/srv/salt/ceph/start/rgw
+ install -m 644 srv/salt/ceph/start/storage/*.sls $(DESTDIR)/srv/salt/ceph/start/storage
+ # state files - terminate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/igw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/terminate/storage
+ install -m 644 srv/salt/ceph/terminate/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/terminate/ganesha
+ install -m 644 srv/salt/ceph/terminate/igw/*.sls $(DESTDIR)/srv/salt/ceph/terminate/igw
+ install -m 644 srv/salt/ceph/terminate/mds/*.sls $(DESTDIR)/srv/salt/ceph/terminate/mds
+ install -m 644 srv/salt/ceph/terminate/mgr/*.sls $(DESTDIR)/srv/salt/ceph/terminate/mgr
+ install -m 644 srv/salt/ceph/terminate/mon/*.sls $(DESTDIR)/srv/salt/ceph/terminate/mon
+ install -m 644 srv/salt/ceph/terminate/rgw/*.sls $(DESTDIR)/srv/salt/ceph/terminate/rgw
+ install -m 644 srv/salt/ceph/terminate/storage/*.sls $(DESTDIR)/srv/salt/ceph/terminate/storage
+ # state files - tuned
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/mgr
+ install -m 644 srv/salt/ceph/tuned/osd/*.sls $(DESTDIR)/srv/salt/ceph/tuned/osd
+ install -m 644 srv/salt/ceph/tuned/mon/*.sls $(DESTDIR)/srv/salt/ceph/tuned/mon
+ install -m 644 srv/salt/ceph/tuned/mgr/*.sls $(DESTDIR)/srv/salt/ceph/tuned/mgr
+ # conf files - tuned
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-mgr
+ install -m 644 srv/salt/ceph/tuned/files/ceph-osd/*.conf $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-osd
+ install -m 644 srv/salt/ceph/tuned/files/ceph-mon/*.conf $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-mon
+ install -m 644 srv/salt/ceph/tuned/files/ceph-mgr/*.conf $(DESTDIR)/srv/salt/ceph/tuned/files/ceph-mgr
+ # state files - update
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/upgrade
+ install -m 644 srv/salt/ceph/upgrade/*.sls $(DESTDIR)/srv/salt/ceph/upgrade
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates
+ install -m 644 srv/salt/ceph/updates/*.sls $(DESTDIR)/srv/salt/ceph/updates/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates/restart
+ install -m 644 srv/salt/ceph/updates/restart/*.sls $(DESTDIR)/srv/salt/ceph/updates/restart/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates/regular
+ install -m 644 srv/salt/ceph/updates/regular/*.sls $(DESTDIR)/srv/salt/ceph/updates/regular/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates/kernel
+ install -m 644 srv/salt/ceph/updates/kernel/*.sls $(DESTDIR)/srv/salt/ceph/updates/kernel/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates/master
+ install -m 644 srv/salt/ceph/updates/master/*.sls $(DESTDIR)/srv/salt/ceph/updates/master/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/updates/salt
+ install -m 644 srv/salt/ceph/updates/salt/*.sls $(DESTDIR)/srv/salt/ceph/updates/salt/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/upgrade
+ install -m 644 srv/salt/ceph/maintenance/upgrade/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/upgrade
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/noout
+ install -m 644 srv/salt/ceph/maintenance/noout/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/noout
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/master
+ install -m 644 srv/salt/ceph/maintenance/upgrade/master/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/master
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/minion
+ install -m 644 srv/salt/ceph/maintenance/upgrade/minion/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/minion
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/report
+ install -m 644 srv/salt/ceph/maintenance/upgrade/report/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/report
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/cleanup
+ install -m 644 srv/salt/ceph/maintenance/upgrade/cleanup/*.sls $(DESTDIR)/srv/salt/ceph/maintenance/upgrade/cleanup
+ # state files - orchestrate stages
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/all
+ install -m 644 srv/salt/ceph/stage/all/*.sls $(DESTDIR)/srv/salt/ceph/stage/all/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/cephfs
+ install -m 644 srv/salt/ceph/stage/cephfs/*.sls $(DESTDIR)/srv/salt/ceph/stage/cephfs/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/cephfs/core
+ install -m 644 srv/salt/ceph/stage/cephfs/core/*.sls $(DESTDIR)/srv/salt/ceph/stage/cephfs/core
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/configure
+ install -m 644 srv/salt/ceph/stage/configure/*.sls $(DESTDIR)/srv/salt/ceph/stage/configure/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/deploy
+ install -m 644 srv/salt/ceph/stage/deploy/*.sls $(DESTDIR)/srv/salt/ceph/stage/deploy/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/deploy/core
+ install -m 644 srv/salt/ceph/stage/deploy/core/*.sls $(DESTDIR)/srv/salt/ceph/stage/deploy/core
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/discovery
+ install -m 644 srv/salt/ceph/stage/discovery/*.sls $(DESTDIR)/srv/salt/ceph/stage/discovery/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/ganesha
+ install -m 644 srv/salt/ceph/stage/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/stage/ganesha/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/ganesha/core
+ install -m 644 srv/salt/ceph/stage/ganesha/core/*.sls $(DESTDIR)/srv/salt/ceph/stage/ganesha/core
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/iscsi
+ install -m 644 srv/salt/ceph/stage/iscsi/*.sls $(DESTDIR)/srv/salt/ceph/stage/iscsi/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/iscsi/core
+ install -m 644 srv/salt/ceph/stage/iscsi/core/*.sls $(DESTDIR)/srv/salt/ceph/stage/iscsi/core
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/prep
+ install -m 644 srv/salt/ceph/stage/prep/*.sls $(DESTDIR)/srv/salt/ceph/stage/prep/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/prep/master
+ install -m 644 srv/salt/ceph/stage/prep/master/*.sls $(DESTDIR)/srv/salt/ceph/stage/prep/master/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/prep/minion
+ install -m 644 srv/salt/ceph/stage/prep/minion/*.sls $(DESTDIR)/srv/salt/ceph/stage/prep/minion/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/removal
+ install -m 644 srv/salt/ceph/stage/removal/*.sls $(DESTDIR)/srv/salt/ceph/stage/removal/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/radosgw
+ install -m 644 srv/salt/ceph/stage/radosgw/*.sls $(DESTDIR)/srv/salt/ceph/stage/radosgw/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/radosgw/core
+ install -m 644 srv/salt/ceph/stage/radosgw/core/*.sls $(DESTDIR)/srv/salt/ceph/stage/radosgw/core
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/services
+ install -m 644 srv/salt/ceph/stage/services/*.sls $(DESTDIR)/srv/salt/ceph/stage/services/
+ # state files - orchestrate shared
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/stage/validate
+ install -m 644 srv/salt/ceph/stage/validate/*.sls $(DESTDIR)/srv/salt/ceph/stage/validate/
+ # state files - sync
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/sync
+ install -m 644 srv/salt/ceph/sync/*.sls $(DESTDIR)/srv/salt/ceph/sync/
+ # state files - subvolume
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/subvolume
+ install -m 644 srv/salt/ceph/subvolume/*.sls $(DESTDIR)/srv/salt/ceph/subvolume/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/setosdflags
+ install -m 644 srv/salt/ceph/setosdflags/*.sls $(DESTDIR)/srv/salt/ceph/setosdflags
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/setosdflags/requireosdrelease
+ install -m 644 srv/salt/ceph/setosdflags/requireosdrelease/*.sls $(DESTDIR)/srv/salt/ceph/setosdflags/requireosdrelease
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/setosdflags/sortbitwise
+ install -m 644 srv/salt/ceph/setosdflags/sortbitwise/*.sls $(DESTDIR)/srv/salt/ceph/setosdflags/sortbitwise
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/time
+ install -m 644 srv/salt/ceph/time/default.sls $(DESTDIR)/srv/salt/ceph/time/
+ install -m 644 srv/salt/ceph/time/disabled.sls $(DESTDIR)/srv/salt/ceph/time/
+ install -m 644 srv/salt/ceph/time/init.sls $(DESTDIR)/srv/salt/ceph/time/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/time/chrony
+ install -m 644 srv/salt/ceph/time/chrony/*.sls $(DESTDIR)/srv/salt/ceph/time/chrony/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/time/chrony/files
+ install -m 644 srv/salt/ceph/time/chrony/files/*.j2 $(DESTDIR)/srv/salt/ceph/time/chrony/files
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/time/ntp
+ install -m 644 srv/salt/ceph/time/ntp/*.sls $(DESTDIR)/srv/salt/ceph/time/ntp/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/time/ntp/files
+ install -m 644 srv/salt/ceph/time/ntp/files/*.j2 $(DESTDIR)/srv/salt/ceph/time/ntp/files
+ # state files - wait
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait
+ install -m 644 srv/salt/ceph/wait/*.sls $(DESTDIR)/srv/salt/ceph/wait/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/mds
+ install -m 644 srv/salt/ceph/wait/mds/*.sls $(DESTDIR)/srv/salt/ceph/wait/mds/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/1hour/until/OK
+ install -m 644 srv/salt/ceph/wait/1hour/until/OK/*.sls $(DESTDIR)/srv/salt/ceph/wait/1hour/until/OK
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/2hours/until/OK
+ install -m 644 srv/salt/ceph/wait/2hours/until/OK/*.sls $(DESTDIR)/srv/salt/ceph/wait/2hours/until/OK
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/4hours/until/OK
+ install -m 644 srv/salt/ceph/wait/4hours/until/OK/*.sls $(DESTDIR)/srv/salt/ceph/wait/4hours/until/OK
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/until/OK
+ install -m 644 srv/salt/ceph/wait/until/OK/*.sls $(DESTDIR)/srv/salt/ceph/wait/until/OK
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/wait/until/expired/30sec
+ install -m 644 srv/salt/ceph/wait/until/expired/30sec/*.sls $(DESTDIR)/srv/salt/ceph/wait/until/expired/30sec
+ # state files - check processes
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes
+ install -m 644 srv/salt/ceph/processes/*.sls $(DESTDIR)/srv/salt/ceph/processes/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/admin
+ install -m 644 srv/salt/ceph/processes/admin/*.sls $(DESTDIR)/srv/salt/ceph/processes/admin
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/rgw
+ install -m 644 srv/salt/ceph/processes/rgw/*.sls $(DESTDIR)/srv/salt/ceph/processes/rgw
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/osd
+ install -m 644 srv/salt/ceph/processes/osd/*.sls $(DESTDIR)/srv/salt/ceph/processes/osd
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/mon
+ install -m 644 srv/salt/ceph/processes/mon/*.sls $(DESTDIR)/srv/salt/ceph/processes/mon
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/mgr
+ install -m 644 srv/salt/ceph/processes/mgr/*.sls $(DESTDIR)/srv/salt/ceph/processes/mgr
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/mds
+ install -m 644 srv/salt/ceph/processes/mds/*.sls $(DESTDIR)/srv/salt/ceph/processes/mds
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/ganesha
+ install -m 644 srv/salt/ceph/processes/ganesha/*.sls $(DESTDIR)/srv/salt/ceph/processes/ganesha
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/processes/igw
+ install -m 644 srv/salt/ceph/processes/igw/*.sls $(DESTDIR)/srv/salt/ceph/processes/igw
+ # state files - warning
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/warning
+ install -m 644 srv/salt/ceph/warning/*.sls $(DESTDIR)/srv/salt/ceph/warning/
+ # state files - warning/noout
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/warning/noout
+ install -m 644 srv/salt/ceph/warning/noout/*.sls $(DESTDIR)/srv/salt/ceph/warning/noout/
+ # state files - salt
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt
+ install -m 644 srv/salt/ceph/salt/*.sls $(DESTDIR)/srv/salt/ceph/salt/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt/crc
+ install -m 644 srv/salt/ceph/salt/crc/*.conf $(DESTDIR)/srv/salt/ceph/salt/crc/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt/crc/minion
+ install -m 644 srv/salt/ceph/salt/crc/minion/*.sls $(DESTDIR)/srv/salt/ceph/salt/crc/minion/
+ install -d -m 755 $(DESTDIR)/srv/salt/ceph/salt/crc/master
+ install -m 644 srv/salt/ceph/salt/crc/master/*.sls $(DESTDIR)/srv/salt/ceph/salt/crc/master/
+
+ # state files - orchestrate stage symlinks
+ ln -sf prep $(DESTDIR)/srv/salt/ceph/stage/0
+ ln -sf discovery $(DESTDIR)/srv/salt/ceph/stage/1
+ ln -sf configure $(DESTDIR)/srv/salt/ceph/stage/2
+ ln -sf deploy $(DESTDIR)/srv/salt/ceph/stage/3
+ ln -sf services $(DESTDIR)/srv/salt/ceph/stage/4
+ ln -sf removal $(DESTDIR)/srv/salt/ceph/stage/5
+
+ # cache directories
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/admin/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/ganesha/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/igw/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/mds/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/mgr/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/mon/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/openstack/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/osd/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/rgw/cache
+ install -d -m 700 $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.checksum
+ # At runtime, these need to be owned by $(USER):$(GROUP). This won't work
+ # in a buildroot on OBS, hence the leading '-' to ignore failures
+ # and '|| true' to suppress some error output, but will work fine
+ # in development when root runs `make install`.
+
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/admin/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/ganesha/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/igw/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/mds/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/mgr/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/mon/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/openstack/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/osd/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/rgw/cache || true
+ -chown $(USER):$(GROUP) $(DESTDIR)/srv/salt/ceph/configuration/files/ceph.conf.checksum || true
+
+install-deps:
+ # Using '|| true' to suppress failure (packages already installed, etc)
+ $(SET_PYTHON) 2>/dev/null || true
+ $(PKG_INSTALL) $(DEEPSEA_DEPS) || true
+ $(PKG_INSTALL) $(PYTHON_DEPS) || true
+
+install: pyc install-deps copy-files
+ sed -i '/^sharedsecret: /s!{{ shared_secret }}!'`cat /proc/sys/kernel/random/uuid`'!' $(DESTDIR)/etc/salt/master.d/sharedsecret.conf
+ chown $(USER):$(GROUP) $(DESTDIR)/etc/salt/master.d/*
+ echo "deepsea_minions: '*'" > $(DESTDIR)/srv/pillar/ceph/deepsea_minions.sls
+ chown -R $(USER) $(DESTDIR)/srv/pillar/ceph
+ # Use '|| true' to suppress some error output in corner cases
+ systemctl restart salt-master
+ systemctl restart salt-api
+ # deepsea-cli
+ $(PYTHON) setup.py install --root=$(DESTDIR)/
+
+rpm: tarball
+ sed '/^Version:/s/[^ ]*$$/'$(VERSION)'/' deepsea.spec.in > deepsea.spec
+ rpmbuild -bb deepsea.spec
+
+# Removing test dependency until resolved
+tarball:
+ $(eval TEMPDIR := $(shell mktemp -d))
+ mkdir $(TEMPDIR)/deepsea-$(VERSION)
+ git archive HEAD | tar -x -C $(TEMPDIR)/deepsea-$(VERSION)
+ sed "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/setup.py.in > $(TEMPDIR)/deepsea-$(VERSION)/setup.py
+ sed "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/deepsea.spec.in > $(TEMPDIR)/deepsea-$(VERSION)/deepsea.spec
+ sed -i "s/DEVVERSION/"$(VERSION)"/" $(TEMPDIR)/deepsea-$(VERSION)/srv/modules/runners/deepsea.py
+ mkdir -p ~/rpmbuild/SOURCES
+ cp $(TEMPDIR)/deepsea-$(VERSION)/setup.py .
+ tar -cjf ~/rpmbuild/SOURCES/deepsea-$(VERSION).tar.bz2 -C $(TEMPDIR) .
+ rm -r $(TEMPDIR)
+
+test: setup.py
+ tox -e py3
+
+lint: setup.py
+ tox -e lint
diff --git a/deepsea/files/default/environ.sh.jinja b/deepsea/files/default/environ.sh.jinja
new file mode 100644
index 0000000..f9e7fe7
--- /dev/null
+++ b/deepsea/files/default/environ.sh.jinja
@@ -0,0 +1,6 @@
+########################################################################
+# File managed by Salt at <{{ source }}>.
+# Your changes may be overwritten.
+########################################################################
+
+{{ config|yaml }}
diff --git a/deepsea/init.sls b/deepsea/init.sls
index 7063a0e..9517127 100644
--- a/deepsea/init.sls
+++ b/deepsea/init.sls
@@ -1,7 +1,11 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
include:
- - deepsea.install
- - deepsea.config
- - deepsea.service
+ - {{ '.source' if deepsea.pkg.use_upstream_source else '.package' }}
+ - .config
+ - .service
diff --git a/deepsea/install.sls b/deepsea/install.sls
deleted file mode 100644
index f34f293..0000000
--- a/deepsea/install.sls
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-# vim: ft=yaml
-
-{% from "deepsea/map.jinja" import deepsea with context -%}
-
-include:
- - deepsea.config
- - deepsea.service
- {% if deepsea.packages.managed %}
- - deepsea.packages
- {% endif %}
-
-deepsea-directories:
- file.directory:
- - names:
- - /etc/salt/master.d
- - {{ deepsea.tmpdir }}
- - force: True
- - mode: 0755
- - user: {{ deepsea.user }}
- - group: {{ deepsea.group }}
- - recurse:
- - user
- - group
- - mode
-
-deepsea-software:
- {% if deepsea.use_upstream_pkgrepo %}
- {# using upstream pkgrepo #}
- pkgrepo.managed:
- - name: deepsea-{{ deepsea.release }}
- - humanname: {{ deepsea.repo.name }}
- - baseurl: {{ deepsea.repo.base_url }}
- - key_url: {{ deepsea.repo.key_url }}
- - gpgcheck: 1
- - gpgautoimport: True
- - require:
- - file: deepsea-directories
- pkg.installed:
- - pkgs: {{ deepsea.packages.required }}
- - require:
- - pkgrepo: deepsea-software
- {% else %}
- {# using gitrepo not upstream pkgrepo #}
- pkgrepo.absent:
- - name: deepsea-{{ deepsea.release }}
- - require_in:
- - file: deepsea-software
- file.absent:
- - name: {{ deepsea.tmpdir }}/DeepSea
- - require_in:
- - git: deepsea-software
- git.latest:
- - name: {{ deepsea.repo.git_url }}
- - target: {{ deepsea.tmpdir }}/DeepSea
- - rev: {{ deepsea.repo.get('git_rev', 'master') }}
- - force_checkout: True
- - force_clone: True
- - force_fetch: True
- - force_reset: True
- - require_in:
- - cmd: deepsea-software
- cmd.run:
- - name: make install
- - cwd: {{ deepsea.tmpdir }}/DeepSea
- {% endif %}
- - require:
- - file: deepsea-directories
- - pkgrepo: deepsea-software
- - require_in:
- - file: deepsea-config-global
diff --git a/deepsea/jinja/macros.jinja b/deepsea/jinja/macros.jinja
new file mode 100644
index 0000000..aeeb852
--- /dev/null
+++ b/deepsea/jinja/macros.jinja
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# vim: ft=jinja
+#
+# Collection of common macros
+
+{%- macro format_kwargs(kwarg) -%}
+ {%- filter indent(4) %}
+ {%- for k, v in kwarg|dictsort() %}
+- {{ k }}: {{ v }}
+ {%- endfor %}
+ {%- endfilter %}
+{%- endmacro %}
diff --git a/deepsea/libtofs.jinja b/deepsea/libtofs.jinja
new file mode 100644
index 0000000..ab0d0f6
--- /dev/null
+++ b/deepsea/libtofs.jinja
@@ -0,0 +1,100 @@
+{%- macro files_switch(source_files,
+ lookup=None,
+ default_files_switch=['id', 'os_family'],
+ indent_width=6,
+ v1_path_prefix='') %}
+ {#-
+ Returns a valid value for the "source" parameter of a "file.managed"
+ state function. This makes easier the usage of the Template Override and
+ Files Switch (TOFS) pattern.
+
+ Params:
+ * source_files: ordered list of files to look for
+ * lookup: key under ':tofs:source_files' to override
+ list of source files
+ * default_files_switch: if there's no config (e.g. pillar)
+ ':tofs:files_switch' this is the ordered list of grains to
+ use as selector switch of the directories under
+ "/files"
+ * indent_witdh: indentation of the result value to conform to YAML
+ * v1_path_prefix: (deprecated) only used for injecting a path prefix into
+ the source, to support older TOFS configs
+
+ Example (based on a `tplroot` of `xxx`):
+
+ If we have a state:
+
+ Deploy configuration:
+ file.managed:
+ - name: /etc/yyy/zzz.conf
+ - source: {{ files_switch(['/etc/yyy/zzz.conf', '/etc/yyy/zzz.conf.jinja'],
+ lookup='Deploy configuration'
+ ) }}
+ - template: jinja
+
+ In a minion with id=theminion and os_family=RedHat, it's going to be
+ rendered as:
+
+ Deploy configuration:
+ file.managed:
+ - name: /etc/yyy/zzz.conf
+ - source:
+ - salt://xxx/files/theminion/etc/yyy/zzz.conf
+ - salt://xxx/files/theminion/etc/yyy/zzz.conf.jinja
+ - salt://xxx/files/RedHat/etc/yyy/zzz.conf
+ - salt://xxx/files/RedHat/etc/yyy/zzz.conf.jinja
+ - salt://xxx/files/default/etc/yyy/zzz.conf
+ - salt://xxx/files/default/etc/yyy/zzz.conf.jinja
+ - template: jinja
+ #}
+ {#- Get the `tplroot` from `tpldir` #}
+ {%- set tplroot = tpldir.split('/')[0] %}
+ {%- set path_prefix = salt['config.get'](tplroot ~ ':tofs:path_prefix', tplroot) %}
+ {%- set files_dir = salt['config.get'](tplroot ~ ':tofs:dirs:files', 'files') %}
+ {%- set files_switch_list = salt['config.get'](
+ tplroot ~ ':tofs:files_switch',
+ default_files_switch
+ ) %}
+ {#- Lookup source_files (v2), files (v1), or fallback to source_files parameter #}
+ {%- set src_files = salt['config.get'](
+ tplroot ~ ':tofs:source_files:' ~ lookup,
+ salt['config.get'](
+ tplroot ~ ':tofs:files:' ~ lookup,
+ source_files
+ )
+ ) %}
+ {#- Only add to [''] when supporting older TOFS implementations #}
+ {%- set path_prefix_exts = [''] %}
+ {%- if v1_path_prefix != '' %}
+ {%- do path_prefix_exts.append(v1_path_prefix) %}
+ {%- endif %}
+ {%- for path_prefix_ext in path_prefix_exts %}
+ {%- set path_prefix_inc_ext = path_prefix ~ path_prefix_ext %}
+ {#- For older TOFS implementation, use `files_switch` from the config #}
+ {#- Use the default, new method otherwise #}
+ {%- set fsl = salt['config.get'](
+ tplroot ~ path_prefix_ext|replace('/', ':') ~ ':files_switch',
+ files_switch_list
+ ) %}
+ {#- Append an empty value to evaluate as `default` in the loop below #}
+ {%- if '' not in fsl %}
+ {%- do fsl.append('') %}
+ {%- endif %}
+ {%- for fs in fsl %}
+ {%- for src_file in src_files %}
+ {%- if fs %}
+ {%- set fs_dir = salt['config.get'](fs, fs) %}
+ {%- else %}
+ {%- set fs_dir = salt['config.get'](tplroot ~ ':tofs:dirs:default', 'default') %}
+ {%- endif %}
+ {%- set url = '- salt://' ~ '/'.join([
+ path_prefix_inc_ext,
+ files_dir,
+ fs_dir,
+ src_file.lstrip('/')
+ ]) %}
+{{ url | indent(indent_width, true) }}
+ {%- endfor %}
+ {%- endfor %}
+ {%- endfor %}
+{%- endmacro %}
diff --git a/deepsea/map.jinja b/deepsea/map.jinja
index b3e14b0..5368ea4 100644
--- a/deepsea/map.jinja
+++ b/deepsea/map.jinja
@@ -1,25 +1,42 @@
# -*- coding: utf-8 -*-
# vim: ft=jinja
-{% import_yaml 'deepsea/defaults.yaml' as defaults %}
-{% import_yaml 'deepsea/osfamilymap.yaml' as osfamilymap %}
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{#- Start imports as #}
+{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
+{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
+{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
+{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
-{## Use grains['grain'] based logic to build config model ##}
+{#- Retrieve the config dict only once #}
+{#- set _config = salt['config.get'](tplroot, default={}) #}
+{%- set _config = {} %}
-{% set deepsea = salt['grains.filter_by'](
- defaults,
- merge=salt['grains.filter_by'](
- osfamilymap,
- grain='os_family',
- merge=salt['grains.filter_by'](
- {
- 'Power': { 'myarch': '_Power', },
- 'default': { 'repoarch': ''},
- },
- grain='osarch',
- merge=salt['pillar.get']('deepsea', {}),
- ),
- ),
- base='deepsea',
-) %}
+{%- set defaults = salt['grains.filter_by']( default_settings,
+ default=tplroot,
+ merge=salt['grains.filter_by']( osfamilymap, grain='os_family',
+ merge=salt['grains.filter_by']( osmap, grain='os',
+ merge=salt['grains.filter_by']( osfingermap, grain='osfinger',
+ merge=salt['grains.filter_by']( _config, default='lookup'
+ )
+ )
+ )
+ )
+ )
+ %}
+{#- Merge the deepsea pillar #}
+{%- set deepsea = salt['pillar.get']('deepsea', default=defaults, merge=True) %}
+
+{#- source jinja #}
+{%- if deepsea.pkg.use_upstream_source %}
+ {%- set name = 'v%s'|format(deepsea.version) %}
+ {%- set uri = deepsea.pkg.source.uri + '/' + name %}
+ {%- do deepsea.pkg.source.update({
+ 'name': deepsea.pkg.source.name + '/' + 'DeepSea-' + name,
+ 'source': uri + '.' + deepsea.pkg.source.archive_suffix,
+ 'archive_format': deepsea.pkg.source.archive_format
+ }) %}
+ {%- do deepsea.update({'base_dir': deepsea.pkg.source.name}) %}
+{%- endif %}
diff --git a/deepsea/osfamilymap.yaml b/deepsea/osfamilymap.yaml
index 6bde15e..d6ce7f0 100644
--- a/deepsea/osfamilymap.yaml
+++ b/deepsea/osfamilymap.yaml
@@ -1,45 +1,82 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
-
-Suse:
- use_upstream_pkgrepo: False
- use_upstream_gitrepo: True
- repo:
- name: 'Filesystem tools and FUSE-related packages (openSUSE_Leap_$releasever)'
- base_url: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_$releasever/$basearch'
- key_url: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_42.3/repodata/repomd.xml.key'
- user: salt
- group: salt
- services:
- running:
- - salt-minion
- dead:
- - apparmor
- - SuSEfirewall2
- packages:
- required:
- - gptfdisk
- - iperf
- - lsof
+#
+# Setup variables using grains['os_family'] based logic.
+# You just need to add the key:values for an `os_family` that differ
+# from `defaults.yaml`.
+# Only add an `os_family` which is/will be supported by the formula
+#
+# If you do not need to provide defaults via the `os_family` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osfamilymap: {}
+---
Debian:
- packages:
- required:
+ pkg:
+ deps:
+ - python3-boto3
+ - python3-rados
+ - tox
- gdisk
- iperf
RedHat:
- services:
- running:
- - ntpd
- - salt-minion
- packages:
- required:
- - python-click
- - python-tox
- - python-netaddr
+ service:
+ name: deepsea
+ enabled: False
+ pkg:
+ deps:
+ # python-boto3
- iperf3
- gdisk
- lshw
- hwinfo
+Suse:
+ pkg:
+ use_upstream_repo: True
+ deps:
+ - python3-tox
+ # python3-boto3
+ - python3-rados
+ - gptfdisk
+ - iperf
+ - lsof
+ repo:
+ name: 'Filesystem tools and FUSE-related packages (openSUSE_Leap_$releasever)'
+ humanname: 'Filesystem tools and FUSE-related packages'
+ baseurl: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_$releasever/$basearch'
+ gpgkey: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_42.3/repodata/repomd.xml.key'
+ gpgcheck: 1
+ gpgautoimport: True
+ service:
+ dead:
+ - apparmor
+ - SuSEfirewall2
+
+Gentoo: {}
+
+Arch:
+ pkg:
+ deps:
+ - python-tox
+ - python-boto3
+ - python3-rados
+
+Alpine: {}
+
+FreeBSD:
+ pkg:
+ deps:
+ - py36-boto3
+ - py36-tox
+
+NetBSD:
+ pkg:
+ deps:
+ - py36-boto3
+ - py36-tox
+
+OpenBSD: {}
+
+MacOS: {}
diff --git a/deepsea/osfingermap.yaml b/deepsea/osfingermap.yaml
new file mode 100644
index 0000000..6ef397e
--- /dev/null
+++ b/deepsea/osfingermap.yaml
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['osfinger'] based logic.
+# You just need to add the key:values for an `osfinger` that differ
+# from `defaults.yaml` + `os_family.yaml` + `osmap.yaml`.
+# Only add an `osfinger` which is/will be supported by the formula
+#
+# If you do not need to provide defaults via the `os_finger` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osfingermap: {}
+---
+# os: Debian
+Debian-9:
+ pkg:
+ deps:
+ - python-rados
+
+Debian-8:
+ pkg:
+ deps:
+ - python-rados
+
+# os: CentOS
+CentOS-7:
+ pkg:
+ deps:
+ - python36-netaddr
+
+CentOS-8:
+ pkg:
+ deps:
+ - python36-netaddr
diff --git a/deepsea/osmap.yaml b/deepsea/osmap.yaml
new file mode 100644
index 0000000..f8e3e23
--- /dev/null
+++ b/deepsea/osmap.yaml
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+#
+# Setup variables using grains['os'] based logic.
+# You just need to add the key:values for an `os` that differ
+# from `defaults.yaml` + `os_family.yaml`.
+# Only add an `os` which is/will be supported by the formula
+#
+# If you do not need to provide defaults via the `os` grain,
+# you will need to provide at least an empty dict in this file, e.g.
+# osmap: {}
+---
+# os_family: Debian
+Ubuntu: {}
+
+Raspbian: {}
+
+# os_family: RedHat
+Fedora:
+ pkg:
+ deps:
+ - python3-boto
+ - python3-netaddr
+ - python3-tox
+
+CentOS: {}
+
+# os_family: Suse
+openSUSE: {}
+
+# os_family: Gentoo
+Funtoo: {}
+
+# os_family: Arch
+Manjaro: {}
+
+# os_family: Solaris
+SmartOS: {}
diff --git a/deepsea/package/clean.sls b/deepsea/package/clean.sls
new file mode 100644
index 0000000..c6dd492
--- /dev/null
+++ b/deepsea/package/clean.sls
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- set sls_config_clean = tplroot ~ '.config.clean' %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+include:
+ - {{ sls_config_clean }}
+ {%- if deepsea.pkg.use_upstream_repo %}
+ - .repo.clean
+ {%- endif %}
+
+ {%- if deepsea.pkg.deps %}
+
+deepsea-package-install-deps-pkg-removed:
+ pkg.removed:
+ - names: {{ deepsea.pkg.deps }}
+
+ {%- endif %}
+
+deepsea-package-clean-pkg-removed:
+ pkg.removed:
+ - name: {{ deepsea.pkg.name }}
+ - require:
+ - sls: {{ sls_config_clean }}
diff --git a/deepsea/package/init.sls b/deepsea/package/init.sls
new file mode 100644
index 0000000..d3e5518
--- /dev/null
+++ b/deepsea/package/init.sls
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .install
diff --git a/deepsea/package/install.sls b/deepsea/package/install.sls
new file mode 100644
index 0000000..a93e8c9
--- /dev/null
+++ b/deepsea/package/install.sls
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+ {%- if deepsea.pkg.use_upstream_repo %}
+include:
+ - .repo
+ {%- endif %}
+
+ {%- if deepsea.pkg.deps %}
+
+deepsea-package-install-deps-pkg-installed:
+ pkg.installed:
+ - names: {{ deepsea.pkg.deps }}
+
+ {%- endif %}
+
+deepsea-package-install-pkg-installed:
+ pkg.installed:
+ - name: {{ deepsea.pkg.name }}
diff --git a/deepsea/package/repo/clean.sls b/deepsea/package/repo/clean.sls
new file mode 100644
index 0000000..0c6bbc5
--- /dev/null
+++ b/deepsea/package/repo/clean.sls
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+deepsea-package-repo-clean-pkgrepo-absent:
+ pkgrepo.absent:
+ - name: {{ deepsea.pkg.repo.name }}
diff --git a/deepsea/package/repo/init.sls b/deepsea/package/repo/init.sls
new file mode 100644
index 0000000..d3e5518
--- /dev/null
+++ b/deepsea/package/repo/init.sls
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .install
diff --git a/deepsea/package/repo/install.sls b/deepsea/package/repo/install.sls
new file mode 100644
index 0000000..b71c6f0
--- /dev/null
+++ b/deepsea/package/repo/install.sls
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+ {%- if deepsea.pkg.use_upstream_repo %}
+ {%- from tplroot ~ "/jinja/macros.jinja" import format_kwargs with context %}
+
+deepsea-package-repo-install-pkgrepo-managed:
+ pkgrepo.managed:
+ {{- format_kwargs(deepsea.pkg.repo) }}
+
+ {%- endif %}
diff --git a/deepsea/packages.sls b/deepsea/packages.sls
deleted file mode 100644
index 6f99e42..0000000
--- a/deepsea/packages.sls
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-# vim: ft=yaml
-
-{% from "deepsea/map.jinja" import deepsea with context -%}
-
- {% if deepsea.packages.managed %}
-
-deepsea-packages-common-dependencies:
- pkg.installed:
- - pkgs:
- - make
- {% for pkg in deepsea.packages.required %}
- - {{ pkg }}
- {% endfor %}
-
- {% endif %}
diff --git a/deepsea/remove.sls b/deepsea/remove.sls
deleted file mode 100644
index 0a30ac2..0000000
--- a/deepsea/remove.sls
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- coding: utf-8 -*-
-# vim: ft=yaml
-
-{% from "deepsea/map.jinja" import deepsea with context %}
-
-deepsea-cleanup:
- file.absent:
- name: {{ deepsea.tmpdir }}
- pkgrepo.absent:
- name: deepsea-{{ deepsea.release }}
- - gpgautoimport: True
- pkg.purged:
- - pkgs: {{ deepsea.packages.required }}
-
diff --git a/deepsea/service.sls b/deepsea/service.sls
deleted file mode 100644
index d089bb5..0000000
--- a/deepsea/service.sls
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- coding: utf-8 -*-
-# vim: ft=sls
-
-{% from "deepsea/map.jinja" import deepsea with context %}
-
- {% for svc in deepsea.services.running %}
-deepsea-{{ svc }}-running:
- service.running:
- - name: {{ svc }}
- - enable: True
- {% endfor %}
-
- {% for svc in deepsea.services.dead %}
-deepsea-{{ svc }}-notrunning:
- service.dead:
- - name: {{ svc }}
- - enable: False
- {% endfor %}
diff --git a/deepsea/service/clean.sls b/deepsea/service/clean.sls
new file mode 100644
index 0000000..8739149
--- /dev/null
+++ b/deepsea/service/clean.sls
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+deepsea-service-clean-service-dead:
+ test.succeed_with_changes
diff --git a/deepsea/service/dead.sls b/deepsea/service/dead.sls
new file mode 100644
index 0000000..e9ce301
--- /dev/null
+++ b/deepsea/service/dead.sls
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+ {%- if deepsea.service.dead %}
+
+deepsea-service-dead-service-dead:
+ service.dead:
+ - names: {{ deepsea.service.dead }}
+ - enable: False
+ - onlyif: systemctl list-unit-files | grep {{ deepsea.service.name }} >/dev/null 2>&1
+
+ {%- endif %}
diff --git a/deepsea/service/init.sls b/deepsea/service/init.sls
new file mode 100644
index 0000000..079be82
--- /dev/null
+++ b/deepsea/service/init.sls
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .dead
+ - .running
diff --git a/deepsea/service/running.sls b/deepsea/service/running.sls
new file mode 100644
index 0000000..a357706
--- /dev/null
+++ b/deepsea/service/running.sls
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+deepsea-service-running-service-unmasked:
+ service.unmasked:
+ - name: {{ deepsea.service.name }}
+ - onlyif: systemctl list-unit-files | grep {{ deepsea.service.name }} >/dev/null 2>&1
+
+deepsea-service-running-service-running:
+ service.running:
+ - name: {{ deepsea.service.name }}
+ - enable: True
+ - onlyif: systemctl list-unit-files | grep {{ deepsea.service.name }} >/dev/null 2>&1
diff --git a/deepsea/source/clean.sls b/deepsea/source/clean.sls
new file mode 100644
index 0000000..cb66f32
--- /dev/null
+++ b/deepsea/source/clean.sls
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+
+ {%- if deepsea.pkg.deps %}
+
+deepsea-package-source-clean-deps-pkg-absent:
+ pkg.absent:
+ - names: {{ deepsea.pkg.deps }}
+ - require_in:
+ - archive: deepsea-package-source-install-source-extracted
+
+ {%- endif %}
+
+deepsea-package-source-clean-file-absent:
+ file.absent:
+ - names:
+ - {{ deepsea.pkg.source.name }}
diff --git a/deepsea/source/init.sls b/deepsea/source/init.sls
new file mode 100644
index 0000000..051d698
--- /dev/null
+++ b/deepsea/source/init.sls
@@ -0,0 +1,5 @@
+#.-*- coding: utf-8 -*-
+# vim: ft=sls
+
+include:
+ - .install
diff --git a/deepsea/source/install.sls b/deepsea/source/install.sls
new file mode 100644
index 0000000..62aa653
--- /dev/null
+++ b/deepsea/source/install.sls
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+# vim: ft=sls
+
+{#- Get the `tplroot` from `tpldir` #}
+{%- set tplroot = tpldir.split('/')[0] %}
+{%- from tplroot ~ "/map.jinja" import deepsea with context %}
+{%- from tplroot ~ "/jinja/macros.jinja" import format_kwargs with context %}
+{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
+
+deepsea-package-source-install-file-directory:
+ file.directory:
+ - names:
+ - {{ deepsea.pkg.source.name }}
+ - /etc/salt/master.d
+ - user: root
+ - group: root
+ - mode: 755
+ - makedirs: True
+ - require_in:
+ - source: deepsea-package-source-install-source-extracted
+ - recurse:
+ - user
+ - group
+ - mode
+ {%- if deepsea.pkg.deps %}
+ pkg.installed:
+ - names: {{ deepsea.pkg.deps }}
+ - require_in:
+ - archive: deepsea-package-source-install-source-extracted
+ {%- endif %}
+
+deepsea-package-source-install-source-extracted:
+ archive.extracted:
+ {{- format_kwargs(deepsea.pkg.source) }}
+ - retry:
+ attempts: 3
+ until: True
+ interval: 60
+ splay: 10
+ - user: root
+ - group: root
+ - recurse:
+ - user
+ - group
+ file.managed:
+ - name: {{ deepsea.pkg.source.name }}/Makefile
+ - source: {{ files_switch(['Makefile'], lookup='deepsea-package-source-install-source-extracted') }}
+ pkg.installed:
+ - name: make
+
+deepsea-package-source-install-cmd-run-make-install:
+ file.replace:
+ - name: /usr/bin/salt-api
+ - pattern: '/usr/bin/python2'
+ - repl: '/usr/bin/python3'
+ - onlyif: test -x /usr/bin/salt-api
+ cmd.run:
+ - cwd: {{ deepsea.pkg.source.name }}
+ - names:
+ - make install
+ - unless:
+ - test -f /usr/local/bin/deepsea
+ - require:
+ - archive: deepsea-package-source-install-source-extracted
+ - pkg: deepsea-package-source-install-source-extracted
+ - file: deepsea-package-source-install-source-extracted
+ - file: deepsea-package-source-install-cmd-run-make-install
diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst
new file mode 100644
index 0000000..5da9ae8
--- /dev/null
+++ b/docs/CONTRIBUTING.rst
@@ -0,0 +1,158 @@
+.. _contributing:
+
+How to contribute
+=================
+
+This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one.
+What it already contains is information about *commit message formatting* and how that directly affects the numerous automated processes that are used for this repo.
+It also covers how to contribute to this *formula's documentation*.
+
+.. contents:: **Table of Contents**
+
+Overview
+--------
+
+Submitting a pull request is more than just code!
+To achieve a quality product, the *tests* and *documentation* need to be updated as well.
+An excellent pull request will include these in the changes, wherever relevant.
+
+Commit message formatting
+-------------------------
+
+Since every type of change requires making Git commits,
+we will start by covering the importance of ensuring that all of your commit
+messages are in the correct format.
+
+Automation of multiple processes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This formula uses `semantic-release `_ for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog.
+The entire process relies on the structure of commit messages to determine the version bump, which is then used for the rest of the automation.
+
+Full details are available in the upstream docs regarding the `Angular Commit Message Conventions `_.
+The key factor is that the first line of the commit message must follow this format:
+
+.. code-block::
+
+ type(scope): subject
+
+
+* E.g. ``docs(contributing): add commit message formatting instructions``.
+
+Besides the version bump, the changelog and release notes are formatted accordingly.
+So based on the example above:
+
+..
+
+ .. raw:: html
+
+ Documentation
+
+ * **contributing:** add commit message formatting instructions
+
+
+* The ``type`` translates into a ``Documentation`` sub-heading.
+* The ``(scope):`` will be shown in bold text without the brackets.
+* The ``subject`` follows the ``scope`` as standard text.
+
+Linting commit messages in Travis CI
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This formula uses `commitlint `_ for checking commit messages during CI testing.
+This ensures that they are in accordance with the ``semantic-release`` settings.
+
+For more details about the default settings, refer back to the ``commitlint`` `reference rules `_.
+
+Relationship between commit type and version bump
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This formula applies some customisations to the defaults, as outlined in the table below,
+based upon the `type `_ of the commit:
+
+.. list-table::
+ :name: commit-type-vs-version-bump
+ :header-rows: 1
+ :stub-columns: 0
+ :widths: 1,2,3,1,1
+
+ * - Type
+ - Heading
+ - Description
+ - Bump (default)
+ - Bump (custom)
+ * - ``build``
+ - Build System
+ - Changes related to the build system
+ - –
+ -
+ * - ``chore``
+ - –
+ - Changes to the build process or auxiliary tools and libraries such as
+ documentation generation
+ - –
+ -
+ * - ``ci``
+ - Continuous Integration
+ - Changes to the continuous integration configuration
+ - –
+ -
+ * - ``docs``
+ - Documentation
+ - Documentation only changes
+ - –
+ - 0.0.1
+ * - ``feat``
+ - Features
+ - A new feature
+ - 0.1.0
+ -
+ * - ``fix``
+ - Bug Fixes
+ - A bug fix
+ - 0.0.1
+ -
+ * - ``perf``
+ - Performance Improvements
+ - A code change that improves performance
+ - 0.0.1
+ -
+ * - ``refactor``
+ - Code Refactoring
+ - A code change that neither fixes a bug nor adds a feature
+ - –
+ - 0.0.1
+ * - ``revert``
+ - Reverts
+ - A commit used to revert a previous commit
+ - –
+ - 0.0.1
+ * - ``style``
+ - Styles
+ - Changes that do not affect the meaning of the code (white-space,
+ formatting, missing semi-colons, etc.)
+ - –
+ - 0.0.1
+ * - ``test``
+ - Tests
+ - Adding missing or correcting existing tests
+ - –
+ - 0.0.1
+
+Use ``BREAKING CHANGE`` to trigger a ``major`` version change
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Adding ``BREAKING CHANGE`` to the footer of the extended description of the commit message will **always** trigger a ``major`` version change, no matter which type has been used.
+This will be appended to the changelog and release notes as well.
+To preserve good formatting of these notes, the following format is prescribed:
+
+* ``BREAKING CHANGE: .``
+
+An example of that:
+
+.. code-block:: git
+
+ ...
+
+ BREAKING CHANGE: With the removal of all of the `.sls` files under
+ `template package`, this formula no longer supports the installation of
+ packages.
diff --git a/docs/README.rst b/docs/README.rst
new file mode 100644
index 0000000..cf31445
--- /dev/null
+++ b/docs/README.rst
@@ -0,0 +1,297 @@
+.. _readme:
+
+deepsea-formula
+===============
+
+|img_travis| |img_sr|
+
+.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/deepsea-formula.svg?branch=master
+ :alt: Travis CI Build Status
+ :scale: 100%
+ :target: https://travis-ci.com/saltstack-formulas/deepsea-formula
+.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
+ :alt: Semantic Release
+ :scale: 100%
+ :target: https://github.com/semantic-release/semantic-release
+
+Salt formula to deploy DeepSea (software defined storage) framework on GNU Linux.
+
+.. contents:: **Table of Contents**
+
+General notes
+-------------
+
+See the full `SaltStack Formulas installation and usage instructions
+`_.
+
+If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
+`_.
+
+If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
+which contains the currently released version. This formula is versioned according to `Semantic Versioning `_.
+
+See `Formula Versioning Section `_ for more details.
+
+Contributing to this repo
+-------------------------
+
+**Commit message formatting is significant!!**
+
+Please see :ref:`How to contribute ` for more details.
+
+Available states
+----------------
+
+.. contents::
+ :local:
+
+``deepsea``
+^^^^^^^^^^^
+
+*Meta-state (This is a state that includes other states)*.
+
+This installs the deepsea package,
+manages the deepsea configuration file and then
+starts the associated deepsea service.
+
+``deepsea.package``
+^^^^^^^^^^^^^^^^^^^
+
+This state will install the deepsea package only.
+
+``deepsea.package.repo``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will install the deepsea package repository.
+
+``deepsea.source``
+^^^^^^^^^^^^^^^^^^
+
+This state will install deepsea from source only.
+
+``deepsea.config``
+^^^^^^^^^^^^^^^^^^
+
+This state configures deepsea defaults and depends on ``deepsea.install``
+via include list.
+
+``deepsea.service``
+^^^^^^^^^^^^^^^^^^^
+
+This state will start the deepsea service and has a dependency on ``deepsea.config``
+via include list.
+
+``deepsea.clean``
+^^^^^^^^^^^^^^^^^
+
+*Meta-state (This is a state that includes other states)*.
+
+this state will undo everything performed in the ``deepsea`` meta-state in reverse order, i.e.
+stops the service,
+removes the configuration file and
+then uninstalls the package.
+
+``deepsea.service.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will stop the deepsea service and disable it at boot time.
+
+``deepsea.config.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the configuration of the deepsea service and has a
+dependency on ``deepsea.service.clean`` via include list.
+
+``deepsea.package.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the deepsea package and has a depency on
+
+``deepsea.package.repo.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the deepsea package repository.
+
+``deepsea.source.clean``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+This state will remove the deepsea package and has a depency on
+``deepsea.config.clean`` via include list.
+
+DeepSea Integration
+-------------------
+
+See official documentation at https://github.com/SUSE/DeepSea/blob/master/README.md
+
+For example on Ubuntu 18.04-
+
+.. code-block:: bash
+
+ root@ubuntu1804:~# salt-run state.orch ceph.stage.0
+
+ [WARNING ] All minions are ready
+ ubuntu1804.localdomain_master:
+ Name: crc_method master - Function: salt.state - Result: Changed Started: - 17:52:31.051226 Duration: 361.594 ms
+ Name: sync master - Function: salt.state - Result: Changed Started: - 17:52:31.412976 Duration: 1028.128 ms
+ Name: salt-api - Function: salt.state - Result: Changed Started: - 17:52:32.441213 Duration: 5332.9 ms
+ Name: repo master - Function: salt.state - Result: Clean Started: - 17:52:37.774260 Duration: 355.654 ms
+ Name: metapackage master - Function: salt.state - Result: Clean Started: - 17:52:38.130062 Duration: 416.05 ms
+ Name: prepare master - Function: salt.state - Result: Changed Started: - 17:52:38.546320 Duration: 298157.407 ms
+ Name: filequeue.remove - Function: salt.runner - Result: Changed Started: - 17:57:36.704571 Duration: 5699.659 ms
+ Name: filequeue.enqueue - Function: salt.runner - Result: Changed Started: - 17:57:42.404364 Duration: 227.791 ms
+ Name: minions.ready - Function: salt.runner - Result: Changed Started: - 17:57:42.632279 Duration: 429.608 ms
+ Name: crc_method minion - Function: salt.state - Result: Changed Started: - 17:57:43.062130 Duration: 1479.336 ms
+ Name: set apparmor - Function: salt.state - Result: Changed Started: - 17:57:44.541611 Duration: 9515.847 ms
+ Name: repo - Function: salt.state - Result: Clean Started: - 17:57:54.057601 Duration: 328.778 ms
+ Name: metapackage minions - Function: salt.state - Result: Clean Started: - 17:57:54.386546 Duration: 408.039 ms
+ Name: common packages - Function: salt.state - Result: Changed Started: - 17:57:54.794863 Duration: 100374.387 ms
+ Name: sync - Function: salt.state - Result: Changed Started: - 17:59:35.169364 Duration: 1385.293 ms
+ Name: mines - Function: salt.state - Result: Changed Started: - 17:59:36.554764 Duration: 382.213 ms
+ Name: updates - Function: salt.state - Result: Clean Started: - 17:59:36.937185 Duration: 26453.162 ms
+ Name: No Ceph cluster - Function: test.nop - Result: Clean Started: - 18:00:03.390498 Duration: 0.368 ms
+
+ Summary for ubuntu1804.localdomain_master
+ -------------
+ Succeeded: 18 (changed=12)
+ Failed: 0
+ -------------
+ Total states run: 18
+ Total run time: 452.336 s
+
+
+ root@ubuntu1804:~# salt-run state.orch ceph.stage.1
+
+ [WARNING ] All minions are ready
+ ubuntu1804.localdomain_master:
+ Name: minions.ready - Function: salt.runner - Result: Changed Started: - 18:08:30.748189 Duration: 380.759 ms
+ Name: refresh_pillar0 - Function: salt.state - Result: Changed Started: - 18:08:31.129184 Duration: 283.682 ms
+ Name: populate.proposals - Function: salt.runner - Result: Changed Started: - 18:08:31.413219 Duration: 2859.894 ms
+
+ Summary for ubuntu1804.localdomain_master
+ ------------
+ Succeeded: 3 (changed=3)
+ Failed: 0
+ ------------
+ Total states run: 3
+ Total run time: 3.524 s
+
+ root@ubuntu1804:~# curl -o /srv/pillar/ceph/proposals/policy.cfg https://raw.githubusercontent.com/SUSE/DeepSea/master/doc/examples/policy.cfg-rolebased
+ root@ubuntu1804:~# vi /srv/pillar/ceph/proposals/policy.cfg
+ root@ubuntu1804:~# vi /srv/pillar/ceph/proposals/config/stack/default/ceph/cluster.yml
+
+
+ root@ubuntu1804:~# salt-run state.orch ceph.stage.2
+
+ [WARNING ] role-ubuntu1804.localdomain/cluster/ubuntu1804.localdomain*.sls matched no files
+ [WARNING ] role-mon/cluster/mon*.sls matched no files
+ [WARNING ] role-mgr/cluster/mon*.sls matched no files
+ [WARNING ] role-mds/cluster/mds*.sls matched no files
+ [WARNING ] role-igw/cluster/igw*.sls matched no files
+ [WARNING ] role-rgw/cluster/rgw*.sls matched no files
+ [WARNING ] role-ganesha/cluster/ganesha*.sls matched no files
+ [WARNING ] role-storage/cluster/data*.sls matched no files
+ deepsea_minions : valid
+ yaml_syntax : valid
+ [WARNING ] role-ubuntu1804.localdomain/cluster/ubuntu1804.localdomain*.sls matched no files
+ [WARNING ] role-mon/cluster/mon*.sls matched no files
+ [WARNING ] role-mgr/cluster/mon*.sls matched no files
+ [WARNING ] role-mds/cluster/mds*.sls matched no files
+ [WARNING ] role-igw/cluster/igw*.sls matched no files
+ [WARNING ] role-rgw/cluster/rgw*.sls matched no files
+ [WARNING ] role-ganesha/cluster/ganesha*.sls matched no files
+ [WARNING ] role-storage/cluster/data*.sls matched no files
+ public network : 192.168.1.0/24
+ cluster network : 10.0.2.0/24
+ ubuntu1804.localdomain_master:
+ Name: push.proposal - Function: salt.runner - Result: Changed Started: - 18:16:31.747204 Duration: 251.938 ms
+ Name: refresh_pillar1 - Function: salt.state - Result: Changed Started: - 18:16:31.999265 Duration: 278.968 ms
+ Name: advise.networks - Function: salt.runner - Result: Changed Started: - 18:16:32.278340 Duration: 553.336 ms
+ Name: install ceph packages - Function: salt.state - Result: Clean Started: - 18:16:32.831855 Duration: 4164.183 ms
+ Name: admin key - Function: salt.state - Result: Changed Started: - 18:16:36.996254 Duration: 421.106 ms
+ Name: osd key - Function: salt.state - Result: Changed Started: - 18:16:37.417542 Duration: 434.585 ms
+ Name: mon key - Function: salt.state - Result: Changed Started: - 18:16:37.852339 Duration: 455.217 ms
+ ----------
+ ID: mgr key
+ Function: salt.state
+ Result: False
+ Comment: Run failed on minions: ubuntu1804.localdomain
+ Started: 18:16:38.307711
+ Duration: 465.578 ms
+ Changes:
+ ubuntu1804.localdomain:
+ Data failed to compile:
+ ----------
+ Rendering SLS 'base:ceph.mgr.key.default' failed: Jinja error: 'select.minions'
+ KeyError: 'select.minions'
+
+ ; line 5
+
+ ---
+ prevent empty rendering:
+ test.nop:
+ - name: skip
+
+ {% for host in salt.saltutil.runner('select.minions', cluster='ceph', roles='mgr', host=True) %} <======================
+ {% set client = "mgr." + host %}
+ {% set keyring_file = salt['keyring.file']('mgr', host) %}
+ {{ keyring_file}}:
+ file.managed:
+ - source:
+ [...]
+ ---
+
+ Summary for ubuntu1804.localdomain_master
+ ------------
+ Succeeded: 7 (changed=6)
+ Failed: 1
+ ------------
+ Total states run: 8
+ Total run time: 7.025 s
+
+
+
+Testing
+-------
+
+Linux testing is done with ``kitchen-salt``.
+
+Requirements
+^^^^^^^^^^^^
+
+* Ruby
+* Docker
+
+.. code-block:: bash
+
+ $ gem install bundler
+ $ bundle install
+ $ bin/kitchen test [platform]
+
+Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
+e.g. ``debian-9-2019-2-py3``.
+
+``bin/kitchen converge``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Creates the docker instance and runs the ``deepsea`` main state, ready for testing.
+
+``bin/kitchen verify``
+^^^^^^^^^^^^^^^^^^^^^^
+
+Runs the ``inspec`` tests on the actual instance.
+
+``bin/kitchen destroy``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Removes the docker instance.
+
+``bin/kitchen test``
+^^^^^^^^^^^^^^^^^^^^
+
+Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
+
+``bin/kitchen login``
+^^^^^^^^^^^^^^^^^^^^^
+
+Gives you SSH access to the instance for manual testing.
+
diff --git a/docs/TOFS_pattern.rst b/docs/TOFS_pattern.rst
new file mode 100644
index 0000000..13c01e9
--- /dev/null
+++ b/docs/TOFS_pattern.rst
@@ -0,0 +1,443 @@
+.. _tofs_pattern:
+
+TOFS: A pattern for using SaltStack
+===================================
+
+.. list-table::
+ :name: tofs-authors
+ :header-rows: 1
+ :stub-columns: 1
+ :widths: 2,2,3,2
+
+ * -
+ - Person
+ - Contact
+ - Date
+ * - Authored by
+ - Roberto Moreda
+ - moreda@allenta.com
+ - 29/12/2014
+ * - Modified by
+ - Daniel Dehennin
+ - daniel.dehennin@baby-gnu.org
+ - 07/02/2019
+ * - Modified by
+ - Imran Iqbal
+ - https://github.com/myii
+ - 23/02/2019
+
+All that follows is a proposal based on my experience with `SaltStack `_. The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.
+
+.. contents:: **Table of Contents**
+
+Usage of values in pillar vs templates in ``file_roots``
+--------------------------------------------------------
+
+Among other functions, the *master* (or *salt-master*) serves files to the *minions* (or *salt-minions*). The `file_roots `_ is the list of directories used in sequence to find a file when a minion requires it: the first match is served to the minion. Those files could be `state files `_ or configuration templates, among others.
+
+Using SaltStack is a simple and effective way to implement configuration management, but even in a `non-multitenant `_ scenario, it is not a good idea to generally access some data (e.g. the database password in our `Zabbix `_ server configuration file or the private key of our `Nginx `_ TLS certificate).
+
+To avoid this situation we can use the `pillar mechanism `_, which is designed to provide controlled access to data from the minions based on some selection rules. As pillar data could be easily integrated in the `Jinja `_ templates, it is a good mechanism to store values to be used in the final rendering of state files and templates.
+
+There are a variety of approaches on the usage of pillar and templates as seen in the `saltstack-formulas `_' repositories. `Some `_ `developments `_ stress the initial purpose of pillar data into a storage for most of the possible variables for a determined system configuration. This, in my opinion, is shifting too much load from the original template files approach. Adding up some `non-trivial Jinja `_ code as essential part of composing the state file definitely makes SaltStack state files (hence formulas) more difficult to read. The extreme of this approach is that we could end up with a new render mechanism, implemented in Jinja, storing everything needed in pillar data to compose configurations. Additionally, we are establishing a strong dependency with the Jinja renderer.
+
+In opposition to the *put the code in file_roots and the data in pillars* approach, there is the *pillar as a store for a set of key-values* approach. A full-blown configuration file abstracted in pillar and jinja is complicated to develop, understand and maintain. I think a better and simpler approach is to keep a configuration file templated using just a basic (non-extensive but extensible) set of pillar values.
+
+On the reusability of SaltStack state files
+-------------------------------------------
+
+There is a brilliant initiative of the SaltStack community called `salt-formulas `_. Their goal is to provide state files, pillar examples and configuration templates ready to be used for provisioning. I am a contributor for two small ones: `zabbix-formula `_ and `varnish-formula `_.
+
+The `design guidelines `_ for formulas are clear in many aspects and it is a recommended reading for anyone willing to write state files, even non-formulaic ones.
+
+In the next section, I am going to describe my proposal to extend further the reusability of formulas, suggesting some patterns of usage.
+
+The Template Override and Files Switch (TOFS) pattern
+-----------------------------------------------------
+
+I understand a formula as a **complete, independent set of SaltStack state and configuration template files sufficient to configure a system**. A system could be something as simple as an NTP server or some other much more complex service that requires many state and configuration template files.
+
+The customization of a formula should be done mainly by providing pillar data used later to render either the state or the configuration template files.
+
+Example: NTP before applying TOFS
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Let's work with the NTP example. A basic formula that follows the `design guidelines `_ has the following files and directories tree:
+
+.. code-block::
+
+ /srv/saltstack/salt-formulas/ntp-saltstack-formula/
+ ntp/
+ map.jinja
+ init.sls
+ conf.sls
+ files/
+ default/
+ etc/
+ ntp.conf.jinja
+
+In order to use it, let's assume a `masterless configuration `_ and this relevant section of ``/etc/salt/minion``:
+
+.. code-block:: yaml
+
+ pillar_roots:
+ base:
+ - /srv/saltstack/pillar
+ file_client: local
+ file_roots:
+ base:
+ - /srv/saltstack/salt
+ - /srv/saltstack/salt-formulas/ntp-saltstack-formula
+
+.. code-block:: jinja
+
+ {#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/map.jinja #}
+ {%- set ntp = salt['grains.filter_by']({
+ 'default': {
+ 'pkg': 'ntp',
+ 'service': 'ntp',
+ 'config': '/etc/ntp.conf',
+ },
+ }, merge=salt['pillar.get']('ntp:lookup')) %}
+
+In ``init.sls`` we have the minimal states required to have NTP configured. In many cases ``init.sls`` is almost equivalent to an ``apt-get install`` or a ``yum install`` of the package.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/init.sls
+ {%- from 'ntp/map.jinja' import ntp with context %}
+
+ Install NTP:
+ pkg.installed:
+ - name: {{ ntp.pkg }}
+
+ Enable and start NTP:
+ service.running:
+ - name: {{ ntp.service }}
+ - enabled: True
+ - require:
+ - pkg: Install NTP package
+
+In ``conf.sls`` we have the configuration states. In most cases, that is just managing configuration file templates and making them to be watched by the service.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+ include:
+ - ntp
+
+ {%- from 'ntp/map.jinja' import ntp with context %}
+
+ Configure NTP:
+ file.managed:
+ - name: {{ ntp.config }}
+ - template: jinja
+ - source: salt://ntp/files/default/etc/ntp.conf.jinja
+ - watch_in:
+ - service: Enable and start NTP service
+ - require:
+ - pkg: Install NTP package
+
+Under ``files/default``, there is a structure that mimics the one in the minion in order to avoid clashes and confusion on where to put the needed templates. There you can find a mostly standard template for the configuration file.
+
+.. code-block:: jinja
+
+ {#- /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/default/etc/ntp.conf.jinja #}
+ {#- Managed by saltstack #}
+ {#- Edit pillars or override this template in saltstack if you need customization #}
+ {%- set settings = salt['pillar.get']('ntp', {}) %}
+ {%- set default_servers = ['0.ubuntu.pool.ntp.org',
+ '1.ubuntu.pool.ntp.org',
+ '2.ubuntu.pool.ntp.org',
+ '3.ubuntu.pool.ntp.org'] %}
+
+ driftfile /var/lib/ntp/ntp.drift
+ statistics loopstats peerstats clockstats
+ filegen loopstats file loopstats type day enable
+ filegen peerstats file peerstats type day enable
+ filegen clockstats file clockstats type day enable
+
+ {%- for server in settings.get('servers', default_servers) %}
+ server {{ server }}
+ {%- endfor %}
+
+ restrict -4 default kod notrap nomodify nopeer noquery
+ restrict -6 default kod notrap nomodify nopeer noquery
+
+ restrict 127.0.0.1
+ restrict ::1
+
+With all this, it is easy to install and configure a simple NTP server by just running ``salt-call state.sls ntp.conf``: the package will be installed, the service will be running and the configuration should be correct for most of cases, even without pillar data.
+
+Alternatively, you can define a highstate in ``/srv/saltstack/salt/top.sls`` and run ``salt-call state.highstate``.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt/top.sls
+ base:
+ '*':
+ - ntp.conf
+
+**Customizing the formula just with pillar data**, we have the option to define the NTP servers.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/pillar/top.sls
+ base:
+ '*':
+ - ntp
+
+.. code-block:: sls
+
+ ## /srv/saltstack/pillar/ntp.sls
+ ntp:
+ servers:
+ - 0.ch.pool.ntp.org
+ - 1.ch.pool.ntp.org
+ - 2.ch.pool.ntp.org
+ - 3.ch.pool.ntp.org
+
+Template Override
+^^^^^^^^^^^^^^^^^
+
+If the customization based on pillar data is not enough, we can override the template by creating a new one in ``/srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja``
+
+.. code-block:: jinja
+
+ {#- /srv/saltstack/salt/ntp/files/default/etc/ntp.conf.jinja #}
+ {#- Managed by saltstack #}
+ {#- Edit pillars or override this template in saltstack if you need customization #}
+
+ {#- Some bizarre configurations here #}
+ {#- ... #}
+
+ {%- for server in settings.get('servers', default_servers) %}
+ server {{ server }}
+ {%- endfor %}
+
+This way we are locally **overriding the template files** offered by the formula in order to make a more complex adaptation. Of course, this could be applied as well to any of the files, including the state files.
+
+Files Switch
+^^^^^^^^^^^^
+
+To bring some order into the set of template files included in a formula, as we commented, we suggest having a similar structure to a normal final file system under ``files/default``.
+
+We can make different templates coexist for different minions, classified by any `grain `_ value, by simply creating new directories under ``files``. This mechanism is based on **using values of some grains as a switch for the directories under** ``files/``.
+
+If we decide that we want ``os_family`` as switch, then we could provide the formula template variants for both the ``RedHat`` and ``Debian`` families.
+
+.. code-block::
+
+ /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/
+ default/
+ etc/
+ ntp.conf.jinja
+ RedHat/
+ etc/
+ ntp.conf.jinja
+ Debian/
+ etc/
+ ntp.conf.jinja
+
+To make this work we need a ``conf.sls`` state file that takes a list of possible files as the configuration template.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+ include:
+ - ntp
+
+ {%- from 'ntp/map.jinja' import ntp with context %}
+
+ Configure NTP:
+ file.managed:
+ - name: {{ ntp.config }}
+ - template: jinja
+ - source:
+ - salt://ntp/files/{{ grains.get('os_family', 'default') }}/etc/ntp.conf.jinja
+ - salt://ntp/files/default/etc/ntp.conf.jinja
+ - watch_in:
+ - service: Enable and start NTP service
+ - require:
+ - pkg: Install NTP package
+
+If we want to cover the possibility of a special template for a minion identified by ``node01`` then we could have a specific template in ``/srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja``.
+
+.. code-block:: jinja
+
+ {#- /srv/saltstack/salt/ntp/files/node01/etc/ntp.conf.jinja #}
+ {#- Managed by saltstack #}
+ {#- Edit pillars or override this template in saltstack if you need customization #}
+
+ {#- Some crazy configurations here for node01 #}
+ {#- ... #}
+
+To make this work we could write a specially crafted ``conf.sls``.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+ include:
+ - ntp
+
+ {%- from 'ntp/map.jinja' import ntp with context %}
+
+ Configure NTP:
+ file.managed:
+ - name: {{ ntp.config }}
+ - template: jinja
+ - source:
+ - salt://ntp/files/{{ grains.get('id') }}/etc/ntp.conf.jinja
+ - salt://ntp/files/{{ grains.get('os_family') }}/etc/ntp.conf.jinja
+ - salt://ntp/files/default/etc/ntp.conf.jinja
+ - watch_in:
+ - service: Enable and start NTP service
+ - require:
+ - pkg: Install NTP package
+
+Using the ``files_switch`` macro
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+We can simplify the ``conf.sls`` with the new ``files_switch`` macro to use in the ``source`` parameter for the ``file.managed`` state.
+
+.. code-block:: sls
+
+ ## /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/conf.sls
+ include:
+ - ntp
+
+ {%- set tplroot = tpldir.split('/')[0] %}
+ {%- from 'ntp/map.jinja' import ntp with context %}
+ {%- from 'ntp/libtofs.jinja' import files_switch %}
+
+ Configure NTP:
+ file.managed:
+ - name: {{ ntp.config }}
+ - template: jinja
+ - source: {{ files_switch(['/etc/ntp.conf.jinja'],
+ lookup='Configure NTP'
+ )
+ }}
+ - watch_in:
+ - service: Enable and start NTP service
+ - require:
+ - pkg: Install NTP package
+
+
+* This uses ``config.get``, searching for ``ntp:tofs:source_files:Configure NTP`` to determine the list of template files to use.
+* If this does not yield any results, the default of ``['/etc/ntp.conf.jinja']`` will be used.
+
+In ``libtofs.jinja``, we define this new macro ``files_switch``.
+
+.. literalinclude:: ../template/libtofs.jinja
+ :caption: /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/libtofs.jinja
+ :language: jinja
+
+How to customise the ``source`` further
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The examples below are based on an ``Ubuntu`` minion called ``theminion`` being configured via. pillar.
+
+Using the default settings of the ``files_switch`` macro above,
+the ``source`` will be:
+
+.. code-block:: sls
+
+ - source:
+ - salt://ntp/files/theminion/etc/ntp.conf.jinja
+ - salt://ntp/files/Debian/etc/ntp.conf.jinja
+ - salt://ntp/files/default/etc/ntp.conf.jinja
+
+Customise ``files``
+~~~~~~~~~~~~~~~~~~~
+
+The ``files`` portion can be customised:
+
+.. code-block:: sls
+
+ ntp:
+ tofs:
+ dirs:
+ files: files_alt
+
+Resulting in:
+
+.. code-block:: sls
+
+ - source:
+ - salt://ntp/files_alt/theminion/etc/ntp.conf.jinja
+ - salt://ntp/files_alt/Debian/etc/ntp.conf.jinja
+ - salt://ntp/files_alt/default/etc/ntp.conf.jinja
+
+Customise the use of grains
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Grains can be customised and even arbitrary paths can be supplied:
+
+.. code-block:: sls
+
+ ntp:
+ tofs:
+ files_switch:
+ - any/path/can/be/used/here
+ - id
+ - os
+ - os_family
+
+Resulting in:
+
+.. code-block:: sls
+
+ - source:
+ - salt://ntp/files/any/path/can/be/used/here/etc/ntp.conf.jinja
+ - salt://ntp/files/theminion/etc/ntp.conf.jinja
+ - salt://ntp/files/Ubuntu/etc/ntp.conf.jinja
+ - salt://ntp/files/Debian/etc/ntp.conf.jinja
+ - salt://ntp/files/default/etc/ntp.conf.jinja
+
+Customise the ``default`` path
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``default`` portion of the path can be customised:
+
+.. code-block:: sls
+
+ ntp:
+ tofs:
+ dirs:
+ default: default_alt
+
+Resulting in:
+
+.. code-block:: sls
+
+ - source:
+ ...
+ - salt://ntp/files/default_alt/etc/ntp.conf.jinja
+
+Customise the list of ``source_files``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The list of ``source_files`` can be given:
+
+.. code-block:: sls
+
+ ntp:
+ tofs:
+ source_files:
+ Configure NTP:
+ - '/etc/ntp.conf.jinja'
+ - '/etc/ntp.conf_alt.jinja'
+
+Resulting in:
+
+.. code-block:: sls
+
+ - source:
+ - salt://ntp/files/theminion/etc/ntp.conf.jinja
+ - salt://ntp/files/theminion/etc/ntp.conf_alt.jinja
+ - salt://ntp/files/Debian/etc/ntp.conf.jinja
+ - salt://ntp/files/Debian/etc/ntp.conf_alt.jinja
+ - salt://ntp/files/default/etc/ntp.conf.jinja
+ - salt://ntp/files/default/etc/ntp.conf_alt.jinja
+
diff --git a/kitchen.yml b/kitchen.yml
new file mode 100644
index 0000000..25a2abc
--- /dev/null
+++ b/kitchen.yml
@@ -0,0 +1,150 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# For help on this file's format, see https://kitchen.ci/
+driver:
+ name: docker
+ use_sudo: false
+ privileged: true
+ run_command: /lib/systemd/systemd
+
+# Make sure the platforms listed below match up with
+# the `env.matrix` instances defined in `.travis.yml`
+platforms:
+ ## SALT `develop`
+ - name: debian-9-develop-py3
+ driver:
+ image: netmanagers/salt-develop-py3:debian-9
+ provision_command:
+ - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
+ - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
+ - name: ubuntu-1804-develop-py3
+ driver:
+ image: netmanagers/salt-develop-py3:ubuntu-18.04
+ provision_command:
+ - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
+ - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
+ - name: centos-7-develop-py3
+ driver:
+ image: netmanagers/salt-develop-py3:centos-7
+ provision_command:
+ - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
+ - yum install make -y
+ - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
+ - name: fedora-29-develop-py3
+ driver:
+ image: netmanagers/salt-develop-py3:fedora-29
+ provision_command:
+ - yum install make -y
+ - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
+ - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
+ - name: opensuse-leap-15-develop-py3
+ driver:
+ image: netmanagers/salt-develop-py3:opensuse-leap-15
+ provision_command:
+ - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
+ - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
+ - zypper -n in tar gzip
+ run_command: /usr/lib/systemd/systemd
+
+ ## SALT 2019.2
+ - name: debian-9-2019-2-py3
+ driver:
+ image: netmanagers/salt-2019.2-py3:debian-9
+ - name: ubuntu-1804-2019-2-py3
+ driver:
+ image: netmanagers/salt-2019.2-py3:ubuntu-18.04
+ - name: centos-7-2019-2-py3
+ driver:
+ image: netmanagers/salt-2019.2-py3:centos-7
+ - name: fedora-29-2019-2-py3
+ driver:
+ image: netmanagers/salt-2019.2-py3:fedora-29
+ - name: opensuse-leap-15-2019-2-py3
+ driver:
+ image: netmanagers/salt-2019.2-py3:opensuse-leap-15
+ provision_command:
+ - zypper -n in tar gzip
+ run_command: /usr/lib/systemd/systemd
+
+ ## SALT 2018.3
+ - name: debian-9-2018-3-py2
+ driver:
+ image: netmanagers/salt-2018.3-py2:debian-9
+ - name: ubuntu-1604-2018-3-py2
+ driver:
+ image: netmanagers/salt-2018.3-py2:ubuntu-16.04
+ - name: centos-7-2018-3-py2
+ driver:
+ image: netmanagers/salt-2018.3-py2:centos-7
+ - name: fedora-29-2018-3-py2
+ driver:
+ image: netmanagers/salt-2018.3-py2:fedora-29
+ # TODO: Use this when fixed instead of `opensuse-leap-42`
+ # Ref: https://github.com/netmanagers/salt-image-builder/issues/2
+ # - name: opensuse-leap-15-2018-3-py2
+ # driver:
+ # image: netmanagers/salt-2018.3-py2:opensuse-leap-15
+ # run_command: /usr/lib/systemd/systemd
+ - name: opensuse-leap-42-2018-3-py2
+ driver:
+ image: netmanagers/salt-2018.3-py2:opensuse-leap-42
+ provision_command:
+ - zypper -n in tar gzip
+ run_command: /usr/lib/systemd/systemd
+
+ ## SALT 2017.7
+ - name: debian-8-2017-7-py2
+ driver:
+ image: netmanagers/salt-2017.7-py2:debian-8
+ - name: ubuntu-1604-2017-7-py2
+ driver:
+ image: netmanagers/salt-2017.7-py2:ubuntu-16.04
+ # TODO: Modify the formula to work for non-`systemd` platforms
+ - name: centos-6-2017-7-py2
+ driver:
+ image: netmanagers/salt-2017.7-py2:centos-6
+ run_command: /sbin/init
+ - name: fedora-28-2017-7-py2
+ driver:
+ image: netmanagers/salt-2017.7-py2:fedora-28
+ - name: opensuse-leap-42-2017-7-py2
+ driver:
+ image: netmanagers/salt-2017.7-py2:opensuse-leap-42
+ provision_command:
+ - zypper -n in tar gzip
+ run_command: /usr/lib/systemd/systemd
+
+provisioner:
+ name: salt_solo
+ log_level: info
+ salt_install: none
+ require_chef: false
+ formula: deepsea
+ salt_copy_filter:
+ - .kitchen
+ - .git
+ state_top:
+ base:
+ '*':
+ - deepsea
+ pillars:
+ top.sls:
+ base:
+ '*':
+ - deepsea
+ pillars_from_files:
+ deepsea.sls: pillar.example
+
+verifier:
+ # https://www.inspec.io/
+ name: inspec
+ sudo: true
+ # cli, documentation, html, progress, json, json-min, json-rspec, junit
+ reporter:
+ - cli
+ inspec_tests:
+ - path: test/integration/default
+
+suites:
+ - name: default
diff --git a/pillar.example b/pillar.example
index 53b7c64..8ea3260 100644
--- a/pillar.example
+++ b/pillar.example
@@ -1,18 +1,49 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
deepsea:
- release: luminous
- # clone software from git (default)
- use_upstream_gitrepo: True
- use_upstream_pkgrepo: False
- dev_env: False
+ version: '0.9.22'
+ pkg:
+ use_upstream_source: True
+ archive:
+ uri: https://dl.deepsea.com/oss/release
- repo:
- git_url: https://git.example.com/repos/github/SUSE/DeepSea.git
- git_rev: experimental
-
+ # Pillar-based config
+ # See also https://deepsea.com/docs/installation/configuration/
+ environ:
+ - 'export PATH=${PATH}:/opt/deepsea-6.2.2.darwin-amd64'
config:
- global: /srv/pillar/ceph/stack/global.yml
- dev_env: False
+ default:
+ instance_name: ${HOSTNAME}
+ security:
+ admin_user: admin
+ auth.google:
+ client_secret: 0ldS3cretKey
+
+ tofs:
+ # The files_switch key serves as a selector for alternative
+ # directories under the formula files directory. See TOFS pattern
+ # doc for more info.
+ # Note: Any value not evaluated by `config.get` will be used literally.
+ # This can be used to set custom paths, as many levels deep as required.
+ files_switch:
+ - any/path/can/be/used/here
+ - id
+ - osfinger
+ - os
+ - os_family
+ # All aspects of path/file resolution are customisable using the options below.
+ # This is unnecessary in most cases; there are sensible defaults.
+ # path_prefix: deepsea_alt
+ # dirs:
+ # files: files_alt
+ # default: default_alt
+ # source_files:
+ # deepsea-config-file-file-managed:
+ # - 'example_alt.tmpl'
+ # - 'example_alt.tmpl.jinja'
+
+ linux:
+ #'Alternatives system' priority: zero disables (default)
+ altpriority: 1000
- packages:
- # Set True if https://github.com/saltstack-formulas/packages-formula is used/preferred
- formula: False
diff --git a/pre-commit_semantic-release.sh b/pre-commit_semantic-release.sh
new file mode 100755
index 0000000..9d34d74
--- /dev/null
+++ b/pre-commit_semantic-release.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+###############################################################################
+# (A) Update `FORMULA` with `${nextRelease.version}`
+###############################################################################
+sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
+
+
+###############################################################################
+# (B) Use `m2r` to convert automatically produced `.md` docs to `.rst`
+###############################################################################
+
+# Install `m2r`
+sudo -H pip install m2r
+
+# Copy and then convert the `.md` docs
+cp *.md docs/
+cd docs/
+m2r --overwrite *.md
+
+# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
+sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
+sed -i -e '1,4s/-/=/g' CHANGELOG.rst
+
+# Use for debugging output, when required
+# cat AUTHORS.rst
+# cat CHANGELOG.rst
+
+# Return back to the main directory
+cd ..
diff --git a/release-rules.js b/release-rules.js
new file mode 100644
index 0000000..c63c850
--- /dev/null
+++ b/release-rules.js
@@ -0,0 +1,18 @@
+// No release is triggered for the types commented out below.
+// Commits using these types will be incorporated into the next release.
+//
+// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
+module.exports = [
+ {breaking: true, release: 'major'},
+ // {type: 'build', release: 'patch'},
+ // {type: 'chore', release: 'patch'},
+ // {type: 'ci', release: 'patch'},
+ {type: 'docs', release: 'patch'},
+ {type: 'feat', release: 'minor'},
+ {type: 'fix', release: 'patch'},
+ {type: 'perf', release: 'patch'},
+ {type: 'refactor', release: 'patch'},
+ {type: 'revert', release: 'patch'},
+ {type: 'style', release: 'patch'},
+ {type: 'test', release: 'patch'},
+];
diff --git a/release.config.js b/release.config.js
new file mode 100644
index 0000000..afa0cb1
--- /dev/null
+++ b/release.config.js
@@ -0,0 +1,106 @@
+module.exports = {
+ branch: 'master',
+ plugins: [
+ ['@semantic-release/commit-analyzer', {
+ preset: 'angular',
+ releaseRules: './release-rules.js',
+ }],
+ '@semantic-release/release-notes-generator',
+ ['@semantic-release/changelog', {
+ changelogFile: 'CHANGELOG.md',
+ changelogTitle: '# Changelog',
+ }],
+ ['@semantic-release/exec', {
+ prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}',
+ }],
+ ['@semantic-release/git', {
+ assets: ['*.md', 'docs/*.rst', 'FORMULA'],
+ }],
+ '@semantic-release/github',
+ ],
+ generateNotes: {
+ preset: 'angular',
+ writerOpts: {
+ // Required due to upstream bug preventing all types being displayed.
+ // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317
+ // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410
+ transform: (commit, context) => {
+ const issues = []
+
+ commit.notes.forEach(note => {
+ note.title = `BREAKING CHANGES`
+ })
+
+ // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
+ if (commit.type === `feat`) {
+ commit.type = `Features`
+ } else if (commit.type === `fix`) {
+ commit.type = `Bug Fixes`
+ } else if (commit.type === `perf`) {
+ commit.type = `Performance Improvements`
+ } else if (commit.type === `revert`) {
+ commit.type = `Reverts`
+ } else if (commit.type === `docs`) {
+ commit.type = `Documentation`
+ } else if (commit.type === `style`) {
+ commit.type = `Styles`
+ } else if (commit.type === `refactor`) {
+ commit.type = `Code Refactoring`
+ } else if (commit.type === `test`) {
+ commit.type = `Tests`
+ } else if (commit.type === `build`) {
+ commit.type = `Build System`
+ // } else if (commit.type === `chore`) {
+ // commit.type = `Maintenance`
+ } else if (commit.type === `ci`) {
+ commit.type = `Continuous Integration`
+ } else {
+ return
+ }
+
+ if (commit.scope === `*`) {
+ commit.scope = ``
+ }
+
+ if (typeof commit.hash === `string`) {
+ commit.hash = commit.hash.substring(0, 7)
+ }
+
+ if (typeof commit.subject === `string`) {
+ let url = context.repository
+ ? `${context.host}/${context.owner}/${context.repository}`
+ : context.repoUrl
+ if (url) {
+ url = `${url}/issues/`
+ // Issue URLs.
+ commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
+ issues.push(issue)
+ return `[#${issue}](${url}${issue})`
+ })
+ }
+ if (context.host) {
+ // User URLs.
+ commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
+ if (username.includes('/')) {
+ return `@${username}`
+ }
+
+ return `[@${username}](${context.host}/${username})`
+ })
+ }
+ }
+
+ // remove references that already appear in the subject
+ commit.references = commit.references.filter(reference => {
+ if (issues.indexOf(reference.issue) === -1) {
+ return true
+ }
+
+ return false
+ })
+
+ return commit
+ },
+ },
+ },
+};
diff --git a/test/integration/default/README.md b/test/integration/default/README.md
new file mode 100644
index 0000000..8019607
--- /dev/null
+++ b/test/integration/default/README.md
@@ -0,0 +1,50 @@
+# Default InSpec Profile
+
+This shows the implementation of the Default InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
+
+## Verify a profile
+
+InSpec ships with built-in features to verify a profile structure.
+
+```bash
+$ inspec check default
+Summary
+-------
+Location: default
+Profile: profile
+Controls: 4
+Timestamp: 2019-06-24T23:09:01+00:00
+Valid: true
+
+Errors
+------
+
+Warnings
+--------
+```
+
+## Execute a profile
+
+To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
+
+```bash
+$ inspec exec default
+..
+
+Finished in 0.0025 seconds (files took 0.12449 seconds to load)
+8 examples, 0 failures
+```
+
+## Execute a specific control from a profile
+
+To run one control from the profile use `inspec exec /path/to/profile --controls name`.
+
+```bash
+$ inspec exec default --controls package
+.
+
+Finished in 0.0025 seconds (files took 0.12449 seconds to load)
+1 examples, 0 failures
+```
+
+See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).
diff --git a/test/integration/default/controls/environ_spec.rb b/test/integration/default/controls/environ_spec.rb
new file mode 100644
index 0000000..6001ec6
--- /dev/null
+++ b/test/integration/default/controls/environ_spec.rb
@@ -0,0 +1,12 @@
+control 'deepsea configuration environment' do
+ title 'should match desired lines'
+
+ describe file('/etc/default/deepsea.sh') do
+ it { should be_file }
+ it { should be_owned_by 'root' }
+ it { should be_grouped_into 'root' }
+ its('mode') { should cmp '0640' }
+ its('content') { should include 'Your changes may be overwritten' }
+ #its('content') { should include 'export DEV_ENV=' }
+ end
+end
diff --git a/test/integration/default/controls/services_spec.rb b/test/integration/default/controls/services_spec.rb
new file mode 100644
index 0000000..7f45bc7
--- /dev/null
+++ b/test/integration/default/controls/services_spec.rb
@@ -0,0 +1,10 @@
+control 'salt-minion service' do
+ impact 0.5
+ title 'should be running and enabled'
+
+ describe service('salt-minion') do
+ it { should be_enabled }
+ it { should be_running }
+ end
+
+end
diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml
new file mode 100644
index 0000000..be653d0
--- /dev/null
+++ b/test/integration/default/inspec.yml
@@ -0,0 +1,12 @@
+name: deepsea
+title: deepsea Formula
+maintainer: Saltstack Formulas Community
+license: Apache-2.0
+summary: Verify that the deepsea formula is setup and configured correctly
+supports:
+ - platform-name: debian
+ - platform-name: ubuntu
+ - platform-name: centos
+ - platform-name: fedora
+ - platform-name: opensuse
+ - platform-name: freebsd