Page MenuHomeFreeBSD

D34746.id105689.diff
No OneTemporary

D34746.id105689.diff

Index: release/Makefile.vm
===================================================================
--- release/Makefile.vm
+++ release/Makefile.vm
@@ -19,6 +19,7 @@
CLOUDWARE?= BASIC-CI \
EC2 \
GCE \
+ OCI \
VAGRANT-VIRTUALBOX \
VAGRANT-VMWARE
AZURE_FORMAT= vhdf
@@ -33,6 +34,9 @@
GCE_FORMAT= raw
GCE_DESC= Google Compute Engine image
GCE_DISK= disk.${GCE_FORMAT}
+OCI_FORMAT= qcow2
+OCI_DESC= Oracle Cloud Infrastructure image
+OCI_DISK= disk.${OCI_FORMAT}
OPENSTACK_FORMAT=qcow2
OPENSTACK_DESC= OpenStack platform image
OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT}
@@ -177,5 +181,7 @@
.include "${.CURDIR}/Makefile.azure"
.include "${.CURDIR}/Makefile.ec2"
.include "${.CURDIR}/Makefile.gce"
+# TODO write one of these when we have figured out upload
+# .include "${.CURDIR}/Makefile.oci"
.include "${.CURDIR}/Makefile.vagrant"
.include "${.CURDIR}/Makefile.inc1"
Index: release/release.conf.sample
===================================================================
--- release/release.conf.sample
+++ release/release.conf.sample
@@ -113,4 +113,4 @@
## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers
## to create disk images.
-#CLOUDWARE="EC2 GCE VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
+#CLOUDWARE="EC2 GCE OCI VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
Index: release/tools/oci.conf
===================================================================
--- /dev/null
+++ release/tools/oci.conf
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# # Set to a list of packages to install.
+# TODO MFH devel/oci-cli and dependencies or use latest for packages
+export VM_EXTRA_PACKAGES="
+ comms/py-pyserial
+ converters/base64
+ devel/py-babel
+ devel/py-iso8601
+ devel/py-oci
+ devel/py-pbr
+ devel/py-six
+ ftp/curl
+ lang/python
+ lang/python3
+ net/cloud-init
+ net/py-eventlet
+ net/py-netaddr
+ net/py-netifaces
+ net/py-oauth
+ net/rsync
+ panicmail
+ security/ca_root_nss
+ security/sudo
+ sysutils/firstboot-freebsd-update
+ sysutils/firstboot-pkgs
+ sysutils/panicmail
+ sysutils/tmux
+ 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).
+# TODO add cloudinit after finishing testing
+export VM_RC_LIST="
+ cloudinit
+ firstboot_pkgs
+ firstboot_freebsd_update
+ growfs
+ ntpd
+ ntpd_sync_on_start
+ sshd
+ zfs"
+
+vm_extra_pre_umount() {
+ cat <<-EOF >> ${DESTDIR}/etc/rc.conf
+ dumpdev=AUTO
+ sendmail_enable=NONE
+ # TODO may not be required for cloudinit
+ ifconfig_DEFAULT=SYNCDHCP
+ kldlist="${kldlist} virtio_random virtio_console virtio_balloon"
+EOF
+
+ cat <<-EOF >> ${DESTDIR}/boot/loader.conf
+ autoboot_delay="5"
+ beastie_disable="YES"
+ boot_serial="YES"
+ loader_logo="none"
+ # ensure disk devices are found by label not partition
+ # kern.geom.label.disk_ident.enable="0"
+ # kern.geom.label.gptid.enable="0"
+ # storage
+ cryptodev_load="YES"
+ opensolaris_load="YES"
+ xz_load="YES"
+ zfs_load="YES"
+EOF
+
+ cat <<-EOF >> ${DESTDIR}/etc/ssh/sshd_config
+ PermitRootLogin prohibit-password
+ PasswordAuthentication no
+ KbdInteractiveAuthentication no
+ PermitEmptyPasswords no
+ UsePAM no
+ UseDNS no
+EOF
+
+ touch ${DESTDIR}/firstboot
+
+ return 0
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 22, 12:37 PM (19 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27847314
Default Alt Text
D34746.id105689.diff (3 KB)

Event Timeline