diff options
author | UnicronNL <kim.sidney@gmail.com> | 2019-05-21 22:15:55 +0200 |
---|---|---|
committer | UnicronNL <kim.sidney@gmail.com> | 2019-05-21 22:15:55 +0200 |
commit | d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0 (patch) | |
tree | 1f4d3d262d72e0bbb74d221e6220a23b9ba403ea | |
parent | 217aa6afaebc021700cb6a4984f35720995f7ec5 (diff) | |
download | vyos-build-d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0.tar.gz vyos-build-d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0.zip |
update cloud builds
-rw-r--r-- | Makefile | 48 | ||||
-rwxr-xr-x | scripts/build-oracle-image | 2 | ||||
-rw-r--r-- | scripts/template.ovf | 28 | ||||
-rwxr-xr-x | tools/cloud-init/99-debug-user.chroot (renamed from tools/cloud-init/GCE/99-debug-user.chroot) | 0 | ||||
-rwxr-xr-x | tools/cloud-init/99-disable-networking.chroot | 3 | ||||
-rw-r--r-- | tools/cloud-init/OCI/config.boot.default | 12 | ||||
-rw-r--r-- | tools/cloud-init/PACKET/90_dpkg.cfg | 8 | ||||
-rw-r--r-- | tools/cloud-init/PACKET/config.boot.default | 39 | ||||
-rw-r--r-- | tools/cloud-init/PACKET/config.boot.default-debug | 41 | ||||
-rw-r--r-- | tools/cloud-init/openstack/90_dpkg.cfg | 8 | ||||
-rw-r--r-- | tools/cloud-init/openstack/config.boot.default | 40 |
11 files changed, 213 insertions, 16 deletions
@@ -112,7 +112,7 @@ GCE-debug: 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/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-debug-user.chroot build/config/hooks/live/ 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-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default @@ -133,6 +133,20 @@ AWS: clean prepare cd .. @scripts/copy-image +.PHONY: openstack +.ONESHELL: +openstack: 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/openstack/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/openstack/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: oracle .ONESHELL: oracle: clean prepare @@ -141,9 +155,41 @@ oracle: clean prepare mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d cp tools/cloud-init/OCI/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/OCI/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ cd $(build_dir) @../scripts/build-oracle-image +.PHONY: PACKET +.ONESHELL: +PACKET: 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/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/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/PACKET/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: PACKET-debug +.ONESHELL: +PACKET-debug: 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/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/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/PACKET/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: clean .ONESHELL: clean: diff --git a/scripts/build-oracle-image b/scripts/build-oracle-image index 61f8ddee..e2066fc7 100755 --- a/scripts/build-oracle-image +++ b/scripts/build-oracle-image @@ -57,7 +57,7 @@ dateymd=$(date +%Y%m%d) PARTED=/sbin/parted OUTPUT=disk.raw OUTPUTQCOW2=VyOS-"$dateymd".qcow2 -IMAGE_SIZE=2 +IMAGE_SIZE=10 qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G ${PARTED} -s ${OUTPUT} mktable msdos diff --git a/scripts/template.ovf b/scripts/template.ovf index 87237bf7..88ea5562 100644 --- a/scripts/template.ovf +++ b/scripts/template.ovf @@ -1,5 +1,5 @@ -<?xml version='1.0' encoding='UTF-8'?> -<ovf:Envelope xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vmw="http://www.vmware.com/schema/ovf"> +<?xml version="1.0" encoding="UTF-8"?> +<ovf:Envelope xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <References> <File ovf:href="vyos_vmware_image.vmdk" ovf:id="file1" ovf:size="{{vmdk_file_size}}"/> </References> @@ -39,22 +39,22 @@ <ProductSection ovf:required="false"> <Info>VyOS is a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality.</Info> <Product>VyOS</Product> - <Vendor>VyOS maintainers and contributors</Vendor> + <Vendor>Sentrium S.L.</Vendor> <Version>{{version}}</Version> <ProductUrl>https://www.vyos.io</ProductUrl> <VendorUrl>https://sentrium.io/</VendorUrl> <AppUrl/> <Category>Appliance user Settings</Category> - <Property ovf:key="password" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:qualifiers="MinLen(8)" ovf:password="true"> + <Property ovf:key="password" ovf:password="true" ovf:qualifiers="MinLen(8)" ovf:type="string" ovf:userConfigurable="true" ovf:value=""> <Label ovf:msgid="Password.label">Password</Label> - <Description ovf:msgid="Password.description">The password for the appliance 'vyos' account. Passwords must be at least 8 characters in length.</Description> + <Description ovf:msgid="Password.description">The password for the appliance 'vyos' account. Passwords must be at least 8 characters in length.</Description> </Property> - <Property ovf:key="public-keys" ovf:type="string" ovf:value="" ovf:userConfigurable="true"> + <Property ovf:key="public-keys" ovf:type="string" ovf:userConfigurable="true" ovf:value=""> <Label>Public key</Label> - <Description>The public ssh key for the appliance 'vyos' account.</Description> + <Description>The public ssh key for the appliance 'vyos' account.</Description> </Property> <Category>Appliance IPv4 Network Settings</Category> - <Property ovf:key="local-hostname" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:qualifiers="MinLen(0),MaxLen(65535)"> + <Property ovf:key="local-hostname" ovf:qualifiers="MinLen(0),MaxLen(65535)" ovf:type="string" ovf:userConfigurable="true" ovf:value=""> <Label>Hostname</Label> <Description>The host name for this virtual machine.</Description> </Property> @@ -87,11 +87,11 @@ <Info/> <Annotation>VyOS</Annotation> </AnnotationSection> - <OperatingSystemSection ovf:id="100" ovf:version="1" vmw:osType="debian8_64Guest"> - <Info>Guest Operating System</Info> - <Description>VyOS</Description> + <OperatingSystemSection ovf:id="96" ovf:version="6" vmw:osType="debian8_64Guest"> + <Info>The operating system installed</Info> + <Description>Debian GNU/Linux 8 (64-bit)</Description> </OperatingSystemSection> - <VirtualHardwareSection ovf:transport="com.vmware.guestInfo" ovf:required="false"> + <VirtualHardwareSection ovf:required="false" ovf:transport="com.vmware.guestInfo"> <Info>Virtual Hardware Requirements</Info> <System> <vssd:ElementName>Virtual Hardware Family</vssd:ElementName> @@ -148,7 +148,7 @@ </Item> <Item> <rasd:Address xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">0</rasd:Address> - <rasd:ElementName xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">SCSI Controller 0</rasd:ElementName> + <rasd:ElementName xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">SCSI Controller 0 - VMware Paravirtual SCSI</rasd:ElementName> <rasd:InstanceID xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData">3</rasd:InstanceID> <rasd:ResourceSubType>VirtualSCSI</rasd:ResourceSubType> <rasd:ResourceType>6</rasd:ResourceType> @@ -195,6 +195,8 @@ <rasd:ResourceSubType>vmxnet3</rasd:ResourceSubType> <rasd:ResourceType>10</rasd:ResourceType> </ovf:Item> + <vmw:Config ovf:required="false" vmw:key="cpuHotAddEnabled" vmw:value="true"/> + <vmw:Config ovf:required="false" vmw:key="memoryHotAddEnabled" vmw:value="true"/> </VirtualHardwareSection> </VirtualSystem> </ovf:Envelope> diff --git a/tools/cloud-init/GCE/99-debug-user.chroot b/tools/cloud-init/99-debug-user.chroot index 7b72f898..7b72f898 100755 --- a/tools/cloud-init/GCE/99-debug-user.chroot +++ b/tools/cloud-init/99-debug-user.chroot 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/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 { + } +} |