From 35c1f299d0a36514b4b5827dfbf03a6403452358 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Tue, 13 Mar 2018 10:58:17 +0100 Subject: [PATCH] TT#32751 Combine CE and Pro install cd Use a single (prev CE like) approach GRML -> main.sh -> deployment.sh -> ngcp-installer All SP versions can be installed from a single image Remove network configuration points from GRML installer Change-Id: I9a56c12ca3f42d055303e5a0b08691de3560fe2c --- Makefile | 14 +- build_iso.sh | 11 +- build_templates.sh | 74 +++------ grub.cfg_carrier | 9 +- grub.cfg_ce | 11 +- grub.cfg_pro | 19 +-- isolinux.cfg_carrier | 18 +- isolinux.cfg_ce | 19 +-- isolinux.cfg_pro | 37 +---- templates/boot/grub/grub.cfg | 62 ++----- templates/boot/isolinux/isolinux.cfg | 99 +++-------- templates/scripts/includes/check-for-network | 29 ++++ templates/scripts/main.sh | 164 +++++++++++++++++++ 13 files changed, 278 insertions(+), 288 deletions(-) create mode 100755 templates/scripts/includes/check-for-network create mode 100755 templates/scripts/main.sh diff --git a/Makefile b/Makefile index d333cac..8a97c37 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ # for syntax checks -BASH_SCRIPTS = ./templates-ce/scripts/main.sh ./templates-ce/scripts/includes/* ./build_iso.sh ./build_templates.sh +BASH_SCRIPTS = ./templates/scripts/main.sh ./templates/scripts/includes/* ./build_iso.sh ./build_templates.sh all: build build: @echo -n "Downloading deployment.sh scripts"; \ - wget -r --directory-prefix=./templates-ce/scripts/includes/netscript/ --reject "index.html*" \ + wget -r --directory-prefix=./templates/scripts/includes/netscript/ --reject "index.html*" \ --no-parent --no-host-directories --cut-dirs=1 "http://deb.sipwise.com/netscript/" ; \ echo " done."; @echo -n "Downloading Sipwise keyring 'sipwise.gpg'"; \ - wget -O ./templates-ce/scripts/includes/sipwise.gpg https://deb.sipwise.com/spce/sipwise.gpg ;\ + wget -O ./templates/scripts/includes/sipwise.gpg https://deb.sipwise.com/spce/sipwise.gpg ;\ echo " done."; syntaxcheck: shellcheck @@ -24,12 +24,12 @@ shellcheck: echo " done."; \ clean: - rm -f templates-ce/boot/grub/sipwise_*.cfg templates-ce/boot/isolinux/sipwise_*.cfg - rm -f templates-ce/boot/isolinux/syslinux.cfg + rm -f templates/boot/grub/sipwise_*.cfg templates/boot/isolinux/sipwise_*.cfg + rm -f templatese/boot/isolinux/syslinux.cfg rm -f templates/boot/grub/sipwise_*.cfg templates/boot/isolinux/sipwise_*.cfg rm -f templates/boot/isolinux/syslinux.cfg - rm -rf templates-ce/scripts/includes/netscript - rm -f templates-ce/scripts/includes/sipwise.gpg + rm -rf templates/scripts/includes/netscript + rm -f templates/scripts/includes/sipwise.gpg dist-clean: clean rm -rf artifacts diff --git a/build_iso.sh b/build_iso.sh index 43821ca..6038d68 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -6,6 +6,7 @@ DATE="$(date +%Y%m%d_%H%M%S)" WGET_OPT="--timeout=30 -q -c" RELEASE="$1" GRML_ISO="$2" +TEMPLATES="templates" usage () { echo "Usage: $0 daily|private|public " @@ -23,25 +24,19 @@ echo "*** Building ${RELEASE} ISO ***" case ${RELEASE} in daily) - TEMPLATES="templates" MR="yes" - PUBLIC="no" SIPWISE_ISO="grml64-sipwise-daily_${DATE}.iso" GRML_URL="http://daily.grml.org/grml64-full_testing/latest/" GRML_HASH_URL="${GRML_URL}" ;; private) - TEMPLATES="templates" MR="no" - PUBLIC="no" SIPWISE_ISO="grml64-sipwise-release_${DATE}.iso" GRML_URL="https://deb.sipwise.com/files/grml/" GRML_HASH_URL="http://download.grml.org/" ;; public) - TEMPLATES="templates-ce" MR="no" - PUBLIC="yes" SIPWISE_ISO="sip_provider_CE_installcd.iso" GRML_URL="https://deb.sipwise.com/files/grml/" GRML_HASH_URL="http://download.grml.org/" @@ -85,8 +80,8 @@ echo "*** Copying isolinux.cfg to syslinux.cfg for grml2usb support ***" cp ${TEMPLATES}/boot/isolinux/isolinux.cfg ${TEMPLATES}/boot/isolinux/syslinux.cfg # build grub.cfg release options -echo "*** Building templates [TEMPLATES=${TEMPLATES} MR=${MR} PUBLIC=${PUBLIC}] ***" -TEMPLATES="${TEMPLATES}" MR="${MR}" PUBLIC="${PUBLIC}" ./build_templates.sh +echo "*** Building templates [TEMPLATES=${TEMPLATES} MR=${MR}] ***" +TEMPLATES="${TEMPLATES}" MR="${MR}" ./build_templates.sh echo "*** Generating Sipwise ISO ***" sudo /usr/sbin/grml2iso -c ./${TEMPLATES} -o "${SIPWISE_ISO}" "${GRML_ISO}" diff --git a/build_templates.sh b/build_templates.sh index e29e68a..0aaabf5 100755 --- a/build_templates.sh +++ b/build_templates.sh @@ -1,68 +1,46 @@ #!/bin/bash # Generate the grub options for all the releases # -BASE=$(dirname $0) +BASE="$(dirname "$0")" TEMPLATES="${TEMPLATES:-templates}" BOOT="${BASE}/${TEMPLATES}/boot" -GRUB="${BOOT}/grub/grub.cfg" -ISO="${BOOT}/isolinux" -RELEASES=($(grep -v '#' ${BASE}/releases | cut -d, -f1 )) -DISTS=($(grep -v '#' ${BASE}/releases |cut -d, -f2 )) -CARRIER=($(grep -v '#' ${BASE}/releases |cut -d, -f3 )) -INFO=($(grep -v '#' ${BASE}/releases |cut -d, -f4 )) +RELEASES=($(grep -v '#' "${BASE}"/releases | cut -d, -f1 )) +DISTS=($(grep -v '#' "${BASE}"/releases |cut -d, -f2 )) +CARRIER=($(grep -v '#' "${BASE}"/releases |cut -d, -f3 )) MR="${MR:-no}" -PUBLIC="${PUBLIC:-no}" -rm -f ${BOOT}/grub/sipwise_*.cfg -rm -f ${BOOT}/isolinux/sipwise_*.cfg +rm -f "${BOOT}/grub/sipwise_*.cfg" +rm -f "${BOOT}/isolinux/sipwise_*.cfg" for index in ${!RELEASES[*]}; do if [[ ${RELEASES[$index]} =~ ^mr[0-9]\.[0-9]$ ]] && [ "${MR}" = "no" ]; then echo "*** [SKIP] grub template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" echo "*** [SKIP] isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" else - if [ "${PUBLIC}" != "no" ]; then - if [ "${INFO[$index]}" = "LTS" ] || [ "${INFO[$index]}" = "LATEST" ]; then - TYPE=$(echo ${INFO[$index]}| tr '[:upper:]' '[:lower:]') - echo "*** grub template ${INFO[$index]} for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" \ - ${BASE}/grub.cfg_ce >> ${BOOT}/grub/sipwise_${TYPE}.cfg - - echo "*** isolinux template ${INFO[$index]} for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" ${BASE}/isolinux.cfg_${TYPE} \ - >> ${BOOT}/isolinux/sipwise_${TYPE}.cfg - else - echo "*** [SKIP] grub template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" - echo "*** [SKIP] isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***" - fi - else - echo "*** grub template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} CARRIER:${CARRIER[$index]} ***" - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" \ - ${BASE}/grub.cfg_ce >> ${BOOT}/grub/sipwise_ce.cfg + echo "*** grub template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} CARRIER:${CARRIER[$index]} ***" + sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ + -e "s_##DIST##_${DISTS[$index]}_g" \ + "${BASE}/grub.cfg_ce" >> "${BOOT}/grub/sipwise_ce.cfg" + sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ + -e "s_##DIST##_${DISTS[$index]}_g" \ + "${BASE}/grub.cfg_pro" >> "${BOOT}/grub/sipwise_pro.cfg" + if [ "${CARRIER[$index]}" == "yes" ]; then sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ -e "s_##DIST##_${DISTS[$index]}_g" \ - ${BASE}/grub.cfg_pro >> ${BOOT}/grub/sipwise_pro.cfg - if [ "${CARRIER[$index]}" == "yes" ]; then - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" \ - ${BASE}/grub.cfg_carrier >> ${BOOT}/grub/sipwise_carrier.cfg - fi + "${BASE}/grub.cfg_carrier" >> "${BOOT}/grub/sipwise_carrier.cfg" + fi - echo "*** isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} CARRIER:${CARRIER[$index]} ***" - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" ${BASE}/isolinux.cfg_ce \ - >> ${BOOT}/isolinux/sipwise_ce.cfg + echo "*** isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} CARRIER:${CARRIER[$index]} ***" + sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ + -e "s_##DIST##_${DISTS[$index]}_g" "${BASE}/isolinux.cfg_ce" \ + >> "${BOOT}/isolinux/sipwise_ce.cfg" + sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ + -e "s_##DIST##_${DISTS[$index]}_g" "${BASE}/isolinux.cfg_pro" \ + >> "${BOOT}/isolinux/sipwise_pro.cfg" + if [ "${CARRIER[$index]}" == "yes" ]; then sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" ${BASE}/isolinux.cfg_pro \ - >> ${BOOT}/isolinux/sipwise_pro.cfg - if [ "${CARRIER[$index]}" == "yes" ]; then - sed -e "s_##VERSION##_${RELEASES[$index]}_g" \ - -e "s_##DIST##_${DISTS[$index]}_g" ${BASE}/isolinux.cfg_carrier \ - >> ${BOOT}/isolinux/sipwise_carrier.cfg - fi + -e "s_##DIST##_${DISTS[$index]}_g" "${BASE}/isolinux.cfg_carrier" \ + >> "${BOOT}/isolinux/sipwise_carrier.cfg" fi fi done diff --git a/grub.cfg_carrier b/grub.cfg_carrier index 59f089e..542cc05 100644 --- a/grub.cfg_carrier +++ b/grub.cfg_carrier @@ -1,13 +1,6 @@ -menuentry "sip:Carrier mgmt (web01a) DHCP / ##VERSION## release" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpnw.dhcp ngcpfillcache ngcpvers=##VERSION## ngcpcrole=mgmt ngcpnonwrecfg ngcphostname=web01a - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - menuentry "sip:Carrier mgmt (web01a) / ##VERSION## release" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpnonwrecfg ngcpfillcache ngcpvers=##VERSION## dns=92.42.136.30,92.42.136.31 nodhcp ip=192.168.52.114::192.168.52.1:255.255.255.0:sp1:eth0:off ngcpcrole=mgmt ngcphostname=web01a + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp1 ngcpnonwrecfg ngcpfillcache ngcpvers=##VERSION## nodhcp ngcpcrole=mgmt ngcphostname=web01a echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } diff --git a/grub.cfg_ce b/grub.cfg_ce index b29560d..8a581b0 100644 --- a/grub.cfg_ce +++ b/grub.cfg_ce @@ -1,13 +1,6 @@ -menuentry "sip:providerCE (DHCP) - version ##VERSION##" { +menuentry "sip:providerCE - version ##VERSION##" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcphostname=spce ngcpvers=##VERSION## ngcpnw.dhcp - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - -menuentry "sip:providerCE (static NW) - version ##VERSION##" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcphostname=spce ngcpvers=##VERSION## dns=8.8.8.8,8.8.4.4 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:spce:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## scripts ngcphostname=spce ngcpvers=##VERSION## nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } diff --git a/grub.cfg_pro b/grub.cfg_pro index ce72a3f..b8c22d8 100644 --- a/grub.cfg_pro +++ b/grub.cfg_pro @@ -1,28 +1,13 @@ menuentry "sip:providerPRO - sp1 / ##VERSION## release" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpvers=##VERSION## dns=8.8.8.8,8.8.4.4 nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp1 ngcpvers=##VERSION## nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "sip:providerPRO - sp2 / ##VERSION## release" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp2 ngcpvers=##VERSION## dns=8.8.8.8,8.8.4.4 nodhcp ip=10.15.20.102::10.15.20.1:255.255.255.0:sp2:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp2 ngcpvers=##VERSION## nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } - -menuentry "sip:providerPRO - sp1 DHCP/ ##VERSION## release" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpvers=##VERSION## ngcpnw.dhcp - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - -menuentry "sip:providerPRO - sp2 DHCP/ ##VERSION## release" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp2 ngcpvers=##VERSION## ngcpnw.dhcp - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - diff --git a/isolinux.cfg_carrier b/isolinux.cfg_carrier index 637d0f5..b3d6dcc 100644 --- a/isolinux.cfg_carrier +++ b/isolinux.cfg_carrier @@ -1,27 +1,11 @@ label carrier##VERSION## - menu label sip:Carrier mgmt/web01a DHCP / ##VERSION## - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpnw.dhcp ngcpnonwrecfg ngcpfillcache ngcpvers=##VERSION## ngcpcrole=mgmt ngcphostname=web01a - - text help - Install sip:Carrier version ##VERSION##. - Install web01a node of Carrier setup. - Other nodes will be installed from web01a. - - Retrieve network configuration via DHCP. - endtext - - -label carriernw##VERSION## menu label sip:Carrier mgmt/web01a / ##VERSION## kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpfillcache ngcpvers=##VERSION## dns=92.42.136.30,92.42.136.31 ngcpnonwrecfg ngcpcrole=mgmt ngcphostname=web01a nodhcp ip=192.168.52.114::192.168.52.1:255.255.255.0:sp1:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp1 ngcpfillcache ngcpvers=##VERSION## nodhcp ngcpnonwrecfg ngcpcrole=mgmt ngcphostname=web01a text help Install sip:Carrier version ##VERSION##. Install web01a node of Carrier setup. Other nodes will be installed from web01a. - - Static network configuration. endtext diff --git a/isolinux.cfg_ce b/isolinux.cfg_ce index 88b8a69..967f8ad 100644 --- a/isolinux.cfg_ce +++ b/isolinux.cfg_ce @@ -1,25 +1,10 @@ label ce##VERSION## - menu label sip:providerCE (DHCP) - version ##VERSION## + menu label sip:providerCE - version ##VERSION## kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcphostname=spce ngcpnw.dhcp ngcpvers=##VERSION## + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## scripts ngcphostname=spce ngcpvers=##VERSION## nodhcp text help Install sip:provider community edition, version ##VERSION##. - - Retrieve network configuration via DHCP. - endtext - -label cenw##VERSION## - menu label sip:providerCE (static NW) - version ##VERSION## - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcphostname=spce ngcpvers=##VERSION## nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:spce:eth0:off dns=8.8.8.8,8.8.4.4 - - text help - Install sip:provider community edition, - version ##VERSION##. - - Use static IP configuration, adjust - in boot command line if necessary. endtext diff --git a/isolinux.cfg_pro b/isolinux.cfg_pro index b34ebef..a6b4247 100644 --- a/isolinux.cfg_pro +++ b/isolinux.cfg_pro @@ -1,50 +1,21 @@ -label prosp1nw-##VERSION## - menu label sip:providerPRO - sp1 / ##VERSION## release - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpvers=##VERSION## dns=8.8.8.8,8.8.4.4 nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off - - text help - Install sip:provider - professional edition, version ##VERSION##. - Install first node of HA setup. - Use static IP configuration, adjust - in boot command line if necessary. - endtext - -label prosp2nw-##VERSION## - menu label sip:providerPRO - sp2 / ##VERSION## release - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp2 ngcpvers=##VERSION## dns=8.8.8.8,8.8.4.4 nodhcp ip=10.15.20.102::10.15.20.1:255.255.255.0:sp2:eth0:off - - text help - Install sip:provider - professional edition, version ##VERSION##. - Install second node of HA setup. - Use static IP configuration, adjust - in boot command line if necessary. - endtext - label prosp1-##VERSION## - menu label sip:providerPRO - sp1 DHCP/ ##VERSION## release + menu label sip:providerPRO - sp1 / ##VERSION## release kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp1 ngcpvers=##VERSION## ngcpnw.dhcp + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp1 ngcpvers=##VERSION## nodhcp text help Install sip:provider professional edition, version ##VERSION##. Install first node of HA setup. - Retrieve network configuration via DHCP. endtext label prosp2-##VERSION## - menu label sip:providerPRO - sp2 DHCP/ ##VERSION## release + menu label sip:providerPRO - sp2 / ##VERSION## release kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/netscript/##VERSION##/deployment.sh ngcpsp2 ngcpvers=##VERSION## ngcpnw.dhcp + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=##DIST## scripts ngcpsp2 ngcpvers=##VERSION## nodhcp text help Install sip:provider professional edition, version ##VERSION##. Install second node of HA setup. - Retrieve network configuration via DHCP. endtext - diff --git a/templates/boot/grub/grub.cfg b/templates/boot/grub/grub.cfg index 2db8ead..75d0145 100644 --- a/templates/boot/grub/grub.cfg +++ b/templates/boot/grub/grub.cfg @@ -12,16 +12,9 @@ menuentry "Rescue system boot (%VERSION%)" { submenu "Specific sip:providerCE releases ... ->" --class=submenu { -menuentry "sip:providerCE (DHCP) - trunk version" { +menuentry "sip:providerCE - trunk version" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcphostname=spce ngcpvers=trunk ngcpnw.dhcp - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - -menuentry "sip:providerCE (static NW) - trunk version" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcphostname=spce ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:spce:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch scripts ngcphostname=spce ngcpvers=trunk nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } @@ -35,28 +28,14 @@ submenu "Specific sip:providerPRO releases ... ->" --class=submenu { menuentry "sip:providerPRO - sp1 / trunk release" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp1 ngcpvers=trunk nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "sip:providerPRO - sp2 / trunk release" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp2 ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.102::10.15.20.1:255.255.255.0:sp2:eth0:off - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - -menuentry "sip:providerPRO - sp1 DHCP/ trunk release" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk ngcpnw.dhcp - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - -menuentry "sip:providerPRO - sp2 DHCP/ trunk release" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp2 ngcpvers=trunk ngcpnw.dhcp + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp2 ngcpvers=trunk nodhcp echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } @@ -68,16 +47,9 @@ source /boot/grub/sipwise_pro.cfg ## begin of Carrier menu {{{ submenu "Specific sip:Carrier releases ... ->" --class=submenu { -menuentry "sip:Carrier mgmt (web01a) DHCP / trunk" { - echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpfillcache ngcpnw.dhcp ngcpvers=trunk ngcpcrole=mgmt ngcpnonwrecfg ngcphostname=web01a - echo 'Loading initrd...' - initrd /boot/%SHORT_NAME%/initrd.img -} - menuentry "sip:Carrier mgmt (web01a) / trunk" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpfillcache ngcpnonwrecfg dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off ngcpvers=trunk ngcpcrole=mgmt ngcphostname=web01a + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp1 ngcpfillcache ngcpnonwrecfg ngcpvers=trunk nodhcp ngcpcrole=mgmt ngcphostname=web01a echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } @@ -91,84 +63,84 @@ submenu "Install Debian ... ->" --class=submenu { menuentry "Install Debian/stretch 64bit - DHCP" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/stretch 64bit - static NW" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/stretch 64bit - Puppet" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/jessie 64bit - DHCP" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/jessie 64bit - static NW" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/jessie 64bit - Puppet" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/wheezy 64bit - DHCP" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/wheezy 64bit - static NW" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/wheezy 64bit - Puppet" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/squeeze 64bit - DHCP" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/squeeze 64bit - static NW" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } menuentry "Install Debian/squeeze 64bit - Puppet" { echo 'Loading kernel...' - linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off echo 'Loading initrd...' initrd /boot/%SHORT_NAME%/initrd.img } diff --git a/templates/boot/isolinux/isolinux.cfg b/templates/boot/isolinux/isolinux.cfg index 9df0146..fea9e3b 100644 --- a/templates/boot/isolinux/isolinux.cfg +++ b/templates/boot/isolinux/isolinux.cfg @@ -67,28 +67,13 @@ menu exit menu separator label cetrunk - menu label sip:providerCE (DHCP) - trunk version + menu label sip:providerCE - trunk version kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcphostname=spce ngcpvers=trunk ngcpnw.dhcp + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch scripts ngcphostname=spce ngcpvers=trunk nodhcp text help Install sip:provider community edition, trunk version. - - Retrieve network configuration via DHCP. - endtext - -label cenwtrunk - menu label sip:providerCE (static NW) - trunk version - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcpce ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcphostname=spce ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:spce:eth0:off - - text help - Install sip:provider community edition, - trunk version. - - Use static IP configuration, adjust - in boot command line if necessary. endtext include sipwise_ce.cfg @@ -110,54 +95,26 @@ menu label ^Back to main menu... menu exit menu separator -label prosp1nw-trunk - menu label sip:providerPRO - sp1 / trunk release - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off - - text help - Install sip:provider - professional edition, trunk version. - Install first node of HA setup. - Use static IP configuration, adjust - in boot command line if necessary. - endtext - -label prosp2nw-trunk - menu label sip:providerPRO - sp2 / trunk release - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp2 ngcpvers=trunk dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.102::10.15.20.1:255.255.255.0:sp2:eth0:off - - text help - Install sip:provider - professional edition, trunk version. - Install second node of HA setup. - Use static IP configuration, adjust - in boot command line if necessary. - endtext - label prosp1-trunk - menu label sip:providerPRO - sp1 DHCP/ trunk release + menu label sip:providerPRO - sp1 / trunk release kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk ngcpnw.dhcp + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp1 ngcpvers=trunk nodhcp text help Install sip:provider professional edition, trunk version. Install first node of HA setup. - Retrieve network configuration via DHCP. endtext label prosp2-trunk - menu label sip:providerPRO - sp2 DHCP/ trunk release + menu label sip:providerPRO - sp2 / trunk release kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp2 ngcpvers=trunk ngcpnw.dhcp + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp2 ngcpvers=trunk nodhcp text help Install sip:provider professional edition, trunk version. Install second node of HA setup. - Retrieve network configuration via DHCP. endtext include sipwise_pro.cfg @@ -179,31 +136,15 @@ menu label ^Back to main menu... menu exit menu separator -label carrierweb01atrunkdhcp - menu label sip:Carrier mgmt/web01a DHCP / trunk - kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk ngcpnw.dhcp ngcpnonwrecfg ngcpfillcache ngcpcrole=mgmt ngcphostname=web01a - - text help - Install sip:Carrier edition (trunk). - Install web01a node of Carrier setup. - Other nodes will be installed from web01a. - - Retrieve network configuration via DHCP. - endtext - - -label carrierweb01atrunkstatic +label carrierweb01atrunk menu label sip:Carrier mgmt/web01a / trunk kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh ngcpsp1 ngcpvers=trunk ngcpnonwrecfg dns=92.42.136.30,92.42.136.31 ngcpfillcache ngcpcrole=mgmt ngcphostname=web01a nodhcp ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 ngcppro ssh=sipwise debianrelease=stretch scripts ngcpsp1 ngcpvers=trunk nodhcp ngcpnonwrecfg ngcpfillcache ngcpcrole=mgmt ngcphostname=web01a text help Install sip:Carrier edition (trunk). Install web01a node of Carrier setup. Other nodes will be installed from web01a. - - Static network configuration. endtext @@ -232,7 +173,7 @@ menu separator label stretch menu label Install Debian/stretch 64bit - DHCP kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts text help Install Debian stretch, 64bit. @@ -245,7 +186,7 @@ label stretch label stretchnw menu label Install Debian/stretch 64bit - static NW kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off text help Install Debian stretch, 64bit. @@ -258,7 +199,7 @@ label stretchnw label stretchpuppet menu label Install Debian/stretch 64bit - Puppet kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=stretch scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off text help Install Debian stretch, 64bit using @@ -273,7 +214,7 @@ label stretchpuppet label jessie menu label Install Debian/jessie 64bit - DHCP kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts text help Install Debian jessie, 64bit. @@ -286,7 +227,7 @@ label jessie label jessienw menu label Install Debian/jessie 64bit - static NW kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off text help Install Debian jessie, 64bit. @@ -299,7 +240,7 @@ label jessienw label jessiepuppet menu label Install Debian/jessie 64bit - Puppet kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=jessie scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off text help Install Debian jessie, 64bit using @@ -314,7 +255,7 @@ label jessiepuppet label wheezy menu label Install Debian/wheezy 64bit - DHCP kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts text help Install Debian wheezy, 64bit. @@ -327,7 +268,7 @@ label wheezy label wheezynw menu label Install Debian/wheezy 64bit - static NW kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off text help Install Debian wheezy, 64bit. @@ -340,7 +281,7 @@ label wheezynw label wheezypuppet menu label Install Debian/wheezy 64bit - Puppet kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=wheezy scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off text help Install Debian wheezy, 64bit using @@ -355,7 +296,7 @@ label wheezypuppet label squeeze menu label Install Debian/squeeze 64bit - DHCP kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts text help Install Debian squeeze, 64bit. @@ -368,7 +309,7 @@ label squeeze label squeezenw menu label Install Debian/squeeze 64bit - static NW kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts dns=92.42.136.30,92.42.136.31 nodhcp ip=10.15.20.123::10.15.20.1:255.255.255.0:debian:eth0:off text help Install Debian squeeze, 64bit. @@ -381,7 +322,7 @@ label squeezenw label squeezepuppet menu label Install Debian/squeeze 64bit - Puppet kernel /boot/%SHORT_NAME%/vmlinuz - append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze netscript=http://deb.sipwise.com/netscript/master/deployment.sh puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off + append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off mgag200.modeset=0 vga=791 quiet nomce net.ifnames=0 nongcp ssh=sipwise debianrelease=squeeze scripts puppetenv=production dns=92.42.136.30,92.42.136.31 ip=10.15.20.123::10.15.20.1:255.255.255.0:puppet-client42:eth0:off text help Install Debian squeeze, 64bit using diff --git a/templates/scripts/includes/check-for-network b/templates/scripts/includes/check-for-network new file mode 100755 index 0000000..1d88286 --- /dev/null +++ b/templates/scripts/includes/check-for-network @@ -0,0 +1,29 @@ +#!/bin/bash +################################################################################ + +. /etc/grml/lsb-functions + +if [ "$(id -ru)" -ne 0 ] ; then + echo "Error: please run this script with uid 0 (root)." >&2 + exit 1 +fi + +einfon "Checking network status... " + +STATUS="Offline" +EXIT_CODE=1 + +GW="$(route -n | awk '/^0\.0\.0\.0/{print $2}')" +GWDEV="$(route -n | awk '/^0\.0\.0\.0/{print $NF}')" +NMAP="$(nmap -sP --host_timeout 4000 --max_rtt_timeout 4000ms "$GW" 2>/dev/null)" + +if [ $? -eq 0 ]; then + if ! echo "$NMAP" | grep -q "0 hosts up" ; then + STATUS="Online (${GWDEV})" + EXIT_CODE=0 + fi +fi + +printf "%s\n" "$STATUS" +eend $EXIT_CODE +exit $EXIT_CODE diff --git a/templates/scripts/main.sh b/templates/scripts/main.sh new file mode 100755 index 0000000..5a5161a --- /dev/null +++ b/templates/scripts/main.sh @@ -0,0 +1,164 @@ +#!/bin/bash + +set -e + +export LANG=C +export LC_ALL=C + +working_dir="$(dirname "$0")" +scripts_dir="${working_dir}/includes/" +netscript_dir="${scripts_dir}/netscript/" + +RC=0 + +YELLOW="$(tput setaf 3)" +NORMAL="$(tput op)" + +. /etc/grml/lsb-functions + +einfo "Executing grml-sipwise specific checks..." +eindent + +install_sipwise_keyring() { + if [ -f "${scripts_dir}/sipwise.gpg" ]; then + einfo "Installing sipwise keyring to '/etc/apt/trusted.gpg.d/sipwise.gpg'..."; eend 0 + cp "${scripts_dir}/sipwise.gpg" /etc/apt/trusted.gpg.d/sipwise.gpg + else + ewarn "Sipwise keyring '${scripts_dir}/sipwise.gpg' not found, continuing anyway." ; eend 0 + fi +} + +network_check() { + if "${scripts_dir}/check-for-network" ; then + einfo "Looks like we have working network, continuing..." ; eend 0 + else + if dialog --yes-label Yes --no-label Exit --yesno "It looks like you don't have a working network connection yet. Do you want to configure the network now?" 0 0 ; then + if ! netcardconfig ; then + ewarn "Failed to configure network, continuing anyway." ; eend 0 + fi + else + ewarn "Cancelling as requested by user." ; eend 0 + return 1 + fi + fi +} + +report_ssh_password() { + local rootpwd=$(grep -Eo '\