summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-25 08:54:34 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-26 03:46:53 +0000
commit7e226f60b7a2bd7e854d14b2bfd9729e20b02119 (patch)
tree31a583f3c5c8438fa51e74310aa911859379e557 /share
parentUpdating container-image example build script for current debian releases. (diff)
downloadcompute-tools-7e226f60b7a2bd7e854d14b2bfd9729e20b02119.tar.xz
compute-tools-7e226f60b7a2bd7e854d14b2bfd9729e20b02119.zip
Renaming container create command to container build.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share')
-rw-r--r--share/bash-completion/container24
-rwxr-xr-xshare/build-scripts/curl (renamed from share/scripts/curl)0
-rwxr-xr-xshare/build-scripts/curl.d/0001-debconf (renamed from share/scripts/curl.d/0001-debconf)0
-rw-r--r--share/build-scripts/curl.d/0001-debconf.templates (renamed from share/scripts/curl.d/0001-debconf.templates)2
-rwxr-xr-xshare/build-scripts/debconf (renamed from share/scripts/debconf)12
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file (renamed from share/scripts/debconf.d/0001-preseed-file)0
-rw-r--r--share/build-scripts/debconf.d/0001-preseed-file.templates (renamed from share/scripts/debconf.d/0001-preseed-file.templates)2
-rwxr-xr-xshare/build-scripts/debconf.d/0002-preseed-debconf (renamed from share/scripts/debconf.d/0002-preseed-debconf)0
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf (renamed from share/scripts/debconf.d/0003-debconf)0
-rw-r--r--share/build-scripts/debconf.d/0003-debconf.templates (renamed from share/scripts/debconf.d/0003-debconf.templates)0
-rwxr-xr-xshare/build-scripts/debootstrap (renamed from share/scripts/debootstrap)2
-rw-r--r--share/doc/examples/bullseye.cfg4
-rwxr-xr-xshare/doc/examples/container-images.sh14
-rw-r--r--share/doc/examples/fuchur-backports.cfg4
-rwxr-xr-xshare/hooks/pre-build.git-pull.sh (renamed from share/hooks/pre-create.git-pull.sh)0
-rw-r--r--share/man/compute-tools.7.rst4
-rw-r--r--share/man/container-build-debconf.1.rst (renamed from share/man/container-create-debconf.1.rst)44
-rw-r--r--share/man/container-build-debootstrap.1.rst (renamed from share/man/container-create-debootstrap.1.rst)34
-rw-r--r--share/man/container-build.1.rst (renamed from share/man/container-create.1.rst)54
-rw-r--r--share/man/container.1.rst4
20 files changed, 102 insertions, 102 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 2fb49aa..bc0281f 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -43,38 +43,38 @@ _container()
return 0
;;
- console)
+ build|b)
case "${prev}" in
-n|--name)
- opts="$(container list -s -f shell)"
+ opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ -s|--script)
+ opts="$(cd /usr/share/compute-tools/build-scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name"
+ opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
esac
;;
- create|cr)
+ console)
case "${prev}" in
-n|--name)
- opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
- COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
- return 0
- ;;
-
- -s|--script)
- opts="$(cd /usr/share/compute-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)"
+ opts="$(container list -s -f shell)"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*)
- opts="-n --name -c --capability -d --drop-capability -s --script -v --verbose -b --bind --bind-ro"
+ opts="-n --name"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
diff --git a/share/scripts/curl b/share/build-scripts/curl
index 98c2b82..98c2b82 100755
--- a/share/scripts/curl
+++ b/share/build-scripts/curl
diff --git a/share/scripts/curl.d/0001-debconf b/share/build-scripts/curl.d/0001-debconf
index 083d469..083d469 100755
--- a/share/scripts/curl.d/0001-debconf
+++ b/share/build-scripts/curl.d/0001-debconf
diff --git a/share/scripts/curl.d/0001-debconf.templates b/share/build-scripts/curl.d/0001-debconf.templates
index c87e47e..59319e4 100644
--- a/share/scripts/curl.d/0001-debconf.templates
+++ b/share/build-scripts/curl.d/0001-debconf.templates
@@ -8,4 +8,4 @@ Default:
Choices-C: ${CHOICES_C}
Choices: ${CHOICES}
Description: Container list:
- Select the system to use for creating the container.
+ Select the system to use for building the container.
diff --git a/share/scripts/debconf b/share/build-scripts/debconf
index 86c871f..39856ae 100755
--- a/share/scripts/debconf
+++ b/share/build-scripts/debconf
@@ -23,13 +23,14 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
+SCRIPT="${0}"
+export SCRIPT
+
+CACHE="/var/cache/${PROGRAM}/build-$(basename ${SCRIPT})"
CONFIG="/etc/${SOFTWARE}/config"
HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
-SCRIPT="${0}"
-export SCRIPT
-
Parameters ()
{
GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:"
@@ -98,7 +99,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [-p|--preseed-file FILE]" >&2
+ echo "Usage: container build -n|--name NAME -s|--script ${SCRIPT} -- [-p|--preseed-file FILE]" >&2
exit 1
}
@@ -1105,7 +1106,7 @@ do
done
# Run debconf parts
-for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/scripts/debconf.d"/*
+for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/build-scripts/debconf.d"/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -1116,7 +1117,6 @@ done
# Read-in configuration from debconf
. "${DEBCONF_TMPDIR}/debconf.default"
-CACHE="/var/cache/${PROGRAM}/${MODE}"
SYSTEM="${MACHINES}/${NAME}"
## Generic parts
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index d70e4e1..d70e4e1 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
diff --git a/share/scripts/debconf.d/0001-preseed-file.templates b/share/build-scripts/debconf.d/0001-preseed-file.templates
index 7e12e0d..9be825d 100644
--- a/share/scripts/debconf.d/0001-preseed-file.templates
+++ b/share/build-scripts/debconf.d/0001-preseed-file.templates
@@ -13,6 +13,6 @@ Type: string
Default:
Description: Enter (optional) preseed file to use:
A preseed file can be used to automatically answer questions to this
- container create script.
+ container build script.
.
If you do not want to use a preseed file, leave this question empty.
diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/build-scripts/debconf.d/0002-preseed-debconf
index 4bc4da6..4bc4da6 100755
--- a/share/scripts/debconf.d/0002-preseed-debconf
+++ b/share/build-scripts/debconf.d/0002-preseed-debconf
diff --git a/share/scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index c1c4e79..c1c4e79 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/build-scripts/debconf.d/0003-debconf.templates
index 73952a8..73952a8 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/build-scripts/debconf.d/0003-debconf.templates
diff --git a/share/scripts/debootstrap b/share/build-scripts/debootstrap
index 9f5b6eb..4c047ee 100755
--- a/share/scripts/debootstrap
+++ b/share/build-scripts/debootstrap
@@ -111,7 +111,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [-a|--architecture ARCHITECTURE] [-d|--distribution DISTRIBUTION] [-m|--mirror MIRROR] [-p|--password PASSWORD}" >&2
+ echo "Usage: container build -n|--name NAME -s|--script ${SCRIPT} -- [-a|--architecture ARCHITECTURE] [-d|--distribution DISTRIBUTION] [-m|--mirror MIRROR] [-p|--password PASSWORD}" >&2
exit 1
}
diff --git a/share/doc/examples/bullseye.cfg b/share/doc/examples/bullseye.cfg
index 044504e..4582c9f 100644
--- a/share/doc/examples/bullseye.cfg
+++ b/share/doc/examples/bullseye.cfg
@@ -1,5 +1,5 @@
-# example for automated Debian 11 (bullseye) based container creation
-# using: sudo container create -s debian
+# example for automated Debian 11 (bullseye) based container building
+# using: sudo container build -s debian
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
index 91589b1..9bdd453 100755
--- a/share/doc/examples/container-images.sh
+++ b/share/doc/examples/container-images.sh
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Description: example for automated Debian base system container image creation
+# Description: example for automated Debian base system container image builds
# Requires: debootstrap plzip xz-utils sudo
# Usage: ./container-images.sh
@@ -77,28 +77,28 @@ do
;;
esac
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}"
sudo tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}"
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512"
if [ -n "${KEY}" ]
then
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sign"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sign"
gpg -a -b --default-key ${KEY} ${SYSTEM}.system.tar.${COMPRESSION}
mv "${SYSTEM}.system.tar.${COMPRESSION}.asc" "${SYSTEM}.system.tar.${COMPRESSION}.sign"
fi
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION} symlink"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION} symlink"
ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${DATE}|current|")"
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
sed -e "s|${DATE}|current|" "${SYSTEM}.system.tar.${COMPRESSION}.sha512" > "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sha512 | sed -e "s|${DATE}|current|")"
if [ -e "${SYSTEM}.system.tar.${COMPRESSION}.sign" ]
then
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sign copy"
+ echo "Building ${SYSTEM}.system.tar.${COMPRESSION}.sign copy"
cp "${SYSTEM}.system.tar.${COMPRESSION}.sign" "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sign | sed -e "s|${DATE}|current|")"
fi
done
diff --git a/share/doc/examples/fuchur-backports.cfg b/share/doc/examples/fuchur-backports.cfg
index 20cd127..c02e776 100644
--- a/share/doc/examples/fuchur-backports.cfg
+++ b/share/doc/examples/fuchur-backports.cfg
@@ -1,5 +1,5 @@
-# example for automated Progress Linux 6.99 (fuchur-backports) container creation
-# using: sudo container create -s progress-linux
+# example for automated Progress Linux 6.99 (fuchur-backports) container building
+# using: sudo container build -s progress-linux
debconf debconf/priority select critical
debconf debconf/frontend select Noninteractive
diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-build.git-pull.sh
index 744f955..744f955 100755
--- a/share/hooks/pre-create.git-pull.sh
+++ b/share/hooks/pre-build.git-pull.sh
diff --git a/share/man/compute-tools.7.rst b/share/man/compute-tools.7.rst
index b6405b2..3252f05 100644
--- a/share/man/compute-tools.7.rst
+++ b/share/man/compute-tools.7.rst
@@ -96,8 +96,8 @@ Linux' overlay filesystem
Usage
=====
-Create a new container:
- sudo container create -n NAME
+Build a new container:
+ sudo container build -n NAME
Start a container:
sudo container start -n NAME
diff --git a/share/man/container-create-debconf.1.rst b/share/man/container-build-debconf.1.rst
index 69cab10..1649071 100644
--- a/share/man/container-create-debconf.1.rst
+++ b/share/man/container-build-debconf.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-========================
-container-create-debconf
-========================
+=======================
+container-build-debconf
+=======================
-------------------------------------------------------
-Create an advanced Debian based container with debconf
-------------------------------------------------------
+-----------------------------------------------------
+Build an advanced Debian based container with debconf
+-----------------------------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,31 +31,31 @@ Create an advanced Debian based container with debconf
Synopsis
========
-| **container create -s debconf** ['OPTIONS']
-| **cnt cr -s debconf** ['OPTIONS']
+| **container build -s debconf** ['OPTIONS']
+| **cnt b -s debconf** ['OPTIONS']
-| **container create -s debian** ['OPTIONS']
-| **cnt cr -s debian** ['OPTIONS']
+| **container build -s debian** ['OPTIONS']
+| **cnt b -s debian** ['OPTIONS']
-| **container create -s progress-linux** ['OPTIONS']
-| **cnt cr -s progress-linux** ['OPTIONS']
+| **container build -s progress-linux** ['OPTIONS']
+| **cnt b -s progress-linux** ['OPTIONS']
Description
===========
-The debconf container creation script uses debconf(1) to automatically create a
+The debconf container build script uses debconf(1) to automatically build a
Debian based container.
Scope
-----
-Note that this container creation script can do a few things more than just
+Note that this container build script can do a few things more than just
automatically debootstrap based on a preseed file. It also allows you to set a
root password, configure the network, install certain packages and execute
hooks.
But: this is *not* a replacement for a configuration management system (like
-ansible, puppet, etc.). The intenion of this script is to create the initial
+ansible, puppet, etc.). The intenion of this script is to build the initial
container to that extend that a configuration management system can take over.
As an analogy, think of debian-installer: d-i sets up your system to make it
@@ -76,7 +76,7 @@ system:
Modes
-----
-This container creation script can be used under two different names: debian and
+This container build script can be used under two different names: debian and
progress-linux.
Alternative, calling it under the debconf name is equal to the debian mode.
@@ -113,13 +113,13 @@ The following script options are available:
Examples
========
-Create a Debian based container:
+Build a Debian based container:
- sudo container create -s debian -n debian.example.net
+ sudo container build -s debian -n debian.example.net
-Create a Progress Linux container:
+Build a Progress Linux container:
- sudo container create -s progress-linux -n progress.example.net
+ sudo container build -s progress-linux -n progress.example.net
Files
=====
@@ -129,8 +129,8 @@ The following files are used:
/etc/compute-tools/config:
Container configuration files.
-/usr/share/compute-tools/scripts:
- Container creation scripts.
+/usr/share/compute-tools/build-scripts:
+ Container build scripts.
/usr/share/doc/compute-tools:
Container documentation.
diff --git a/share/man/container-create-debootstrap.1.rst b/share/man/container-build-debootstrap.1.rst
index 8165cea..853b4dc 100644
--- a/share/man/container-create-debootstrap.1.rst
+++ b/share/man/container-build-debootstrap.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-============================
-container-create-debootstrap
-============================
+===========================
+container-build-debootstrap
+===========================
---------------------------------------------------------------------
-Create a basic Debian based container with debootstrap or mmdebstrap
---------------------------------------------------------------------
+-------------------------------------------------------------------
+Build a basic Debian based container with debootstrap or mmdebstrap
+-------------------------------------------------------------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,19 +31,19 @@ Create a basic Debian based container with debootstrap or mmdebstrap
Synopsis
========
-| **container create -s debootstrap** ['OPTIONS']
-| **cnt cr -s debootstrap** ['OPTIONS']
+| **container build -s debootstrap** ['OPTIONS']
+| **cnt b -s debootstrap** ['OPTIONS']
-| **container create -s mmdebstrap** ['OPTIONS']
-| **cnt cr -s mmdebstrap** ['OPTIONS']
+| **container build -s mmdebstrap** ['OPTIONS']
+| **cnt b -s mmdebstrap** ['OPTIONS']
Description
===========
-The debootstrap container creation script uses debootstrap(8) or mmdebstrap(1)
-to create a Debian based container.
+The debootstrap container build script uses debootstrap(8) or mmdebstrap(1)
+to build a Debian based container.
-This script creates a pure Debian system with three modificiations:
+This script builds a pure Debian system with three modificiations:
* apt cache of packages downloaded during debootstrap is cleaned
* hostname is set (container name) in /etc/hostname
@@ -72,15 +72,15 @@ The following script options are available:
Examples
========
-Create a Debian 11 (bullseye) based container with same architecture as the host
+Build a Debian 11 (bullseye) based container with same architecture as the host
system using debootstrap:
- sudo container create -s debootstrap -n bullseye.example.net
+ sudo container build -s debootstrap -n bullseye.example.net
-Create a Debian 11 (bullseye) based container with different architecture as the
+Build a Debian 11 (bullseye) based container with different architecture as the
host system using mmdebstrap:
- sudo container create -s mmdebstrap -n bullseye-i386.example.net -- -a i386
+ sudo container build -s mmdebstrap -n bullseye-i386.example.net -- -a i386
See also
========
diff --git a/share/man/container-create.1.rst b/share/man/container-build.1.rst
index cb10f97..55f2a9b 100644
--- a/share/man/container-create.1.rst
+++ b/share/man/container-build.1.rst
@@ -17,13 +17,13 @@
.. You should have received a copy of the GNU General Public License
.. along with this program. If not, see <https://www.gnu.org/licenses/>.
-================
-container-create
-================
+===============
+container-build
+===============
-------------------
-Create a container
-------------------
+-----------------
+Build a container
+-----------------
:manual section: 1
:manual group: Open Infrastructure
@@ -31,40 +31,40 @@ Create a container
Synopsis
========
-| **container create** ['OPTIONS']
-| **cnt cr** ['OPTIONS']
+| **container build** ['OPTIONS']
+| **cnt b** ['OPTIONS']
Description
===========
-The **container create** command creates a container based on a script.
+The **container build** command builds a container based on a script.
Scripts
-------
-The following container scripts are available:
+The following build scripts are available:
curl:
- Basic script to create Debian based container, see container-create-curl(1).
+ Basic script to build Debian based container, see container-create-curl(1).
debootstrap:
- Basic script to create Debian based container, see
- container-create-debootstrap(1).
+ Basic script to build Debian based container, see
+ container-build-debootstrap(1).
debconf:
- Advanced script to automatically create Debian based container, see
- container-create-debconf(1).
+ Advanced script to automatically build Debian based container, see
+ container-build-debconf(1).
default:
- Symlink (if existing) to a container script which is used if no script was
+ Symlink (if existing) to a build script which is used if no script was
specified. On Debian based system this can be managed through
update-alternatives(1), i.e. 'sudo update-alternatives --config
- container_script'.
+ container_build-script'.
Options
=======
-The following **container create** options are available:
+The following **container build** options are available:
-n, --name='NAME':
Specify container name.
@@ -76,7 +76,7 @@ The following **container create** options are available:
Specify capabilities to drop, see capabilities(7).
-s, --script='SCRIPT':
- Specify container creation script, defaults to 'debootstrap'.
+ Specify container build script, defaults to 'debootstrap'.
-v, --verbose:
Explain what is being done.
@@ -101,21 +101,21 @@ The following **container create** options are available:
Examples
========
-Create example.net container using curl script:
+Build example.net container using curl script:
- sudo container create -n example.net -s curl
+ sudo container build -n example.net -s curl
-Create example.net container using debootstrap script:
+Build example.net container using debootstrap script:
- sudo container create -n example.net -s debootstrap
+ sudo container build -n example.net -s debootstrap
-Create example.net container using debconf script:
+Build example.net container using debconf script:
- sudo container create -n example.net -s debconf
+ sudo container build -n example.net -s debconf
-Create example.net container with the default create script and start it:
+Build example.net container with the default build script and start it:
- sudo container create,start -n example.net
+ sudo container build,start -n example.net
See also
========
diff --git a/share/man/container.1.rst b/share/man/container.1.rst
index 61661ab..cce283b 100644
--- a/share/man/container.1.rst
+++ b/share/man/container.1.rst
@@ -53,8 +53,8 @@ Commands
The following **container** commands are available:
-create:
- Create a new container, see container-create(1).
+build:
+ Build a new container, see container-build(1).
start:
Start a container, see container-start(1).