From 16cc9be3ba331216392e988f20183ab8c4eda0ce Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 23 Oct 2018 23:58:42 +0200 Subject: Separate files needed for different cloud providers Fix serial console speed settings Add google cloud image generation --- tools/cloud-init/99-walinuxagent.chroot | 18 ---------------- tools/cloud-init/GCE/90_dpkg.cfg | 2 ++ tools/cloud-init/GCE/config.boot.default | 30 +++++++++++++++++++++++++++ tools/cloud-init/azure/99-walinuxagent.chroot | 18 ++++++++++++++++ tools/cloud-init/azure/config.boot.default | 30 +++++++++++++++++++++++++++ tools/cloud-init/azure/vyos-azure.list.chroot | 2 ++ tools/cloud-init/cloud-init.list.chroot | 1 + tools/cloud-init/config.boot.default | 30 --------------------------- tools/cloud-init/vyos-azure.list.chroot | 2 -- 9 files changed, 83 insertions(+), 50 deletions(-) delete mode 100755 tools/cloud-init/99-walinuxagent.chroot create mode 100644 tools/cloud-init/GCE/90_dpkg.cfg create mode 100644 tools/cloud-init/GCE/config.boot.default create mode 100755 tools/cloud-init/azure/99-walinuxagent.chroot create mode 100644 tools/cloud-init/azure/config.boot.default create mode 100644 tools/cloud-init/azure/vyos-azure.list.chroot create mode 100644 tools/cloud-init/cloud-init.list.chroot delete mode 100644 tools/cloud-init/config.boot.default delete mode 100644 tools/cloud-init/vyos-azure.list.chroot (limited to 'tools/cloud-init') diff --git a/tools/cloud-init/99-walinuxagent.chroot b/tools/cloud-init/99-walinuxagent.chroot deleted file mode 100755 index 1de525cf..00000000 --- a/tools/cloud-init/99-walinuxagent.chroot +++ /dev/null @@ -1,18 +0,0 @@ -#!/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/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 diff --git a/tools/cloud-init/config.boot.default b/tools/cloud-init/config.boot.default deleted file mode 100644 index 18f6ef09..00000000 --- a/tools/cloud-init/config.boot.default +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index 91320a59..00000000 --- a/tools/cloud-init/vyos-azure.list.chroot +++ /dev/null @@ -1,2 +0,0 @@ -cloud-init -walinuxagent -- cgit v1.2.3