diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2018-10-22 00:59:33 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2018-10-22 00:59:33 +0200 |
commit | d7b7f5a0440da862db7701f5135b68c9a9ec75b4 (patch) | |
tree | 7f6c0eabc7e3defe12e15c290cad60eec8ada3cf | |
parent | f83330c72c41a4e118f7ca162027e29b684205fb (diff) | |
download | vyos-build-d7b7f5a0440da862db7701f5135b68c9a9ec75b4.tar.gz vyos-build-d7b7f5a0440da862db7701f5135b68c9a9ec75b4.zip |
Add Azure creation script
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | tools/cloud-init/99-walinuxagent.chroot | 17 | ||||
-rw-r--r-- | tools/cloud-init/config.boot.default | 30 | ||||
-rw-r--r-- | tools/cloud-init/vyos-azure.list.chroot | 2 |
4 files changed, 52 insertions, 0 deletions
@@ -82,6 +82,9 @@ 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/99-walinuxagent.chroot build/config/hooks/ + cp tools/cloud-init/vyos-azure.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ cd $(build_dir) @../scripts/build-azure-image diff --git a/tools/cloud-init/99-walinuxagent.chroot b/tools/cloud-init/99-walinuxagent.chroot new file mode 100755 index 00000000..f8848a2c --- /dev/null +++ b/tools/cloud-init/99-walinuxagent.chroot @@ -0,0 +1,17 @@ +#!/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/* +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/config.boot.default b/tools/cloud-init/config.boot.default new file mode 100644 index 00000000..18f6ef09 --- /dev/null +++ b/tools/cloud-init/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/vyos-azure.list.chroot b/tools/cloud-init/vyos-azure.list.chroot new file mode 100644 index 00000000..91320a59 --- /dev/null +++ b/tools/cloud-init/vyos-azure.list.chroot @@ -0,0 +1,2 @@ +cloud-init +walinuxagent |