Add --overlay option in charmed installer
Change-Id: I99e2e8a27f7a930380a2fa686e2352b8fea69c7e
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh
index e1a45d0..123b29c 100755
--- a/installers/charmed_install.sh
+++ b/installers/charmed_install.sh
@@ -33,6 +33,7 @@
while [ $# -gt 0 ] ; do
case $1 in
--bundle) BUNDLE="$2" ;;
+ --overlay) OVERLAY="$2" ;;
--k8s) KUBECFG="$2" ;;
--vca) CONTROLLER="$2" ;;
--lxd) LXD_CLOUD="$2" ;;
@@ -249,10 +250,14 @@
fi
[ -v TAG ] && generate_images_overlay && images_overlay="--overlay $IMAGES_OVERLAY_FILE"
+ if [ -v OVERLAY ]; then
+ extra_overlay="--overlay $OVERLAY"
+ fi
+
if [ -v BUNDLE ]; then
- juju deploy -m $MODEL_NAME $BUNDLE --overlay ~/.osm/vca-overlay.yaml $images_overlay
+ juju deploy -m $MODEL_NAME $BUNDLE --overlay ~/.osm/vca-overlay.yaml $images_overlay $extra_overlay
else
- juju deploy -m $MODEL_NAME $OSM_BUNDLE --overlay ~/.osm/vca-overlay.yaml $images_overlay
+ juju deploy -m $MODEL_NAME $OSM_BUNDLE --overlay ~/.osm/vca-overlay.yaml $images_overlay $extra_overlay
fi
if [ ! -v KUBECFG ]; then
diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh
index 57cc4fb..42c2ed5 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -77,6 +77,7 @@
echo -e " [--lxd <yaml path>]: Takes a YAML file as a parameter with the LXD Cloud information (--charmed option)"
echo -e " [--lxd-cred <yaml path>]: Takes a YAML file as a parameter with the LXD Credentials information (--charmed option)"
echo -e " [--microstack]: Installs microstack as a vim. (--charmed option)"
+ echo -e " [--overlay]: Add an overlay to override some defaults of the default bundle (--charmed option)"
echo -e " [--ha]: Installs High Availability bundle. (--charmed option)"
echo -e " [--tag]: Docker image tag. (--charmed option)"
echo -e " [--registry]: Docker registry with optional credentials as user:pass@hostname:port (--charmed option)"
@@ -1824,6 +1825,7 @@
[ "${OPTARG}" == "lxd" ] && continue
[ "${OPTARG}" == "lxd-cred" ] && continue
[ "${OPTARG}" == "microstack" ] && continue
+ [ "${OPTARG}" == "overlay" ] && continue
[ "${OPTARG}" == "only-vca" ] && continue
[ "${OPTARG}" == "vca" ] && continue
[ "${OPTARG}" == "ha" ] && continue
diff --git a/installers/install_osm.sh b/installers/install_osm.sh
index f3798e4..37e0467 100755
--- a/installers/install_osm.sh
+++ b/installers/install_osm.sh
@@ -77,6 +77,7 @@
echo -e " [--lxd <yaml path>]: Takes a YAML file as a parameter with the LXD Cloud information (--charmed option)"
echo -e " [--lxd-cred <yaml path>]: Takes a YAML file as a parameter with the LXD Credentials information (--charmed option)"
echo -e " [--microstack]: Installs microstack as a vim. (--charmed option)"
+ echo -e " [--overlay]: Add an overlay to override some defaults of the default bundle (--charmed option)"
echo -e " [--ha]: Installs High Availability bundle. (--charmed option)"
echo -e " [--tag]: Docker image tag. (--charmed option)"
echo -e " [--registry]: Docker registry with optional credentials as user:pass@hostname:port (--charmed option)"