diff options
24 files changed, 424 insertions, 20 deletions
diff --git a/.gitmodules b/.gitmodules index fe47ce28..f0c9ea46 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,9 +73,6 @@ [submodule "packages/vyatta-op-quagga"] path = packages/vyatta-op-quagga url = https://github.com/vyos/vyatta-op-quagga.git -[submodule "packages/vyatta-cfg-dhcp-relay"] - path = packages/vyatta-cfg-dhcp-relay - url = https://github.com/vyos/vyatta-cfg-dhcp-relay.git [submodule "packages/vyatta-op-dhcp-server"] path = packages/vyatta-op-dhcp-server url = https://github.com/vyos/vyatta-op-dhcp-server.git @@ -142,3 +139,9 @@ [submodule "packages/pmacct"] path = packages/pmacct url = https://github.com/vyos/pmacct +[submodule "packages/vyos-strongswan"] + path = packages/vyos-strongswan + url = https://github.com/vyos/vyos-strongswan +[submodule "packages/vyos-frr"] + path = packages/vyos-frr + url = https://github.com/vyos/vyos-frr.git @@ -30,6 +30,8 @@ RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/ libperl-dev \ libnfnetlink-dev \ python3-git \ + parted \ + kpartx \ jq \ qemu-system-x86 \ qemu-utils \ @@ -82,9 +82,38 @@ clearfog: clean prepare azure: clean prepare @set -e @echo "It's not like I'm building this specially for you or anything!" + cp tools/cloud-init/azure/99-walinuxagent.chroot build/config/hooks/ + cp tools/cloud-init/azure/vyos-azure.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/azure/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ cd $(build_dir) @../scripts/build-azure-image +.PHONY: GCE +.ONESHELL: +GCE: clean prepare + @set -e + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/GCE/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/GCE/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + @../scripts/build-GCE-image + +.PHONY: AWS +.ONESHELL: +AWS: clean prepare + @set -e + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/AWS/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/AWS/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: clean .ONESHELL: clean: @@ -98,6 +127,8 @@ clean: rm -f *.img rm -f *.xz rm -f *.vhd + rm -f *.raw + rm -f *.tar.gz .PHONY: purge purge: diff --git a/data/live-build-config/archives/vyos.key.chroot b/data/live-build-config/archives/vyos-dev.key.chroot index a6522e36..a6522e36 100644 --- a/data/live-build-config/archives/vyos.key.chroot +++ b/data/live-build-config/archives/vyos-dev.key.chroot diff --git a/data/live-build-config/archives/vyos-release.key.chroot b/data/live-build-config/archives/vyos-release.key.chroot new file mode 100644 index 00000000..ff47c683 --- /dev/null +++ b/data/live-build-config/archives/vyos-release.key.chroot @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQINBFXKsiIBEACyid9PR/v56pSRG8VgQyRwvzoI7rLErZ8BCQA2WFxA6+zNy+6G ++0E/6XAOzE+VHli+wtJpiVJwAh+wWuqzOmv9css2fdJxpMW87pJAS2i3EVVVf6ab +wU848JYLGzc9y7gZrnT1m2fNh4MXkZBNDp780WpOZx8roZq5X+j+Y5hk5KcLiBn/ +lh9Zoh8yzrWDSXQsz0BGoAbVnLUEWyo0tcRcHuC0eLx6oNG/IHvd/+kxWB1uULHU +SlB/6vcx56lLqgzywkmhP01050ZDyTqrFRIfrvw6gLQaWlgR3lB93txvF/sz87Il +VblV7e6HEyVUQxedDS8ikOyzdb5r9a6Zt/j8ZPSntFNM6OcKAI7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LdZxM1k+DahCJgwWabDCUizm +sVP3epAP19FP8sNtHi0P1LC0kq6/0qJot+4iBiRwXMervCD5ExdOm2ugvSgghdYN +BikFHvmsCxbZAQjykQ6TMn+vkmcEz4fGAn4L7Nx4paKEtXaAFO8TJmFjOlGUthEm +CtHDKjCTh9WV4pwG2WnXuACjnJcs6LcK377EjWU25H4y1ff+NDIUg/DWfSS85iIc +UgkOlQO6HJy0O96L5uxn7VJpXNYFa20lpfTVZv7uu3BC3RW/FyOYsGtSiUKYq6cb +CMxGTfFxGeynwIlPRlH68BqH6ctR/mVdo+5UIWsChSnNd1GreIEI6p2nBk3mc7jZ +7pTEHpjarwOjs/S/lK+vLW53CSFimmW4lw3MwqiyAkxl0tHAT7QMHH9Rgw2HF/g6 +XD76fpFdMT856dsuf+j2uuJFlFe5B1fERBzeU18MxML0VpDmGFEaxxypfACeI/iu +8vzPzaWHhkOkU8/J/Ci7+vNtUOZb +=Ld8S +-----END PGP PUBLIC KEY BLOCK----- diff --git a/data/live-build-config/hooks/30-frr-configs.chroot b/data/live-build-config/hooks/30-frr-configs.chroot index b2a715d3..cc169fb5 100755 --- a/data/live-build-config/hooks/30-frr-configs.chroot +++ b/data/live-build-config/hooks/30-frr-configs.chroot @@ -31,11 +31,11 @@ bfdd=no daemons_conf = """ vtysh_enable=yes -zebra_options=" -s 90000000 --daemon -A 127.0.0.1 -n" -bgpd_options=" --daemon -A 127.0.0.1" -ospfd_options=" --daemon -A 127.0.0.1" -ospf6d_options=" --daemon -A ::1" -ripd_options=" --daemon -A 127.0.0.1" +zebra_options=" -s 90000000 --daemon -A 127.0.0.1 -M snmp -n" +bgpd_options=" --daemon -A 127.0.0.1 -M snmp" +ospfd_options=" --daemon -A 127.0.0.1 -M snmp" +ospf6d_options=" --daemon -A ::1 -M snmp" +ripd_options=" --daemon -A 127.0.0.1 -M snmp" ripngd_options=" --daemon -A ::1" isisd_options=" --daemon -A 127.0.0.1" pimd_options=" --daemon -A 127.0.0.1" diff --git a/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-relay b/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-relay new file mode 100755 index 00000000..5a8ce620 --- /dev/null +++ b/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-relay @@ -0,0 +1,50 @@ +#!/bin/sh +# +# + +### BEGIN INIT INFO +# Provides: isc-dhcpv6-relay +# Required-Start: $remote_fs $network +# Required-Stop: $remote_fs $network +# Should-Start: $local_fs +# Should-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: IPv6 DHCP relay +# Description: Dynamic Host Configuration Protocol Relay for IPv6 +### END INIT INFO + +# It is not safe to start if we don't have a default configuration... +if [ ! -f /etc/default/isc-dhcpv6-relay ]; then + echo "/etc/default/isc-dhcpv6-relay does not exist! - Aborting..." + exit 1 +fi + +# Source init functions +. /lib/lsb/init-functions + +# Read init script configuration (interfaces the daemon should listen on +# and the DHCP server we should forward requests to.) +[ -f /etc/default/isc-dhcpv6-relay ] && . /etc/default/isc-dhcpv6-relay + +DHCRELAYPID=/var/run/dhcv6relay.pid + +case "$1" in + start) + start-stop-daemon --start --quiet --pidfile $DHCRELAYPID \ + --exec /usr/sbin/dhcrelay -- -q $OPTIONS -pf $DHCRELAYPID + ;; + stop) + start-stop-daemon --stop --quiet --pidfile $DHCRELAYPID + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/isc-dhcpv6-relay {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-server b/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-server index c7278416..441827d5 100755 --- a/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-server +++ b/data/live-build-config/includes.chroot/etc/init.d/isc-dhcpv6-server @@ -3,15 +3,15 @@ # ### BEGIN INIT INFO -# Provides: isc-dhcp-server +# Provides: isc-dhcpv6-server # Required-Start: $remote_fs $network $syslog # Required-Stop: $remote_fs $network $syslog # Should-Start: $local_fs slapd $named # Should-Stop: $local_fs slapd # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: DHCP server -# Description: Dynamic Host Configuration Protocol Server +# Short-Description: IPv6 DHCP server +# Description: Dynamic Host Configuration Protocol Server for IPv6 ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -23,9 +23,6 @@ DHCPD_DEFAULT="${DHCPD_DEFAULT:-/etc/default/isc-dhcpv6-server}" # It is not safe to start if we don't have a default configuration... if [ ! -f "$DHCPD_DEFAULT" ]; then echo "$DHCPD_DEFAULT does not exist! - Aborting..." - if [ "$DHCPD_DEFAULT" = "/etc/default/isc-dhcp-server" ]; then - echo "Run 'dpkg-reconfigure isc-dhcp-server' to fix the problem." - fi exit 0 fi diff --git a/data/live-build-config/includes.chroot/etc/systemd/system/getty@.service.d/aftervyos.conf b/data/live-build-config/includes.chroot/etc/systemd/system/getty@.service.d/aftervyos.conf deleted file mode 100644 index 7eee7bd3..00000000 --- a/data/live-build-config/includes.chroot/etc/systemd/system/getty@.service.d/aftervyos.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -After=vyatta-router.service diff --git a/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default b/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default index 0a75716b..1509ac85 100644 --- a/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default +++ b/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default @@ -12,7 +12,7 @@ system { syslog { global { facility all { - level notice + level info } facility protocols { level debug diff --git a/data/live-build-config/package-lists/vyos-utils.list.chroot b/data/live-build-config/package-lists/vyos-utils.list.chroot index ef9e994a..78ed5729 100644 --- a/data/live-build-config/package-lists/vyos-utils.list.chroot +++ b/data/live-build-config/package-lists/vyos-utils.list.chroot @@ -19,3 +19,6 @@ iftop lsof openssh-client haveged +htop +atop +iotop diff --git a/packages/vyatta-cfg-dhcp-relay b/packages/vyatta-cfg-dhcp-relay deleted file mode 160000 -Subproject 85c7b8b985685e859067ff75afebdb6fa64ed8e diff --git a/packages/vyos-frr b/packages/vyos-frr new file mode 160000 +Subproject 6ba5fb8036f9155a3f724d43513e89ab8f07e8d diff --git a/packages/vyos-strongswan b/packages/vyos-strongswan new file mode 160000 +Subproject 5f1a6880eb6ac98deb48b915bc574c2a5260831 diff --git a/scripts/build-GCE-image b/scripts/build-GCE-image new file mode 100755 index 00000000..7684bd43 --- /dev/null +++ b/scripts/build-GCE-image @@ -0,0 +1,153 @@ +#!/bin/sh +# +# Copyright (C) 2018 VyOS maintainers and contributors +# +# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 or later as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# File: build-GCE-image +# Purpose: +# Build VyOS image for Google cloud. + +lb bootstrap + +lb chroot +lb installer +lb binary_chroot +lb chroot_devpts install +lb chroot_proc install +lb chroot_selinuxfs install +lb chroot_sysfs install +lb chroot_hosts install +lb chroot_resolv install +lb chroot_hostname install +lb chroot_sysv-rc install +lb chroot_upstart install +lb chroot_apt install-binary +lb chroot_archives chroot install +lb binary_rootfs +lb binary_manifest +lb binary_package-lists +lb binary_linux-image +lb binary_memtest +lb binary_grub +lb binary_grub2 +lb binary_syslinux +lb binary_disk +lb binary_loadlin +lb binary_win32-loader +lb binary_includes +lb binary_hooks +lb binary_checksums + +# get vyos build version +version=$(cat version) +dateymd=$(date +%Y%m%d) + +###################################### +### Prepare the HDD (format, ext.) ### +###################################### +PARTED=/sbin/parted +OUTPUT=disk.raw +OUTPUTGZ=VyOS-"$dateymd".tar.gz +IMAGE_SIZE=2 +qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G + +${PARTED} -s ${OUTPUT} mktable msdos +${PARTED} -s -a optimal ${OUTPUT} mkpart primary ext4 1Mi 100% +${PARTED} -s ${OUTPUT} set 1 boot on +RESULT_KPARTX=`kpartx -asv ${OUTPUT} 2>&1` + +if echo "${RESULT_KPARTX}" | grep "^add map" ; then + LOOP_DEVICE=$(echo ${RESULT_KPARTX} | cut -d" " -f3) + LOOPRAW_DEVICE=${LOOP_DEVICE%p*} + echo "kpartx mounted using: ${LOOP_DEVICE} via ${LOOPRAW_DEVICE}" +else + echo "It seems kpartx didn't mount the image correctly: exiting." + exit 1 +fi + +cleanup(){ + error=$? + [ ! -d "${MOUNT_DIR}" ] && return + if [ "$error" -gt 0 ]; then + echo + echo "Error $error" + else + echo "Finished." + fi + + set +e + + sync + umount -l ${MOUNT_DIR} + rmdir ${MOUNT_DIR} + + umount devpts-live + umount proc-live + umount sysfs-live + + dmsetup remove --deferred ${LOOP_DEVICE} + losetup -d /dev/${LOOPRAW_DEVICE} + exit $error +} +trap "cleanup" EXIT TERM INT + +mkfs.ext4 /dev/mapper/${LOOP_DEVICE} -L persistence +UUID=$(blkid -o value -s UUID /dev/mapper/${LOOP_DEVICE}) + +# No fsck because of X days without checks +tune2fs -i 0 /dev/mapper/${LOOP_DEVICE} + +MOUNT_DIR=`mktemp -d -t build-debimg.XXXXXX` +mount /dev/mapper/${LOOP_DEVICE} ${MOUNT_DIR} + +######################## +### Setting-up files ### +######################## +mkdir -p ${MOUNT_DIR}/boot/grub +mkdir -p ${MOUNT_DIR}/boot/"$version"/rw + +echo "/ union" > ${MOUNT_DIR}/persistence.conf +cp binary/live/filesystem.squashfs ${MOUNT_DIR}/boot/"$version"/"$version.squashfs" +cp binary/live/initrd.img ${MOUNT_DIR}/boot/"$version"/initrd.img +cp binary/live/vmlinuz ${MOUNT_DIR}/boot/"$version"/vmlinuz + +######################## +### Create grub menu ### +######################## +cat > ${MOUNT_DIR}/boot/grub/grub.cfg << EOF +set timeout=5 +set default=0 + +menuentry "VyOS $version (Serial console)" { + linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,38400n8d earlyprintk=ttyS0,38400 consoleblank=0 systemd.show_status=true + initrd /boot/"$version"/initrd.img +} + +menuentry "Lost password change $version (Serial console)" { + linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,38400n8d earlyprintk=ttyS0,38400 consoleblank=0 systemd.show_status=true init=/opt/vyatta/sbin/standalone_root_pw_reset + initrd /boot/"$version"/initrd.img +} +EOF + + +############################# +### Setting-up bootloader ### +############################# +grub-install --boot-directory ${MOUNT_DIR}/boot --force --no-floppy --skip-fs-probe /dev/${LOOPRAW_DEVICE} + +################### +### HOOK SCRIPT ### +################### +fstrim ${MOUNT_DIR} +sync + +tar -Sczf ${OUTPUTGZ} ${OUTPUT} diff --git a/scripts/build-azure-image b/scripts/build-azure-image index d158fe89..d47b4351 100755 --- a/scripts/build-azure-image +++ b/scripts/build-azure-image @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# File: build-clearfog-image +# File: build-azure-image # Purpose: # Build VyOS image for Azure. @@ -127,12 +127,12 @@ set timeout=5 set default=0 menuentry "VyOS $version (Serial console)" { - linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true + linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=tty0 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true initrd /boot/"$version"/initrd.img } menuentry "Lost password change $version (Serial console)" { - linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true init=/opt/vyatta/sbin/standalone_root_pw_reset + linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=tty0 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true init=/opt/vyatta/sbin/standalone_root_pw_reset initrd /boot/"$version"/initrd.img } EOF diff --git a/tools/cloud-init/AWS/90_dpkg.cfg b/tools/cloud-init/AWS/90_dpkg.cfg new file mode 100644 index 00000000..1bf7d288 --- /dev/null +++ b/tools/cloud-init/AWS/90_dpkg.cfg @@ -0,0 +1,2 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ Ec2 ] diff --git a/tools/cloud-init/AWS/config.boot.default b/tools/cloud-init/AWS/config.boot.default new file mode 100644 index 00000000..18f6ef09 --- /dev/null +++ b/tools/cloud-init/AWS/config.boot.default @@ -0,0 +1,30 @@ +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 9600 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/GCE/90_dpkg.cfg b/tools/cloud-init/GCE/90_dpkg.cfg new file mode 100644 index 00000000..ac4ffeae --- /dev/null +++ b/tools/cloud-init/GCE/90_dpkg.cfg @@ -0,0 +1,2 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ GCE ] diff --git a/tools/cloud-init/GCE/config.boot.default b/tools/cloud-init/GCE/config.boot.default new file mode 100644 index 00000000..a0cc398f --- /dev/null +++ b/tools/cloud-init/GCE/config.boot.default @@ -0,0 +1,30 @@ +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 38400 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/azure/99-walinuxagent.chroot b/tools/cloud-init/azure/99-walinuxagent.chroot new file mode 100755 index 00000000..1de525cf --- /dev/null +++ b/tools/cloud-init/azure/99-walinuxagent.chroot @@ -0,0 +1,18 @@ +#!/bin/sh + +echo I: Waagent / Cloud init + +# debug info: +#echo ForwardToConsole=yes >> /etc/systemd/journald.conf + +# dhcp issue on azure +sed -ie 's,rfc3442-classless-static-routes,disabled-\0,' /etc/dhcp/dhclient.conf + +rm -f /etc/ssh/ssh_host_* +rm -f /var/log/waagent.log +rm -r /var/cache/apt/* +mkdir -p /var/cache/apt/archives +rm -r /var/lib/apt/lists/* + +# prevent systemd message flooding +echo ':msg, contains, "Time has been changed" ~' > /etc/rsyslog.d/time_msgs.conf diff --git a/tools/cloud-init/azure/config.boot.default b/tools/cloud-init/azure/config.boot.default new file mode 100644 index 00000000..296c690a --- /dev/null +++ b/tools/cloud-init/azure/config.boot.default @@ -0,0 +1,30 @@ +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/azure/vyos-azure.list.chroot b/tools/cloud-init/azure/vyos-azure.list.chroot new file mode 100644 index 00000000..91320a59 --- /dev/null +++ b/tools/cloud-init/azure/vyos-azure.list.chroot @@ -0,0 +1,2 @@ +cloud-init +walinuxagent diff --git a/tools/cloud-init/cloud-init.list.chroot b/tools/cloud-init/cloud-init.list.chroot new file mode 100644 index 00000000..db064e62 --- /dev/null +++ b/tools/cloud-init/cloud-init.list.chroot @@ -0,0 +1 @@ +cloud-init |