Page MenuHomeFreeBSD

D41793.diff
No OneTemporary

D41793.diff

diff --git a/release/Makefile.vm b/release/Makefile.vm
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -30,8 +30,9 @@
BASIC-CI_DESC= Image for CI
EC2_FORMAT= raw
EC2_FSLIST= ufs zfs
-EC2_DESC= Amazon EC2 image
-EC2_FLAVOURS= BASE
+EC2_FLAVOURS= BASE CLOUD-INIT
+EC2-BASE_DESC= Amazon EC2 image
+EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image
GCE_FORMAT= raw
GCE_FSLIST= ufs zfs
GCE_DESC= Google Compute Engine image
diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf
new file mode 100644
--- /dev/null
+++ b/release/tools/ec2-cloud-init.conf
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+. ${WORLDDIR}/release/tools/ec2.conf
+
+# Packages to install into the image we're creating. In addition to packages
+# present on all EC2 AMIs, we install cloud-init.
+export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init"
+
+# Services to enable in rc.conf(5).
+export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd"
+
+vm_extra_pre_umount() {
+ # Configuration common to all EC2 AMIs
+ ec2_common
+
+ # Configure cloud-init
+ cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg
+ disable_root: true
+ system_info:
+ distro: freebsd
+ default_user:
+ name: ec2-user
+ lock_passwd: True
+ groups: [wheel]
+ shell: /bin/sh
+ # Currently broken, cloud-init hard-codes to /usr/home/*
+ homedir: /home/ec2-user
+ EOF
+
+ return 0
+}

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 12, 8:21 PM (8 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23639540
Default Alt Text
D41793.diff (1 KB)

Event Timeline