From 6513e474ac5b1450691119b31343805f1d1266fc Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 29 Oct 2014 14:57:30 +0000 Subject: Move virtual machine / cloud provider targets and options from release/Makefile to their own Makefile. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 release/Makefile.vm (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm new file mode 100644 index 000000000000..1d1f64223f53 --- /dev/null +++ b/release/Makefile.vm @@ -0,0 +1,57 @@ +# +# $FreeBSD$ +# +# +# Makefile for building virtual machine and cloud provider disk images. +# + +VMTARGETS= vm-base vm-image +VMFORMATS?= vhd vmdk qcow2 raw +VMSIZE?= 20G +VMBASE?= vm +AZURECONF?= ${.CURDIR}/tools/azure.conf + +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANDIRS+= ${VMTARGETS} +CLEANFILES+= ${VMBASE}.img +. for FORMAT in ${VMFORMATS} +CLEANFILES+= ${VMBASE}.${FORMAT} +. endfor +.endif + +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) +CLEANFILES+= ${OSRELEASE}.vhd \ + ${OSRELEASE}.vhd.raw \ + azure.img +CLEANDIRS+= vm-azure +.endif + +vm-base: +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} +. endif +.endif + touch ${.TARGET} + +vm-image: vm-base +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) +. for FORMAT in ${VMFORMATS} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} +. endfor +. endif +.endif + touch ${.TARGET} + +vm-azure: +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ + ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd +.endif + touch ${.TARGET} -- cgit v1.2.3 From d08ce983a7bbe104dfc78c920a86985ae2fd60cc Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 29 Oct 2014 15:52:17 +0000 Subject: Add glue to allow enabling building cloud provider VM images by default. When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the release/Makefile 'release' target. CLOUDTARGETS is generated from the contents of CLOUDWARE, which should be a list of all supported target providers. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 1d1f64223f53..82eb7d4ece45 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -9,7 +9,22 @@ VMTARGETS= vm-base vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm -AZURECONF?= ${.CURDIR}/tools/azure.conf + +CLOUDWARE?= AZURE +AZURE_FORMAT= vhd + +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) +. for _CW in ${CLOUDWARE} +CLOUDTARGETS+= vm-${_CW:tl} +CLEANDIRS+= vm-${_CW:tl} +CLEANFILES+= ${_CW:tl}.img \ + ${_CW:tl}.${${_CW:tu}_FORMAT} \ + ${_CW:tl}.${${_CW:tu}_FORMAT}.raw +. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) +${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf +. endif +. endfor +.endif .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} @@ -19,13 +34,6 @@ CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) -CLEANFILES+= ${OSRELEASE}.vhd \ - ${OSRELEASE}.vhd.raw \ - azure.img -CLEANDIRS+= vm-azure -.endif - vm-base: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -- cgit v1.2.3 From f27438c75256f550d9327bf6d3915fc83fd34620 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 29 Oct 2014 16:18:29 +0000 Subject: Avoid hard-coding the Azure image file format. While here, avoid using OSRELEASE for the output file name. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 82eb7d4ece45..ce7f0eab922c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -11,7 +11,7 @@ VMSIZE?= 20G VMBASE?= vm CLOUDWARE?= AZURE -AZURE_FORMAT= vhd +AZURE_FORMAT= vhdf .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} @@ -20,6 +20,7 @@ CLEANDIRS+= vm-${_CW:tl} CLEANFILES+= ${_CW:tl}.img \ ${_CW:tl}.${${_CW:tu}_FORMAT} \ ${_CW:tl}.${${_CW:tu}_FORMAT}.raw +${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} . if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif @@ -59,7 +60,8 @@ vm-image: vm-base vm-azure: .if exists(${.CURDIR}/${TARGET}/mk-azure.sh) env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ + AZURE_FORMAT=${AZURE_FORMAT} \ ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ - ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE} .endif touch ${.TARGET} -- cgit v1.2.3 From 573e7cca4b79ea8fb0e194d719bd66f2d6a95f64 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 29 Oct 2014 17:04:09 +0000 Subject: Initial commit providing a mechanism to create openstack images as part of the release build. This mimics the way Microsoft Azure images are built, with the addition of installing the net/cloud-init package and adding a (commented) rc.conf(5) entry for cloudinit. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index ce7f0eab922c..0ef7fc8ef2e7 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -10,8 +10,10 @@ VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm -CLOUDWARE?= AZURE +CLOUDWARE?= AZURE \ + OPENSTACK AZURE_FORMAT= vhdf +OPENSTACK_FORMAT=qcow2 .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} @@ -65,3 +67,13 @@ vm-azure: ${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE} .endif touch ${.TARGET} + +vm-openstack: +.if exists(${.CURDIR}/${TARGET}/mk-openstack.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + OPENSTACKCONF=${OPENSTACKCONF} + OPENSTACK_FORMAT=${OPENSTACK_FORMAT} \ + ${.CURDIR}/${TARGET}/mk-openstack.sh ${.TARGET} openstack.img \ + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OPENSTACKIMAGE} +.endif + touch ${.TARGET} -- cgit v1.2.3 From f61371e0feb38a9f044138098f41a7a89631f291 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 3 Nov 2014 23:47:00 +0000 Subject: Add line continuation so OPENSTACKCONF is actually included in the env(1). Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 0ef7fc8ef2e7..db3ac541654d 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -71,7 +71,7 @@ vm-azure: vm-openstack: .if exists(${.CURDIR}/${TARGET}/mk-openstack.sh) env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - OPENSTACKCONF=${OPENSTACKCONF} + OPENSTACKCONF=${OPENSTACKCONF} \ OPENSTACK_FORMAT=${OPENSTACK_FORMAT} \ ${.CURDIR}/${TARGET}/mk-openstack.sh ${.TARGET} openstack.img \ ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OPENSTACKIMAGE} -- cgit v1.2.3 From 7d2ef96183ea3e29543eca16bf5774b054046373 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 3 Nov 2014 23:59:53 +0000 Subject: Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index db3ac541654d..73042f72bf23 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -59,6 +59,8 @@ vm-image: vm-base .endif touch ${.TARGET} +vm-cloudware: ${CLOUDTARGETS} + vm-azure: .if exists(${.CURDIR}/${TARGET}/mk-azure.sh) env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ -- cgit v1.2.3 From 1e7c1f17428a0b342afd622fad341a389bed7a3f Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 5 Nov 2014 13:22:19 +0000 Subject: Initial rewrite to consolidate VM image build scripts into one. There may be some very sharp edges here while refactoring. - Move amd64/mk-vmimage.sh -> scripts/mk-vmimage.sh. - Remove vm-base target from Makefile.vm. - In vm-image target, use getopts flags for argument passing. - Create tools/vmimage.subr, containing default and prototype for the following functions that are used to drive the build, run in this order: vm_install_base() vm_extra_install_base() vm_extra_install_packages() vm_extra_install_ports() vm_extra_enable_services() vm_extra_pre_umount() vm_create_disk() vm_extra_create_disk() - In tools/azure.conf, override: vm_extra_install_base() vm_extra_pre_umount() vm_extra_create_disk() - In tools/openstack.conf, override: vm_extra_install_base() vm_extra_pre_umount() Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 73042f72bf23..c37a4ad759d6 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -5,7 +5,7 @@ # Makefile for building virtual machine and cloud provider disk images. # -VMTARGETS= vm-base vm-image +VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm @@ -37,23 +37,17 @@ CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif -vm-base: -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} -. endif -.endif - touch ${.TARGET} +vm-base: vm-image -vm-image: vm-base +vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) . for FORMAT in ${VMFORMATS} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} + ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -i ${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -S ${WORLDDIR} -o ${VMBASE}.${FORMAT} . endfor . endif .endif @@ -62,20 +56,21 @@ vm-image: vm-base vm-cloudware: ${CLOUDTARGETS} vm-azure: -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ - AZURE_FORMAT=${AZURE_FORMAT} \ - ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ - ${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE} +.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -i azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \ + -S ${WORLDDIR} -o ${AZUREIMAGE} -c ${AZURECONF} .endif touch ${.TARGET} vm-openstack: -.if exists(${.CURDIR}/${TARGET}/mk-openstack.sh) +.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - OPENSTACKCONF=${OPENSTACKCONF} \ - OPENSTACK_FORMAT=${OPENSTACK_FORMAT} \ - ${.CURDIR}/${TARGET}/mk-openstack.sh ${.TARGET} openstack.img \ - ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OPENSTACKIMAGE} + ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -i openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \ + -S ${WORLDDIR} -o ${OPENSTACKIMAGE} -c ${OPENSTACKCONF} .endif touch ${.TARGET} -- cgit v1.2.3 From b6dd8a62c4ae49b3bc425d0559431de20268917b Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Sat, 8 Nov 2014 12:40:59 +0000 Subject: Add CLEANFILES entry for VM targets Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 1 + 1 file changed, 1 insertion(+) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index c37a4ad759d6..30f38682b46a 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -20,6 +20,7 @@ OPENSTACK_FORMAT=qcow2 CLOUDTARGETS+= vm-${_CW:tl} CLEANDIRS+= vm-${_CW:tl} CLEANFILES+= ${_CW:tl}.img \ + vm-${_CW:tl} \ ${_CW:tl}.${${_CW:tu}_FORMAT} \ ${_CW:tl}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} -- cgit v1.2.3 From 1c34bf95522f9245605fafcc9df3936f5211014e Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Sat, 8 Nov 2014 12:45:35 +0000 Subject: Fix DESTDIR for installworld, and make sure it is created before use. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 30f38682b46a..eb167defa5fc 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -44,9 +44,10 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) . for FORMAT in ${VMFORMATS} + mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/${TARGET}/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ -S ${WORLDDIR} -o ${VMBASE}.${FORMAT} . endfor @@ -58,9 +59,10 @@ vm-cloudware: ${CLOUDTARGETS} vm-azure: .if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/${TARGET}/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \ -S ${WORLDDIR} -o ${AZUREIMAGE} -c ${AZURECONF} .endif @@ -68,9 +70,10 @@ vm-azure: vm-openstack: .if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/${TARGET}/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \ -S ${WORLDDIR} -o ${OPENSTACKIMAGE} -c ${OPENSTACKCONF} .endif -- cgit v1.2.3 From 26bb2a6066639c76eeee9b32509dae17250d69da Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Sat, 8 Nov 2014 16:44:45 +0000 Subject: Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that it is consolidated into one file. Fix paths for the base image and output disk image files. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index eb167defa5fc..d7fc18f941d8 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -42,39 +42,33 @@ vm-base: vm-image vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -. for FORMAT in ${VMFORMATS} +. for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ - -S ${WORLDDIR} -o ${VMBASE}.${FORMAT} -. endfor -. endif + -i ${.OBJDIR}/${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} +. endfor .endif touch ${.TARGET} vm-cloudware: ${CLOUDTARGETS} vm-azure: -.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \ - -S ${WORLDDIR} -o ${AZUREIMAGE} -c ${AZURECONF} -.endif + -i ${.OBJDIR}/azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${AZUREIMAGE} -c ${AZURECONF} touch ${.TARGET} vm-openstack: -.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh \ + ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \ - -S ${WORLDDIR} -o ${OPENSTACKIMAGE} -c ${OPENSTACKCONF} -.endif + -i ${.OBJDIR}/openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${OPENSTACKIMAGE} -c ${OPENSTACKCONF} touch ${.TARGET} -- cgit v1.2.3 From f43c861f3814db97dea6b54a6c84a281e303200e Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 10 Nov 2014 21:10:50 +0000 Subject: Remove a stray directory from CLEANFILES. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 1 - 1 file changed, 1 deletion(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index d7fc18f941d8..d362324379f7 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -20,7 +20,6 @@ OPENSTACK_FORMAT=qcow2 CLOUDTARGETS+= vm-${_CW:tl} CLEANDIRS+= vm-${_CW:tl} CLEANFILES+= ${_CW:tl}.img \ - vm-${_CW:tl} \ ${_CW:tl}.${${_CW:tu}_FORMAT} \ ${_CW:tl}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} -- cgit v1.2.3 From 48096f81ed910e33371f0a2fb5212c06c9c707c4 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Thu, 20 Nov 2014 03:46:35 +0000 Subject: Merge duplicative vm-CLOUDTYPE targets before additional duplication gets added by the impending arrival of ec2 and gcloud. --- release/Makefile.vm | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index d362324379f7..bb5311fdc66c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,6 +26,15 @@ ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} . if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif + +vm-${_CW:tl}: + mkdir -p ${.OBJDIR}/${.TARGET} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/scripts/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ + -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW}IMAGE} -c ${${_CW}CONF} + touch ${.TARGET} . endfor .endif @@ -53,21 +62,3 @@ vm-image: touch ${.TARGET} vm-cloudware: ${CLOUDTARGETS} - -vm-azure: - mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/scripts/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${AZUREIMAGE} -c ${AZURECONF} - touch ${.TARGET} - -vm-openstack: - mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/scripts/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${OPENSTACKIMAGE} -c ${OPENSTACKCONF} - touch ${.TARGET} -- cgit v1.2.3 From 99e908c904c8dd9487ec3fb702fa7024ea00f86e Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Fri, 16 Jan 2015 17:05:35 +0000 Subject: Add a 'list-cloudware' target to print the list of supported CLOUDWARE values and a description. Add the AZURE_DESC and OPENSTACK_DESC descriptions. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index bb5311fdc66c..f28881eca7ae 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -13,7 +13,9 @@ VMBASE?= vm CLOUDWARE?= AZURE \ OPENSTACK AZURE_FORMAT= vhdf +AZURE_DESC= Microsoft Azure platform image OPENSTACK_FORMAT=qcow2 +OPENSTACK_DESC= OpenStack platform image .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} @@ -62,3 +64,10 @@ vm-image: touch ${.TARGET} vm-cloudware: ${CLOUDTARGETS} + +list-cloudware: +.if !empty(CLOUDWARE) +. for _CW in ${CLOUDWARE} + @${ECHO} "${_CW:tu}: ${${_CW:tu}_DESC}" +. endfor +.endif -- cgit v1.2.3 From 85311c29b012a1660d679ce1fa17841f13f8ee08 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Fri, 16 Jan 2015 17:40:30 +0000 Subject: Add 'list-vmtargets' target, which produces a list of all supported VM and cloud provider images. Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions. Format the output to make a bit more readable. Update release(7) to document the list-vmtargets target. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index f28881eca7ae..4652c164a76f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -10,6 +10,11 @@ VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm +VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image +VMDK_DESC= VMWare, VirtualBox disk image +QCOW2_DESC= Qemu, KVM disk image +RAW_DESC= Unformatted raw disk image + CLOUDWARE?= AZURE \ OPENSTACK AZURE_FORMAT= vhdf @@ -65,9 +70,18 @@ vm-image: vm-cloudware: ${CLOUDTARGETS} +list-vmtargets: list-cloudware + @${ECHO} + @${ECHO} "Supported virtual machine disk image formats:" +.for FORMAT in ${VMFORMATS:tu} + @${ECHO} " ${FORMAT:tl}: ${${FORMAT}_DESC}" +.endfor + list-cloudware: .if !empty(CLOUDWARE) + @${ECHO} + @${ECHO} "Supported cloud hosting provider images:" . for _CW in ${CLOUDWARE} - @${ECHO} "${_CW:tu}: ${${_CW:tu}_DESC}" + @${ECHO} " ${_CW:tu}: ${${_CW:tu}_DESC}" . endfor .endif -- cgit v1.2.3 From 5f87b8f5f9e0754c86ed3e2778eeff6c4656d6ea Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Fri, 16 Jan 2015 19:27:19 +0000 Subject: Add initial support for the GCE (Google Compute Engine) cloud hosting provider image. Many thanks to swills@ for his work on getting this to this point. Submitted by: swills Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/Makefile.vm') diff --git a/release/Makefile.vm b/release/Makefile.vm index 4652c164a76f..5c052fa04e7c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -16,9 +16,12 @@ QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image CLOUDWARE?= AZURE \ + GCE \ OPENSTACK AZURE_FORMAT= vhdf AZURE_DESC= Microsoft Azure platform image +GCE_FORMAT= raw +GCE_DESC= Google Compute Engine image OPENSTACK_FORMAT=qcow2 OPENSTACK_DESC= OpenStack platform image -- cgit v1.2.3