From 985d68a187baae03e8fef0ca4583cb76b5239197 Mon Sep 17 00:00:00 2001 From: James Laska Date: Tue, 29 Apr 2014 11:19:14 -0400 Subject: [PATCH] AMI packaging improvements Several AMI packaging changes, including: * Set a default value for OFFICIAL=no * Include tower version in ami_description and tag:Name * Packer will tag the AMI to help with visually identifying AMIs (tags used include Name, aws_instance_count, product_name, product_version) * Removed license/* files. The license instance count is supplied via an environment variable AWS_INSTANCE_COUNT * Update reset/install_aws.sh to require an instance count parameter (-c) --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1332b1536b..9cad81984c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PYTHON=python SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") +OFFICIAL ?= no PACKER ?= packer GRUNT ?= $(shell [ -t 0 ] && echo "grunt" || echo "grunt --no-color") @@ -12,7 +13,7 @@ VERSION=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.spl RELEASE=$(shell $(PYTHON) -c "from awx import __version__; print(__version__.split('-')[1])") # Allow AMI license customization -LICENSE_TIER ?= 10.json +AWS_INSTANCE_COUNT ?= 10 ifneq ($(OFFICIAL),yes) BUILD=dev$(DATE) @@ -256,7 +257,7 @@ deb: sdist (cd $(DEB_BUILD_DIR) && PKG_RELEASE=$(DEB_PKG_RELEASE) dpkg-buildpackage -nc -us -uc -b --changes-option="-fdebian/realfiles") ami: - (cd packaging/ami && $(PACKER) build $(PACKER_BUILD_OPTS) -var "aws_license=$(LICENSE_TIER)" $(NAME).json) + (cd packaging/ami && $(PACKER) build $(PACKER_BUILD_OPTS) -var "aws_instance_count=$(AWS_INSTANCE_COUNT)" -var "product_version=$(VERSION)" -var "official=$(OFFICIAL)" $(NAME).json) install: $(PYTHON) setup.py install egg_info -b ""