History log of /freebsd-current/release/Makefile.ec2
Revision Date Author Comments
# 6c87aed3 12-Apr-2024 Colin Percival <cperciva@FreeBSD.org>

release: Support r/o /usr/ports for cloudware

Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after: 3 days


# 7494fb6b 08-Sep-2023 Colin Percival <cperciva@FreeBSD.org>

EC2: Flavour existing AMIs as "base"

Using the recently-added "cloudware flavours" mechanism, turn the
existing EC2 AMIs into a new "base" flavour. The only user-visible
change is that AMI names now include the word "base".

releng/14.0 candidate.

Discussed with: gjb
Reviewed by: imp
MFC after: 5 days
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D41791


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 219caac6 06-Aug-2023 Colin Percival <cperciva@FreeBSD.org>

EC2: Build and upload AMIs for both UFS and ZFS

The pre-existing "ec2ami" target builds and uploads a single AMI
(with filesystem determined by ${VMFS}) as before; a new "ec2amis"
target does both UFS and ZFS.

Reviewed by: gjb
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D41343


# 4c9c9b4b 06-Aug-2023 Colin Percival <cperciva@FreeBSD.org>

EC2: Respect ${VMFS}

Prior to this commit, ${VMFS} controlled the filesystem used for
building EC2 images, but the AMIs were recorded with SSM Parameter
paths which indicated that they were UFS.

This commit (a) uses ${VMFS} in the SSM parameter path instead of
a hard-coded "ufs", and (b) adds the filesystem to the AMI name.

Reviewed by: gjb
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D41342


# bcf91471 07-Jun-2023 Colin Percival <cperciva@FreeBSD.org>

EC2: Default to "uefi-preferred" boot mode

In EC2, UEFI boots faster than BIOS, but not all amd64 instance types
support UEFI. AMIs need to have their boot mode designated, which
created a dilemma: Faster boots, or wider compatibility?

The recently added "uefi-preferred" option solves this: AMIs can be
marked to use UEFI where it's available, but fall back to BIOS on
instance types which do not support UEFI.

This uses bsdec2-image-upload 1.4.6, which recently landed in the
ports tree.

PR: 265697
Reviewed by: delphij, imp
MFC after: 1 week
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D40470


# b43d7aa0 16-Sep-2021 Colin Percival <cperciva@FreeBSD.org>

EC2: Default to UEFI booting

This reduces the FreeBSD boot time by approximately 5 seconds,
roughly equally divided betwenn two factors:
* Disk I/O is faster in the EFI loader since it can perform larger
I/Os. (The BIOS loader is limited due to the use of bounce buffers
in sub-1M memory.)
* The EFI console is much faster than the VGA console.

Note however that not all EC2 instance types support UEFI; as a
general rule the newer instances (based on Amazon's "Nitro" platform)
support UEFI but the older instances (based on Xen) do not.

X-MFC: TBD based on tradeoff between performance and compatibility
Relnotes: yes
Sponsored by: https://www.patreon.com/cperciva


# 0aa2a94e 15-Sep-2021 Colin Percival <cperciva@FreeBSD.org>

EC2: Allow AMI boot mode to be specified

The default boot method for amd64 AMIs is BIOS, but at AMI creation
time a flag can be set to specify that UEFI should be used instead.
This commit adds a variable AMIBOOTMETHOD which, if set to "UEFI",
causes the appropriate flag to be set during AMI creation.

The only boot method supported by EC2 for arm64 is UEFI.

The names of AMIs are also amended to include the boot method; they
now look like "FreeBSD 14.0-CURRENT-amd64-20210915 UEFI".

MFC after: 1 week
Sponsored by: https://www.patreon.com/cperciva


# c5af0ac1 26-Aug-2021 Colin Percival <cperciva@FreeBSD.org>

Add support for recording EC2 AMI Ids in SSM

If SSMPREFIX is specified, AMI Ids will be recorded in the SSM
Parameter Store under the name
${SSMPREFIX}/${ARCH}/${FLAVOUR}/${ROOTFS}/${REVISION}/${BRANCH}
where ARCH is "amd64" or "arm64", FLAVOUR is "base" (but may have
other options in the future), ROOTFS is "ufs" (but may have other
options in the future), and REVISION and BRANCH have their normal
meanings.

FreeBSD will be using the public prefix "/aws/service/freebsd",
resulting in SSM Parameter names which look like
/aws/service/freebsd/amd64/base/ufs/14.0/CURRENT

Relnotes: yes
Sponsored by: https://patreon.com/cperciva
MFC after: 2 weeks


# 63749bfe 04-Mar-2021 Glen Barber <gjb@FreeBSD.org>

release: sprinkle UNAME_r hacks following c883b6fd8ccd

Pass UNAME_r override to make(1) for ports builds when building
ports for another branch.

MFC after: 3 days
MFC with: 0be274d37379, 80ab50e1de19, c883b6fd8ccd
Sponsored by: Rubicon Communications, LLC ("Netgate")


# 86e5b137 12-Aug-2020 Glen Barber <gjb@FreeBSD.org>

release: update to use git instead of svn:

Makefile.* (cloudware):
- Consistify setting the BUILDDATE for snapshots.

release.conf.sample/release.sh:
- Run 'git clone' in 'quiet' mode.

Makefile.inc1:
- Set BUILDDATE and export the variable.

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 29b282f3 16-Jul-2020 Glen Barber <gjb@FreeBSD.org>

Makefile.inc1:
- New file. Adds logic to search for the git binary, as well
as determining the branch and revision, used in various
places.

Makefile:
- Remove searching for the svn{,lite} binary.

Makefile.ec2:
- Reduce duplicated code, removing searching for the svn{,lite}
binary, in addition to EC2_SVN{BRANCH,REV}.
- Rename EC2_SVN* with GIT* for consistency.

Makefile.mirrors:
- Remove the SRCBRANCH declaration, replaced with the exported
GITBRANCH variable.
- Update _SNAP_SUFFIX from SVNREVISION to GITREV, and remove
the leading 'r' from it, since it will break git hashes.
- Remove yet another instance of duplicated code to search for
the svn{,version}lite binary.

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 01b73296 20-Mar-2019 Colin Percival <cperciva@FreeBSD.org>

Pass --arm64 to bsdec2-image-upload when building ARM64 AMIs.

Future commits will allow the resulting EC2 AMIs to actually boot and
be usable.


# 7ac2ecc0 21-Aug-2018 Colin Percival <cperciva@FreeBSD.org>

Quieten the svn (or svnlite) commands used to extract information from an
SVN checkout for placement into an EC2 AMI. We only run these if there
is a .svn directory; but in the event that SVN was used to check out a
tree which is then exported over NFS, we were unnecessarily noisy.

Reported by: Andrey Fesenko
MFC after: 3 days
X-MFC-With: r336420, r336433, r336593, r336621,
r336622, r336624, r337394, r337401


# 4222a490 06-Aug-2018 Colin Percival <cperciva@FreeBSD.org>

Fix copy-and-paste error in previous commit.


# a7ec419d 06-Aug-2018 Colin Percival <cperciva@FreeBSD.org>

Add EC2PUBLICSNAP option to EC2 builds; this passes a (recently added)
flag to bsdec2-image-upload instructing it to mark the snapshot of its
root disk as public (which is independent from marking the created AMIs
as public).

Requested by: Amazon


# 38c0c78e 22-Jul-2018 Matt Macy <mmacy@FreeBSD.org>

fix use of empty in Makefile.ec2

empty() takes a variable name - not the expanded value

Reported by: sjg


# 16bb9a49 22-Jul-2018 Matt Macy <mmacy@FreeBSD.org>

Correctly reference SRCTOP, avoid multiple invocations of svn

Reported by: sjg


# 87faf663 22-Jul-2018 Matt Macy <mmacy@FreeBSD.org>

fix build non-svn checkouts post r336593

The change made in r336593 assumes that the build is happening in a
svn checkout resulting in misleading debug output. Check that we're
actually working in an svn checkout before proceeding to call svn.


# 049775ce 21-Jul-2018 Colin Percival <cperciva@FreeBSD.org>

Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch
and revision number announced in SNS notifications about new EC2 AMIs.

While I'm here, incorporate that information into the AMI "description"
fields, since it's more useful than simply echoing the information
already provided via the AMI "name".

Approved by: gjb


# 43fbd222 17-Jul-2018 Colin Percival <cperciva@FreeBSD.org>

Check that EC2SNSTOPIC and EC2PUBLIC are non-empty, along with being
defined, in order to avoid problems with thermite.sh.

Reported by: gjb


# a6fe18b0 17-Jul-2018 Colin Percival <cperciva@FreeBSD.org>

Teach EC2 AMI release code to send an SNS notification after publishing
new AMIs if EC2SNSTOPIC is defined.

Reviewed by: gjb
Requested by: Amazon


# 0edcc5b8 25-May-2017 Colin Percival <cperciva@FreeBSD.org>

Turn on support for the Amazon "Elastic Network Adapter" in EC2 AMIs.

X-MFC-after: 318647 + fixes for some lock ordering warnings


# 17dbc50b 08-Jun-2016 Colin Percival <cperciva@FreeBSD.org>

Add 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
avoid environment pollution problems. That port uses <bsd.prog.mk> but
is not compatible with the latest mk bits in HEAD.

Reported by: gjb
No rush, but make sure it's in the tree before tomorrow by: gjb


# 4d6b6376 12-Jan-2016 Colin Percival <cperciva@FreeBSD.org>

Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
EC2 images.

X-MFC after: if/when the driver fixes get MFCed
Relnotes: FreeBSD now supports EC2 Enhanced Networking


# 57d94a19 01-Jul-2015 Glen Barber <gjb@FreeBSD.org>

Remove the HH-MM suffix from the build date suffix.

It was useful when working out several kinks when
testing automated image uploading when retrying was
necessary, but now it is making things much too messy.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 27d233f7 25-Jun-2015 Glen Barber <gjb@FreeBSD.org>

Change the hour:minute delimiter from ':' to '-', since
the former is an invalid character in EC2 images.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 3c3445e8 25-Jun-2015 Glen Barber <gjb@FreeBSD.org>

Consider PRERELEASE builds snapshots, in addition to CURRENT and
STABLE.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# e5f5cbd4 20-Jun-2015 Glen Barber <gjb@FreeBSD.org>

Append the hour and minute to the snapshot suffix for EC2
AMIs and Azure VM images. This is particularly helpful for
testing to avoid name collisions, but also useful for cases
where a necessary rebuild is done before the date changes.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 1a5daee0 02-Jun-2015 Glen Barber <gjb@FreeBSD.org>

Remove trailing tabs to avoid spamming stdout with long lines.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 9aa91d25 21-May-2015 Glen Barber <gjb@FreeBSD.org>

Include the TARGET in the EC2 AMI name.

Without this, AWS rejects subsequent image uploads of a different
architecture because the name conflicts.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 431e39f8 04-May-2015 Glen Barber <gjb@FreeBSD.org>

Remove a debugging line that snuck in with r282419.

Pointyhat: gjb
MFC after: 3 days
X-MFC-With: r282419
Sponsored by: The FreeBSD Foundation


# 98becbfc 04-May-2015 Glen Barber <gjb@FreeBSD.org>

Add logic to detect if the net/bsdec2-image-upload port needs
to be installed. [1]

For the cw-ec2-portinstall and ec2ami targets, touch the
.TARGET file after completion to prevent duplicate invocations.

Add cw-ec2-portinstall and ec2ami to CLEANFILES.

Submitted by: cperciva[1]
MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# f23e36d7 27-Apr-2015 Glen Barber <gjb@FreeBSD.org>

Add the cw-ec2-portinstall target to always install the
net/bsdec2-image-upload port.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 73d4ced0 31-Mar-2015 Colin Percival <cperciva@FreeBSD.org>

Add code for creating an EC2 AMI.