aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Debeau <eric.debeau@orange.com>2018-05-09 11:53:37 +0000
committerEric Debeau <eric.debeau@orange.com>2018-05-09 11:55:50 +0000
commit66dbb61e785c905e075aefe4644e33e73a30d707 (patch)
treef86e03e4918fbce5abddf8994578fd752b920ce6
parentb462c46e080a5010fef637afbacd443586d747dc (diff)
Add NEXUS_DOCKER_REPO in the .env file
Add NEXUS_DOCKER_REPO in the.env file to be used by docker-compose Change-Id: I6c29b5bba788a333d50c652c441d42dd8ae3e4db Issue-ID: EXTAPI-83 Signed-off-by: Eric Debeau <eric.debeau@orange.com>
-rw-r--r--boot/nbi_vm_init.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/boot/nbi_vm_init.sh b/boot/nbi_vm_init.sh
index f3bef124..c626938e 100644
--- a/boot/nbi_vm_init.sh
+++ b/boot/nbi_vm_init.sh
@@ -1,9 +1,10 @@
#!/bin/bash
+# Set environment variables
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
-NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
-DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+export NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
export SDC_IP=$(cat /opt/config/sdc_ip_addr.txt)
export AAI_IP=$(cat /opt/config/aai_ip_addr.txt)
export SO_IP=$(cat /opt/config/so_ip_addr.txt)
@@ -12,9 +13,11 @@ export SO_IP=$(cat /opt/config/so_ip_addr.txt)
mkdir -p /opt/nbi
cd /opt/nbi
+# Create .env file to access env variables for docker-compose
echo "SDC_IP=${SDC_IP}" > .env
echo "SO_IP=${SO_IP}" >> .env
echo "AAI_IP=${AAI_IP}" >> .env
+echo "NEXUS_DOCKER_REPO=${NEXUS_DOCKER_REPO}" >> .env
# Fetch the latest docker-compose.yml
curl -o docker-compose.yml https://git.onap.org/externalapi/nbi/plain/docker-compose.yml?h=master