From 177515de8f7089267cb9ac175b62e296119e4002 Mon Sep 17 00:00:00 2001 From: Imdad Ahad Date: Fri, 21 Oct 2016 16:16:10 +0100 Subject: [PATCH 1/2] Use python wheels to speed up AS deployment: * Create wheels from python dependencies on building codedeploy artifact * Update script to install wheels and default to pypi if not found --- Makefile | 1 + scripts/aws_install_dependencies.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6884c678b..62dfbc931 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,7 @@ build: dependencies generate-version-file ## Build project .PHONY: build-codedeploy-artifact build-codedeploy-artifact: ## Build the deploy artifact for CodeDeploy + pip3 wheel --wheel-dir=wheelhouse -r requirements.txt mkdir -p target zip -r -x@deploy-exclude.lst target/notifications-api.zip * diff --git a/scripts/aws_install_dependencies.sh b/scripts/aws_install_dependencies.sh index b82881d45..03daadb21 100755 --- a/scripts/aws_install_dependencies.sh +++ b/scripts/aws_install_dependencies.sh @@ -5,4 +5,4 @@ set -eo pipefail echo "Install dependencies" cd /home/notify-app/notifications-api; -pip3 install -r /home/notify-app/notifications-api/requirements.txt +pip3 install --find-links=wheelhouse -r /home/notify-app/notifications-api/requirements.txt From 72993311b35e4b4a701a167375c9d3ab554b97bf Mon Sep 17 00:00:00 2001 From: Imdad Ahad Date: Mon, 24 Oct 2016 16:23:18 +0100 Subject: [PATCH 2/2] Install wheel when building artifact --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 62dfbc931..3c258990f 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,7 @@ build: dependencies generate-version-file ## Build project .PHONY: build-codedeploy-artifact build-codedeploy-artifact: ## Build the deploy artifact for CodeDeploy + pip3 install wheel pip3 wheel --wheel-dir=wheelhouse -r requirements.txt mkdir -p target zip -r -x@deploy-exclude.lst target/notifications-api.zip *