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
(cherry picked from commit 579eaafe7f)
This commit is contained in:
Bernard Cafarelli 2018-02-02 13:12:26 +01:00 committed by Carlos Goncalves
parent 36e138cd11
commit e73f74b6ab
2 changed files with 9 additions and 2 deletions

View File

@ -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" -o "$AMP_BASEOS" = "centos" ] && [ "$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"

View File

@ -1,6 +1,5 @@
dib-init-system
package-installs
pkg-map
pip-and-virtualenv
source-repositories
svc-map