xref: /freebsd/release/tools/ec2-small.conf (revision 87b759f0fa1f7554d50ce640c40138512bbded44)
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# Packages to install into the image we're creating.  In addition to packages
18# present on all EC2 AMIs, we install:
19# * ec2-scripts, which provides a range of EC2ification startup scripts,
20# * firstboot-freebsd-update, to install security updates at first boot,
21# * firstboot-pkgs, to install packages at first boot, and
22# * isc-dhcp44-client, used for IPv6 network setup.
23export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \
24    firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client"
25
26# Services to enable in rc.conf(5).
27export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \
28    ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \
29    growfs sshd"
30
31vm_extra_pre_umount() {
32	# Any EC2 ephemeral disks seen when the system first boots will
33	# be "new" disks; there is no "previous boot" when they might have
34	# been seen and used already.
35	touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen
36
37	# Configuration common to all EC2 AMIs
38	ec2_common
39
40	# Standard FreeBSD network configuration
41	ec2_base_networking
42
43	return 0
44}
45