mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 11:14:18 +01:00
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
This commit is contained in:
parent
4c9c9b4b74
commit
219caac69a
@ -18,9 +18,6 @@ PUBLICSNAP= --publicsnap
|
|||||||
EC2SNSREL= ${REVISION}-${BRANCH}
|
EC2SNSREL= ${REVISION}-${BRANCH}
|
||||||
EC2SNSVERS= ${GITBRANCH}@${GITREV}
|
EC2SNSVERS= ${GITBRANCH}@${GITREV}
|
||||||
.endif
|
.endif
|
||||||
.if defined(SSMPREFIX) && !empty(SSMPREFIX)
|
|
||||||
SSMOPTS= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${VMFS}/${REVISION}/${BRANCH}
|
|
||||||
.endif
|
|
||||||
.if ${TARGET_ARCH} != "amd64"
|
.if ${TARGET_ARCH} != "amd64"
|
||||||
EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/}
|
EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/}
|
||||||
.endif
|
.endif
|
||||||
@ -54,7 +51,12 @@ cw-ec2-portinstall:
|
|||||||
.endif
|
.endif
|
||||||
@touch ${.TARGET}
|
@touch ${.TARGET}
|
||||||
|
|
||||||
ec2ami-${VMFS}: cw-ec2-${VMFS} ${CW_EC2_PORTINSTALL}
|
.for _FS in ${EC2_FSLIST}
|
||||||
|
.if defined(SSMPREFIX) && !empty(SSMPREFIX)
|
||||||
|
SSMOPTS_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${_FS}/${REVISION}/${BRANCH}
|
||||||
|
.endif
|
||||||
|
EC2AMILIST+= ec2ami-${_FS}
|
||||||
|
ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL}
|
||||||
.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
|
.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation"
|
@echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation"
|
||||||
@ -74,12 +76,14 @@ ec2ami-${VMFS}: cw-ec2-${VMFS} ${CW_EC2_PORTINSTALL}
|
|||||||
@false
|
@false
|
||||||
.endif
|
.endif
|
||||||
/usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \
|
/usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \
|
||||||
${EC2ARCH} ${SSMOPTS} ${BOOTMODEOPT} --sriov --ena \
|
${EC2ARCH} ${SSMOPTS_${_FS}} ${BOOTMODEOPT} --sriov --ena \
|
||||||
${.OBJDIR}/ec2.raw \
|
${.OBJDIR}/${EC2${_FS:tu}IMAGE} \
|
||||||
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${VMFS:tu}" \
|
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FS:tu}" \
|
||||||
"${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \
|
"${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \
|
||||||
${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \
|
${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \
|
||||||
${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS}
|
${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS}
|
||||||
@touch ${.TARGET}
|
@touch ${.TARGET}
|
||||||
|
.endfor
|
||||||
|
|
||||||
ec2ami: ec2ami-${VMFS}
|
ec2ami: ec2ami-${VMFS}
|
||||||
|
ec2amis: ${EC2AMILIST}
|
||||||
|
@ -33,7 +33,7 @@ BASIC-CI_FSLIST= ufs
|
|||||||
BASIC-CI_DESC= Image for CI
|
BASIC-CI_DESC= Image for CI
|
||||||
BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT}
|
BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT}
|
||||||
EC2_FORMAT= raw
|
EC2_FORMAT= raw
|
||||||
EC2_FSLIST= ufs
|
EC2_FSLIST= ufs zfs
|
||||||
EC2_DESC= Amazon EC2 image
|
EC2_DESC= Amazon EC2 image
|
||||||
EC2_DISK= ${OSRELEASE}.${EC2_FORMAT}
|
EC2_DISK= ${OSRELEASE}.${EC2_FORMAT}
|
||||||
GCE_FORMAT= raw
|
GCE_FORMAT= raw
|
||||||
|
Loading…
Reference in New Issue
Block a user