xref: /freebsd/release/tools/ec2-small.conf (revision 647299caa06e38622dc05a4358f9407b62a9bdda)
1*647299caSColin Percival#!/bin/sh
2*647299caSColin Percival
3*647299caSColin Percival. ${WORLDDIR}/release/tools/ec2.conf
4*647299caSColin Percival
5*647299caSColin Percival# Build with a 4.9 GB partition; the growfs rc.d script will expand
6*647299caSColin Percival# the partition to fill the root disk after the EC2 instance is launched.
7*647299caSColin Percival# Note that if this is set to <N>G, we will end up with an <N+1> GB disk
8*647299caSColin Percival# image since VMSIZE is the size of the filesystem partition, not the disk
9*647299caSColin Percival# which it resides within.  (This overrides the default in ec2.conf.)
10*647299caSColin Percivalexport VMSIZE=5000m
11*647299caSColin Percival
12*647299caSColin Percival# Flags to installworld/kernel: We don't want debug symbols (kernel or
13*647299caSColin Percival# userland), 32-bit libraries, tests, or the debugger.
14*647299caSColin Percivalexport INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \
15*647299caSColin Percival    WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"
16*647299caSColin Percival
17*647299caSColin Percival# Packages to install into the image we're creating.  In addition to packages
18*647299caSColin Percival# present on all EC2 AMIs, we install:
19*647299caSColin Percival# * ec2-scripts, which provides a range of EC2ification startup scripts,
20*647299caSColin Percival# * firstboot-freebsd-update, to install security updates at first boot,
21*647299caSColin Percival# * firstboot-pkgs, to install packages at first boot, and
22*647299caSColin Percival# * isc-dhcp44-client, used for IPv6 network setup.
23*647299caSColin Percivalexport VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \
24*647299caSColin Percival    firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client"
25*647299caSColin Percival
26*647299caSColin Percival# Services to enable in rc.conf(5).
27*647299caSColin Percivalexport VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \
28*647299caSColin Percival    ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \
29*647299caSColin Percival    growfs sshd"
30*647299caSColin Percival
31*647299caSColin Percivalvm_extra_pre_umount() {
32*647299caSColin Percival	# Any EC2 ephemeral disks seen when the system first boots will
33*647299caSColin Percival	# be "new" disks; there is no "previous boot" when they might have
34*647299caSColin Percival	# been seen and used already.
35*647299caSColin Percival	touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen
36*647299caSColin Percival
37*647299caSColin Percival	# Configuration common to all EC2 AMIs
38*647299caSColin Percival	ec2_common
39*647299caSColin Percival
40*647299caSColin Percival	# Standard FreeBSD network configuration
41*647299caSColin Percival	ec2_base_networking
42*647299caSColin Percival
43*647299caSColin Percival	return 0
44*647299caSColin Percival}
45