diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-24 18:45:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-24 18:55:37 +0000 |
commit | d20677330a40013f3b371fa0734de9ad7a069235 (patch) | |
tree | f4b1e2d7e40490a45c45e762048c16b8a615386d /share | |
parent | Adding upstream version 20210630. (diff) | |
download | open-infrastructure-compute-tools-d20677330a40013f3b371fa0734de9ad7a069235.tar.xz open-infrastructure-compute-tools-d20677330a40013f3b371fa0734de9ad7a069235.zip |
Adding upstream version 20210724.upstream/20210724
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | share/bash-completion/container | 4 | ||||
-rw-r--r-- | share/config/container.conf.in | 2 | ||||
-rw-r--r-- | share/doc/host-setup.txt (renamed from share/doc/HOST-SETUP.txt) | 34 | ||||
-rw-r--r-- | share/logrotate/container | 2 | ||||
-rw-r--r-- | share/procps/zz-container.conf | 2 | ||||
-rwxr-xr-x | share/scripts/debconf | 8 | ||||
-rwxr-xr-x | share/scripts/debootstrap | 4 | ||||
-rw-r--r-- | share/sudo/container-shell | 2 | ||||
-rw-r--r-- | share/systemd/container-auto.service | 2 | ||||
-rw-r--r-- | share/systemd/container@.service | 2 |
10 files changed, 35 insertions, 27 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container index d966d7a..2fb49aa 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -1,5 +1,5 @@ -# bash-completion -# +# Open Infrastructure: compute-tools + # Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ diff --git a/share/config/container.conf.in b/share/config/container.conf.in index 3ab014d..d3f9a48 100644 --- a/share/config/container.conf.in +++ b/share/config/container.conf.in @@ -1,4 +1,4 @@ -# compute-tools: @NAME@ +# Open Infrastructure: compute-tools [start] cnt.auto=@CNT_AUTO@ diff --git a/share/doc/HOST-SETUP.txt b/share/doc/host-setup.txt index 6b368f0..9a9ec94 100644 --- a/share/doc/HOST-SETUP.txt +++ b/share/doc/host-setup.txt @@ -11,27 +11,27 @@ apt install bridge-utils ifenslave vlan 2. Boot Parameters ------------------ -2.1 CGroup Memory Controller -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +2.1 CGroup Memory Controller (optional) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to enable the memory controller the following boot parameter needs to be used: cgroup_enable=memory -2.2 CGroup Swap Controller -~~~~~~~~~~~~~~~~~~~~~~~~~~ +2.2 CGroup Swap Controller (optional) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to enable the swap controller the following boot parameter needs to be used: swapaccount=1 -2.3 vsyscall -~~~~~~~~~~~~ +2.3 vsyscall (legacy) +~~~~~~~~~~~~~~~~~~~~~ In order to be able to execute binaries linked to older libc versions -(<= wheezy) newer linux versions (>= buster), add the following boot parameter -(see #881813 for more information): +(<= wheezy) on newer linux versions (>= buster), add the following boot +parameter (see #881813 for more information): vsyscall=emulate @@ -39,18 +39,10 @@ In order to be able to execute binaries linked to older libc versions 3. Networking ~~~~~~~~~~~~~ -3.1 Enable IPv4 Forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -apt install procps -echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ip_foward.conf -sysctl -p - - -3.2 Configure Network Bridge +3.1 Configure Network Bridge ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3.2.1 Bridge: 1 Interface, standalone, DHCP +3.1.1 Bridge: 1 Interface, standalone, DHCP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cat > /etc/network/interfaces << EOF @@ -72,7 +64,7 @@ iface bridge0 inet dhcp EOF -3.2.2 Bridge: 1 Interface, standalone, static +3.1.2 Bridge: 1 Interface, standalone, static ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cat > /etc/network/interfaces << EOF @@ -101,7 +93,7 @@ iface bridge0 inet static EOF -3.2.3 Bridge: 2 logical Interfaces, subnet, static +3.1.3 Bridge: 2 logical Interfaces, subnet, static ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cat > /etc/network/interfaces << EOF @@ -129,7 +121,7 @@ iface bridge0 inet static EOF -3.2.4 Bridge: 3 physical Interfaces, vlan, bonding, static +3.1.4 Bridge: 3 physical Interfaces, vlan, bonding, static ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cat > /etc/network/interfaces << EOF diff --git a/share/logrotate/container b/share/logrotate/container index 0722aa5..d1783de 100644 --- a/share/logrotate/container +++ b/share/logrotate/container @@ -1,3 +1,5 @@ +# Open Infrastructure: compute-tools + /var/log/compute-tools/container.log { compress create 0640 root adm diff --git a/share/procps/zz-container.conf b/share/procps/zz-container.conf index c464c42..61c047d 100644 --- a/share/procps/zz-container.conf +++ b/share/procps/zz-container.conf @@ -1,3 +1,5 @@ +# Open Infrastructure: compute-tools + # The default limits are set to low for running many containers # and eventually lead to errors like the following on container start: # diff --git a/share/scripts/debconf b/share/scripts/debconf index 9a703e5..86c871f 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -602,10 +602,14 @@ EOF IPV4_ADDRESS1_PART4="$(echo ${IPV4_ADDRESS1} | cut -d. -f4)" IPV6_ADDRESS1="$(${DIG} AAAA +short ${NAME} | tail -n1)" - # TODO: address parts + # FIXME: address parts + + export IPV4_ADDRESS1 IPV4_ADDRESS1_PART1 IPV4_ADDRESS1_PART2 IPV4_ADDRESS1_PART3 IPV4_ADDRESS1_PART4 + export IPV6_ADDRESS1 fi - sed -e "s|@NAME@|${NAME}|g" \ + sed -e "s|@FILE@|${FILE}|g" \ + -e "s|@NAME@|${NAME}|g" \ -e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \ -e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \ -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \ diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index f0db7e8..9f5b6eb 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -174,9 +174,11 @@ do fi done +# Run mkdir -p "${MACHINES}" - ${BOOTSTRAP} ${BOOTSTRAP_OPTIONS} --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR} + +# Cleaning apt cache chroot "${MACHINES}/${NAME}" apt clean # Setting hostname diff --git a/share/sudo/container-shell b/share/sudo/container-shell index cd3f74d..c4108a6 100644 --- a/share/sudo/container-shell +++ b/share/sudo/container-shell @@ -1 +1,3 @@ +# Open Infrastructure: compute-tools + container ALL=NOPASSWD: /usr/bin/container diff --git a/share/systemd/container-auto.service b/share/systemd/container-auto.service index 805bdc6..50f8ac6 100644 --- a/share/systemd/container-auto.service +++ b/share/systemd/container-auto.service @@ -1,3 +1,5 @@ +# Open Infrastructure: compute-tools + [Unit] Description=compute-tools automatic start and stop Documentation=man:container-auto diff --git a/share/systemd/container@.service b/share/systemd/container@.service index 5d4425e..4bd7be5 100644 --- a/share/systemd/container@.service +++ b/share/systemd/container@.service @@ -1,3 +1,5 @@ +# Open Infrastructure: compute-tools + [Unit] Description="Container: %i" Documentation=man:compute-tools |