PASSWORD_OVERLAY_FILE=~/.osm/password-overlay.yaml
PATH=/snap/bin:${PATH}
OSM_DEVOPS="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. &> /dev/null && pwd )"
+INSTALL_PLA=""
+PLA_OVERLAY_FILE=~/.osm/pla-overlay.yaml
+
if [ -f ${OSM_DEVOPS}/common/all_funcs ] ; then
source ${OSM_DEVOPS}/common/all_funcs
else
--tag) TAG="$2" ;;
--registry) REGISTRY_INFO="$2" ;;
--only-vca) ONLY_VCA=y ;;
+ --pla) INSTALL_PLA=y ;;
esac
shift
done
generate_password_overlay && secret_overlay="--overlay $PASSWORD_OVERLAY_FILE"
+ [ -n "$INSTALL_PLA" ] && create_pla_overlay && pla_overlay="--overlay $PLA_OVERLAY_FILE"
+
if [ -v BUNDLE ]; then
- juju deploy --trust --channel $CHARMHUB_CHANNEL -m $MODEL_NAME $BUNDLE $images_overlay $extra_overlay $secret_overlay
+ juju deploy --trust --channel $CHARMHUB_CHANNEL -m $MODEL_NAME $BUNDLE $images_overlay $extra_overlay $secret_overlay $pla_overlay
else
- juju deploy --trust --channel $CHARMHUB_CHANNEL -m $MODEL_NAME $OSM_BUNDLE $images_overlay $extra_overlay $secret_overlay
+ juju deploy --trust --channel $CHARMHUB_CHANNEL -m $MODEL_NAME $OSM_BUNDLE $images_overlay $extra_overlay $secret_overlay $pla_overlay
fi
if [ ! -v KUBECFG ]; then
function check_osm_deployed() {
TIME_TO_WAIT=600
start_time="$(date -u +%s)"
- total_service_count=16
+ total_service_count=15
+ [ -n "$INSTALL_PLA" ] && total_service_count=$((total_service_count + 1))
previous_count=0
while true
do
mv /tmp/password-overlay.yaml $PASSWORD_OVERLAY_FILE
}
+function create_pla_overlay(){
+ echo "Creating PLA Overlay"
+ [ $BUNDLE == $OSM_HA_BUNDLE ] && scale=3 || scale=1
+ cat << EOF > /tmp/pla-overlay.yaml
+applications:
+ pla:
+ charm: osm-pla
+ channel: latest/stable
+ scale: $scale
+ series: kubernetes
+ options:
+ log_level: DEBUG
+ resources:
+ image: opensourcemano/pla:testing-daily
+relations:
+ - - pla:kafka
+ - kafka:kafka
+ - - pla:mongodb
+ - mongodb:database
+EOF
+ mv /tmp/pla-overlay.yaml $PLA_OVERLAY_FILE
+}
+
function generate_images_overlay(){
echo "applications:" > /tmp/images-overlay.yaml
- charms_with_resources="nbi lcm mon pol ng-ui ro pla"
+ charms_with_resources="nbi lcm mon pol ng-ui ro"
+ [ -n "$INSTALL_PLA" ] && charms_with_resources+=" pla"
for charm in $charms_with_resources; do
cat << EOF > /tmp/${charm}_registry.yaml
registrypath: ${REGISTRY_URL}opensourcemano/${charm}:$TAG