From a41427f14b8b056640e5853f5ec61284fb23acaa Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Sun, 24 Feb 2019 13:45:00 -0500 Subject: Create ONAP's ODL Fluorine SR1 distro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modules installed: - AAA - Controller - Daexim - Netconf - MDSAL (pulled trnasitively) - ODL Parent - YangTools (pulled transitively) Brings karaf from 255.9 MB to 215.7 MB. Note: Oxygen SR3 was 353.2 MB when Fluorine SR1 is 255.9 MB, so upstream ODL has already shrink their distribution size. Change-Id: Ic8618156efd4fc842b496bc25557eb322a6dbf26 Issue-ID: CCSDK-1105 Signed-off-by: Alexis de Talhouët Reviewed-on: https://gerrit.onap.org/r/79075 Tested-by: ONAP Jobbuilder Reviewed-by: Dan Timoney --- .../onap-distribution/fluorine/karaf/pom.xml | 199 ++++++++++++++++ .../assembly/bin/configure-cluster-ipdetect.sh | 265 +++++++++++++++++++++ .../src/main/assembly/bin/configure_cluster.sh | 228 ++++++++++++++++++ .../src/main/assembly/bin/custom_shard_config.txt | 17 ++ .../karaf/src/main/assembly/bin/set_persistence.sh | 111 +++++++++ .../main/assembly/etc/org.ops4j.pax.url.mvn.cfg | 96 ++++++++ .../karaf/src/main/assembly/etc/shell.init.script | 66 +++++ opendaylight/onap-distribution/fluorine/pom.xml | 41 ++++ opendaylight/onap-distribution/pom.xml | 42 ++++ 9 files changed, 1065 insertions(+) create mode 100644 opendaylight/onap-distribution/fluorine/karaf/pom.xml create mode 100755 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/configure-cluster-ipdetect.sh create mode 100755 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/configure_cluster.sh create mode 100644 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/custom_shard_config.txt create mode 100755 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/set_persistence.sh create mode 100644 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg create mode 100644 opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/etc/shell.init.script create mode 100644 opendaylight/onap-distribution/fluorine/pom.xml create mode 100644 opendaylight/onap-distribution/pom.xml diff --git a/opendaylight/onap-distribution/fluorine/karaf/pom.xml b/opendaylight/onap-distribution/fluorine/karaf/pom.xml new file mode 100644 index 00000000..dbada050 --- /dev/null +++ b/opendaylight/onap-distribution/fluorine/karaf/pom.xml @@ -0,0 +1,199 @@ + + + + + org.opendaylight.odlparent + karaf4-parent + 3.1.4 + + + + org.onap.ccsdk.distribution + distribution-opendaylight-onap-fluorine-karaf + 0.4.1-SNAPSHOT + ccsdk-distribution :: onap :: opendaylight :: fluorine :: karaf + 4.0.0 + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + OpenDaylight distribution build specific for ONAP projects. + + + + + + 0.9.1 + + + + + + org.opendaylight.integration + all-artifacts + ${opendaylight.version} + import + pom + + + + + + + + + org.opendaylight.aaa + features-aaa + features + xml + runtime + + + + + org.opendaylight.controller + features-extras + features + xml + runtime + + + org.opendaylight.controller + features-mdsal + features + xml + runtime + + + org.opendaylight.controller + features-mdsal-benchmark + features + xml + runtime + + + org.opendaylight.controller + features-mdsal-trace + features + xml + runtime + + + + + org.opendaylight.daexim + daexim-features + features + xml + runtime + + + + + org.opendaylight.netconf + features-netconf + features + xml + runtime + + + org.opendaylight.netconf + features-netconf-connector + features + xml + runtime + + + org.opendaylight.netconf + features-restconf + features + xml + runtime + + + org.opendaylight.netconf + features-yanglib + features + xml + runtime + + + + + org.opendaylight.odlparent + features-akka + features + xml + runtime + + + org.opendaylight.odlparent + features-odlparent + features + xml + runtime + + + + org.opendaylight.aaa + aaa-cli-jar + + test + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-aaa-cli-jar + prepare-package + + copy-dependencies + + + ${project.build.directory}/assembly/bin + aaa-cli-jar + true + true + true + true + + true + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + prepare-package + + run + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/configure-cluster-ipdetect.sh b/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/configure-cluster-ipdetect.sh new file mode 100755 index 00000000..7b97ef96 --- /dev/null +++ b/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/configure-cluster-ipdetect.sh @@ -0,0 +1,265 @@ +#!/bin/bash +# +# Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. +# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html +# + + +function usage() +{ + # Print any error messages + test "$1" != "" && echo " ERROR: $1" + + # Print standard usage help + cat << EOF + This script is used to configure cluster parameters on this + controller. The user should restart controller to apply changes. + + Usage: $0 + - seed_nodes_list: List of seed nodes, separated by comma or space. + + The script checks that one (any) of the the controller's active IP + addresses is present in the seed_nodes_list. When running this script + on multiple seed nodes, keep the seed_node_list same on all nodes. + + Optionally, shards can be configured in a more granular way by + modifying the file "custom_shard_configs.txt" in the same folder + as this tool. Please see that file for more details. + +This script is currently limited to IPv4 addresses. If you have +problems running this script, please use 'configure_cluster.sh'. + +EOF + + exit 1 +} + + +function start_banner +{ +cat < ${MODULESHARDSCONF} + modules_builder > ${MODULESCONF} + cat ${MODULESCONF} + fi + + echo "Configuring replication type in module-shards.conf" + sed -i -e "/^[^#].*replicas[ ]*=/ { :loop /.*\]/ b done; N; b loop; :done s/replicas.*\]/replicas = [${MEMBER_NAME_LIST}]/}" ${MODULESHARDSCONF} +} + + +function verify_configuration_files +{ + # Constants + BIN_DIR=`dirname $0` + test ${BIN_DIR} == '.' && BIN_DIR=${PWD} + CONTROLLER_DIR=`dirname ${BIN_DIR}` + CONF_DIR=${CONTROLLER_DIR}/configuration/initial + AKKACONF=${CONF_DIR}/akka.conf + MODULESCONF=${CONF_DIR}/modules.conf + MODULESHARDSCONF=${CONF_DIR}/module-shards.conf + + # Verify configuration files are present in expected location. + if [ ! -f ${AKKACONF} -o ! -f ${MODULESHARDSCONF} ]; then + # Check if the configuration files exist in the system + # directory, then copy them over. + ORIG_CONF_DIR=${CONTROLLER_DIR}/system/org/opendaylight/controller/sal-clustering-config + version=$(sed -n -e 's/.*\(.*\)<\/version>/\1/p' ${ORIG_CONF_DIR}/maven-metadata-local.xml) + ORIG_CONF_DIR=${ORIG_CONF_DIR}/${version} + ORIG_AKKA_CONF=sal-clustering-config-${version}-akkaconf.xml + ORIG_MODULES_CONF=sal-clustering-config-${version}-moduleconf.xml + ORIG_MODULESHARDS_CONF=sal-clustering-config-${version}-moduleshardconf.xml + + if [ -f ${ORIG_CONF_DIR}/${ORIG_AKKA_CONF} -a \ + -f ${ORIG_CONF_DIR}/${ORIG_MODULES_CONF} -a \ + -f ${ORIG_CONF_DIR}/${ORIG_MODULESHARDS_CONF} ]; then + cat < + - index: Integer within 1..N, where N is the number of seed nodes. + - seed_nodes_list: List of seed nodes, separated by comma or space. + + The address at the provided index should belong this controller. + When running this script on multiple seed nodes, keep the + seed_node_list same, and vary the index from 1 through N. + + Optionally, shards can be configured in a more granular way by + modifying the file "custom_shard_configs.txt" in the same folder + as this tool. Please see that file for more details + +EOF + + exit 1 +} + + +function start_banner +{ +cat < ${MODULESHARDSCONF} + modules_builder > ${MODULESCONF} + cat ${MODULESCONF} + fi + + echo "Configuring replication type in module-shards.conf" + sed -i -e "/^[^#].*replicas[ ]*=/ { :loop /.*\]/ b done; N; b loop; :done s/replicas.*\]/replicas = [${MEMBER_NAME_LIST}]/}" ${MODULESHARDSCONF} +} + + +function verify_configuration_files +{ + # Constants + BIN_DIR=`dirname $0` + test ${BIN_DIR} == '.' && BIN_DIR=${PWD} + CONTROLLER_DIR=`dirname ${BIN_DIR}` + CONF_DIR=${CONTROLLER_DIR}/configuration/initial + AKKACONF=${CONF_DIR}/akka.conf + MODULESCONF=${CONF_DIR}/modules.conf + MODULESHARDSCONF=${CONF_DIR}/module-shards.conf + + # Verify configuration files are present in expected location. + if [ ! -f ${AKKACONF} -o ! -f ${MODULESHARDSCONF} ]; then + # Check if the configuration files exist in the system + # directory, then copy them over. + ORIG_CONF_DIR=${CONTROLLER_DIR}/system/org/opendaylight/controller/sal-clustering-config + version=$(sed -n -e 's/.*\(.*\)<\/version>/\1/p' ${ORIG_CONF_DIR}/maven-metadata-local.xml) + ORIG_CONF_DIR=${ORIG_CONF_DIR}/${version} + ORIG_AKKA_CONF=sal-clustering-config-${version}-akkaconf.xml + ORIG_MODULES_CONF=sal-clustering-config-${version}-moduleconf.xml + ORIG_MODULESHARDS_CONF=sal-clustering-config-${version}-moduleshardconf.xml + + if [ -f ${ORIG_CONF_DIR}/${ORIG_AKKA_CONF} -a \ + -f ${ORIG_CONF_DIR}/${ORIG_MODULES_CONF} -a \ + -f ${ORIG_CONF_DIR}/${ORIG_MODULESHARDS_CONF} ]; then + cat < + +EOF + + exit 1 +} + + +function end_banner +{ +cat <\(.*\)<\/version>/\1/p' ${ORIG_CONF_DIR}/maven-metadata-local.xml) + ORIG_CONF_DIR=${ORIG_CONF_DIR}/${version} + ORIG_CLUSTER_CONF=sal-clustering-config-${version}-datastore.cfg + + if [ -f ${ORIG_CONF_DIR}/${ORIG_CLUSTER_CONF} ]; then + cat < "?}; + +__load_class = { + (($.reader class) classLoader) loadClass $1 +} + +// make sure that we catch exceptions +// as they do occur if the session is headless / non-interactive +jlineReader = $.reader +if { %(jlineReader != null) } { + + # On 256 colors terminal, add a right prompt + max_colors = ($.jline.terminal getNumericCapability max_colors) + if { %(max_colors >= 256) } { + __rprompt_formatter = (((__load_class java.text.SimpleDateFormat) getConstructor (__load_class java.lang.String)) newInstance \'$'\u001B\[90m'\'HH:mm:ss) + __date_class = (__load_class java.util.Date) +// Do not use right prompt by default +// \#rprompt = { $__rprompt_formatter format ($__date_class newInstance) } + } + + setopt group + setopt auto-fresh-line + unsetopt insert-tab + keymap "^[OA" up-line-or-search + keymap "^[[A" up-line-or-search + keymap "^[OB" down-line-or-search + keymap "^[[B" down-line-or-search + +} diff --git a/opendaylight/onap-distribution/fluorine/pom.xml b/opendaylight/onap-distribution/fluorine/pom.xml new file mode 100644 index 00000000..3c592c3c --- /dev/null +++ b/opendaylight/onap-distribution/fluorine/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-opendaylight + 0.4.1-SNAPSHOT + + + distribution-opendaylight-onap-fluorine-parent + 0.4.1-SNAPSHOT + pom + ccsdk-distribution :: onap :: opendaylight :: fluorine :: parent + Creates ONAP's OpenDaylight Fluorine container + + + karaf + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + diff --git a/opendaylight/onap-distribution/pom.xml b/opendaylight/onap-distribution/pom.xml new file mode 100644 index 00000000..34b8cce1 --- /dev/null +++ b/opendaylight/onap-distribution/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-opendaylight + 0.4.1-SNAPSHOT + + + distribution-opendaylight-onap + 0.4.1-SNAPSHOT + pom + + ccsdk-distribution :: onap :: opendaylight :: parent + Creates ONAP's OpenDaylight distribution + + + fluorine + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + -- cgit 1.2.3-korg