From 6fcb935a92e8c8a68bf1f8bcc004146dbdc3f0c1 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Tue, 3 Sep 2019 18:11:12 -0400 Subject: [PATCH] Native charm support This commit adds an API Proxy env variable to __lcm__.env, in order to enable native charm support in OSM. The default behavior is to automatically detect the IP of the primary interface. This can be overridden with the -A flag. Change-Id: I172ce4f7bb76f67ae9fb8918cdd5a10c93fa3b8a Signed-off-by: Adam Israel --- installers/full_install_osm.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 158a925f..d3b72ab2 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -30,6 +30,8 @@ function usage(){ echo -e " -H use specific juju host controller IP" echo -e " -S use VCA/juju secret key" echo -e " -P use VCA/juju public key file" + echo -e " -C use VCA/juju CA certificate file" + echo -e " -A use VCA/juju API proxy" echo -e " --vimemu: additionally deploy the VIM emulator as a docker container" echo -e " --elk_stack: additionally deploy an ELK docker stack for event logging" echo -e " --pm_stack: additionally deploy a Prometheus+Grafana stack for performance monitoring (PM)" @@ -801,6 +803,18 @@ function generate_docker_env_files() { $WORKDIR_SUDO sed -i "s|OSMLCM_VCA_APIPROXY.*|OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}|g" $OSM_DOCKER_WORK_DIR/lcm.env fi + #if ! grep -Fq "OSMLCM_VCA_CACERT" $OSM_DOCKER_WORK_DIR/lcm.env; then + # echo "OSMLCM_VCA_CACERT=\"${OSM_VCA_CACERT}\"" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lcm.env + #else + # $WORKDIR_SUDO sed -i "s|OSMLCM_VCA_CACERT.*|OSMLCM_VCA_CACERT=\"${OSM_VCA_CACERT}\"|g" $OSM_DOCKER_WORK_DIR/lcm.env + #fi + + if ! grep -Fq "OSMLCM_VCA_APIPROXY" $OSM_DOCKER_WORK_DIR/lcm.env; then + echo "OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lcm.env + else + $WORKDIR_SUDO sed -i "s|OSMLCM_VCA_APIPROXY.*|OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}|g" $OSM_DOCKER_WORK_DIR/lcm.env + fi + # RO MYSQL_ROOT_PASSWORD=$(generate_secret) if [ ! -f $OSM_DOCKER_WORK_DIR/ro-db.env ]; then @@ -1227,7 +1241,7 @@ OSM_DATABASE_COMMONKEY= ELASTIC_VERSION=6.4.2 ELASTIC_CURATOR_VERSION=5.5.4 -while getopts ":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:" o; do +while getopts ":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:A:" o; do case "${o}" in h) usage && exit 0 @@ -1276,6 +1290,9 @@ while getopts ":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:" o; do P) OSM_VCA_PUBKEY=$(cat ${OPTARG}) ;; + A) + OSM_VCA_APIPROXY="${OPTARG}" + ;; w) # when specifying workdir, do not use sudo for access WORKDIR_SUDO= -- 2.25.1