From 579eaafe7f3a876cb3b8a7cd943016fa24698d15 Mon Sep 17 00:00:00 2001 From: Bernard Cafarelli Date: Fri, 2 Feb 2018 13:12:26 +0100 Subject: [PATCH] Do not install pip in amphora when using distribution packages pip-and-virtualenv element is not needed in that case, and can cause image build failures in environments without direct Internet access Change-Id: I37616d76dd78ffb1419a898509e9466e7c54f69f --- diskimage-create/diskimage-create.sh | 10 +++++++++- elements/amphora-agent/element-deps | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index 4ba0b9b6ec..5852c25e92 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -128,7 +128,7 @@ while getopts "a:b:c:d:ehi:no:pt:r:s:vw:x" opt; do AMP_OUTPUTFILENAME=$(readlink -f $OPTARG) ;; p) - export DIB_INSTALLTYPE_amphora_agent=package + AMP_PACKAGE_INSTALL=1 ;; r) AMP_ROOTPW=$OPTARG @@ -191,6 +191,8 @@ AMP_IMAGESIZE=${AMP_IMAGESIZE:-2} AMP_DISABLE_SSHD=${AMP_DISABLE_SSHD:-0} +AMP_PACKAGE_INSTALL=${AMP_PACKAGE_INSTALL:-0} + AMP_ENABLE_FULL_MAC_SECURITY=${AMP_ENABLE_FULL_MAC_SECURITY:-0} if [ "$AMP_BASEOS" = "rhel" ] && [ "$AMP_IMAGESIZE" -lt 3 ]; then @@ -318,6 +320,12 @@ else AMP_element_sequence="$AMP_element_sequence ${AMP_BASEOS}" fi +if [ "$AMP_PACKAGE_INSTALL" -eq 1 ]; then + export DIB_INSTALLTYPE_amphora_agent=package +else + # We will need pip for amphora-agent + AMP_element_sequence="$AMP_element_sequence pip-and-virtualenv" +fi # Add our backend element (haproxy, etc.) AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND" diff --git a/elements/amphora-agent/element-deps b/elements/amphora-agent/element-deps index 66bcd50a0e..f16aabadd9 100644 --- a/elements/amphora-agent/element-deps +++ b/elements/amphora-agent/element-deps @@ -1,6 +1,5 @@ dib-init-system package-installs pkg-map -pip-and-virtualenv source-repositories svc-map