MT#10805 add carrier support in templates

Change-Id: I3361ad68d3ed262c7f8171c020c8cf1a8917d0c1
changes/61/761/2
Victor Seva 11 years ago
parent 4a1c215ffd
commit eacff4bab4

2
.gitignore vendored

@ -0,0 +1,2 @@
*~
sipwise_*.cfg

@ -8,7 +8,8 @@ GRUB="${BOOT}/grub/grub.cfg"
ISO="${BOOT}/isolinux"
RELEASES=($(grep -v '#' ${BASE}/releases | cut -d, -f1 ))
DISTS=($(grep -v '#' ${BASE}/releases |cut -d, -f2 ))
INFO=($(grep -v '#' ${BASE}/releases |cut -d, -f3 ))
CARRIER=($(grep -v '#' ${BASE}/releases |cut -d, -f3 ))
INFO=($(grep -v '#' ${BASE}/releases |cut -d, -f4 ))
MR="${MR:-no}"
PUBLIC="${PUBLIC:-no}"
@ -37,21 +38,31 @@ for index in ${!RELEASES[*]}; do
echo "*** [SKIP] isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***"
fi
else
echo "*** grub template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***"
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_carrier >> ${BOOT}/grub/sipwise_carrier.cfg
fi
echo "*** isolinux template for RELEASE:${RELEASES[$index]} DIST:${DISTS[$index]} ***"
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_carrier \
>> ${BOOT}/isolinux/sipwise_carrier.cfg
fi
fi
fi
done

@ -0,0 +1,13 @@
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnoupload ngcpnw.dhcp 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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnoupload ngcpnonwrecfg ngcpvers=##VERSION## dns=92.42.136.30 ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off ngcpcrole=mgmt ngcphostname=web01a
echo 'Loading initrd...'
initrd /boot/%SHORT_NAME%/initrd.img
}

@ -0,0 +1,27 @@
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnw.dhcp ngcpnonwrecfg 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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=##DIST## netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnoupload ngcpvers=##VERSION## dns=92.42.136.30 ngcpnonwrecfg ngcpcrole=mgmt ngcphostname=web01a ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off
text help
Install sip:Carrier version ##VERSION##.
Install web01a node of Carrier setup.
Other nodes will be installed from web01a.
Static network configuration.
endtext

@ -1,23 +1,26 @@
# list of releases
# no spaces please!!
mr3.6,wheezy,.
mr3.6.2,wheezy,LATEST
mr3.6.1,wheezy,.
mr3.5,wheezy,.
mr3.5.1,wheezy,.
mr3.4,wheezy,.
mr3.4.2,wheezy,.
mr3.4.1,wheezy,.
mr3.3,wheezy,.
mr3.3.2,wheezy,.
mr3.3.1,wheezy,.
mr3.2.2,wheezy,.
mr3.2.1,wheezy,.
mr3.2,wheezy,.
3.1,wheezy,.
3.0,wheezy,.
2.8,squeeze,LTS
2.7,squeeze,.
2.6,squeeze,.
2.5,squeeze,.
2.4,squeeze,.
#version,distribution,carrier,info
# carrier [yes|no]
# info [.|LTS|LATEST]
mr3.6,wheezy,yes,.
mr3.6.2,wheezy,yes,LATEST
mr3.6.1,wheezy,yes,.
mr3.5,wheezy,no,.
mr3.5.1,wheezy,no,.
mr3.4,wheezy,no,.
mr3.4.2,wheezy,no,.
mr3.4.1,wheezy,no,.
mr3.3,wheezy,no,.
mr3.3.2,wheezy,no,.
mr3.3.1,wheezy,no,.
mr3.2.2,wheezy,no,.
mr3.2.1,wheezy,no,.
mr3.2,wheezy,no,.
3.1,wheezy,no,.
3.0,wheezy,no,.
2.8,squeeze,no,LTS
2.7,squeeze,no,.
2.6,squeeze,no,.
2.5,squeeze,no,.
2.4,squeeze,no,.

@ -153,36 +153,24 @@ source /boot/grub/sipwise_pro.cfg
} # Specific sip:providerPRO releases
## begin of Carrier 3.x menu {{{
submenu "Specific sip:Carrier 3.x releases ... ->" --class=submenu {
## begin of Carrier menu {{{
submenu "Specific sip:Carrier releases ... ->" --class=submenu {
menuentry "sip:Carrier 3.x PXE mgmt (web01a) DHCP / trunk" {
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcptrunk ngcpnoupload ngcpnw.dhcp ngcpcrole=mgmt ngcpnonwrecfg ngcphostname=web01a
linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnoupload ngcpnw.dhcp ngcptrunk ngcpcrole=mgmt ngcpnonwrecfg ngcphostname=web01a
echo 'Loading initrd...'
initrd /boot/%SHORT_NAME%/initrd.img
}
menuentry "sip:Carrier 3.x PXE mgmt (web01a) / trunk" {
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp2 ngcptrunk ngcpnoupload ngcpcrole=mgmt ngcphostname=web01b ngcpnonwrecfg dns=92.42.136.30 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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcpnoupload ngcpnonwrecfg dns=92.42.136.30 ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off ngcptrunk ngcpcrole=mgmt ngcphostname=web01a
echo 'Loading initrd...'
initrd /boot/%SHORT_NAME%/initrd.img
}
menuentry "sip:Carrier 3.x mgmt/db/proxy/lb DHCP / mr3.6.1" {
echo 'Loading kernel...'
linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpvers=mr3.6.1 ngcpnoupload ngcpnw.dhcp ngcpnonwrecfg ngcphostname=web01a_FIXME ngcpcrole=mgmt_FIXME ngcpsp1_FIXME
echo 'Loading initrd...'
initrd /boot/%SHORT_NAME%/initrd.img
}
menuentry "sip:Carrier 3.x mgmt/db/proxy/lb / mr3.6.1" {
echo 'Loading kernel...'
linux /boot/%SHORT_NAME%/vmlinuz live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpvers=mr3.6.1 ngcpnoupload ngcpnw.dhcp ngcpnonwrecfg ngcphostname=web01a_FIXME ngcpcrole=mgmt_FIXME ngcpsp1_FIXME dns=92.42.136.30 ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off
echo 'Loading initrd...'
initrd /boot/%SHORT_NAME%/initrd.img
}
source /boot/grub/sipwise_carrier.cfg
} # Specific sip:providerCarrier 3.x releases

@ -358,13 +358,13 @@ menu exit
menu separator
label carrierweb01atrunkdhcp
menu label sip:Carrier 3.x PXE mgmt/web01a DHCP / trunk
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcptrunk ngcpnw.dhcp ngcpcrole=mgmt ngcphostname=web01a ngcpnonwrecfg
append initrd=/boot/%SHORT_NAME%/initrd.img live-media-path=/live/%GRML_NAME%/ boot=live bootid=%BOOTID% apm=power-off vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcptrunk ngcpnw.dhcp ngcpnonwrecfg ngcpcrole=mgmt ngcphostname=web01a
text help
Install sip:Carrier 3.x edition (trunk).
Install web01a node of Carrier 3.x setup.
Install sip:Carrier edition (trunk).
Install web01a node of Carrier setup.
Other nodes will be installed from web01a.
Retrieve network configuration via DHCP.
@ -372,45 +372,20 @@ label carrierweb01atrunkdhcp
label carrierweb01atrunkstatic
menu label sip:Carrier 3.x PXE mgmt/web01a / trunk
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp2 ngcptrunk ngcpnoupload ngcpcrole=mgmt ngcphostname=web01b ngcpnonwrecfg dns=92.42.136.30 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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpsp1 ngcptrunk ngcpnoupload ngcpnonwrecfg dns=92.42.136.30 ngcpcrole=mgmt ngcphostname=web01a ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off
text help
Install sip:Carrier 3.x edition (trunk).
Install web01a node of Carrier 3.x setup.
Install sip:Carrier edition (trunk).
Install web01a node of Carrier setup.
Other nodes will be installed from web01a.
Static network configuration.
endtext
label carrieranymr361dhcp
menu label sip:Carrier 3.x mgmt/db/proxy/lb DHCP / mr3.6.1
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpvers=mr3.6.1 ngcpnoupload ngcpnw.dhcp ngcpnonwrecfg ngcphostname=web01a_FIXME ngcpcrole=mgmt_FIXME ngcpsp1_FIXME
text help
Install sip:Carrier 3.x edition (mr3.6.1).
Install any node of Carrier 3.x setup.
Please configure boot options manually!
Retrieve network configuration via DHCP.
endtext
label carrieranymr361static
menu label sip:Carrier 3.x mgmt/db/proxy/lb / mr3.6.1
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 vga=791 quiet nomce ngcppro ssh=sipwise debianrelease=wheezy netscript=http://deb.sipwise.com/kantan/deployment.sh ngcpvers=mr3.6.1 ngcpnoupload ngcpnw.dhcp ngcpnonwrecfg ngcphostname=web01a_FIXME ngcpcrole=mgmt_FIXME ngcpsp1_FIXME dns=92.42.136.30 ip=10.15.20.101::10.15.20.1:255.255.255.0:sp1:eth0:off
text help
Install sip:Carrier 3.x edition (mr3.6.1).
Install any node of Carrier 3.x setup.
Please configure boot options manually!
Static network configuration.
endtext
include sipwise_carrier.cfg
# back to main menu
label quit

Loading…
Cancel
Save