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