Add new type __install_coreos
This commit is contained in:
parent
e6b6925908
commit
e7e8f1428a
7 changed files with 71 additions and 0 deletions
19
cdist/conf/type/__install_coreos/gencode-remote
Executable file
19
cdist/conf/type/__install_coreos/gencode-remote
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
device=$(cat "${__object:?}/parameter/device")
|
||||||
|
ignition=$(cat "${__object}/parameter/ignition")
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
ignition_file="\$(mktemp /tmp/cdist.XXXXXXXXXX)"
|
||||||
|
|
||||||
|
base64 -d > "\${ignition_file}" << eof
|
||||||
|
$(base64 "${ignition}")
|
||||||
|
eof
|
||||||
|
|
||||||
|
coreos-install -d "${device}" \
|
||||||
|
\$(if [ -s "\${ignition_file}" ]; then
|
||||||
|
printf -- "-i \${ignition_file}\n"
|
||||||
|
fi)
|
||||||
|
|
||||||
|
rm "\${ignition_file}"
|
||||||
|
EOF
|
0
cdist/conf/type/__install_coreos/install
Normal file
0
cdist/conf/type/__install_coreos/install
Normal file
50
cdist/conf/type/__install_coreos/man.rst
Normal file
50
cdist/conf/type/__install_coreos/man.rst
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
cdist-type__install_coreos(7)
|
||||||
|
=============================
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
|
||||||
|
cdist-type__install_coreos - Install CoreOS
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
This type installs CoreOS to a given device using coreos-install_, which is
|
||||||
|
present in CoreOS ISO by default.
|
||||||
|
|
||||||
|
.. _coreos-install: https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
|
||||||
|
|
||||||
|
REQUIRED PARAMETERS
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
device
|
||||||
|
A device CoreOS will be installed to.
|
||||||
|
|
||||||
|
OPTIONAL PARAMETERS
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
ignition
|
||||||
|
Path to ignition config.
|
||||||
|
|
||||||
|
EXAMPLES
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
__install_coreos \
|
||||||
|
--device /dev/sda \
|
||||||
|
--ignition ignition.json
|
||||||
|
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
|
||||||
|
Ľubomír Kučera <lubomir.kucera.jr at gmail.com>
|
||||||
|
|
||||||
|
COPYING
|
||||||
|
-------
|
||||||
|
|
||||||
|
Copyright \(C) 2018 Ľubomír Kučera. 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.
|
1
cdist/conf/type/__install_coreos/parameter/optional
Normal file
1
cdist/conf/type/__install_coreos/parameter/optional
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ignition
|
1
cdist/conf/type/__install_coreos/parameter/required
Normal file
1
cdist/conf/type/__install_coreos/parameter/required
Normal file
|
@ -0,0 +1 @@
|
||||||
|
device
|
0
cdist/conf/type/__install_coreos/singleton
Normal file
0
cdist/conf/type/__install_coreos/singleton
Normal file
Loading…
Reference in a new issue