Merge pull request #508 from greendeath/feature/__docker_compose
Created __docker_compose type for cdist
This commit is contained in:
commit
d07f262eb6
6 changed files with 103 additions and 0 deletions
28
cdist/conf/type/__docker_compose/gencode-remote
Normal file
28
cdist/conf/type/__docker_compose/gencode-remote
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# 2016 Dominique Roux (dominique.roux at ungleich.ch)
|
||||||
|
#
|
||||||
|
# This file is part of cdist.
|
||||||
|
#
|
||||||
|
# cdist is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# cdist is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
version="$(cat "$__object/parameter/version")"
|
||||||
|
|
||||||
|
# Download docker-compose file
|
||||||
|
echo 'curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose'
|
||||||
|
|
||||||
|
# Change permissions
|
||||||
|
echo 'chmod +x /usr/local/bin/docker-compose'
|
49
cdist/conf/type/__docker_compose/man.rst
Normal file
49
cdist/conf/type/__docker_compose/man.rst
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
cdist-type__docker_compose(7)
|
||||||
|
=============================
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
cdist-type__docker_compose - install docker-compose
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
Installs docker-compose package.
|
||||||
|
|
||||||
|
|
||||||
|
REQUIRED PARAMETERS
|
||||||
|
-------------------
|
||||||
|
None.
|
||||||
|
|
||||||
|
|
||||||
|
OPTIONAL PARAMETERS
|
||||||
|
-------------------
|
||||||
|
version
|
||||||
|
Define docker_compose version, defaults to "1.9.0"
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN PARAMETERS
|
||||||
|
------------------
|
||||||
|
None.
|
||||||
|
|
||||||
|
|
||||||
|
EXAMPLES
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
__docker_compose
|
||||||
|
|
||||||
|
# Install version 1.9.0-rc4
|
||||||
|
__docker_compose --version 1.9.0-rc4
|
||||||
|
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Dominique Roux <dominique.roux--@--ungleich.ch>
|
||||||
|
|
||||||
|
|
||||||
|
COPYING
|
||||||
|
-------
|
||||||
|
Copyright \(C) 2016 Dominique Roux. Free use of this software is
|
||||||
|
granted under the terms of the GNU General Public License version 3 or later (GPLv3+).
|
24
cdist/conf/type/__docker_compose/manifest
Normal file
24
cdist/conf/type/__docker_compose/manifest
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# 2016 Dominique Roux (dominique.roux at ungleich.ch)
|
||||||
|
#
|
||||||
|
# This file is part of cdist.
|
||||||
|
#
|
||||||
|
# cdist is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# cdist is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# Needed packages
|
||||||
|
__docker
|
||||||
|
__package curl
|
|
@ -0,0 +1 @@
|
||||||
|
1.9.0
|
1
cdist/conf/type/__docker_compose/parameter/optional
Normal file
1
cdist/conf/type/__docker_compose/parameter/optional
Normal file
|
@ -0,0 +1 @@
|
||||||
|
version
|
0
cdist/conf/type/__docker_compose/singleton
Normal file
0
cdist/conf/type/__docker_compose/singleton
Normal file
Loading…
Reference in a new issue