aboutsummaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-02-05 12:44:55 -0500
committerDan Timoney <dtimoney@att.com>2021-02-05 13:18:46 -0500
commit1618d5c24a05253bcddb13a510eb18f1742d6d8c (patch)
tree6d70fc71e52bfe54c8ce83f08de30d37c9901a6c /installation
parent8f77d7fe0dd148054ed048642bf87ee7724dc2be (diff)
Update for ODL Aluminum
Update sdnc docker containers for ODL Aluminum release version Change-Id: Ibef207c7e7a5730543f4ab3c601395159bfbcb1a Issue-ID: SDNC-1476 Signed-off-by: Dan Timoney <dtimoney@att.com> Former-commit-id: 8b0557634763a74cc4c4ab1e8402abf939b2068b
Diffstat (limited to 'installation')
-rw-r--r--installation/sdnc/src/main/dc/docker-compose.yaml49
-rwxr-xr-xinstallation/sdnc/src/main/scripts/addIpAddresses.sh10
-rwxr-xr-xinstallation/sdnc/src/main/scripts/addVnis.sh10
-rwxr-xr-xinstallation/sdnc/src/main/scripts/installSdncDb.sh14
-rw-r--r--installation/sdnc/src/main/scripts/rmForeignKey.sh8
-rwxr-xr-xinstallation/sdnc/src/main/scripts/startODL.sh4
6 files changed, 72 insertions, 23 deletions
diff --git a/installation/sdnc/src/main/dc/docker-compose.yaml b/installation/sdnc/src/main/dc/docker-compose.yaml
new file mode 100644
index 00000000..1eece804
--- /dev/null
+++ b/installation/sdnc/src/main/dc/docker-compose.yaml
@@ -0,0 +1,49 @@
+version: '2.1'
+
+services:
+ db:
+ image: mariadb:10.5
+ container_name: sdnc_db
+ ports:
+ - "3306"
+ environment:
+ - MYSQL_ROOT_PASSWORD=MySecretPassword
+ - MYSQL_ROOT_HOST=%
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "30m"
+ max-file: "5"
+
+ sdnc:
+ image: onap/sdnc-image:latest
+ depends_on :
+ - db
+ container_name: sdnc_controller
+ entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"]
+ ports:
+ - "8282:8181"
+ - "8543:8443"
+ links:
+ - db:dbhost
+ - db:sdnctldb01
+ - db:sdnctldb02
+ environment:
+ - MYSQL_ROOT_PASSWORD=MySecretPassword
+ - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties
+ - SDNC_REPLICAS=1
+ - SDNC_DB_USER=sdnctl
+ - SDNC_DB_PASSWORD=gamma
+ - MYSQL_DATABASE=sdnctl
+ - SDNC_DB_INIT=true
+ - KARAF_CONSOLE_LOG_LEVEL=info
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "30m"
+ max-file: "5"
+ extra_hosts:
+ aaf.osaaf.org: 10.12.6.214
+
+
+
diff --git a/installation/sdnc/src/main/scripts/addIpAddresses.sh b/installation/sdnc/src/main/scripts/addIpAddresses.sh
index 6b9af4df..a990545c 100755
--- a/installation/sdnc/src/main/scripts/addIpAddresses.sh
+++ b/installation/sdnc/src/main/scripts/addIpAddresses.sh
@@ -1,8 +1,8 @@
#!/bin/bash
-MYSQL_USER=${MYSQL_USER:-sdnctl}
-MYSQL_PWD=${MYSQL_PWD:-gamma}
-MYSQL_DB=${MYSQL_DB:-sdnctl}
+SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
+SDNC_DB_PASSWORD=${SDNC_DB_PASSWORD:-gamma}
+SDNC_DB_DATABASE=${SDNC_DB_DATABASE:-sdnctl}
MYSQL_HOST=${MYSQL_HOST:-dbhost}
universe=$1
@@ -11,7 +11,7 @@ start=$3
if [ $# -eq 3 ]
then
- mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<EOF
+ mysql --user=${SDNC_DB_USER} --password=${SDNC_DB_PASSWORD} --host=${MYSQL_HOST} ${SDNC_DB_DATABASE} <<EOF
INSERT INTO IPV4_ADDRESS_POOL VALUES('', '$universe', 'AVAILABLE', '${subnet}.${start}');
EOF
elif [ $# -eq 4 ]
@@ -21,7 +21,7 @@ then
while [ $ip -le $stop ]
do
- mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<EOF
+ mysql --user=${SDNC_DB_USER} --password=${SDNC_DB_PASSWORD} --host=${MYSQL_HOST} ${SDNC_DB_DATABASE} <<EOF
INSERT INTO IPV4_ADDRESS_POOL VALUES('', '$universe', 'AVAILABLE','${subnet}.${ip}');
EOF
ip=$(( ip+1 ))
diff --git a/installation/sdnc/src/main/scripts/addVnis.sh b/installation/sdnc/src/main/scripts/addVnis.sh
index a8b50eb6..c8be557f 100755
--- a/installation/sdnc/src/main/scripts/addVnis.sh
+++ b/installation/sdnc/src/main/scripts/addVnis.sh
@@ -1,15 +1,15 @@
#!/bin/bash
-MYSQL_USER=${MYSQL_USER:-sdnctl}
-MYSQL_PWD=${MYSQL_PWD:-gamma}
-MYSQL_DB=${MYSQL_DB:-sdnctl}
+SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
+SDNC_DB_PASSWORD=${SDNC_DB_PASSWORD:-gamma}
+SDNC_DB_DATABASE=${SDNC_DB_DATABASE:-sdnctl}
MYSQL_HOST=${MYSQL_HOST:-dbhost}
start=$1
if [ $# -eq 1 ]
then
- mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host ${MYSQL_HOST} ${MYSQL_DB} <<EOF
+ mysql --user=${SDNC_DB_USER} --password=${SDNC_DB_PASSWORD} --host ${MYSQL_HOST} ${SDNC_DB_DATABASE} <<EOF
INSERT INTO VLAN_ID_POOL (purpose, status, vlan_id) VALUES('VNI', 'AVAILABLE', $start);
EOF
elif [ $# -eq 2 ]
@@ -19,7 +19,7 @@ then
while [ $vlanid -le $stop ]
do
- mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host ${MYSQL_HOST} ${MYSQL_DB} <<EOF
+ mysql --user=${SDNC_DB_USER} --password=${SDNC_DB_PASSWORD} --host ${MYSQL_HOST} ${SDNC_DB_DATABASE} <<EOF
INSERT INTO VLAN_ID_POOL (purpose, status, vlan_id) VALUES( 'VNI', 'AVAILABLE', $vlanid);
EOF
vlanid=$(( vlanid+1 ))
diff --git a/installation/sdnc/src/main/scripts/installSdncDb.sh b/installation/sdnc/src/main/scripts/installSdncDb.sh
index 1a403285..58c172fb 100755
--- a/installation/sdnc/src/main/scripts/installSdncDb.sh
+++ b/installation/sdnc/src/main/scripts/installSdncDb.sh
@@ -22,18 +22,18 @@
###
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0}
SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
-SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma}
+SDNC_DB_PASSWORD=${SDNC_DB_PASSWORD:-gamma}
SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl}
# Create tablespace and user account
-mysql -h dbhost -u root -p${MYSQL_PASSWD} mysql <<-END
+mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END
CREATE DATABASE ${SDNC_DB_DATABASE};
-CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWD}';
-CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWD}';
+CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWORD}';
+CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWORD}';
GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'%' WITH GRANT OPTION;
commit;
@@ -43,13 +43,13 @@ END
if [ -f ${SDNC_HOME}/data/sdnctl.dump ]
then
echo "Installing ${SDNC_HOME}/data/sdnctl.dump"
- mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/sdnctl.dump
+ mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWORD} sdnctl < ${SDNC_HOME}/data/sdnctl.dump
fi
for datafile in ${SDNC_HOME}/data/*.data.dump
do
echo "Installing ${datafile}"
- mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < $datafile
+ mysql -h dbhost -u root -p${MYSQL_ROOT_PASSWORD} sdnctl < $datafile
done
# Create VNIs 100-199
diff --git a/installation/sdnc/src/main/scripts/rmForeignKey.sh b/installation/sdnc/src/main/scripts/rmForeignKey.sh
index 40914fa2..6e64f78e 100644
--- a/installation/sdnc/src/main/scripts/rmForeignKey.sh
+++ b/installation/sdnc/src/main/scripts/rmForeignKey.sh
@@ -1,8 +1,8 @@
#!/bin/bash
-MYSQL_USER=${MYSQL_USER:-sdnctl}
-MYSQL_PWD=${MYSQL_PWD:-gamma}
-MYSQL_DB=${MYSQL_DB:-sdnctl}
+SDNC_DB_USER=${SDNC_DB_USER:-sdnctl}
+SDNC_DB_PASSWORD=${SDNC_DB_PASSWORD:-gamma}
+SDNC_DB_DATABASE=${SDNC_DB_DATABASE:-sdnctl}
MYSQL_HOST=${MYSQL_HOST:-dbhost}
@@ -12,7 +12,7 @@ then
exit 1
fi
-mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host ${MYSQL_HOST} ${MYSQL_DB} <<EOF
+mysql --user=${SDNC_DB_USER} --password=${SDNC_DB_PASSWORD} --host ${MYSQL_HOST} ${SDNC_DB_DATABASE} <<EOF
ALTER TABLE $1
DROP FOREIGN KEY $2;
EOF
diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh
index d1223027..dbbe4030 100755
--- a/installation/sdnc/src/main/scripts/startODL.sh
+++ b/installation/sdnc/src/main/scripts/startODL.sh
@@ -229,7 +229,7 @@ SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
SDNC_DB_INIT=${SDNC_DB_INIT:-false}
CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
JDEBUG=${JDEBUG:-false}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
GEO_ENABLED=${GEO_ENABLED:-false}
SDNC_AAF_ENABLED=${SDNC_AAF_ENABLED:-false}
@@ -329,7 +329,7 @@ if $SDNC_DB_INIT; then
# Wait for database
#
printf "Waiting for mysql"
- until mysql -h dbhost -u root -p"${MYSQL_PASSWD}" mysql > /dev/null 2>&1
+ until mysql -h dbhost -u root -p"${MYSQL_ROOT_PASSWORD}" -e "select 1" > /dev/null 2>&1
do
printf "."
sleep 1