From d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Tue, 21 May 2019 22:15:55 +0200 Subject: update cloud builds --- tools/cloud-init/99-debug-user.chroot | 17 ++++++++++ tools/cloud-init/99-disable-networking.chroot | 3 ++ tools/cloud-init/GCE/99-debug-user.chroot | 17 ---------- tools/cloud-init/OCI/config.boot.default | 12 ++++++- tools/cloud-init/PACKET/90_dpkg.cfg | 8 +++++ tools/cloud-init/PACKET/config.boot.default | 39 +++++++++++++++++++++ tools/cloud-init/PACKET/config.boot.default-debug | 41 +++++++++++++++++++++++ tools/cloud-init/openstack/90_dpkg.cfg | 8 +++++ tools/cloud-init/openstack/config.boot.default | 40 ++++++++++++++++++++++ 9 files changed, 167 insertions(+), 18 deletions(-) create mode 100755 tools/cloud-init/99-debug-user.chroot create mode 100755 tools/cloud-init/99-disable-networking.chroot delete mode 100755 tools/cloud-init/GCE/99-debug-user.chroot create mode 100644 tools/cloud-init/PACKET/90_dpkg.cfg create mode 100644 tools/cloud-init/PACKET/config.boot.default create mode 100644 tools/cloud-init/PACKET/config.boot.default-debug create mode 100644 tools/cloud-init/openstack/90_dpkg.cfg create mode 100644 tools/cloud-init/openstack/config.boot.default (limited to 'tools/cloud-init') diff --git a/tools/cloud-init/99-debug-user.chroot b/tools/cloud-init/99-debug-user.chroot new file mode 100755 index 00000000..7b72f898 --- /dev/null +++ b/tools/cloud-init/99-debug-user.chroot @@ -0,0 +1,17 @@ +#!/bin/bash +# Script to add a user to Linux system +if [ $(id -u) -eq 0 ]; then + egrep "^debuguser" /etc/passwd >/dev/null + if [ $? -eq 0 ]; then + echo "$username exists!" + exit 1 + else + pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) + useradd -m -p $pass debuguser + usermod -aG sudo debuguser + [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" + fi +else + echo "Only root may add a user to the system" + exit 2 +fi diff --git a/tools/cloud-init/99-disable-networking.chroot b/tools/cloud-init/99-disable-networking.chroot new file mode 100755 index 00000000..e576c8a5 --- /dev/null +++ b/tools/cloud-init/99-disable-networking.chroot @@ -0,0 +1,3 @@ +#!/bin/bash +systemctl disable networking +/usr/sbin/update-rc.d -f networking remove diff --git a/tools/cloud-init/GCE/99-debug-user.chroot b/tools/cloud-init/GCE/99-debug-user.chroot deleted file mode 100755 index 7b72f898..00000000 --- a/tools/cloud-init/GCE/99-debug-user.chroot +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Script to add a user to Linux system -if [ $(id -u) -eq 0 ]; then - egrep "^debuguser" /etc/passwd >/dev/null - if [ $? -eq 0 ]; then - echo "$username exists!" - exit 1 - else - pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) - useradd -m -p $pass debuguser - usermod -aG sudo debuguser - [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" - fi -else - echo "Only root may add a user to the system" - exit 2 -fi diff --git a/tools/cloud-init/OCI/config.boot.default b/tools/cloud-init/OCI/config.boot.default index 296c690a..de724f0b 100644 --- a/tools/cloud-init/OCI/config.boot.default +++ b/tools/cloud-init/OCI/config.boot.default @@ -1,4 +1,14 @@ system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } syslog { global { facility all { @@ -16,7 +26,7 @@ system { } console { device ttyS0 { - speed 115200 + speed 9600 } } config-management { diff --git a/tools/cloud-init/PACKET/90_dpkg.cfg b/tools/cloud-init/PACKET/90_dpkg.cfg new file mode 100644 index 00000000..4f7bbd8c --- /dev/null +++ b/tools/cloud-init/PACKET/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ Ec2 ] +datasource: + Ec2: + metadata_urls: ["https://metadata.packet.net"] + max_wait: 120 + timeout: 50 + strict_id: false diff --git a/tools/cloud-init/PACKET/config.boot.default b/tools/cloud-init/PACKET/config.boot.default new file mode 100644 index 00000000..cca5fcbc --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default @@ -0,0 +1,39 @@ +system { + host-name vyos + login { + user vyos { + authentication { + plaintext-password "vyos" + } + level admin + } + } + 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 ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/PACKET/config.boot.default-debug b/tools/cloud-init/PACKET/config.boot.default-debug new file mode 100644 index 00000000..85e3a890 --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default-debug @@ -0,0 +1,41 @@ +interfaces { + ethernet eth0 { + address dhcp + } +} +service { + ssh { + port 8022 + client-keepalive-interval 180 + } +} +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 ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/openstack/90_dpkg.cfg b/tools/cloud-init/openstack/90_dpkg.cfg new file mode 100644 index 00000000..a740b314 --- /dev/null +++ b/tools/cloud-init/openstack/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, AltCloud, MAAS, OpenStack, CloudSigma, SmartOS, None ] +disable_ec2_metadata: true +datasource: + OpenStack: + max_wait: 6 + timeout: 3 + retries: 2 diff --git a/tools/cloud-init/openstack/config.boot.default b/tools/cloud-init/openstack/config.boot.default new file mode 100644 index 00000000..de724f0b --- /dev/null +++ b/tools/cloud-init/openstack/config.boot.default @@ -0,0 +1,40 @@ +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } + 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 { + } +} -- cgit v1.2.3 From 91d4cd070f15d24886928cb5a31303a8387c51e8 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Fri, 12 Jul 2019 10:39:42 +0200 Subject: Add default hostname --- tools/cloud-init/GCE/config.boot.default | 1 + tools/cloud-init/GCE/config.boot.default-debug | 1 + tools/cloud-init/PACKET/config.boot.default | 8 -------- tools/cloud-init/PACKET/config.boot.default-debug | 1 + tools/cloud-init/azure/config.boot.default | 1 + 5 files changed, 4 insertions(+), 8 deletions(-) (limited to 'tools/cloud-init') diff --git a/tools/cloud-init/GCE/config.boot.default b/tools/cloud-init/GCE/config.boot.default index a0cc398f..cac26936 100644 --- a/tools/cloud-init/GCE/config.boot.default +++ b/tools/cloud-init/GCE/config.boot.default @@ -1,4 +1,5 @@ system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/GCE/config.boot.default-debug b/tools/cloud-init/GCE/config.boot.default-debug index 9514e893..a51c3f4d 100644 --- a/tools/cloud-init/GCE/config.boot.default-debug +++ b/tools/cloud-init/GCE/config.boot.default-debug @@ -10,6 +10,7 @@ service { } } system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/PACKET/config.boot.default b/tools/cloud-init/PACKET/config.boot.default index cca5fcbc..b56a94aa 100644 --- a/tools/cloud-init/PACKET/config.boot.default +++ b/tools/cloud-init/PACKET/config.boot.default @@ -1,13 +1,5 @@ system { host-name vyos - login { - user vyos { - authentication { - plaintext-password "vyos" - } - level admin - } - } syslog { global { facility all { diff --git a/tools/cloud-init/PACKET/config.boot.default-debug b/tools/cloud-init/PACKET/config.boot.default-debug index 85e3a890..660f1d0f 100644 --- a/tools/cloud-init/PACKET/config.boot.default-debug +++ b/tools/cloud-init/PACKET/config.boot.default-debug @@ -10,6 +10,7 @@ service { } } system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/azure/config.boot.default b/tools/cloud-init/azure/config.boot.default index 296c690a..32025974 100644 --- a/tools/cloud-init/azure/config.boot.default +++ b/tools/cloud-init/azure/config.boot.default @@ -1,4 +1,5 @@ system { + host-name vyos syslog { global { facility all { -- cgit v1.2.3