Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163268247
D44767.id138983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D44767.id138983.diff
View Options
diff --git a/release/Makefile.vm b/release/Makefile.vm
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -21,6 +21,7 @@
BASIC-CI \
BASIC-CLOUDINIT \
EC2 \
+ EQUINIX \
GCE \
OCI \
VAGRANT
@@ -38,6 +39,9 @@
EC2_FLAVOURS?= BASE CLOUD-INIT
EC2-BASE_DESC= Amazon EC2 image
EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image
+EQUINIX_FORMAT= raw
+EQUINIX_FSLIST?= ufs zfs
+EQUINIX_DESC= Equinix Deploy image
GCE_FORMAT= raw
GCE_FSLIST?= ufs zfs
GCE_DESC= Google Compute Engine image
diff --git a/release/release.conf.sample b/release/release.conf.sample
--- a/release/release.conf.sample
+++ b/release/release.conf.sample
@@ -113,7 +113,7 @@
## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers
## to create disk images.
-#CLOUDWARE="EC2 GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
+#CLOUDWARE="EC2 EQUINIX GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
## Set to a non-empty value to build mfsBSD images as part of the release build.
#WITH_MFSBSD=
diff --git a/release/tools/equinix.conf b/release/tools/equinix.conf
new file mode 100644
--- /dev/null
+++ b/release/tools/equinix.conf
@@ -0,0 +1,131 @@
+#!/bin/sh
+# Set to a list of packages to install.
+export VM_EXTRA_PACKAGES="
+ converters/base64
+ ftp/curl
+ lang/python
+ lang/python3
+ net/cloud-init
+ net/rsync
+ security/ca_root_nss
+ security/sudo
+ sysutils/firstboot-freebsd-update
+ sysutils/firstboot-pkgs
+ sysutils/panicmail
+ textproc/jq
+ "
+
+# Should be enough for base image, image can be resized in needed
+export VMSIZE=5g
+
+# Set to a list of third-party software to enable in rc.conf(5).
+export VM_RC_LIST="
+ cloudinit
+ defious
+ firstboot_freebsd_update
+ firstboot_pkgs
+ growfs
+ ntpd
+ ntpd_sync_on_start
+ sshd
+ zfs"
+
+vm_extra_pre_umount() {
+ cat <<-'EOF' >> ${DESTDIR}/etc/rc.conf
+ dumpdev=AUTO
+ sendmail_enable=NONE
+ EOF
+
+ cat <<-'EOF' >> ${DESTDIR}/boot/loader.conf
+ autoboot_delay="5"
+ cryptodev_load="YES"
+ opensolaris_load="YES"
+ xz_load="YES"
+ zfs_load="YES"
+ # enable serial console
+ autoboot_delay="7"
+ boot_serial="YES"
+ comconsole_port="0x2f8"
+ comconsole_speed="115200"
+ console="comconsole"
+ EOF
+
+ cat <<-'EOF' >> ${DESTDIR}/etc/ssh/sshd_config
+ PermitRootLogin prohibit-password
+ PasswordAuthentication no
+ KbdInteractiveAuthentication no
+ PermitEmptyPasswords no
+ UseDNS no
+ UsePAM no
+ EOF
+
+ cat <<-'EOF' >> ${DESTDIR}/etc/rc.d/defious
+ #!/bin/sh
+ # SPDX-License-Identifier: BSD-2-Clause
+ #
+ # Copyright 2022 SkunkWerks, GmbH
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions
+ # are met:
+ # 1. Redistributions of source code must retain the above copyright
+ # notice, this list of conditions and the following disclaimer.
+ # 2. Redistributions in binary form must reproduce the above copyright
+ # notice, this list of conditions and the following disclaimer in the
+ # documentation and/or other materials provided with the distribution.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+
+ # PROVIDE: defious
+ # REQUIRE: mountcritlocal
+ # BEFORE: NETWORKING cloudinitlocal cloudinit cloudconfig cloudfinal
+ # KEYWORD: firstboot
+
+ # Extract metadata files from the first located EFI partition
+ # and blindly transfer these into their more common places.
+
+ # We need to run very early, because these configuration settings will
+ # typically modify /etc/rc.conf and similar settings, to enable storage &
+ # networking configurations that are not supported by auto-configuration
+ # through dhclient(8) and similar approaches.
+
+ . /etc/rc.subr
+
+ name="defious"
+ desc="Extract loader and rc scripts from the mounted EFI partition"
+ start_cmd="defious_start"
+ stop_cmd=":"
+ rcvar="defious_enable"
+
+ defious_start ()
+ {
+ warn "dEFIous: checking for Equinix config in EFI partition"
+ # does this resemble an Equinix -aware EFI partition?
+ test -d /boot/efi/metal || return
+ # really this is all we need to do
+ warn "dEFIous: extracting Equinix config from EFI partition"
+ cp -av /boot/efi/metal/ / || return
+ warn "dEFIous: Equinix config extraction successful"
+ }
+
+ load_rc_config $name
+ run_rc_command "$1"
+ EOF
+ chmod +x ${DESTDIR}/etc/rc.d/defious
+
+ # ensure we run first-boot scripts on .. first ... boot
+ touch ${DESTDIR}/firstboot
+
+ return 0
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 2:46 PM (14 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35367771
Default Alt Text
D44767.id138983.diff (5 KB)
Attached To
Mode
D44767: release: add Equinix Deploy cloudinit targets
Attached
Detach File
Event Timeline
Log In to Comment