Skip to content
Snippets Groups Projects
Commit 9a510864 authored by garciadeblas's avatar garciadeblas
Browse files

Add option to OSM installer to skip caching juju lxd images


A new option '--nocachelxdimages' has been added to
'installers/full_install_osm.sh'. If specified, the installer will
skip caching juju lxd images. The option will also skip crontab
configuration to guarantee that the images are not cached daily.

The change also modifies 'ci_stage_3.groovy' to use that option in
OSM pipeline, which will save installation time.

Change-Id: I7bfc4432d9a1c99e39440daaf559db897944bd22
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 50942533
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ function usage(){ ...@@ -54,6 +54,7 @@ function usage(){
echo -e " -d <docker registry URL> use docker registry URL instead of dockerhub" echo -e " -d <docker registry URL> use docker registry URL instead of dockerhub"
echo -e " -p <docker proxy URL> set docker proxy URL as part of docker CE configuration" echo -e " -p <docker proxy URL> set docker proxy URL as part of docker CE configuration"
echo -e " -T <docker tag> specify docker tag for the modules specified with option -m" echo -e " -T <docker tag> specify docker tag for the modules specified with option -m"
echo -e " --nocachelxdimages: do not cache local lxd images, do not create cronjob for that cache (will save installation time, might affect instantiation time)"
echo -e " --nolxd: do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)" echo -e " --nolxd: do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)"
echo -e " --nodocker: do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)" echo -e " --nodocker: do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)"
echo -e " --nojuju: do not juju, assumes already installed" echo -e " --nojuju: do not juju, assumes already installed"
...@@ -451,7 +452,7 @@ function install_juju() { ...@@ -451,7 +452,7 @@ function install_juju() {
echo "Installing juju" echo "Installing juju"
sudo snap install juju --classic --channel=2.8/stable sudo snap install juju --classic --channel=2.8/stable
[[ ":$PATH": != *":/snap/bin:"* ]] && PATH="/snap/bin:${PATH}" [[ ":$PATH": != *":/snap/bin:"* ]] && PATH="/snap/bin:${PATH}"
update_juju_images [ -n "$INSTALL_NOCACHELXDIMAGES" ] && update_juju_images
echo "Finished installation of juju" echo "Finished installation of juju"
return 0 return 0
} }
...@@ -1539,6 +1540,7 @@ function dump_vars(){ ...@@ -1539,6 +1540,7 @@ function dump_vars(){
echo "INSTALL_LIGHTWEIGHT=$INSTALL_LIGHTWEIGHT" echo "INSTALL_LIGHTWEIGHT=$INSTALL_LIGHTWEIGHT"
echo "INSTALL_ONLY=$INSTALL_ONLY" echo "INSTALL_ONLY=$INSTALL_ONLY"
echo "INSTALL_ELK=$INSTALL_ELK" echo "INSTALL_ELK=$INSTALL_ELK"
echo "INSTALL_NOCACHELXDIMAGES=$INSTALL_NOCACHELXDIMAGES"
#echo "INSTALL_PERFMON=$INSTALL_PERFMON" #echo "INSTALL_PERFMON=$INSTALL_PERFMON"
echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK" echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK"
echo "OPENSTACK_PUBLIC_NET_NAME=$OPENSTACK_PUBLIC_NET_NAME" echo "OPENSTACK_PUBLIC_NET_NAME=$OPENSTACK_PUBLIC_NET_NAME"
...@@ -1632,6 +1634,7 @@ KUBERNETES="y" ...@@ -1632,6 +1634,7 @@ KUBERNETES="y"
NGUI="y" NGUI="y"
INSTALL_K8S_MONITOR="" INSTALL_K8S_MONITOR=""
INSTALL_NOHOSTCLIENT="" INSTALL_NOHOSTCLIENT=""
INSTALL_NOCACHELXDIMAGES=""
SESSION_ID=`date +%s` SESSION_ID=`date +%s`
OSM_DEVOPS= OSM_DEVOPS=
OSM_VCA_HOST= OSM_VCA_HOST=
...@@ -1826,6 +1829,7 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o ...@@ -1826,6 +1829,7 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o
[ "${OPTARG}" == "registry" ] && continue [ "${OPTARG}" == "registry" ] && continue
[ "${OPTARG}" == "pla" ] && INSTALL_PLA="y" && continue [ "${OPTARG}" == "pla" ] && INSTALL_PLA="y" && continue
[ "${OPTARG}" == "volume" ] && OPENSTACK_ATTACH_VOLUME="true" && continue [ "${OPTARG}" == "volume" ] && OPENSTACK_ATTACH_VOLUME="true" && continue
[ "${OPTARG}" == "nocachelxdimages" ] && INSTALL_NOCACHELXDIMAGES="y" && continue
echo -e "Invalid option: '--$OPTARG'\n" >&2 echo -e "Invalid option: '--$OPTARG'\n" >&2
usage && exit 1 usage && exit 1
;; ;;
......
...@@ -55,6 +55,8 @@ function usage(){ ...@@ -55,6 +55,8 @@ function usage(){
echo -e " -K: Specifies the name of the controller to use - The controller must be already bootstrapped" echo -e " -K: Specifies the name of the controller to use - The controller must be already bootstrapped"
echo -e " -d <docker registry URL> use docker registry URL instead of dockerhub" echo -e " -d <docker registry URL> use docker registry URL instead of dockerhub"
echo -e " -p <docker proxy URL> set docker proxy URL as part of docker CE configuration" echo -e " -p <docker proxy URL> set docker proxy URL as part of docker CE configuration"
echo -e " -T <docker tag> specify docker tag for the modules specified with option -m"
echo -e " --nocachelxdimages: do not cache local lxd images, do not create cronjob for that cache (will save installation time, might affect instantiation time)"
echo -e " --nolxd: do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)" echo -e " --nolxd: do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)"
echo -e " --nodocker: do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)" echo -e " --nodocker: do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)"
echo -e " --nojuju: do not juju, assumes already installed" echo -e " --nojuju: do not juju, assumes already installed"
......
...@@ -469,7 +469,8 @@ node("${params.NODE}") { ...@@ -469,7 +469,8 @@ node("${params.NODE}") {
${release} -r unstable \ ${release} -r unstable \
-d ${USERNAME}:${PASSWORD}@${INTERNAL_DOCKER_REGISTRY} \ -d ${USERNAME}:${PASSWORD}@${INTERNAL_DOCKER_REGISTRY} \
-p ${INTERNAL_DOCKER_PROXY} \ -p ${INTERNAL_DOCKER_PROXY} \
-t ${container_name} -t ${container_name} \
--nocachelxdimages
""" """
} }
prometheusHostname = IP_ADDRESS prometheusHostname = IP_ADDRESS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment