aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot/aaf_install.sh9
-rw-r--r--boot/aaf_vm_init.sh57
-rw-r--r--boot/appc_vm_init.sh3
-rw-r--r--boot/dbcl_vm_init.sh2
-rw-r--r--boot/mr_install.sh2
-rw-r--r--boot/mr_vm_init.sh8
-rw-r--r--boot/oof_install.sh8
-rw-r--r--heat/ONAP/onap_openstack.env3
-rw-r--r--heat/ONAP/onap_openstack.yaml4
-rw-r--r--heat/ONAP/onap_openstack_light.yaml4
-rw-r--r--heat/ONAP/onap_openstack_template.env1
11 files changed, 78 insertions, 23 deletions
diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh
index 0378a4e7..ea80e47f 100644
--- a/boot/aaf_install.sh
+++ b/boot/aaf_install.sh
@@ -95,8 +95,13 @@ resolvconf -u
cd /opt
git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO
chmod +x /opt/authz/auth/auth-cass/docker/dinstall.sh
+chmod +x /opt/authz/auth/auth-cass/docker/backup/backup.sh
+chmod +x /opt/authz/auth/docker/dbuild.sh
chmod +x /opt/authz/auth/docker/drun.sh
-chmod +x /opt/authz/auth/docker/d.props
+chmod +x /opt/authz/auth/docker/dstart.sh
+chmod +x /opt/authz/auth/docker/dstop.sh
+# d.props is not a startable shell
+# chmod +x /opt/authz/auth/docker/d.props
#Update maven settings
cat > /usr/share/maven/conf/settings.xml << EOF
@@ -513,4 +518,4 @@ then
fi
cd /opt
-./aaf_vm_init.sh \ No newline at end of file
+./aaf_vm_init.sh
diff --git a/boot/aaf_vm_init.sh b/boot/aaf_vm_init.sh
index f3ca911e..ea64c3e5 100644
--- a/boot/aaf_vm_init.sh
+++ b/boot/aaf_vm_init.sh
@@ -4,25 +4,60 @@ 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)
-LOCAL_IP=$(cat /opt/config/local_ip.txt)
-CASSANDRA_CONTAINER_NAME="aaf_cass"
+HOSTNAME=`hostname`
+FQDN=aaf.api.simpledemo.onap.org
+HOST_IP=$(cat /opt/config/dns_ip_addr.txt)
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
cd /opt/authz
git pull
-cd /opt/authz/auth/auth-cass/docker
-./dinstall.sh
-sleep 2
+if [ "`docker container ls | grep aaf_cass`" = "" ]; then
+ # Cassandra Install
+ cd /opt/authz/auth/auth-cass/docker
+ # Phase 1
+ ./dinstall.sh
+ echo "Waiting for Cassandra to startup"
+ sleep 15
+ # Phase 2
+ if [ "`docker container ls | grep aaf_cass`" = "" ]; then
+ echo "Error on Cassandra install"
+ exit
+ else
+ ./dinstall.sh
+ fi
+fi
+
+CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
+CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
-#Update configuration file
-CASSANDRA_CONTAINER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $CASSANDRA_CONTAINER_NAME)
sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY="$NEXUS_DOCKER_REPO"/g" /opt/authz/auth/docker/d.props
-sed -i "s/VERSION=.*/VERSION="$DOCKER_IMAGE_VERSION"/g" /opt/authz/auth/docker/d.props
-sed -i "s/HOSTNAME=.*/HOSTNAME="$(hostname)"/g" /opt/authz/auth/docker/d.props
-sed -i "s/HOST_IP=.*/HOST_IP="$LOCAL_IP"/g" /opt/authz/auth/docker/d.props
-sed -i "s/CASS_HOST=cass.aaf.osaaf.org:.*/CASS_HOST=cass.aaf.osaaf.org:"$CASSANDRA_CONTAINER_IP"/g" /opt/authz/auth/docker/d.props
+#sed -i "s/VERSION=.*/VERSION="$DOCKER_IMAGE_VERSION"/g" /opt/authz/auth/docker/d.props
+sed -i "s/HOSTNAME=.*/HOSTNAME="$HOSTNAME"/g" /opt/authz/auth/docker/d.props
+sed -i "s/HOST_IP=.*/HOST_IP="$HOST_IP"/g" /opt/authz/auth/docker/d.props
+sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" /opt/authz/auth/docker/d.props
+
+if [ ! -e "/opt/app/osaaf/etc" ]; then
+ # Nothing installed, install sample
+ mkdir -p /opt/app/osaaf/logs
+ cd /opt/app/osaaf/logs
+ mkdir fs cm gui hello locate oauth service
+ cd /opt
+ cp -Rf /opt/authz/auth/sample/* /opt/app/osaaf
+fi
+# Set Location information
+# Need new Deployment system properties
+CADI_LATITUDE=37.781
+CADI_LONGITUDE=-122.261
+
+CADI_TRUST_MASKS="${HOST_IP%\.[0-9]*}\\/24,${CASS_IP%\.[0-9]*}\\/24"
+sed -i "s/cadi_latitude=.*/cadi_latitude="$CADI_LATITUDE"/g" /opt/app/osaaf/local/org.osaaf.location.props
+sed -i "s/cadi_longitude=.*/cadi_longitude="$CADI_LONGITUDE"/g" /opt/app/osaaf/local/org.osaaf.location.props
+sed -i "s/cadi_registration_hostname=.*/cadi_registration_hostname="$FQDN"/g" /opt/app/osaaf/local/org.osaaf.location.props
+sed -i "s/cadi_trust_masks=.*/cadi_trust_masks="$CADI_TRUST_MASKS"/g" /opt/app/osaaf/local/org.osaaf.location.props
cd /opt/authz/auth/docker
+./dbuild.sh
+sleep 5
./drun.sh \ No newline at end of file
diff --git a/boot/appc_vm_init.sh b/boot/appc_vm_init.sh
index 3e57c391..647e9597 100644
--- a/boot/appc_vm_init.sh
+++ b/boot/appc_vm_init.sh
@@ -22,4 +22,7 @@ docker tag $NEXUS_DOCKER_REPO/onap/appc-image:$DOCKER_IMAGE_VERSION onap/appc-im
docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$DGBUILDER_IMAGE_VERSION
docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$DGBUILDER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:latest
+docker pull $NEXUS_DOCKER_REPO/onap/appc-cdt-image:$DOCKER_IMAGE_VERSION
+docker tag $NEXUS_DOCKER_REPO/onap/appc-cdt-image:$DOCKER_IMAGE_VERSION onap/appc-cdt-image:latest
+
/opt/docker/docker-compose up -d
diff --git a/boot/dbcl_vm_init.sh b/boot/dbcl_vm_init.sh
index ba9859ad..662837aa 100644
--- a/boot/dbcl_vm_init.sh
+++ b/boot/dbcl_vm_init.sh
@@ -4,7 +4,7 @@
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/uui_docker.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
# Refresh images
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
diff --git a/boot/mr_install.sh b/boot/mr_install.sh
index 9bd56563..9238cf8b 100644
--- a/boot/mr_install.sh
+++ b/boot/mr_install.sh
@@ -102,5 +102,5 @@ resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
-git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO dcae-startup-vm-message-router
+git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO /opt/startup-vm-message-router/demo
./mr_vm_init.sh
diff --git a/boot/mr_vm_init.sh b/boot/mr_vm_init.sh
index f0626762..78d61f8a 100644
--- a/boot/mr_vm_init.sh
+++ b/boot/mr_vm_init.sh
@@ -5,12 +5,12 @@ export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort
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)
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-cd /opt/dcae-startup-vm-message-router
+cd /opt/startup-vm-message-router/demo
sed -i 's|wget .*|wget -q \"http://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz\" \\|g' deploy.sh
-bash deploy.sh &
+bash deploy.sh &>/dev/null &disown
-bash dbcl_vm_init.sh &
+cd /opt
+bash dbcl_vm_init.sh &>/dev/null &disown
diff --git a/boot/oof_install.sh b/boot/oof_install.sh
index 89c3013d..2e60eafa 100644
--- a/boot/oof_install.sh
+++ b/boot/oof_install.sh
@@ -91,6 +91,10 @@ service docker restart
echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
resolvconf -u
+# Clone Gerrit repository
+cd /opt
+git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO optf-has
+
# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
if [[ $CLOUD_ENV != "rackspace" ]]
then
@@ -103,7 +107,5 @@ then
reboot
fi
-# Clone Gerrit repository and run docker containers
-cd /opt
-git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO optf-has
+# Run docker containers
./oof_vm_init.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env
index 0d770543..d60a7304 100644
--- a/heat/ONAP/onap_openstack.env
+++ b/heat/ONAP/onap_openstack.env
@@ -141,7 +141,7 @@ parameters:
aai_sparky_docker: 1.2-STAGING-latest
appc_docker: 1.3.0-SNAPSHOT-latest
so_docker: 1.2.1
- policy_docker: v1.2.0
+ policy_docker: 1.2.0
portal_docker: 2.1-STAGING-latest
robot_docker: 1.2-STAGING-latest
sdc_docker: 1.2-STAGING-latest
@@ -159,6 +159,7 @@ parameters:
oof_docker: latest
aaf_docker: 2.1.0-SNAPSHOT
nbi_docker: latest
+ dbcl_docker: latest
dcae_docker: 1.1.2
dcae_snmptrap_docker: latest
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index a7598de7..a63ff1aa 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -426,6 +426,8 @@ parameters:
type: string
nbi_docker:
type: string
+ dbcl_docker:
+ type: string
vfc_nokia_docker:
type: string
@@ -952,6 +954,7 @@ resources:
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
__mr_repo__: { get_param: mr_repo }
+ __dbcl_docker__: { get_param: dbcl_docker }
template: |
#!/bin/bash
@@ -967,6 +970,7 @@ resources:
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__mr_repo__" > /opt/config/remote_repo.txt
+ echo "__dbcl_docker__" > /opt/config/docker_version.txt
# Download and run install script
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
diff --git a/heat/ONAP/onap_openstack_light.yaml b/heat/ONAP/onap_openstack_light.yaml
index 117a3180..f72f3d53 100644
--- a/heat/ONAP/onap_openstack_light.yaml
+++ b/heat/ONAP/onap_openstack_light.yaml
@@ -351,6 +351,8 @@ parameters:
type: string
nbi_docker:
type: string
+ dbcl_docker:
+ type: string
vfc_nokia_docker:
type: string
@@ -873,6 +875,7 @@ resources:
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
__mr_repo__: { get_param: mr_repo }
+ __dbcl_docker__: { get_param: dbcl_docker }
template: |
#!/bin/bash
@@ -888,6 +891,7 @@ resources:
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__mr_repo__" > /opt/config/remote_repo.txt
+ echo "__dbcl_docker__" > /opt/config/docker_version.txt
# Download and run install script
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
diff --git a/heat/ONAP/onap_openstack_template.env b/heat/ONAP/onap_openstack_template.env
index 1b3cd2ed..721fd9d7 100644
--- a/heat/ONAP/onap_openstack_template.env
+++ b/heat/ONAP/onap_openstack_template.env
@@ -159,6 +159,7 @@ parameters:
oof_docker: ${OOF_DOCKER}
aaf_docker: ${AAF_DOCKER}
nbi_docker: ${NBI_DOCKER}
+ dbcl_docker: ${DBCL_DOCKER}
dcae_docker: ${BOOTSTRAP_DOCKER}
dcae_snmptrap_docker: ${SNMPTRAP_DOCKER}