diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-07-23 08:28:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-07-23 08:28:38 +0000 |
commit | 67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365 (patch) | |
tree | 43300ba57e2427696d7d9b0b6ff14275d991f912 /share/doc | |
parent | Adding upstream version 20170701. (diff) | |
download | open-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.tar.xz open-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.zip |
Adding upstream version 20170722.upstream/20170722
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | share/doc/HOST-SETUP.txt | 42 | ||||
-rwxr-xr-x | share/doc/examples/container-images.sh | 55 | ||||
-rw-r--r-- | share/doc/examples/dschinn-backports.cfg | 41 | ||||
-rw-r--r-- | share/doc/examples/stretch.cfg | 7 |
4 files changed, 92 insertions, 53 deletions
diff --git a/share/doc/HOST-SETUP.txt b/share/doc/HOST-SETUP.txt index 72d42d5..e172ee3 100644 --- a/share/doc/HOST-SETUP.txt +++ b/share/doc/HOST-SETUP.txt @@ -52,11 +52,11 @@ source /etc/network/interfaces.d/* auto lo iface lo inet loopback -iface eth0 inet manual +iface eno1 inet manual -allow-hotplug br0 -iface br0 inet dhcp - bridge_ports eth0 +allow-hotplug bridge0 +iface bridge0 inet dhcp + bridge_ports eno1 bridge_fd 0 bridge_maxwait 0 bridge_stp 0 @@ -74,18 +74,18 @@ source /etc/network/interfaces.d/* auto lo iface lo inet loopback -iface eth0 inet manual +iface eno1 inet manual -allow-hotplug br0 -iface br0 inet static +allow-hotplug bridge0 +iface bridge0 inet static address 10.0.0.2 gateway 10.0.0.1 netmask 255.255.255.0 - pre-up ifconfig eth0 down - pre-up ifconfig eth0 up + pre-up ifconfig eno1 down + pre-up ifconfig eno1 up - bridge_ports eth0 + bridge_ports eno1 bridge_fd 0 bridge_maxwait 0 bridge_stp 0 @@ -103,16 +103,16 @@ source /etc/network/interfaces.d/* auto lo iface lo inet loopback -allow-hotplug eth0 -iface eth0 inet dhcp +allow-hotplug eno1 +iface eno1 inet dhcp -allow-hotplug br0 -iface br0 inet static +allow-hotplug bridge0 +iface bridge0 inet static address 10.0.0.1 netmask 255.255.255.0 - pre-up brctl addbr br0 - post-down brctl delbr br0 + pre-up brctl addbr bridge0 + post-down brctl delbr bridge0 bridge_fd 0 bridge_maxwait 0 @@ -131,19 +131,19 @@ source /etc/network/interfaces.d/* auto lo iface lo inet loopback -allow-hotplug eth0 -iface eth0 inet dhcp +allow-hotplug eno1 +iface eno1 inet dhcp -iface eth1 inet manual +iface eno2 inet manual -iface eth2 inet manual +iface eno3 inet manual allow-hotplug bond0 iface bond0 inet manual up ifconfig bond0 0.0.0.0 up down ifconfig bond0 down - slaves eth1 eth2 + slaves eno2 eno3 bond-mode 4 bond-miimon 100 diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh index b743f57..07f3451 100755 --- a/share/doc/examples/container-images.sh +++ b/share/doc/examples/container-images.sh @@ -3,7 +3,7 @@ # container-tools - Manage systemd-nspawn containers # # Description: example for automated Debian base system container image creation -# Requires: debootstrap xz-utils +# Requires: debootstrap plzip xz-utils # Usage: sudo ./container-images.sh set -e @@ -13,25 +13,54 @@ DISTRIBUTIONS="stretch sid" MIRROR="https://deb.debian.org/debian" INCLUDE="dbus" -DATE="$(date +%Y%m%d)" +COMPRESSIONS="gz lz xz" + +VERSION="$(date +%Y%m%d)" for DISTRIBUTION in ${DISTRIBUTIONS} do for ARCHITECTURE in ${ARCHITECTURES} do - SOURCE="debian-${DISTRIBUTION}-${ARCHITECTURE}_${DATE}" - TARGET="debian-${DISTRIBUTION}-${ARCHITECTURE}" + SYSTEM="debian-${DISTRIBUTION}-${VERSION}_${ARCHITECTURE}" + + debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SYSTEM} ${MIRROR} + chroot "${SYSTEM}" apt-get clean + + rm -f "${SYSTEM}/etc/apt/apt.conf.d/01autoremove-kernels" + rm -f "${SYSTEM}/etc/hostname" + echo "" > "${SYSTEM}/etc/machine-id" + rm -f "${SYSTEM}/etc/resolv.conf" + rm -f "${SYSTEM}/var/lib/systemd/catalog/database" + + for COMPRESSION in ${COMPRESSIONS} + do + case "${COMPRESSION}" in + gz) + TAR_OPTIONS="--gzip" + ;; + + lz) + TAR_OPTIONS="--lzip" + ;; + + xz) + TAR_OPTIONS="--xz" + ;; + esac + + echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}" + tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}" + + echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512" + sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512" - debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SOURCE} ${MIRROR} - chroot "${SOURCE}" apt-get clean + echo "Creating ${SYSTEM}.system.tar.${COMPRESSION} symlink" + ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${VERSION}|current|")" - rm -f "${SOURCE}/etc/apt/apt.conf.d/01autoremove-kernels" - rm -f "${SOURCE}/etc/hostname" - echo "" > "${SOURCE}/etc/machine-id" - rm -f "${SOURCE}/etc/resolv.conf" - rm -f "${SOURCE}/var/lib/systemd/catalog/database" + echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy" + sed -e "s|${VERSION}|current|" "${SYSTEM}.system.tar.${COMPRESSION}.sha512" > "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sha512 | sed -e "s|${VERSION}|current|")" + done - echo "Creating ${TARGET}.tar.xz" - tar cfJ "${TARGET}.tar.xz" "${SOURCE}" + rm -rf "${SYSTEM}" done done diff --git a/share/doc/examples/dschinn-backports.cfg b/share/doc/examples/dschinn-backports.cfg index 1cddcf2..4f72268 100644 --- a/share/doc/examples/dschinn-backports.cfg +++ b/share/doc/examples/dschinn-backports.cfg @@ -3,6 +3,11 @@ # example for automated Progress Linux 4+ (dschinn-backports) container creation # using: sudo container create -s progress-linux +debconf debconf/priority select critical +debconf debconf/frontend select Noninteractive + +container-tools cnt-debconf/mode select progress-linux + #container-tools cnt-debconf/preseed-files string #container-tools cnt-debconf/include-preseed-files string @@ -23,21 +28,21 @@ container-tools cnt-debconf/parent-mirror-security string http://security.debian container-tools cnt-debconf/archive-areas multiselect main, contrib, non-free container-tools cnt-debconf/parent-archive-areas multiselect main, contrib, non-free -container-tools cnt-debconf/packages string openssh-server +container-tools cnt-debconf/packages string knot-resolver openssh-server container-tools cnt-debconf/root-password string progress #container-tools cnt-debconf/root-password-crypted string # Network IP configuration -container-tools cnt-debconf/network0/bridge string br0 -container-tools cnt-debconf/network0/veth string veth0 -container-tools cnt-debconf/network0/ipv4-method select static -container-tools cnt-debconf/network0/ipv4-comment string Primary network interfaces -container-tools cnt-debconf/network0/ipv4-address string 192.168.0.2 -container-tools cnt-debconf/network0/ipv4-gateway string 192.168.0.1 -container-tools cnt-debconf/network0/ipv4-netmask string 255.255.255.0 -#container-tools cnt-debconf/network0/ipv4-post-up string -#container-tools cnt-debconf/network0/ipv4-post-down string +container-tools cnt-debconf/network1/bridge string bridge0 +container-tools cnt-debconf/network1/veth string veth0 +container-tools cnt-debconf/network1/ipv4-method select static +container-tools cnt-debconf/network1/ipv4-comment string Primary network interfaces +container-tools cnt-debconf/network1/ipv4-address string 192.168.0.2 +container-tools cnt-debconf/network1/ipv4-gateway string 192.168.0.1 +container-tools cnt-debconf/network1/ipv4-netmask string 255.255.255.0 +#container-tools cnt-debconf/network1/ipv4-post-up string +#container-tools cnt-debconf/network1/ipv4-post-down string # Network DNS configuration container-tools cnt-debconf/nameserver/server string 127.0.0.1 8.8.8.8 8.8.4.4 @@ -46,14 +51,14 @@ container-tools cnt-debconf/nameserver/search string example.net container-tools cnt-debconf/nameserver/options string timeout:1 attempts:1 # Third-Party Repositories -#container-tools cnt-debconf/archive0/repository string -#container-tools cnt-debconf/archive0/list string -#container-tools cnt-debconf/archive0/comment string -#container-tools cnt-debconf/archive0/source string -#container-tools cnt-debconf/archive0/key string -#container-tools cnt-debconf/archive0/preferences-package string -#container-tools cnt-debconf/archive0/preferences-pin string -#container-tools cnt-debconf/archive0/preferences-pin-priority +#container-tools cnt-debconf/archive1/repository string +#container-tools cnt-debconf/archive1/list string +#container-tools cnt-debconf/archive1/comment string +#container-tools cnt-debconf/archive1/source string +#container-tools cnt-debconf/archive1/key string +#container-tools cnt-debconf/archive1/preferences-package string +#container-tools cnt-debconf/archive1/preferences-pin string +#container-tools cnt-debconf/archive1/preferences-pin-priority # Internal Options #container-tools cnt-debconf/apt-recommends string diff --git a/share/doc/examples/stretch.cfg b/share/doc/examples/stretch.cfg index 2af4b85..4a137b7 100644 --- a/share/doc/examples/stretch.cfg +++ b/share/doc/examples/stretch.cfg @@ -3,6 +3,11 @@ # example for automated Debian 9 (stretch) based container creation # using: sudo container create -s debian +debconf debconf/priority select critical +debconf debconf/frontend select Noninteractive + +container-tools cnt-debconf/mode select debian + #container-tools cnt-debconf/preseed-files string #container-tools cnt-debconf/include-preseed-files string @@ -28,5 +33,5 @@ container-tools cnt-debconf/packages string openssh-server container-tools cnt-debconf/root-password string debian #container-tools cnt-debconf/root-password-crypted string -container-tools cnt-debconf/network0/bridge string br0 +container-tools cnt-debconf/network1/bridge string bridge0 #container-tools cnt-debconf/network-mac string |