Date: Fri, 18 Apr 2014 01:15:45 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r264634 - projects/release-embedded/release/cloudware Message-ID: <201404180115.s3I1Fj8F053927@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Fri Apr 18 01:15:45 2014 New Revision: 264634 URL: http://svnweb.freebsd.org/changeset/base/264634 Log: Initial commit of a script to create Amazon EC2 images. Right now, it does not do anything. When complete, thanks to work done by Colin Percival, it will allow re@ to create EC2 images as part of the release build process. There are a number of implementation details I want to sort out, which while I think about them, I realize improvements that can be made elsewhere in related processes here. The 'cloudware/' directory name is chosen since there are other cloud-based hypervisor works in progress, so they will be consolidated within one directory structure, similar to what we do now for architecture-specific scripts. Sponsored by: The FreeBSD Foundation Added: projects/release-embedded/release/cloudware/ projects/release-embedded/release/cloudware/ec2.conf (contents, props changed) projects/release-embedded/release/cloudware/release-ec2.sh (contents, props changed) Added: projects/release-embedded/release/cloudware/ec2.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/release-embedded/release/cloudware/ec2.conf Fri Apr 18 01:15:45 2014 (r264634) @@ -0,0 +1,9 @@ +#!/bin/sh +#- +# +# $FreeBSD$ +# + +# Configuration file for Amazon EC2 AMI builds. + +return 0 Added: projects/release-embedded/release/cloudware/release-ec2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/release-embedded/release/cloudware/release-ec2.sh Fri Apr 18 01:15:45 2014 (r264634) @@ -0,0 +1,71 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber +# under sponsorship from the FreeBSD Foundation. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Script to produce Amazon EC2 images. +# This is heavily based on work done by Colin Percival, and his +# code in ^/user/cperciva/EC2-build. + +PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" +export PATH + +RELENGDIR="$(realpath $(dirname $(basename ${0})))" + +# Default settings if a configuration file is not specified: +CHROOTDIR="/scratch" +CONF="${RELENGDIR}/ec2.conf" + +usage() { + echo "${0} [-c /path/to/configuration/file]" + exit 1 +} + +diskbuild() {} +imagebuild() {} +pushami() {} + +main() { + while getopts "c:" arg; do + case ${arg} in + c) + CONF=${OPTARG} + ;; + *) + usage + ;; + esac + done + shift $(( ${OPTIND} - 1 )) + . ${CONF} +} + +main "$@" +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404180115.s3I1Fj8F053927>