diff options
76 files changed, 598 insertions, 2995 deletions
diff --git a/autorelease/README.md b/autorelease/README.md deleted file mode 100644 index 03a41a34f..000000000 --- a/autorelease/README.md +++ /dev/null @@ -1,7 +0,0 @@ - -# ONAP Integration - Autorelease - -## Description - -* Scripts to build the artifacts/binaries (e.g. zip/tar.gz files) that are used in the release candidates and final release from scratch - diff --git a/autorelease/scripts/autorelease-test.sh b/autorelease/scripts/autorelease-test.sh deleted file mode 100755 index b5d584e50..000000000 --- a/autorelease/scripts/autorelease-test.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease -GERRIT_BRANCH='master' - -cd $ROOT -git checkout build - -BUILD_DIR=$ROOT/build -cd $BUILD_DIR - -$ROOT/scripts/clone-all.sh -$ROOT/scripts/generate-pom.sh -$ROOT/scripts/fix-relativepaths.sh -$ROOT/scripts/set-version.sh - -TMPDIR=`mktemp -d` -mvn -q clean deploy -DdisableJavaSdkAutoGeneration -DaltDeploymentRepository=staging::default::file:$TMPDIR -DskipTests=true -Dcheckstyle.skip=true -echo "TMPDIR=$TMPDIR" diff --git a/autorelease/scripts/clone-all.sh b/autorelease/scripts/clone-all.sh deleted file mode 100755 index 936d8ea08..000000000 --- a/autorelease/scripts/clone-all.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease -GERRIT_BRANCH='master' - -BUILD_DIR=$ROOT/build -cd $BUILD_DIR - -$ROOT/scripts/get-all-repos.sh | while read p; do - cd $BUILD_DIR - if [ -e $BUILD_DIR/$p ]; then - cd $BUILD_DIR/$p - git checkout $GERRIT_BRANCH - git reset --hard origin - git clean -f - git pull - else - #TODO: replace with https once repo is open to public - git clone -b $GERRIT_BRANCH ssh://gerrit.open-o.org:29418/$p - fi -done - -rm -rf $BUILD_DIR/integration/autorelease/build diff --git a/autorelease/scripts/diff-all.sh b/autorelease/scripts/diff-all.sh deleted file mode 100755 index 5bb502f25..000000000 --- a/autorelease/scripts/diff-all.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease -GERRIT_BRANCH='sun' - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -$ROOT/scripts/get-all-repos.sh | while read p; do - cd $BUILD_DIR/$p - echo $p - git diff | cat -done diff --git a/autorelease/scripts/fix-names.sh b/autorelease/scripts/fix-names.sh deleted file mode 100755 index 9540ac594..000000000 --- a/autorelease/scripts/fix-names.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2015, 2016 The Linux Foundation. All rights reserved. -############################################################################## - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -# MAP of path to a parent pom from the perspective of hosting directory -# starting from the autorelease repo root. -# -# Format: <groupId>:<artifactId>:<path> - -fix_name() { - pom=$1 - echo -e "\nScanning $pom" - pomPath=`dirname $pom` - - projectPath=${pomPath#*/} # Path to pom file from the perspective of hosting repo - - relativePath="$projectPath" # Calculated relative path to parent pom - - # Update any existing project names - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -u "/x:project/x:name" -v "$relativePath" \ - "$pom" > "${pom}.new" - mv "${pom}.new" "${pom}" - - # Add missing ones - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -s "/x:project[count(x:name)=0]" -t elem -n name -v "$relativePath" \ - "$pom" > "${pom}.new" - mv "${pom}.new" "${pom}" -} - -# Find all project poms ignoring the /src/ paths (We don't want to scan code) -find . -name pom.xml -not -path "*/src/*" | xargs -I^ -P8 bash -c "$(declare -f fix_name); fix_name ^" diff --git a/autorelease/scripts/fix-relativepaths.sh b/autorelease/scripts/fix-relativepaths.sh deleted file mode 100755 index 1c9b8d331..000000000 --- a/autorelease/scripts/fix-relativepaths.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2015, 2016 The Linux Foundation. All rights reserved. -############################################################################## - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -# MAP of path to a parent pom from the perspective of hosting directory -# starting from the autorelease repo root. -# -# Format: <groupId>:<artifactId>:<path> - -fix_relative_paths() { - PARENT_MAP=( - "org.openo.oparent:oparent:oparent" - "org.openo.nfvo:nfvo-root:nfvo" - ) - - pom=$1 - echo "Scanning $pom" - pomPath=`dirname $pom` - - # Find and replace parent poms - for parent in "${PARENT_MAP[@]}"; do - map=${parent#*:} # - - groupId=${parent%%:*} # Maven groupId - artifactId=${map%%:*} # Maven artifactId - projectPath=${map#*:} # Path to pom file from the perspective of hosting repo - - # Compute relative path to parent pom - relativePath=`python -c "import os.path; print os.path.relpath('$projectPath','$pomPath')"` - - # Standardize POM XML formatting - xmlstarlet fo "$pom" > "${pom}.old" - - # Update any existing relativePath values - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -u "//x:parent[x:artifactId=\"$artifactId\" and x:groupId=\"$groupId\"]/x:relativePath" \ - -v "$relativePath" "${pom}" > "${pom}.new1" - - # Add missing ones - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -s "//x:parent[x:artifactId=\"$artifactId\" and x:groupId=\"$groupId\" and count(x:relativePath)=0]" \ - -t elem -n relativePath -v "$relativePath" "${pom}.new1" > "${pom}.new2" - - # Standardize POM XML formatting again - xmlstarlet fo "${pom}.new2" > "${pom}.new" - - diff -u "${pom}.old" "${pom}.new" - cp "${pom}.new" "${pom}" - done -} - -# Find all project poms ignoring the /src/ paths (We don't want to scan code) -find . -name pom.xml -not -path "*/src/*" | sort | xargs -I^ bash -c "$(declare -f fix_relative_paths); fix_relative_paths ^" diff --git a/autorelease/scripts/generate-assembly.py b/autorelease/scripts/generate-assembly.py deleted file mode 100755 index 30d5e7516..000000000 --- a/autorelease/scripts/generate-assembly.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys, csv, subprocess - -version = "1.1.0-SNAPSHOT" - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - - print """ -<!-- - Copyright (c) 2016-2017 Huawei Technologies Co., Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>linux64</id> - <formats> - <format>tar.gz</format> - </formats> - <fileSets> - <fileSet> - <directory>../../distribution</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>**</include> - </includes> - </fileSet> - </fileSets> - <dependencySets> -""" - - for row in reader: - if row["classifier"]: - include = "{}:{}:{}:{}".format(row["groupId"], row["artifactId"], row["extension"], row["classifier"]) - else: - include = "{}:{}:{}".format(row["groupId"], row["artifactId"], row["extension"]) - - txt = """ - <dependencySet> - <outputDirectory>{}</outputDirectory> - <useProjectArtifact>false</useProjectArtifact> - <includes> - <include>{}</include> - </includes> - <outputFileNameMapping>{}-${{artifact.version}}${{dashClassifier?}}.${{artifact.extension}}</outputFileNameMapping> - </dependencySet>""" - # print txt.format(row["filename"], include, row["filename"]) - - - print """ - </dependencySets> -</assembly> -""" diff --git a/autorelease/scripts/generate-binary-deps.py b/autorelease/scripts/generate-binary-deps.py deleted file mode 100755 index aaf18001a..000000000 --- a/autorelease/scripts/generate-binary-deps.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys, csv, subprocess - -version = "1.1.0-SNAPSHOT" - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - errors = 0 - - items = [] - for row in reader: - txt = """ - <dependency> - <groupId>{}</groupId> - <artifactId>{}</artifactId> - <version>{}</version> - <type>{}</type> - <classifier>{}</classifier> - </dependency>""" - print txt.format(row["groupId"], row["artifactId"], version, row["extension"], row["classifier"]) - diff --git a/autorelease/scripts/generate-distribution-script.py b/autorelease/scripts/generate-distribution-script.py deleted file mode 100755 index 67cd26733..000000000 --- a/autorelease/scripts/generate-distribution-script.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys, csv, subprocess - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() -url_template = "https://nexus.open-o.org/service/local/artifact/maven/redirect?r=releases&g={0}&a={1}&e={2}&c={3}&v=$VERSION" - -def parseRow(row): - service = row["service"] - filename = row["filename"] - groupId = row["groupId"] - artifactId = row["artifactId"] - extension = row["extension"] - classifier = row["classifier"] - url = url_template.format(groupId, artifactId, extension, classifier) - if classifier: - dest = "{}/{}-$VERSION.{}.{}".format(filename, filename, classifier, extension) - else: - dest = "{}/{}-$VERSION.{}".format(filename, filename, extension) - return {"url": url, "dest": dest} - - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - errors = 0 - - print """ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -VERSION=2.0.0 - -set +e - -""" - items = [] - for row in reader: - item = parseRow(row) - items.append(item) - - print "# {}".format(row["service"]) - print "mkdir -p {}".format(row["filename"]) - print "wget -O \"{}\" \"{}\"".format(item["dest"], item["url"]) - print "" diff --git a/autorelease/scripts/generate-jjbs/gen-code-jjbs.sh b/autorelease/scripts/generate-jjbs/gen-code-jjbs.sh deleted file mode 100755 index 9432cee54..000000000 --- a/autorelease/scripts/generate-jjbs/gen-code-jjbs.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build -JJB_DIR=$BUILD_DIR/ci-management/jjb - -cd $BUILD_DIR - -source $ROOT/scripts/generate-jjbs/workarounds.sh - - -find . -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort | while read repo; do - project=${repo} - - toxs=`find $repo -type d -exec test -e "{}/tox.ini" ';' -prune -printf "%P/tox.ini\n" | sort` - - in_sun_branch=`git show sun:autorelease/all-projects.txt | grep -x ${repo}` - - mkdir -p $JJB_DIR/$repo - - if [ ! -z "$toxs" ]; then - rm -f $JJB_DIR/$repo/${repo}-python.yaml - - project=${repo}-java - echo $repo/${repo}-python.yaml - - cat > $JJB_DIR/$repo/${repo}-python.yaml <<EOF ---- -- project: - name: ${repo}-python - project: '${repo}' - stream: - - 'master': - branch: 'master' -EOF - if [ $in_sun_branch ]; then - cat >> $JJB_DIR/$repo/${repo}-python.yaml <<EOF - - 'sun': - branch: 'sun' -EOF - fi - cat >> $JJB_DIR/$repo/${repo}-python.yaml <<EOF - mvn-settings: '${repo}-settings' - build-node: 'centos7-redis-2c-1g' - subproject: -EOF - for tox in $toxs; do - toxpath=${tox%/tox.ini} - - if [ "$toxpath" == "" ]; then - subproject="root" - pathparam="." - pattern="**" - else - subproject=${toxpath////-} # replace slash with dash - pathparam=$toxpath - pattern="$toxpath/**" - - # do special subproject names - for SUB in "${SUBPROJECT_MAP[@]}"; do - if [ "${SUB%:*}" = "$repo/$toxpath" ]; then - subproject=${SUB#*:} - fi - done - fi - - cat >> $JJB_DIR/$repo/${repo}-python.yaml <<EOF - - '${subproject}': - path: '${pathparam}' - pattern: '${pattern}' -EOF - done - cat >> $JJB_DIR/$repo/${repo}-python.yaml <<EOF - jobs: - - '{project}-{stream}-{subproject}-verify-python' -EOF - fi - - - - - has_subprojects=0 - for r in "${SPLIT_REPOS[@]}"; do - if [ "$repo" = "$r" ]; then - has_subprojects=1 - fi - done - - if [ $has_subprojects -eq 1 ]; then - poms=`find $repo -mindepth 1 -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort` - else - poms=`find $repo -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort` - if [ "$poms" != "/pom.xml" ]; then - has_subprojects=1 - fi - fi - - - if [ ! -z "$poms" ]; then - rm -f $JJB_DIR/$repo/${repo}.yaml - rm -f $JJB_DIR/$repo/${repo}-java.yaml - echo $repo/${project}.yaml - fi - - if [ $has_subprojects -eq 0 ]; then - # root pom.xml found - cat > $JJB_DIR/$repo/${project}.yaml <<EOF ---- -- project: - name: ${project} - jobs: - - '{project}-{stream}-verify-java' - - '{project}-{stream}-merge-java' - - project: '${repo}' - stream: - - 'master': - branch: 'master' -EOF - if [ $in_sun_branch ]; then - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - - 'sun': - branch: 'sun' -EOF - fi - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - mvn-settings: '${repo}-settings' -EOF - elif [ ! -z "$poms" ]; then - cat > $JJB_DIR/$repo/${project}.yaml <<EOF ---- -- project: - name: ${project} - project: '${repo}' - stream: - - 'master': - branch: 'master' -EOF - if [ $in_sun_branch ]; then - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - - 'sun': - branch: 'sun' -EOF - fi - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - mvn-settings: '${repo}-settings' - subproject: -EOF - - for pom in $poms; do - pompath=${pom%/pom.xml} - subproject=${pompath////-} # replace slash with dash - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - - '${subproject}': - pom: '${pom}' - pattern: '${pompath}/**' -EOF - done - - if [ -e $BUILD_DIR/$repo/pom.xml ]; then - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - - 'root': - pom: 'pom.xml' - pattern: '*' -EOF - fi - - cat >> $JJB_DIR/$repo/${project}.yaml <<EOF - jobs: - - '{project}-{stream}-{subproject}-verify-java' - - '{project}-{stream}-{subproject}-merge-java' -EOF - fi -done diff --git a/autorelease/scripts/generate-jjbs/gen-csit-jjbs.sh b/autorelease/scripts/generate-jjbs/gen-csit-jjbs.sh deleted file mode 100755 index 539e91115..000000000 --- a/autorelease/scripts/generate-jjbs/gen-csit-jjbs.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# csit plans root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build -JJB_DIR=$BUILD_DIR/ci-management/jjb - -WORKSPACE=`git rev-parse --show-toplevel` -PLANS_DIR=`git rev-parse --show-toplevel`/test/csit/plans - -source $ROOT/scripts/generate-jjbs/workarounds.sh - - -TMPDIR=`mktemp -d --suffix="-docker-log"` -$ROOT/scripts/ls-microservice-repos.py | cut -d ' ' -f 1 > $TMPDIR/microservices.txt - -find $PLANS_DIR -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort | while read repo; do - - OUTFILE=$JJB_DIR/$repo/${repo}-csit.yaml - cat > $OUTFILE <<EOF ---- -- project: - name: ${repo}-csit - jobs: - - 'integration-verify-{project}-csit-{functionality}' - - '{project}-csit-{functionality}' - project: '${repo}' - functionality: -EOF - find $PLANS_DIR/$repo -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort | while read func; do - echo $repo / $func - cat >> $OUTFILE <<EOF - - '${func}': - trigger_jobs: -EOF - - docker kill `docker ps -a -q` - docker rm `docker ps -a -q` - - $WORKSPACE/test/csit/run-csit.sh plans/${repo}/${func} - mkdir -p $TMPDIR/${repo} - cp $WORKSPACE/archives/_docker-images.log $TMPDIR/${repo}/${func}.txt - - docker kill `docker ps -a -q` - docker rm `docker ps -a -q` - - - for image in `grep openoint $TMPDIR/${repo}/${func}.txt | grep -f $TMPDIR/microservices.txt | sort`; do - microservice=`echo $image | cut -d '/' -f 2` - cat >> $OUTFILE <<EOF - - 'integration-${microservice}-merge-docker' -EOF - done - - done - - cat >> $OUTFILE <<EOF - robot-options: '' - branch: 'master' -EOF -done - -echo $TMPDIR diff --git a/autorelease/scripts/generate-jjbs/gen-docker-jjbs.sh b/autorelease/scripts/generate-jjbs/gen-docker-jjbs.sh deleted file mode 100755 index 142892e72..000000000 --- a/autorelease/scripts/generate-jjbs/gen-docker-jjbs.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build -JJB_DIR=$BUILD_DIR/ci-management/jjb - -cd $BUILD_DIR - -# docker root dir -DOCKER=`git rev-parse --show-toplevel`/test/csit/docker - -cd $DOCKER - -OUTFILE=$JJB_DIR/integration/integration-docker-microservices.yaml - -cat > $OUTFILE <<EOF ---- -- project: - name: integration-docker-microservices - project: 'integration' - branch: 'master' - version: '1.1.0-SNAPSHOT' - mvn-settings: 'autorelease-settings' - build-node: 'centos7-robot-8c-8g' - jobs: - - 'integration-{microservice}-verify-docker' - - 'integration-{microservice}-merge-docker' - microservice: -EOF - -TMPDIR=`$ROOT/scripts/generate-jjbs/gen-job-lists.sh` -IFS=$'\n' -for line in `$ROOT/scripts/ls-microservice-repos.py | sort`; do - IFS=' ' - array=($line) - microservice=${array[0]} - repo=${array[1]} - trigger=${array[2]} - echo $microservice $repo $trigger - cat >> $OUTFILE <<EOF - - '${microservice}': - trigger_jobs: -EOF - for job in `cat ${TMPDIR}/merge-jobs/${repo}.txt | grep "${trigger}"`; do - cat >> $OUTFILE <<EOF - - '${job}' -EOF - done -done diff --git a/autorelease/scripts/generate-jjbs/gen-job-lists.sh b/autorelease/scripts/generate-jjbs/gen-job-lists.sh deleted file mode 100755 index 4e12c91dc..000000000 --- a/autorelease/scripts/generate-jjbs/gen-job-lists.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build -JJB_DIR=$BUILD_DIR/ci-management/jjb - -cd $BUILD_DIR - -source $ROOT/scripts/generate-jjbs/workarounds.sh - - -TMPDIR=`mktemp -d` -echo $TMPDIR - -mkdir -p $TMPDIR/merge-jobs -find . -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort | while read repo; do - project=${repo} - OUTFILE=$TMPDIR/merge-jobs/${repo}.txt - - has_subprojects=0 - for r in "${SPLIT_REPOS[@]}"; do - if [ "$repo" = "$r" ]; then - has_subprojects=1 - fi - done - - if [ $has_subprojects -eq 1 ]; then - poms=`find $repo -mindepth 1 -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort` - else - poms=`find $repo -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort` - if [ "$poms" != "/pom.xml" ]; then - has_subprojects=1 - fi - fi - - - if [ $has_subprojects -eq 0 ]; then - echo ${repo}-master-merge-java > $OUTFILE - elif [ ! -z "$poms" ]; then - for pom in $poms; do - pompath=${pom%/pom.xml} - subproject=${pompath////-} # replace slash with dash - echo ${repo}-master-${subproject}-merge-java >> $OUTFILE - done - fi -done - diff --git a/autorelease/scripts/generate-jjbs/workarounds.sh b/autorelease/scripts/generate-jjbs/workarounds.sh deleted file mode 100755 index 82b39658c..000000000 --- a/autorelease/scripts/generate-jjbs/workarounds.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# specific workarounds to maintain existing job list -rm -f $BUILD_DIR/integration/autorelease/build/pom.xml -rm -f $BUILD_DIR/nfvo/monitor/pom.xml -touch $BUILD_DIR/common-tosca-aria/tox.ini - - -SUBPROJECT_MAP=( - "nfvo/drivers/vnfm/svnfm/zte/vmanager:drv-vnfm-zte" - "nfvo/drivers/vnfm/gvnfm/gvnfmadapter:drv-gvnfm" -) - -SPLIT_REPOS=("nfvo" "common-services-common-utilities" "multivimdriver-openstack" "multivimdriver-vmware-vio") diff --git a/autorelease/scripts/generate-pom.sh b/autorelease/scripts/generate-pom.sh deleted file mode 100755 index 5a3286a53..000000000 --- a/autorelease/scripts/generate-pom.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease -VERSION="1.1.0-SNAPSHOT" - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -FILE=$BUILD_DIR/pom-raw.xml - -cat > $FILE <<EOF -<!-- - Copyright (c) 2016-2017 Huawei Technologies Co., Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- AUTOGENERATED by generate-pom.sh; DO NOT MODIFY MANUALLY --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.openo.oparent</groupId> - <artifactId>oparent</artifactId> - <version>$VERSION</version> - <relativePath>oparent</relativePath> - </parent> - <groupId>org.openo.integration.distribution</groupId> - <artifactId>openo</artifactId> - <packaging>pom</packaging> - <modules> -EOF - -find -mindepth 1 -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P\n" | sort | while read p; do - if [ $p != "integration/autorelease/build" ]; then - cat >> $FILE <<EOF - <module>$p</module> -EOF - fi -done - -cat >> $FILE <<EOF - </modules> - <dependencies> -EOF - -$ROOT/scripts/generate-binary-deps.py >> $FILE - -cat >> $FILE <<EOF - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.6</version> - <configuration> - <appendAssemblyId>true</appendAssemblyId> - <descriptors> - <descriptor>assembly.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> -EOF - -xmlstarlet fo pom-raw.xml > pom.xml -rm -f pom-raw.xml - -$ROOT/scripts/generate-assembly.py > $BUILD_DIR/assembly.xml diff --git a/autorelease/scripts/get-all-repos.sh b/autorelease/scripts/get-all-repos.sh deleted file mode 100755 index 25a4e20e3..000000000 --- a/autorelease/scripts/get-all-repos.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -ssh -p 29418 gerrit.open-o.org gerrit ls-projects | grep -vf $ROOT/excluded-projects.txt diff --git a/autorelease/scripts/list-microservices.py b/autorelease/scripts/list-microservices.py deleted file mode 100755 index 03c0eb040..000000000 --- a/autorelease/scripts/list-microservices.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys, csv, subprocess - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - - rows = [] - for row in reader: - rows.append(row) - - for row in rows: - print " * {:35s} {}".format(row["filename"], row["service"]) diff --git a/autorelease/scripts/ls-microservice-repos.py b/autorelease/scripts/ls-microservice-repos.py deleted file mode 100755 index 716bc3dc1..000000000 --- a/autorelease/scripts/ls-microservice-repos.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import sys, csv, subprocess, os, urllib2 - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - - for row in reader: - print "{} {} {}".format(row["filename"], row["repo"], row["job-trigger-string"]) diff --git a/autorelease/scripts/set-version.sh b/autorelease/scripts/set-version.sh deleted file mode 100755 index 3a4503a6d..000000000 --- a/autorelease/scripts/set-version.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -VERSION="2.0.0" - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -if [ -z "$MVN" ]; then - export MVN=`which mvn` -fi - -# Jenkins sets a $MVN parameter via JJB that points to the appropriately installed maven -$MVN -q -f oparent/version/pom.xml versions:set versions:update-child-modules -DnewVersion=${VERSION} diff --git a/autorelease/scripts/verify-binaries.py b/autorelease/scripts/verify-binaries.py deleted file mode 100755 index 50f7312ef..000000000 --- a/autorelease/scripts/verify-binaries.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys, csv, subprocess - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() -path = "{}/autorelease/dist".format(root) -version = "1.1.0-SNAPSHOT" -url_template = "https://nexus.open-o.org/service/local/artifact/maven/redirect?r=snapshots&g={0}&a={1}&e={2}&c={3}&v=LATEST" - -subprocess.call(["rm", "-rf", path]) -subprocess.call(["mkdir", "-p", path]) - - -def parseRow(row): - service = row["service"] - filename = row["filename"] - groupId = row["groupId"] - artifactId = row["artifactId"] - extension = row["extension"] - classifier = row["classifier"] - url = url_template.format(groupId, artifactId, extension, classifier) - if classifier: - dest = "{}/{}-{}.{}.{}".format(path, filename, version, classifier, extension) - else: - dest = "{}/{}-{}.{}".format(path, filename, version, extension) - return {"url": url, "dest": dest} - - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - errors = 0 - - items = [] - for row in reader: - item = parseRow(row) - items.append(item) - - result = subprocess.call(["wget", "-q", "--spider", "--content-disposition", item["url"]]) - if result == 0: - print "{} OK".format(row["service"]) - else: - errors += 1 - print "{} ERROR: {} not found".format(row["service"], item["url"]) - - print "{} errors found".format(errors) - - if errors > 0: - sys.exit(1) diff --git a/deployment/heat/onap-oom/env/gwu/onap.env b/deployment/heat/onap-oom/env/gwu/onap.env new file mode 100644 index 000000000..6c03e947e --- /dev/null +++ b/deployment/heat/onap-oom/env/gwu/onap.env @@ -0,0 +1,33 @@ +parameters: + + keystone_url: http://192.168.1.11:5000 + openstack_tenant_id: 4c93f99551604bf7af25a8f80c7f34cb + openstack_tenant_name: onap + openstack_username: demo + openstack_api_key: demo + + ubuntu_1404_image: trusty + ubuntu_1604_image: xenial + centos_7_image: centos7 + + apt_proxy: 192.168.1.51:3142 + docker_proxy: 192.168.1.51:5000 + + rancher_vm_flavor: m1.small + k8s_vm_flavor: m2.xxlarge + + public_net_id: 024582bd-ef9b-48b9-9e70-e6732559d9df + public_net_name: provider + + dcae_keystone_url: http://192.168.1.11:5000/v2.0 + oam_network_cidr: 172.16.0.0/16 + dcae_ip_addr: 172.16.0.4 + dns_forwarder: 192.168.1.11 + external_dns: 192.168.1.3 + + dnsaas_proxy_enable: false + dnsaas_keystone_url: http://192.168.1.11:5000/v2.0 + dnsaas_region: RegionOne + dnsaas_tenant_name: onap + dnsaas_username: demo + dnsaas_password: demo diff --git a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env new file mode 100644 index 000000000..0810cb598 --- /dev/null +++ b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env @@ -0,0 +1,33 @@ +parameters: + + keystone_url: http://10.145.122.117:5000 + openstack_tenant_id: 3d228d2fcbb7447bbba3cde703431bc1 + openstack_tenant_name: onap-beijing-oom + openstack_username: demo + openstack_api_key: demo + + ubuntu_1404_image: trusty + ubuntu_1604_image: xenial + centos_7_image: centos7 + + apt_proxy: 10.145.122.118:3142 + docker_proxy: 10.145.122.118:5000 + + rancher_vm_flavor: m1.small + k8s_vm_flavor: m1.xxlarge + + public_net_id: 3a6247f1-fac6-4167-a49f-33cc8415ccf4 + public_net_name: provider + + dcae_keystone_url: http://10.145.122.117:5000/v2.0 + oam_network_cidr: 172.16.0.0/16 + dcae_ip_addr: 172.16.0.4 + dns_forwarder: 10.145.122.117 + external_dns: 10.145.122.118 + + dnsaas_proxy_enable: false + dnsaas_keystone_url: http://10.145.122.117:5000/v2.0 + dnsaas_region: RegionOne + dnsaas_tenant_name: onap-beijing-oom + dnsaas_username: demo + dnsaas_password: demo diff --git a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env new file mode 100644 index 000000000..867d2ded4 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env @@ -0,0 +1,33 @@ +parameters: + + keystone_url: http://10.12.25.2:5000 + openstack_tenant_id: 09d8566ea45e43aa974cf447ed591d77 + openstack_tenant_name: Integration-Jenkins + openstack_username: demo + openstack_api_key: onapdemo + + ubuntu_1404_image: ubuntu-14-04-cloud-amd64 + ubuntu_1604_image: ubuntu-16-04-cloud-amd64 + centos_7_image: CentOS-7 + + apt_proxy: 10.12.5.80:3142 + docker_proxy: 10.12.5.80:5000 + + rancher_vm_flavor: m1.small + k8s_vm_flavor: m1.xxlarge + + public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 + public_net_name: external + + dcae_keystone_url: "http://10.0.14.1/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + oam_network_cidr: 10.0.0.0/16 + dcae_ip_addr: 10.0.4.1 + dns_forwarder: 10.12.25.5 + external_dns: 8.8.8.8 + + dnsaas_proxy_enable: true + dnsaas_keystone_url: http://10.12.25.5:5000/v2.0 + dnsaas_region: RegionOne + dnsaas_tenant_name: Integration-Jenkins + dnsaas_username: demo + dnsaas_password: onapdemo diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh new file mode 100644 index 000000000..db2428ba9 --- /dev/null +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -0,0 +1,197 @@ +#!/bin/bash -x +printenv + +mkdir -p /opt/config +echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt +echo `hostname -I` `hostname` >> /etc/hosts +mkdir -p /etc/docker +cat > /etc/docker/daemon.json <<EOF +{ + "insecure-registries" : ["__docker_proxy__"] +} +EOF +cat > /etc/apt/apt.conf.d/30proxy<<EOF +Acquire::http { Proxy "http://__apt_proxy__"; }; +Acquire::https::Proxy "DIRECT"; +EOF +apt-get -y update +apt-get -y install jq + +cd ~ + +# install docker 1.12 +curl -s https://releases.rancher.com/install-docker/1.12.sh | sh +usermod -aG docker ubuntu + +# install kubernetes 1.8.6 +curl -s -LO https://storage.googleapis.com/kubernetes-release/release/v1.8.6/bin/linux/amd64/kubectl +chmod +x ./kubectl +sudo mv ./kubectl /usr/local/bin/kubectl +mkdir ~/.kube + +# install helm 2.3 +wget -q http://storage.googleapis.com/kubernetes-helm/helm-v2.3.0-linux-amd64.tar.gz +tar -zxvf helm-v2.3.0-linux-amd64.tar.gz +sudo mv linux-amd64/helm /usr/local/bin/helm + +# Fix virtual memory allocation for onap-log:elasticsearch: +echo "vm.max_map_count=262144" >> /etc/sysctl.conf +sysctl -p + +# install rancher agent +echo export RANCHER_IP=__rancher_ip_addr__ > api-keys-rc +source api-keys-rc + +sleep 50 +until curl -s -o projects.json -H "Accept: application/json" http://$RANCHER_IP:8080/v2-beta/projects; do + sleep 10 +done +OLD_PID=$(jq -r '.data[0].id' projects.json) + +curl -s -H "Accept: application/json" -H "Content-Type: application/json" -d '{"accountId":"1a1"}' http://$RANCHER_IP:8080/v2-beta/apikeys | tee apikeys.json +echo export RANCHER_ACCESS_KEY=`jq -r '.publicValue' apikeys.json` >> api-keys-rc +echo export RANCHER_SECRET_KEY=`jq -r '.secretValue' apikeys.json` >> api-keys-rc +source api-keys-rc + +curl -s -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X DELETE -H 'Content-Type: application/json' "http://$RANCHER_IP:8080/v2-beta/projects/$OLD_PID" + +until [ ! -z "$TEMPLATE_ID" ] && [ "$TEMPLATE_ID" != "null" ]; do + sleep 5 + curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v2-beta/projectTemplates?name=Kubernetes | tee projectTemplatesKubernetes.json + TEMPLATE_ID=$(jq -r '.data[0].id' projectTemplatesKubernetes.json) +done + +curl -s -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X POST -H 'Content-Type: application/json' -d '{ "name":"oom", "projectTemplateId":"'$TEMPLATE_ID'" }' "http://$RANCHER_IP:8080/v2-beta/projects" | tee project.json +PID=`jq -r '.id' project.json` +echo export RANCHER_URL=http://$RANCHER_IP:8080/v1/projects/$PID >> api-keys-rc +source api-keys-rc + +until [ $(jq -r '.state' project.json) == "active" ]; do + sleep 5 + curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID | tee project.json +done + +TID=$(curl -s -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://$RANCHER_IP:8080/v1/projects/$PID/registrationTokens | jq -r '.id') +touch token.json +while [ $(jq -r .command token.json | wc -c) -lt 10 ]; do + sleep 5 + curl -s -X GET -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID/registrationToken/$TID | tee token.json +done +CMD=$(jq -r .command token.json) +eval $CMD + +# download rancher CLI +wget -q https://github.com/rancher/cli/releases/download/v0.6.7/rancher-linux-amd64-v0.6.7.tar.xz +unxz rancher-linux-amd64-v0.6.7.tar.xz +tar xvf rancher-linux-amd64-v0.6.7.tar + +# Clone OOM: +cd ~ +git clone -b amsterdam http://gerrit.onap.org/r/oom + +# Update values.yaml to point to docker-proxy instead of nexus3: +cd ~/oom/kubernetes +perl -p -i -e 's/nexus3.onap.org:10001/__docker_proxy__/g' `find ./ -name values.yaml` oneclick/setenv.bash + +KUBETOKEN=$(echo -n 'Basic '$(echo -n "$RANCHER_ACCESS_KEY:$RANCHER_SECRET_KEY" | base64 -w 0) | base64 -w 0) + +# create .kube/config +cat > ~/.kube/config <<EOF +apiVersion: v1 +kind: Config +clusters: +- cluster: + api-version: v1 + insecure-skip-tls-verify: true + server: "https://$RANCHER_IP:8080/r/projects/$PID/kubernetes:6443" + name: "oom" +contexts: +- context: + cluster: "oom" + user: "oom" + name: "oom" +current-context: "oom" +users: +- name: "oom" + user: + token: "$KUBETOKEN" +EOF + +export KUBECONFIG=/root/.kube/config +kubectl config view + +# Update ~/oom/kubernetes/kube2msb/values.yaml kubeMasterAuthToken to use the token from ~/.kube/config +sed -i "s/kubeMasterAuthToken:.*/kubeMasterAuthToken: $KUBETOKEN/" ~/oom/kubernetes/kube2msb/values.yaml + +# Put your onap_key ssh private key in ~/.ssh/onap_key + +# Create or edit ~/oom/kubernetes/config/onap-parameters.yaml +cp ~/oom/kubernetes/config/onap-parameters-sample.yaml ~/oom/kubernetes/config/onap-parameters.yaml +cat >> ~/oom/kubernetes/config/onap-parameters.yaml <<EOF + +#################################### +# Overridden by k8s_vm_entrypoint.sh +#################################### + +OPENSTACK_UBUNTU_14_IMAGE: "__ubuntu_1404_image__" +OPENSTACK_UBUNTU_16_IMAGE: "__ubuntu_1604_image__" +OPENSTACK_CENTOS_7_IMAGE: "__centos_7_image__" +OPENSTACK_PUBLIC_NET_ID: "__public_net_id__" +OPENSTACK_PUBLIC_NET_NAME: "__public_net_name__" +OPENSTACK_OAM_NETWORK_CIDR: "__oam_network_cidr__" +OPENSTACK_TENANT_NAME: "__openstack_tenant_name__" +OPENSTACK_TENANT_ID: "__openstack_tenant_id__" +OPENSTACK_USERNAME: "__openstack_username__" +OPENSTACK_API_KEY: "__openstack_api_key__" +OPENSTACK_KEYSTONE_URL: "__keystone_url__" +DCAE_IP_ADDR: "__dcae_ip_addr__" +DCAE_KEYSTONE_URL: "__dcae_keystone_url__" +DNS_LIST: "__dns_forwarder__" +DNS_FORWARDER: "__dns_forwarder__" +EXTERNAL_DNS: "__external_dns__" +DNSAAS_PROXY_ENABLE: "__dnsaas_proxy_enable__" +DNSAAS_KEYSTONE_URL: "__dnsaas_keystone_url__" +DNSAAS_REGION: "__dnsaas_region__" +DNSAAS_TENANT_NAME: "__dnsaas_tenant_name__" +DNSAAS_USERNAME: "__dnsaas_username__" +DNSAAS_PASSWORD: "__dnsaas_password__" + +EOF +cat ~/oom/kubernetes/config/onap-parameters.yaml + + +# wait for kubernetes to initialze +sleep 100 +until [ $(kubectl get pods --namespace kube-system | tail -n +2 | grep -c Running) -ge 6 ]; do + sleep 10 +done + +# Source the environment file: +cd ~/oom/kubernetes/oneclick/ +source setenv.bash + +# run the config pod creation +cd ~/oom/kubernetes/config +./createConfig.sh -n onap + +# Wait until the config container completes. +sleep 200 +until [ $(kubectl get pods --namespace onap -a | tail -n +2 | grep -c Completed) -eq 1 ]; do + sleep 10 +done + +# version control the config to see what's happening +cd /dockerdata-nfs/ +git init +git config user.email "root@k8s" +git config user.name "root" +git add -A +git commit -m "initial commit" + +# Run ONAP: +cd ~/oom/kubernetes/oneclick/ +./createAll.bash -n onap + +# Check ONAP status: +sleep 3 +kubectl get pods --all-namespaces diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml new file mode 100644 index 000000000..6241c0ae3 --- /dev/null +++ b/deployment/heat/onap-oom/onap-oom.yaml @@ -0,0 +1,169 @@ +heat_template_version: 2015-10-15 +description: ONAP on Kubernetes using OOM + +parameters: + docker_proxy: + type: string + + apt_proxy: + type: string + + public_net_id: + type: string + description: The ID of the Public network for floating IP address allocation + + public_net_name: + type: string + description: The name of the Public network referred by public_net_id + + oam_network_cidr: + type: string + description: CIDR of the OAM ONAP network + + keystone_url: + type: string + description: URL of OpenStack Keystone + + openstack_tenant_id: + type: string + description: OpenStack tenant ID + + openstack_tenant_name: + type: string + description: OpenStack tenant name (matching with the openstack_tenant_id) + + openstack_username: + type: string + description: OpenStack username + + openstack_api_key: + type: string + description: OpenStack password or API Key + + ubuntu_1404_image: + type: string + description: Name of the Ubuntu 14.04 image + + ubuntu_1604_image: + type: string + description: Name of the Ubuntu 16.04 image + + centos_7_image: + type: string + description: the id/name of the CentOS 7 VM imange + + rancher_vm_flavor: + type: string + description: Name of the Ubuntu 14.04 image + + k8s_vm_flavor: + type: string + description: Name of the Ubuntu 14.04 image + + dcae_ip_addr: + type: string + + dns_forwarder: + type: string + description: the forwarder address for setting up ONAP's private DNS server + + external_dns: + type: string + description: Public IP of the external DNS for ONAP network + + dnsaas_proxy_enable: + type: string + description: whether to enable DNSaaS proxy via multicloud + + dnsaas_region: + type: string + description: the region of the cloud instance providing the Designate DNS as a Service + + dnsaas_keystone_url: + type: string + description: the keystone URL of the cloud instance providing the Designate DNS as a Service + + dnsaas_username: + type: string + description: the username of the cloud instance providing the Designate DNS as a Service + + dnsaas_password: + type: string + description: the password of the cloud instance providing the Designate DNS as a Service + + dnsaas_tenant_name: + type: string + description: the name of the tenant in the cloud instance providing the Designate DNS as a Service + + dcae_keystone_url: + type: string + description: the keystone URL for DCAE to use (via MultiCloud) + +resources: + random-str: + type: OS::Heat::RandomString + properties: + length: 4 + + rancher_vm: + type: OS::Nova::Server + properties: + name: rancher + image: { get_param: ubuntu_1604_image } + flavor: { get_param: rancher_vm_flavor } + key_name: onap_key + networks: + - network: { get_param: public_net_id } + user_data_format: RAW + user_data: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + template: + get_file: rancher_vm_entrypoint.sh + + k8s_vm: + type: OS::Nova::Server + properties: + name: k8s + image: { get_param: ubuntu_1604_image } + flavor: { get_param: k8s_vm_flavor } + key_name: onap_key + networks: + - network: { get_param: public_net_id } + user_data_format: RAW + user_data: + str_replace: + params: + __docker_proxy__: { get_param: docker_proxy } + __apt_proxy__: { get_param: apt_proxy } + __rancher_ip_addr__: { get_attr: [rancher_vm, first_address] } + __openstack_tenant_id__: { get_param: openstack_tenant_id } + __openstack_tenant_name__: { get_param: openstack_tenant_name } + __openstack_username__: { get_param: openstack_username } + __openstack_api_key__: { get_param : openstack_api_key } + __public_net_id__: { get_param: public_net_id } + __public_net_name__: { get_param: public_net_name } + __oam_network_cidr__: { get_param: oam_network_cidr } + __ubuntu_1404_image__: { get_param: ubuntu_1404_image } + __ubuntu_1604_image__: { get_param: ubuntu_1604_image } + __centos_7_image__: { get_param: centos_7_image } + __keystone_url__: { get_param: keystone_url } + __dcae_keystone_url__: { get_param: dcae_keystone_url } + __dcae_ip_addr__: { get_param: dcae_ip_addr } + __dns_forwarder__: { get_param: dns_forwarder } + __external_dns__: { get_param: external_dns } + __dnsaas_proxy_enable__: { get_param: dnsaas_proxy_enable } + __dnsaas_keystone_url__: { get_param: dnsaas_keystone_url } + __dnsaas_region__: { get_param: dnsaas_region } + __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name } + __dnsaas_username__: { get_param: dnsaas_username } + __dnsaas_password__: { get_param: dnsaas_password } + template: + get_file: k8s_vm_entrypoint.sh + +outputs: + k8s_vm_ip: + description: The IP address of the k8s instance + value: { get_attr: [k8s_vm, first_address] } diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh new file mode 100644 index 000000000..da1955446 --- /dev/null +++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh @@ -0,0 +1,18 @@ +#!/bin/bash -x +printenv + +echo `hostname -I` `hostname` >> /etc/hosts +mkdir -p /etc/docker +cat > /etc/docker/daemon.json <<EOF +{ + "insecure-registries" : ["__docker_proxy__"] +} +EOF +cat > /etc/apt/apt.conf.d/30proxy<<EOF +Acquire::http { Proxy "http://__apt_proxy__"; }; +Acquire::https::Proxy "DIRECT"; +EOF +apt-get -y update +apt-get -y install docker.io +usermod -aG docker ubuntu +docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.10 diff --git a/distribution/LICENSE b/distribution/LICENSE deleted file mode 100644 index bebcc7f89..000000000 --- a/distribution/LICENSE +++ /dev/null @@ -1,473 +0,0 @@ -THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS. - -APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION - -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -Attribution 4.0 International - -https://creativecommons.org/licenses/by/4.0/legalcode - ---------------------------------------------------------------------------------------- - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - ---------------------------------------------------------------------------------------- - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - ---------------------------------------------------------------------------------------- - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the "Licensor." The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/packaging/README.md b/packaging/README.md deleted file mode 100644 index 171e70cb7..000000000 --- a/packaging/README.md +++ /dev/null @@ -1,6 +0,0 @@ - -# ONAP Integration - Packaging - -## Description - -* Scripts, definitions, and other helper files for ONAP docker images diff --git a/packaging/docker/binaries.csv b/packaging/docker/binaries.csv deleted file mode 100644 index 81a9809de..000000000 --- a/packaging/docker/binaries.csv +++ /dev/null @@ -1,64 +0,0 @@ -repo,job-trigger-string,service,filename,groupId,artifactId,extension,classifier,ports,mysql,mongodb,tomcat,python,unzip-dir -client-cli,,Open-O Command-Line interface (CLI),client-cli,org.openo.client.cli,client-cli-deployment,zip,,,,,,, -client-gui,,Open-O GUI,client-gui,org.openo.client.gui,integration,zip,,9150,,,TRUE,,webapps/openoui -common-services-auth,,Common Services Authentication,common-services-auth,org.openo.common-services.auth,auth-service-deployment,zip,,8102,TRUE,,TRUE,TRUE, -common-services-common-utilities,wso2bpel,Common Services WSO2 Extension,common-services-wso2ext,org.openo.common-services.common-utilities.wso2bpel-ext,standalone,tar.gz,linux64,8101,TRUE,,,, -common-services-driver-mgr,,Common Services Driver Manager,common-services-drivermanager,org.openo.common-services.driver-mgr,drivermanager-service-deployment,zip,,8103,TRUE,,TRUE,, -common-services-external-system-registration,,Common Services External System Register,common-services-extsys,org.openo.common-services.external-system-registration,standalone,tar.gz,linux64,8100,TRUE,,,, -common-services-microservice-bus,,Common Services Microservice Bus,common-services-msb,org.openo.common-services.microservice-bus,msb-core-standalone,tar.gz,linux64,80 8080,,,,, -common-services-protocol-stack,,Common Services Protocol Stack,common-services-protocolstack,org.openo.common-services.protocol-stack,protocolstackservice-deployment,zip,,8109,,,TRUE,, -common-tosca-aria,,Common TOSCA ARIA,common-tosca-aria,org.openo.common-tosca.aria,aria,zip,,8204,,,,TRUE, -common-tosca-catalog,,Common TOSCA Catalog,common-tosca-catalog,org.openo.common-tosca.catalog,catalog-all,tar.gz,linux64,8200,TRUE,,,, -common-tosca-inventory,,Common TOSCA Inventory,common-tosca-inventory,org.openo.common-tosca.inventory,inventory-standalone,zip,bin,8203 3306,TRUE,TRUE,,, -common-tosca-model-designer,,Common TOSCA Model Designer,common-tosca-modeldesigner,org.openo.common-tosca.model-designer.modeldesigner.distribution,modeldesigner-standalone,tar.gz,linux.gtk.x86_64,8202,,,,, -gso,,GSO Service Gateway,gso-service-gateway,org.openo.gso,service-gateway-deployment,zip,,8305,,,TRUE,, -gso,,GSO Service Manager,gso-service-manager,org.openo.gso,servicemanagerservice-deployment,zip,,8301,TRUE,,TRUE,, -gvnfm-vnflcm,,GVNFM Lifecycle Management,gvnfm-vnflcm,org.openo.gvnfm.vnflcm,gvnfm-vnflcm,zip,,8801,TRUE,,,TRUE, -gvnfm-vnfmgr,,GVNFM Init Configuration and Management,gvnfm-vnfmgr,org.openo.gvnfm.vnfmgr,gvnfm-vnfmgr,zip,,8803,TRUE,,,TRUE, -gvnfm-vnfres,,GVNFM Virtual Resource Management,gvnfm-vnfres,org.openo.gvnfm.vnfres,gvnfm-vnfres,zip,,8802,TRUE,,,TRUE, -nfvo,vim-vimadapter,NFVO VIM Driver,nfvo-driver-vim,org.openo.nfvo,vimadapter-deployment,zip,,8481,,,TRUE,, -nfvo,gvnfm-gvnfmadapter,NFVO VNFM Driver GVNFM,nfvo-driver-vnfm-gvnfm,org.openo.nfvo,drivers-vnfm-gvnfm-gvnfmadapter,zip,,8484,,,,TRUE, -nfvo,svnfm-huawei,NFVO VNFM Driver Huawei,nfvo-driver-vnfm-huawei,org.openo.nfvo,hw-vnfmadapter-deployment,zip,,8482,TRUE,,TRUE,, -nfvo,gvnfm-juju,NFVO VNFM Driver JUJU,nfvo-driver-vnfm-juju,org.openo.nfvo,juju-vnfmadapterservice-deployment,zip,,8483,TRUE,,TRUE,, -nfvo,svnfm-zte,NFVO VNFM Driver ZTE,nfvo-driver-vnfm-zte,org.openo.nfvo,drivers-vnfm-svnfm-zte-vmanager,zip,,8410,,,,TRUE, -nfvo,vnfm-ericsson,NFVO VNFM Driver Ericsson,nfvo-driver-vnfm-ericsson,org.openo.nfvo,ericsson-vnfm-driver-deployment,zip,,8485,,,TRUE,, -nfvo,lcm,NFVO Lifecycle Management,nfvo-lcm,org.openo.nfvo,nfvo-lcm,zip,,8403,TRUE,,,TRUE, -nfvo,resmanagement,NFVO Resource Manager,nfvo-resmanagement,org.openo.nfvo,resmanagement-deployment,zip,,8480,TRUE,,TRUE,, -nfvo,monitor-dac,NFVO Monitor Data Acquire Component,nfvo-dac,org.openo.nfvo.monitor.dac.dac-api,dac-standalone,zip,,8206,,,,, -nfvo,monitor-umc,NFVO Monitor Unified Monitor Component,nfvo-umc,org.openo.nfvo.monitor.umc.umc-api,umc-standalone,zip,,8205,TRUE,,,, -nfvo,sdnc-zte,NFVO SDNC Driver ZTE,nfvo-driver-sdnc-zte,org.openo.nfvo.sfc-driver-standalone,nfvo-drivers-sdnc-zte-sfc-driver,zip,,8411,,,,, -policy-designer,,Policy Designer,policy-designer,org.openo.policy.designer,policydesigner-resource,tar.gz,linux64,8901,TRUE,,,, -policy-engine,,Policy Engine,policy-engine,org.openo.policy.engine,policy-engine-core,tar.gz,linux64,8902,,,,, -policy-lcm,,Policy Lcm,policy-lcm,org.openo.policy.lcm,apply,tar.gz,linux64,8903,,,,, -sdnhub-driver-ct-te,,SDNHUB Driver CT TE,sdnhub-driver-ct-te,org.openo.sdnhub.driver-ct-te,ct_tedriver,zip,,8670,,,,TRUE, -sdnhub-driver-huawei-l3vpn,,SDNHUB Driver Huawei L3VPN,sdnhub-driver-huawei-l3vpn,org.openo.sdnhub.driver-huawei-l3vpn,l3vpndriver-deployment,zip,,8533,,,TRUE,, -sdnhub-driver-huawei-openstack,,SDNHUB Driver Huawei Openstack,sdnhub-driver-huawei-openstack,org.openo.sdnhub.driver-huawei-openstack,osdriverservice-deployment,zip,,8539,,,TRUE,, -sdnhub-driver-huawei-overlay,,SDNHUB Driver Huawei Overlay,sdnhub-driver-huawei-overlay,org.openo.sdnhub.driver-huawei-overlay,overlayvpndriver-deployment,zip,,8536,,,TRUE,, -sdnhub-driver-huawei-servicechain,,SDNHUB Driver Huawei Servicechain,sdnhub-driver-huawei-servicechain,org.openo.sdnhub.driver-huawei-servicechain,servicechaindriverservice-deployment,zip,,8542,,,TRUE,, -sdnhub-driver-zte-sptn,,SDNHUB Driver ZTE SPTN,sdnhub-driver-zte-sptn,org.openo.sdnhub.driver-zte-sptn,standalone,tar.gz,linux64,8640,TRUE,,,, -sdno-brs,,SDNO Services BRS,sdno-service-brs,org.openo.sdno.brs,brs-deployment,zip,,8527,,,TRUE,, -sdno-brs,,SDNO Services MSS,sdno-service-mss,org.openo.sdno.brs,mss-deployment,zip,,8530,TRUE,,TRUE,, -sdno-ipsec,,SDNO Services IpSec,sdno-service-ipsec,org.openo.sdno.ipsec,ipsecservice-deployment,zip,,8515,,,TRUE,, -sdno-l2vpn,,SDNO Services L2VPN,sdno-service-l2vpn,org.openo.sdno.l2vpn,l2vpnservice-deployment,zip,,8509,,,TRUE,, -sdno-l3vpn,,SDNO Services L3VPN,sdno-service-l3vpn,org.openo.sdno.l3vpn,l3vpnservice-deployment,zip,,8506,,,TRUE,, -sdno-lcm,,SDNO Services LCM,sdno-service-lcm,org.openo.sdno.lcm,lcm-deployment,zip,,8535,,,,, -sdno-monitoring,,SDNO Monitoring,sdno-monitoring,org.openo.sdno.monitoring,ct_monitoring,zip,,8610,TRUE,,,TRUE, -sdno-nslcm,,SDNO Services Nslcm,sdno-service-nslcm,org.openo.sdno.nslcm,nslcm-deployment,zip,,8545,,,TRUE,, -sdno-optimize,,SDNO Optimize,sdno-optimize,org.openo.sdno.optimize,ct_optimizer,zip,,8620,TRUE,,,TRUE, -sdno-overlay,,SDNO Services Overlay VPN,sdno-service-overlayvpn,org.openo.sdno.overlay,overlayvpnservice-deployment,zip,,8503,,,TRUE,, -sdno-route,,SDNO Services Route,sdno-service-route,org.openo.sdno.route,routeservice-deployment,zip,,8551,,,TRUE,, -sdno-servicechain,,SDNO Services Service Chain,sdno-service-servicechain,org.openo.sdno.servicechain,servicechainservice-deployment,zip,,8521,,,TRUE,, -sdno-site,,SDNO Services Site,sdno-service-site,org.openo.sdno.site,localsiteservice-deployment,zip,,8548,,,TRUE,, -sdno-vpc,,SDNO Services VPC,sdno-service-vpc,org.openo.sdno.vpc,vpcservice-deployment,zip,,8518,,,TRUE,, -sdno-vsitemgr,,SDNO Vsite Manager,sdno-vsitemgr,org.openo.sdno.vsitemgr,ct_vsitemgr,zip,,8600,TRUE,,,TRUE, -sdno-vxlan,,SDNO Services VxLAN,sdno-service-vxlan,org.openo.sdno.vxlan,vxlanservice-deployment,zip,,8512,,,TRUE,, -vnf-sdk-function-test,,VNF SDK Function Test,vnfsdk-function-test,org.openo.vnf-sdk.function-test,standalone,tar.gz,linux64,8701,TRUE,,,, -nfvo,,VNF SDK Function Test Task,vnf-sdk-function-test-task,org.openo.nfvo,nfvo-functest,zip,,8704,TRUE,,,TRUE, -vnf-sdk-marketplace,,VNF SDK Marketplace,vnf-sdk-marketplace,org.openo.vnf-sdk.marketplace,vnf-sdk-marketplace-deployment,zip,,8702,TRUE,,TRUE,, -vnf-sdk-validate-lc-test,,VNF SDK Validate Lifecycle Test,vnf-sdk-validate-lc-test,org.openo.vnf-sdk.validate-lc-test,lifecycle-test-deployment,zip,,8703,,,TRUE,TRUE, -multivimdriver-broker,,MultiVIM broker,multivim-broker,org.openo.multivimdriver.broker,multivimbroker,zip,,9001,TRUE,,,TRUE, -multivimdriver-openstack,newton,MultiVIM driver of OpenStack Newton,multivim-driver-newton,org.openo.multivimdriver.openstack,multivimdriver-openstack-newton,zip,,9003,TRUE,,,TRUE, -multivimdriver-openstack,kilo,MultiVIM driver of OpenStack Kilo,multivim-driver-kilo,org.openo.multivimdriver.openstack,multivimdriver-openstack-kilo,zip,,9002,TRUE,,,TRUE, -multivimdriver-vmware-vio,vio,MultiVIM driver of VMware VIO,multivim-driver-vio,org.openo.multivimdriver.vmware.vio,multivimdriver-vio,zip,,9004,TRUE,,,TRUE, -holmes-engine-management,,Holmes Engine D,holmes-engine-d-standalone,org.openo.holmes.engine-management,holmes-engine-d-standalone,zip,linux64,8750,TRUE,,,, -holmes-rule-management,,Holmes Rulemgt Standalone,holmes-rulemgt-standalone,org.openo.holmes.rule-management,holmes-rulemgt-standalone,zip,linux64,8751,TRUE,,,, diff --git a/packaging/docker/docker-images.csv b/packaging/docker/docker-images.csv deleted file mode 100644 index f967c0b88..000000000 --- a/packaging/docker/docker-images.csv +++ /dev/null @@ -1,38 +0,0 @@ -project,image,repo,pom,mvn-options,shell-cmd -aai,openecomp/ajsc-aai,aai/aai-service,ajsc-aai/pom.xml,docker:build, -aai,openecomp/data-router,aai/data-router,pom.xml,docker:build, -aai,openecomp/model-loader,aai/model-loader,pom.xml,docker:build, -aai,openecomp/aai-resources,aai/resources,aai-resources/pom.xml,docker:build, -aai,openecomp/search-data-service,aai/search-data-service,pom.xml,docker:build, -aai,openecomp/sparky-be,aai/sparky-be,pom.xml,docker:build, -aai,openecomp/aai-traversal,aai/traversal,aai-traversal/pom.xml,docker:build, -appc,openecomp/appc-image,appc/deployment,pom.xml,-P docker, -dcae,openecomp/dcae-dmaapbc,dcae/dmaapbc,pom.xml,,docker build -f ./Dockerfile . -dcae,,dcae/orch-dispatcher,,,docker build -f ./Dockerfile . -dcae,dcae-controller,dcae/demo,pom.xml,,bash dcae-demo-controller/src/main/docker-build/build.sh -dcae,dcae-inventory,dcae/dcae-inventory,pom.xml,docker:build, -mso,openecomp/mso,mso,packages/docker/pom.xml,-P docker, -mso,openecomp/mso-arquillian,mso,packages/docker/pom.xml,-P docker, -mso,openecomp/wildfly,mso,packages/docker/pom.xml,-P docker, -mso,openecomp/ubuntu-update,mso,packages/docker/pom.xml,-P docker, -mso,openecomp/jacoco,mso,packages/docker/pom.xml,-P docker, -policy,onap/policy/policy-os,policy/docker,pom.xml,,./docker_build.sh -policy,onap/policy/policy-db,policy/docker,pom.xml,,./docker_build.sh -policy,onap/policy/policy-nexus,policy/docker,pom.xml,,./docker_build.sh -policy,onap/policy/policy-base,policy/docker,pom.xml,,./docker_build.sh -policy,onap/policy/policy-pe,policy/docker,pom.xml,,./docker_build.sh -policy,onap/policy/policy-drools,policy/docker,pom.xml,,./docker_build.sh -portal,openecomp/portalapps,portal,pom.xml,,git -C ecompsdkos pull || git clone $GIT_NO_PROJECT/ecompsdkos; git -C dmaapbc pull || git clone $GIT_NO_PROJECT/ui/dmaapbc dmaapbc; cd deliveries; chmod +x *.sh; ./run.sh -portal,openecomp/portaldb,portal,pom.xml,,git -C ecompsdkos pull || git clone $GIT_NO_PROJECT/ecompsdkos; git -C dmaapbc pull || git clone $GIT_NO_PROJECT/ui/dmaapbc dmaapbc; cd deliveries; chmod +x *.sh; ./run.sh -portal,widget-ms,portal,ecomp-portal-widget-ms/pom.xml,docker:build, -sdc,openecomp/sdc-backend,sdc,pom.xml,-P docker, -sdc,openecomp/sdc-frontend,sdc,pom.xml,-P docker, -sdc,openecomp/sdc-cassandra,sdc,pom.xml,-P docker, -sdc,openecomp/sdc-elasticsearch,sdc,pom.xml,-P docker, -sdc,openecomp/sdc-kibana,sdc,pom.xml,-P docker, -sdc,openecomp/sdc-sanity,sdc,pom.xml,-P docker, -sdnc,openecomp/dgbuilder-sdnc-image,sdnc/oam,pom.xml,-P docker, -sdnc,openecomp/sdnc-image,sdnc/oam,pom.xml,-P docker, -sdnc,openecomp/admportal-sdnc-image,sdnc/oam,pom.xml,-P docker, -sdnc,openecomp/ubuntu-sdnc-image,sdnc/oam,pom.xml,-P docker, -vid,openecomp/vid,vid,pom.xml,-P docker, diff --git a/packaging/docker/scripts/build-all-images.sh b/packaging/docker/scripts/build-all-images.sh deleted file mode 100755 index 8137ce71b..000000000 --- a/packaging/docker/scripts/build-all-images.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# $1 org - -if [ -z "$1" ]; then - ORG="openoint" -else - ORG=$1 -fi - -set -exu - -VERSION="1.1.0-SNAPSHOT" - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -cd $ROOT -for image in `$ROOT/scripts/ls-microservices.py | sort`; do - echo - echo $image - docker build -t $ORG/$image:$VERSION -t $ORG/$image:latest $image/target -done diff --git a/packaging/docker/scripts/gen-all-dockerfiles.sh b/packaging/docker/scripts/gen-all-dockerfiles.sh deleted file mode 100755 index 531eb3041..000000000 --- a/packaging/docker/scripts/gen-all-dockerfiles.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# $1 autorelease build - -if [ -z "$1" ]; then - BUILD="snapshots" -else - BUILD=$1 -fi - -VERSION="1.1.0-SNAPSHOT" - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -cd $ROOT -for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do - $ROOT/scripts/gen-dockerfiles.sh $dirsrc $BUILD & -done -wait - - -mkdir -p $ROOT/target -cat > $ROOT/target/pom.xml <<EOF -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.openo.integration.docker</groupId> - <artifactId>docker-root</artifactId> - <version>${VERSION}</version> - <packaging>pom</packaging> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.19.0</version> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - <modules> -EOF -for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do -cat >> $ROOT/target/pom.xml <<EOF - <module>../${dirsrc}/target</module> -EOF -done -cat >> $ROOT/target/pom.xml <<EOF - </modules> -</project> -EOF diff --git a/packaging/docker/scripts/gen-dockerfiles.py b/packaging/docker/scripts/gen-dockerfiles.py deleted file mode 100755 index 498727388..000000000 --- a/packaging/docker/scripts/gen-dockerfiles.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import sys, csv, subprocess, os, shutil, urllib2, argparse - -parser = argparse.ArgumentParser(description='Generate docker image definition for a microservice. The results will be placed under the target/ subdirectory.') -parser.add_argument('microservice', help='filename of microservice as entered in binaries.csv') -parser.add_argument('--build', default="snapshot", help='a specific build to use ("autorelease-????")') - -args = parser.parse_args() - -version = "1.1.0-SNAPSHOT" - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() -path = "{}/test/csit/docker".format(root) -url_template = "https://nexus.open-o.org/service/local/artifact/maven/redirect?r=snapshots&g={0}&a={1}&e={2}&c={3}&v=LATEST" - -found = False - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - - for row in reader: - if row["filename"] == args.microservice: - found = True - print row["filename"] - - if row["classifier"]: - file = "{}-{}-{}.{}".format(row["artifactId"], version, row["classifier"], row["extension"]) - dest = "{}-{}-{}.{}".format(row["filename"], version, row["classifier"], row["extension"]) - else: - file = "{}-{}.{}".format(row["artifactId"], version, row["extension"]) - dest = "{}-{}.{}".format(row["filename"], version, row["extension"]) - - dir = "{}/{}/target".format(path, row["filename"]) - - try: - shutil.rmtree(dir, True) - os.makedirs(dir) - except OSError: - pass - - # create empty Dockerfile if not exists - open( "{}/Dockerfile".format(dir), "a" ).close() - - outfile = open( "{}/50-microservice.txt".format(dir), "w" ) - - outfile.write("# 50-microservice.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY\n\n") - outfile.write("# Set up microservice\n") - if args.build == "snapshot": - redir_url = url_template.format(row["groupId"], row["artifactId"], row["extension"], row["classifier"]) - outfile.write("# {}\n".format(redir_url)) - response = urllib2.urlopen(redir_url) - url = response.geturl() - else: - url = "https://nexus.open-o.org/content/repositories/{}/{}/{}/{}/{}".format(args.build, row["groupId"].replace(".","/"), row["artifactId"], version, file ) - - - outfile.write("RUN wget -q -O {} \"{}\"".format(dest, url)) - # outfile.write("ADD \"{}\" {}\n".format(url, dest)) - - unzip_opt = "" - if row["extension"] == "tar.gz": - if row["unzip-dir"]: - unzip_opt = " -C {}".format(row["unzip-dir"]) - outfile.write(" && tar -xf {}{}".format(dest, unzip_opt)) - elif row["extension"] == "zip": - if row["unzip-dir"]: - unzip_opt = " -d {}".format(row["unzip-dir"]) - outfile.write(" && unzip -q -o -B {}{}".format(dest, unzip_opt)) - outfile.write(" && rm -f {}\n".format(dest)) - - outfile.write("# Set permissions\n") - outfile.write("RUN find . -type d -exec chmod o-w {} \;\n") - outfile.write("RUN find . -name \"*.sh\" -exec chmod +x {} \;\n") - - if row["ports"]: - ports = row["ports"].split() - for port in ports: - outfile.write("EXPOSE {}\n".format(port)) - outfile.write("RUN echo Open-O {} {} \"{}\" > OPENO_VERSION\n".format(row["filename"], version, url)) - outfile.write("\n\n") - - outfile.close() - - - def symlink(flag, template): - try: - os.remove("{}/{}".format(dir, template)) - except OSError: - pass - if flag: - os.symlink("../../templates/{}".format(template), "{}/{}".format(dir, template)) - - symlink(True, "10-basebuild.txt") - symlink(row["python"], "15-python.txt") - symlink(row["mysql"], "20-mysql.txt") - if row["tomcat"]: - # create empty 30-tomcat.txt as marker for gen-dockerfiles.sh - open( "{}/30-tomcat.txt".format(dir), "a" ).close() - symlink(row["mongodb"], "25-mongodb.txt") - symlink(True, "90-entrypoint.txt") - -if not found: - print "Error: microservice {} not found in binaries.csv.".format(args.microservice) - sys.exit(2) diff --git a/packaging/docker/scripts/gen-dockerfiles.sh b/packaging/docker/scripts/gen-dockerfiles.sh deleted file mode 100755 index 5cd926a98..000000000 --- a/packaging/docker/scripts/gen-dockerfiles.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# $1 dirsrc -# $2 autorelease build - -set -e - -dirsrc=$1 - -if [ -z "$2" ]; then - BUILD="snapshots" -else - BUILD=$2 -fi - -VERSION="1.1.0-SNAPSHOT" - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -cd $ROOT -dir=$dirsrc/target -mkdir -p $dir - -if [ "$BUILD" = "snapshots" ]; then - $ROOT/scripts/gen-dockerfiles.py $dirsrc -else - $ROOT/scripts/gen-dockerfiles.py $dirsrc --build $BUILD -fi - -# Update build number in workaround files -for file in `find $dirsrc -name 80-workaround.txt`; do - sed -i "s|autorelease-[0-9]\{4\}|$BUILD|" $file -done - - -cp $ROOT/../../../distribution/LICENSE $dir -cp -f $dirsrc/*.txt $dir 2>/dev/null || : - -if [ -f $dir/20-mysql.txt ]; then - cp $ROOT/templates/init-mysql.sh $dir/init-mysql.sh -else - rm -f $dir/init-mysql.sh -fi - - -# empty 30-tomcat.txt would be created by gen-dockerfiles.py where required -if [ -f $dir/30-tomcat.txt ]; then - TOMCAT_VERSION=`$ROOT/scripts/get-tomcat-version.sh` - cat > $dir/30-tomcat.txt <<EOF -# 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY -# Set up tomcat -RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz && tar --strip-components=1 -xf apache-tomcat-${TOMCAT_VERSION}.tar.gz && rm -f apache-tomcat-${TOMCAT_VERSION}.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT -RUN echo 'export CATALINA_OPTS="\$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh -ENV CATALINA_HOME /service - -EOF -fi - - - -cat > $dir/docker-entrypoint.sh <<EOF -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually. -# -# $dir/docker-entrypoint.sh -# - -if [ -z "\$SERVICE_IP" ]; then - export SERVICE_IP=\`hostname -i\` -fi -echo -echo Environment Variables: -echo "SERVICE_IP=\$SERVICE_IP" - -EOF - -if [ $dirsrc != "common-services-msb" ]; then - cat >> $dir/docker-entrypoint.sh <<EOF -if [ -z "\$MSB_ADDR" ]; then - echo "Missing required variable MSB_ADDR: Microservices Service Bus address <ip>:<port>" - exit 1 -fi -echo "MSB_ADDR=\$MSB_ADDR" -echo - -# Wait for MSB initialization -echo Wait for MSB initialization -for i in {1..20}; do - curl -sS -m 1 \$MSB_ADDR > /dev/null && break - sleep \$i -done - -EOF -fi - -cat >> $dir/docker-entrypoint.sh <<EOF -echo - -# Configure service based on docker environment variables -./instance-config.sh - -EOF -if [ -f $dir/20-mysql.txt ]; then - cat >> $dir/docker-entrypoint.sh <<EOF -# Start mysql -su mysql -c /usr/bin/mysqld_safe & - -EOF -fi -if [ -f $dir/25-mongodb.txt ]; then - cat >> $dir/docker-entrypoint.sh <<EOF -# Start mongodb -mongod & - -EOF -fi -cat >> $dir/docker-entrypoint.sh <<EOF -# Perform one-time config -if [ ! -e init.log ]; then - # Perform workarounds due to defects in release binary - ./instance-workaround.sh - -EOF -if [ -f $dir/20-mysql.txt ]; then - cat >> $dir/docker-entrypoint.sh <<EOF - # Init mysql; set root password - ./init-mysql.sh - -EOF -fi -cat >> $dir/docker-entrypoint.sh <<EOF - # microservice-specific one-time initialization - ./instance-init.sh - - date > init.log -fi - -# Start the microservice -./instance-run.sh - -EOF - -cat > $dir/Dockerfile <<EOF -# -# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually. -# -# $dir/Dockerfile -# - -EOF - -cat $dir/*.txt >> $dir/Dockerfile - -for file in instance-config.sh instance-init.sh instance-run.sh instance-workaround.sh; do - if [ ! -f $dirsrc/$file ]; then - cp -n $ROOT/templates/instance-script.sh $dirsrc/$file - fi -done - -cp -f $dirsrc/instance-*.sh $dir -touch $dir/instance-config.sh -touch $dir/instance-init.sh -touch $dir/instance-run.sh -touch $dir/instance-workaround.sh -chmod +x $dir/*.sh - - -cat > $dir/pom.xml <<EOF -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.openo.integration.docker</groupId> - <artifactId>${dirsrc}</artifactId> - <version>${VERSION}</version> - <packaging>docker</packaging> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.19.0</version> - <extensions>true</extensions> - <configuration> - <images> - <image> - <name>openoint/${dirsrc}</name> - <build> - <dockerFileDir>.</dockerFileDir> - <tags> - <tag>latest</tag> - </tags> - </build> - </image> - </images> - </configuration> - </plugin> - </plugins> - </build> -</project> -EOF diff --git a/packaging/docker/scripts/get-latest-build.sh b/packaging/docker/scripts/get-latest-build.sh deleted file mode 100755 index 388a6d33c..000000000 --- a/packaging/docker/scripts/get-latest-build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# get latest autorelease build -curl -sS https://nexus.open-o.org/content/repositories/ | grep autorelease | sed 's|<[^>]*>||g' | sed -r 's|\s+||g' | cut -d/ -f 1 | sort | tail -1 diff --git a/packaging/docker/scripts/get-tomcat-version.sh b/packaging/docker/scripts/get-tomcat-version.sh deleted file mode 100755 index 316a0ec94..000000000 --- a/packaging/docker/scripts/get-tomcat-version.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# get latest 8.5 tomcat version -curl -sS http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/ | grep v8.5 | sed 's|<[^>]*>||g' | sed -r 's|\s+||g' | sed 's|/.*||g' | sed 's|v||g' | tail -1 diff --git a/packaging/docker/scripts/ls-microservices.py b/packaging/docker/scripts/ls-microservices.py deleted file mode 100755 index 7a7433be3..000000000 --- a/packaging/docker/scripts/ls-microservices.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import sys, csv, subprocess, os, urllib2 - -root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).rstrip() - -with open( "{}/autorelease/binaries.csv".format(root), "r" ) as f: - reader = csv.DictReader(f) - - for row in reader: - print row["filename"] diff --git a/packaging/docker/scripts/pull-all-images.sh b/packaging/docker/scripts/pull-all-images.sh deleted file mode 100755 index aee3bb2e3..000000000 --- a/packaging/docker/scripts/pull-all-images.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -exu - -VERSION="1.1.0-SNAPSHOT" - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -cd $ROOT -for image in `$ROOT/scripts/ls-microservices.py | sort`; do - echo - echo $image - docker pull openoint/$image:$VERSION - docker pull openoint/$image:latest -done diff --git a/packaging/docker/scripts/push-all-images.sh b/packaging/docker/scripts/push-all-images.sh deleted file mode 100755 index 00684c61d..000000000 --- a/packaging/docker/scripts/push-all-images.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# $1 org - -if [ -z "$1" ]; then - ORG="openoint" -else - ORG=$1 -fi - -set -ex - -VERSION="1.1.0-SNAPSHOT" - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -if [ -z "$MVN" ]; then - export MVN=`which mvn` -fi -if [ -z "$MVN" ] && [ -x /w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn ]; then - export MVN="/w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn" -fi - -cd $ROOT -for image in `$ROOT/scripts/ls-microservices.py | sort`; do - echo - echo $image - - if [ ! -z "$MVN" ]; then - $MVN -f $image/target docker:push - else - docker push $ORG/$image:$VERSION - docker push $ORG/$image:latest - fi -done diff --git a/packaging/docker/scripts/verify-dockerfiles.sh b/packaging/docker/scripts/verify-dockerfiles.sh deleted file mode 100755 index e2acbdc90..000000000 --- a/packaging/docker/scripts/verify-dockerfiles.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# docker root dir -ROOT=`git rev-parse --show-toplevel`/test/csit/docker - -MICROSERVICES=`$ROOT/scripts/ls-microservices.py` - -EXIT_CODE=0 -for dir in `find $ROOT -maxdepth 1 -mindepth 1 -type d ! -name scripts ! -name templates -printf '%f\n'`; do - if ! grep -q $dir <<<$MICROSERVICES; then - echo ERROR: $dir not found in binaries.csv - EXIT_CODE=1 - fi -done -exit $EXIT_CODE diff --git a/test/csit/plans/appc/healthcheck/setup.sh b/test/csit/plans/appc/healthcheck/setup.sh index d47bbc5a2..406743303 100755 --- a/test/csit/plans/appc/healthcheck/setup.sh +++ b/test/csit/plans/appc/healthcheck/setup.sh @@ -19,13 +19,24 @@ # Place the scripts in run order: SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${WORKSPACE}/test/csit/scripts/appc/script1.sh +amsterdam="$(echo ${WORKSPACE} | grep amsterdam | wc -l)" + +if [ "$amsterdam" != "1" ]; then + export APPC_DOCKER_IMAGE_VERSION=1.3.0-SNAPSHOT-latest + export CCSDK_DOCKER_IMAGE_VERSION=0.1-STAGING-latest + export BRANCH=master + export SOLUTION_NAME=onap +else + export APPC_DOCKER_IMAGE_VERSION=v1.2.0 + export CCSDK_DOCKER_IMAGE_VERSION=v0.1.0 + export BRANCH=amsterdam + export SOLUTION_NAME=openecomp +fi export NEXUS_USERNAME=docker export NEXUS_PASSWD=docker export NEXUS_DOCKER_REPO=nexus3.onap.org:10001 export DMAAP_TOPIC=AUTO -export APPC_DOCKER_IMAGE_VERSION=1.3.0-SNAPSHOT-latest -export CCSDK_DOCKER_IMAGE_VERSION=0.1-STAGING-latest export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) @@ -37,14 +48,14 @@ fi # Clone APPC repo to get docker-compose for APPC mkdir -p $WORKSPACE/archives/appc cd $WORKSPACE/archives -git clone -b master --single-branch http://gerrit.onap.org/r/appc/deployment.git appc +git clone -b $BRANCH --single-branch http://gerrit.onap.org/r/appc/deployment.git appc cd $WORKSPACE/archives/appc git pull cd $WORKSPACE/archives/appc/docker-compose sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" docker-compose.yml docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO -docker pull $NEXUS_DOCKER_REPO/onap/appc-image:$APPC_DOCKER_IMAGE_VERSION -docker tag $NEXUS_DOCKER_REPO/onap/appc-image:$APPC_DOCKER_IMAGE_VERSION onap/appc-image:latest +docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-image:$APPC_DOCKER_IMAGE_VERSION +docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-image:$APPC_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/appc-image:latest docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:latest # start APPC containers with docker compose and configuration from docker-compose.yml diff --git a/test/csit/plans/appc/healthcheck_amsterdam/bundle_query.sh b/test/csit/plans/appc/healthcheck_amsterdam/bundle_query.sh deleted file mode 100755 index 45a92ea31..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/bundle_query.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -############################################################################### -# Copyright 2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### -SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo $SCRIPTS - - -num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1) -num_failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l) -failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure) - -echo "There are $num_failed_bundles failed bundles out of $num_bundles installed bundles." - -if [ "$num_failed_bundles" -ge 1 ] || [ "$num_bundles" == "" ]; then - echo "There are $num_bundles bundles with $num_failed_bundles in a failed state. " - echo "The following bundle(s) are in a failed state: " - echo " $failed_bundles" - exit 1; -fi - -exit 0 diff --git a/test/csit/plans/appc/healthcheck_amsterdam/db_query.sh b/test/csit/plans/appc/healthcheck_amsterdam/db_query.sh deleted file mode 100755 index 70829a13a..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/db_query.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash -############################################################################### -# Copyright 2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### -SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo $SCRIPTS - -sdnctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l) - -appcctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D appcctl -u appcctl -pappcctl <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l) - - - -docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"show tables" 2>/dev/null | ( while read table_name; do -export $table_name="$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"select count(*) from $table_name" 2>/dev/null)" -done - -if [ "$sdnctl_num_tables" -ge "1" ]; then - echo "There are $sdnctl_num_tables tables in the sdnctl database. " -else - echo "Database sdnctl is not available." - exit 1; -fi - -if [ "$appcctl_num_tables" -ge "1" ]; then - echo "There is $appcctl_num_tables table in the appcctl database. " -else - echo "Database appcctl is not available." - exit 1; -fi - -#if [ "$NODE_TYPES" -eq "0" ]; then -# echo "There is no data in table NODE_TYPES. " -# exit 1; -#fi - -#if [ "$SVC_LOGIC" -eq "0" ] ; then -# echo "There is no data in table SVC_LOGIC. " -# exit 1; -#fi - -#if [ "$VNF_DG_MAPPING" -eq "0" ]; then -# echo "There is no data in table VNF_DG_MAPPING. " -# exit 1; -#fi - -echo "Expected table data is present." -exit 0 ) - -if [ "$?" -eq "1" ]; then - exit 1; -fi - -exit 0 diff --git a/test/csit/plans/appc/healthcheck_amsterdam/health_check.sh b/test/csit/plans/appc/healthcheck_amsterdam/health_check.sh deleted file mode 100755 index 63e0b17aa..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/health_check.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -############################################################################### -# Copyright 2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### -SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo $SCRIPTS - -response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-appc" -H "X-TransactionId: csit-appc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck ) - -if [ "$response" == "200" ]; then - echo "APPC health check passed." - exit 0; -fi - -echo "APPC health check failed with response code ${response}." -exit 1 diff --git a/test/csit/plans/appc/healthcheck_amsterdam/setup.sh b/test/csit/plans/appc/healthcheck_amsterdam/setup.sh deleted file mode 100755 index f5a579ed5..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/setup.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Modifications copyright (c) 2017 AT&T Intellectual Property -# -# Place the scripts in run order: -SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source ${WORKSPACE}/test/csit/scripts/appc/script1.sh - -export NEXUS_USERNAME=docker -export NEXUS_PASSWD=docker -export NEXUS_DOCKER_REPO=nexus3.onap.org:10001 -export DMAAP_TOPIC=AUTO -export APPC_DOCKER_IMAGE_VERSION=v1.2.0 -export CCSDK_DOCKER_IMAGE_VERSION=v0.1.0 - -export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) - -if [ "$MTU" == "" ]; then - export MTU="1450" -fi - - -# Clone APPC repo to get docker-compose for APPC -mkdir -p $WORKSPACE/archives/appc -cd $WORKSPACE/archives -git clone -b amsterdam --single-branch http://gerrit.onap.org/r/appc/deployment.git appc -cd $WORKSPACE/archives/appc -git pull -cd $WORKSPACE/archives/appc/docker-compose -sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" docker-compose.yml -docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO -docker pull $NEXUS_DOCKER_REPO/openecomp/appc-image:$APPC_DOCKER_IMAGE_VERSION -docker tag $NEXUS_DOCKER_REPO/openecomp/appc-image:$APPC_DOCKER_IMAGE_VERSION openecomp/appc-image:latest -docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION -docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:latest -# start APPC containers with docker compose and configuration from docker-compose.yml -docker-compose up -d -# WAIT 5 minutes maximum and test every 5 seconds if APPC is up using HealthCheck API -TIME_OUT=2000 -INTERVAL=30 -TIME=0 -while [ "$TIME" -lt "$TIME_OUT" ]; do - -startODL_status=$(docker exec appc_controller_container ps -e | grep startODL | wc -l) -waiting_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Waiting | wc -l) -run_level=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level) - - if [ "$run_level" == "Level 100" ] && [ "$startODL_status" -lt "1" ] && [ "$waiting_bundles" -lt "1" ] ; then - echo APPC started in $TIME seconds - break; - fi - - echo Sleep: $INTERVAL seconds before testing if APPC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds - sleep $INTERVAL - TIME=$(($TIME+$INTERVAL)) -done - -if [ "$TIME" -ge "$TIME_OUT" ]; then - echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for testing activities... -fi - -sleep 300 - -# Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS}" diff --git a/test/csit/plans/appc/healthcheck_amsterdam/teardown.sh b/test/csit/plans/appc/healthcheck_amsterdam/teardown.sh deleted file mode 100755 index 357ead8aa..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/teardown.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Modifications copyright (c) 2017 AT&T Intellectual Property -# - -kill-instance.sh appc_controller_container -kill-instance.sh sdnc_dgbuilder_container -kill-instance.sh sdnc_db_container - -# $WORKSPACE/archives/appc deleted with archives folder when tests starts so we keep it at the end for debugging diff --git a/test/csit/plans/appc/healthcheck_amsterdam/testplan.txt b/test/csit/plans/appc/healthcheck_amsterdam/testplan.txt deleted file mode 100644 index 0f78b1740..000000000 --- a/test/csit/plans/appc/healthcheck_amsterdam/testplan.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Test suites are relative paths under [integration.git]/test/csit/tests/. -# Place the suites in run order. -appc/healthcheck_amsterdam - diff --git a/test/csit/plans/sdc/nightly/setup.sh b/test/csit/plans/sdc/nightly/setup.sh index ac7a7f3f4..5abdd6bd1 100644 --- a/test/csit/plans/sdc/nightly/setup.sh +++ b/test/csit/plans/sdc/nightly/setup.sh @@ -16,7 +16,7 @@ # # Modifications copyright (c) 2017 AT&T Intellectual Property # -# Place the scripts in run order: +## Place the scripts in run order: mkdir ${WORKSPACE}/archives @@ -24,12 +24,6 @@ chmod -R 777 ${WORKSPACE}/archives source ${WORKSPACE}/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh -source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_containers.sh - -source ${WORKSPACE}/test/csit/scripts/sdc/docker_health.sh - -source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_sanity.sh - BE_IP=`get-instance-ip.sh sdc-BE` echo BE_IP=${BE_IP} diff --git a/test/csit/plans/sdc/sanity/setup.sh b/test/csit/plans/sdc/sanity/setup.sh index 3e4e66024..de3cb942c 100644 --- a/test/csit/plans/sdc/sanity/setup.sh +++ b/test/csit/plans/sdc/sanity/setup.sh @@ -21,13 +21,6 @@ source ${WORKSPACE}/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh -source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_containers.sh - -source ${WORKSPACE}/test/csit/scripts/sdc/docker_health.sh - -source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_sanity.sh - - BE_IP=`get-instance-ip.sh sdc-BE` echo BE_IP=${BE_IP} diff --git a/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh index 5dbfb5fc2..1025f405d 100644 --- a/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh +++ b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh @@ -1,4 +1,7 @@ #!/bin/bash + + +set -x # # ============LICENSE_START======================================================= # ONAP CLAMP @@ -61,4 +64,50 @@ export HOST_IP=$IP_ADDRESS sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" ${WORKSPACE}/data/environments/$ENV_NAME.json sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" ${WORKSPACE}/data/environments/$ENV_NAME.json + +source ${WORKSPACE}/data/clone/sdc/version.properties +export RELEASE=$major.$minor-STAGING-latest +export DEP_ENV=$ENV_NAME + +cp ${WORKSPACE}/data/clone/sdc/sdc-os-chef/scripts/docker_run.sh ${WORKSPACE}/test/csit/scripts/sdc/ +#sed -i "s~/data~${WORKSPACE}\/data~g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh +#sed -i "s/HOST_IP=\${IP}/HOST_IP=\${HOST_IP}/g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh +sed -i "s/ENVNAME=\"\${DEP_ENV}\"/ENVNAME=\"\${ENV_NAME}\"/g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh + +source ${WORKSPACE}/data/clone/sdc/version.properties +export RELEASE=$major.$minor-STAGING-latest + + +bash -x ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh -r ${RELEASE} -p 10001 -t + +sleep 120 + +#monitor sanity process + +TIME_OUT=1200 +INTERVAL=20 +TIME=0 +while [ "$TIME" -lt "$TIME_OUT" ]; do + +PID=`docker exec -i sdc-sanity ps -ef | grep java | awk '{print $2}'` +echo sanity PID is -- $PID + +if [ -z "$PID" ] + then + echo SDC sanity finished in $TIME seconds + break + fi + + echo Sleep: $INTERVAL seconds before testing if SDC sanity completed. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds + sleep $INTERVAL + TIME=$(($TIME+$INTERVAL)) +done + +if [ "$TIME" -ge "$TIME_OUT" ] + then + echo TIME OUT: Sany was NOT completed in $TIME_OUT seconds... Could cause problems for tests... +fi + + + diff --git a/test/csit/scripts/sdc/docker_health.sh b/test/csit/scripts/sdc/docker_health.sh index 832b25a23..4264b1a59 100644 --- a/test/csit/scripts/sdc/docker_health.sh +++ b/test/csit/scripts/sdc/docker_health.sh @@ -13,11 +13,11 @@ curl http://localhost:8181/sdc1/rest/healthCheck echo "" echo "" -res=`curl -s -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" "http://localhost:8080/sdc2/rest/v1/user/demo" | wc -l` -if [[ ${res} != 0 ]] +http_code=$(curl -o out.html -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://localhost:8080/sdc2/rest/v1/user/demo;) +if [[ ${http_code} != 200 ]] then - echo "Error [${res}] while user existance check" - exit ${res} + echo "Error [${http_code}] while user existance check" + return ${http_code} fi echo "check user existance: OK" diff --git a/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh b/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh index 48a31e895..efa372ed2 100644 --- a/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh +++ b/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh @@ -19,6 +19,14 @@ echo "This is ${WORKSPACE}/test/csit/scripts/sdc/kill_and_remove_dataFolder.sh" +# copy logs to archive + +cp -rf ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport/* ${WORKSPACE}/archives/ +cp -rf ${WORKSPACE}/data/logs/ ${WORKSPACE}/archives/ +cp -rf ${WORKSPACE}/data/logs/sdc-sanity/target/*.xml ${WORKSPACE}/archives/ + +ls -Rt ${WORKSPACE}/archives/ + #kill and remove all sdc dockers docker stop $(docker ps -a -q --filter="name=sdc") docker rm $(docker ps -a -q --filter="name=sdc") diff --git a/test/csit/scripts/sdc/start_sdc_containers.sh b/test/csit/scripts/sdc/start_sdc_containers.sh index 0dd373256..5bc8770bf 100644 --- a/test/csit/scripts/sdc/start_sdc_containers.sh +++ b/test/csit/scripts/sdc/start_sdc_containers.sh @@ -24,8 +24,8 @@ echo "This is ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_containers.sh" - -export RELEASE='1.1-STAGING-latest' +source ${WORKSPACE}/data/clone/sdc/version.properties +export RELEASE=$major.$minor-STAGING-latest export DEP_ENV=$ENV_NAME #[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release #[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW diff --git a/test/csit/tests/appc/healthcheck_amsterdam/APPC_GLOBAL_VARIABLES.robot b/test/csit/tests/appc/healthcheck_amsterdam/APPC_GLOBAL_VARIABLES.robot deleted file mode 100644 index b869434fc..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/APPC_GLOBAL_VARIABLES.robot +++ /dev/null @@ -1,10 +0,0 @@ -*** Settings *** -Documentation store all properties that can change or are used in multiple places here -... format is all caps with underscores between words and prepended with GLOBAL -... make sure you prepend them with GLOBAL so that other files can easily see it is from this file. - - -*** Variables *** -${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt -${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt -${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/APPC_Netstat.robot b/test/csit/tests/appc/healthcheck_amsterdam/APPC_Netstat.robot deleted file mode 100644 index 285fc3727..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/APPC_Netstat.robot +++ /dev/null @@ -1,8 +0,0 @@ -*** Settings *** -Library OperatingSystem - -*** Test Cases *** -APPC Netstat - [Documentation] Checking the active ports - ${output}= Run netstat -a | grep -E 8282 | grep LISTEN - Log To Console ${output} diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_HEALTHCHECK_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck_amsterdam/LCM_HEALTHCHECK_TIMESTAMP.robot deleted file mode 100644 index 2259f3f69..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_HEALTHCHECK_TIMESTAMP.robot +++ /dev/null @@ -1,52 +0,0 @@ -*** Settings *** -Library Selenium2Library -Library OperatingSystem -Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot - -*** Variable *** -${ResponseCode} -${var} - -*** Test Cases *** - -APPC LCM API HEALTHCHECK - [Documentation] APPC LCM API HEALTHCHECK - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] -# Set Selenium Speed 60 -# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a - -# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} -# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content} - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] -# Set Selenium Speed 90 -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input - -## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre -## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected - -Tear Down - - [Documentation] Close all browsers - Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_HEALTHCHECK_REQUEST.txt b/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_HEALTHCHECK_REQUEST.txt deleted file mode 100644 index d258b492b..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_HEALTHCHECK_REQUEST.txt +++ /dev/null @@ -1,25 +0,0 @@ -{ -"input" : -{ -"common-header" : -{ -"timestamp" : "2017-10-07T01:28:39.615000Z", -"api-ver" : "2.00", -"originator-id" : "SDNGP", -"request-id" : "AppCONAP-lcm-HealthCheck-PhilTest#1", -"sub-request-id" : "AppCONAP-lcm-HealthCheck-PhilTest#1", -"flags" : -{ -"mode" : "NORMAL", -"force" : "TRUE", -"ttl" : 3600 -} -}, -"action" : "HealthCheck", -"action-identifiers" : -{ -"vnf-id" : "dbax001v" -}, -"payload" : "{\"request-parameters\":{\"vnf-name\":\"dbax001v\",\"vnf-host-ip-address\":\"https://135.205.240.68:8080/Dispatch/\"},\"configuration-parameters\":{\"vnf_instance\":\"dbax001v\"}}" -} -} diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_REQUEST.txt b/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_REQUEST.txt deleted file mode 100644 index 5e199c97e..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_REQUEST.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ -"input" : -{ -"common-header" : -{ -"timestamp" : "2017-09-29T16:30:05.44Z", -"api-ver" : "2.01", -"originator-id" : "c09ac7d1-de62-0016-2000-e63702155Phil2", -"request-id" : "c09ac7d1-de62-0016-2000-e63702155Phil2", -"sub-request-id" : "150", -"flags" : -{ -"force" : "TRUE", -"ttl" : 60000 -} -}, -"action" : "Restart", -"action-identifiers" : -{ -"vnf-id" : "trial-vnf-004" -}, -"payload" : "{\"vm-id\":\"http://135.25.246.131:8774/v2/81fc2bc61f974de1b5a49e8c2ec090bb/servers/7c95ba81-4aad-4b13-9e94-d6af4f2b06be\",\"identity-url\":\"http://135.25.246.131:5000/v2.0\",\"tenant-id\":\"81fc2bc61f974de1b5a49e8c2ec090bb\"}" -} -}
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_TIMESTAMP.robot deleted file mode 100644 index 768865f92..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VM_RESTART_TIMESTAMP.robot +++ /dev/null @@ -1,47 +0,0 @@ -*** Settings *** -Library Selenium2Library -Library OperatingSystem -Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot - -*** Variable *** -${ResponseCode} -${var} - -*** Test Cases *** -APPC LCM API VM RESTART - [Documentation] APPC LCM API VM RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - -# Get Server time ${GLOBAL_VM_RESTART_REQUESTFILE} - -# ${file_content}= OperatingSystem.Get File ${GLOBAL_VM_RESTART_REQUESTFILE} - -# Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_REQUEST.txt b/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_REQUEST.txt deleted file mode 100644 index ee9b8d9ba..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_REQUEST.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ -"input" : -{ -"common-header" : -{ -"timestamp" : "2017-10-07T01:39:54.227000Z", -"api-ver" : "2.00", -"originator-id" : "c09ac7d1-de62-0016-2000-e63702155555", -"request-id" : "c09ac7d1-de62-0016-2000-e63701125555", -"sub-request-id" : "150", -"flags" : -{ -"force" : "TRUE", -"ttl" : 60000 -} -}, -"action" : "Restart", -"action-identifiers" : -{ -"vnf-id" : "ibcx8888v" -}, -"payload" : "{\"AICIdentity\" : \"http://135.25.246.162:5000/v2.0\", \"vnf-host-ip-address\" : \"135.21.166.46\"}" -} -} diff --git a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_TIMESTAMP.robot b/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_TIMESTAMP.robot deleted file mode 100644 index 15690f023..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/LCM_VNF_RESTART_TIMESTAMP.robot +++ /dev/null @@ -1,50 +0,0 @@ -*** Settings *** -Library Selenium2Library -Library OperatingSystem -Library XvfbRobot -Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot -Resource ${CURDIR}/gettime.robot - - - -*** Variable *** -${ResponseCode} -${var} - -*** Test Cases *** - -APPC LCM API VNF RESTART - [Documentation] APPC LCM API VNF RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome - Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - -# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE} - -# Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/__init__.robot b/test/csit/tests/appc/healthcheck_amsterdam/__init__.robot deleted file mode 100644 index 3b8528dff..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation APPC - healthcheck diff --git a/test/csit/tests/appc/healthcheck_amsterdam/gettime.robot b/test/csit/tests/appc/healthcheck_amsterdam/gettime.robot deleted file mode 100644 index 9f376f9bc..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/gettime.robot +++ /dev/null @@ -1,40 +0,0 @@ -*** Settings *** -Library Selenium2Library -Library OperatingSystem -Library DateTime -Library String -##Library HttpLibrary.HTTP -Library Collections - - -*** Keywords *** - -Get Server time - [Documentation] Getting server time to update the json request - [Arguments] ${RequestFile} - - ${date}= Get Current Date time_zone=local result_format=%Y-%m-%dT%H:%M:%S.%fZ exclude_millis=False - - #updating the request file with the server time - ${file_content}= OperatingSystem.Get File ${RequestFile} - @{list}= Split to lines ${file_content} - ${data}= Get from list ${list} 5 - @{splitted_string}= Split String ${data} : 1 - ${time}= Get From List ${splitted_string} 1 - Log ${time} - @{splitted_string_time}= Split String ${time} " 2 - ${times1}= Get From List ${splitted_string_time} 1 - Log ${times1} - ${replaced_string}= Replace String ${data} ${times1} ${date} - @{list1}= Split to lines ${file_content} - Remove from list ${list1} 5 - Insert into list ${list1} 5 ${replaced_string} - Remove File ${RequestFile} - :FOR ${line} IN @{list1} - \ Append to File ${RequestFile} ${line} encoding=UTF-8 - \ Append to File ${RequestFile} ${\n} encoding=UTF-8 - - - - -
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck_amsterdam/test1.robot b/test/csit/tests/appc/healthcheck_amsterdam/test1.robot deleted file mode 100644 index 8bd49860b..000000000 --- a/test/csit/tests/appc/healthcheck_amsterdam/test1.robot +++ /dev/null @@ -1,27 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library Process - -*** Variables *** - -${bundle_query} ${SCRIPTS}/bundle_query.sh -${health_check} ${SCRIPTS}/health_check.sh -${db_query} ${SCRIPTS}/db_query.sh - - -*** Test Cases *** -Health check test case for APPC - [Documentation] Health check - ${result_hc}= Run Process bash ${health_check} > log_hc.txt shell=yes - Should Be Equal As Integers ${result_hc.rc} 0 - -Query bundle test case for APPC - [Documentation] Query bundles - ${result_bq}= Run Process bash ${bundle_query} > log_bq.txt shell=yes - Should Be Equal As Integers ${result_bq.rc} 0 - -Query database test case for APPC - [Documentation] Query database - ${result_db}= Run Process bash ${db_query} > log_db.txt shell=yes - Should Be Equal As Integers ${result_db.rc} 0 - diff --git a/test/csit/tests/sdc/nightly/test1.robot b/test/csit/tests/sdc/nightly/test1.robot index 6d4dc242d..3783e159e 100644 --- a/test/csit/tests/sdc/nightly/test1.robot +++ b/test/csit/tests/sdc/nightly/test1.robot @@ -10,7 +10,7 @@ Get Requests health check ok CreateSession sdc-be http://localhost:8080 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= Get Request sdc-be /sdc2/rest/healthCheck headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.status_code} 500 @{ITEMS}= Copy List ${resp.json()['componentsInfo']} : FOR ${ELEMENT} IN @{ITEMS} \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} diff --git a/test/csit/tests/sdc/sanity/test1.robot b/test/csit/tests/sdc/sanity/test1.robot index 6d4dc242d..3783e159e 100644 --- a/test/csit/tests/sdc/sanity/test1.robot +++ b/test/csit/tests/sdc/sanity/test1.robot @@ -10,7 +10,7 @@ Get Requests health check ok CreateSession sdc-be http://localhost:8080 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= Get Request sdc-be /sdc2/rest/healthCheck headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.status_code} 500 @{ITEMS}= Copy List ${resp.json()['componentsInfo']} : FOR ${ELEMENT} IN @{ITEMS} \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} diff --git a/test/ete/labs/gwu/onap-openrc b/test/ete/labs/gwu/onap-openrc index 74042317b..1a452fa0a 100644 --- a/test/ete/labs/gwu/onap-openrc +++ b/test/ete/labs/gwu/onap-openrc @@ -1,4 +1,4 @@ -export OS_PROJECT_ID=fe370564c0614739a328e20d8ae76261 +export OS_PROJECT_ID=4c93f99551604bf7af25a8f80c7f34cb export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=onap diff --git a/test/ete/labs/gwu/onap-openstack-template.env b/test/ete/labs/gwu/onap-openstack-template.env index c42214937..97adca265 100644 --- a/test/ete/labs/gwu/onap-openstack-template.env +++ b/test/ete/labs/gwu/onap-openstack-template.env @@ -6,7 +6,7 @@ parameters: # # ############################################## - public_net_id: 50e7638e-a9d2-4cd9-a242-2f289f8f6553 + public_net_id: 024582bd-ef9b-48b9-9e70-e6732559d9df public_net_name: provider diff --git a/test/ete/labs/huawei/onap-ci-amsterdam-heat-openrc b/test/ete/labs/huawei/onap-beijing-oom-openrc index 5acb86759..cc6df8b91 100644 --- a/test/ete/labs/huawei/onap-ci-amsterdam-heat-openrc +++ b/test/ete/labs/huawei/onap-beijing-oom-openrc @@ -1,7 +1,7 @@ export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_ID=3d228d2fcbb7447bbba3cde703431bc1 -export OS_PROJECT_NAME=onap-ci-amsterdam-heat +export OS_PROJECT_NAME=onap-beijing-oom export OS_USERNAME=demo export OS_PASSWORD=demo export OS_AUTH_URL=http://controller.neo.futurewei.com:5000/v3 diff --git a/test/ete/labs/windriver/Integration-Jenkins-openrc b/test/ete/labs/windriver/Integration-Jenkins-openrc new file mode 100644 index 000000000..aa9aaabfc --- /dev/null +++ b/test/ete/labs/windriver/Integration-Jenkins-openrc @@ -0,0 +1,10 @@ +export OS_PROJECT_ID=09d8566ea45e43aa974cf447ed591d77 + +export OS_PROJECT_NAME=Integration-Jenkins +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh deleted file mode 100644 index ca2e2c2cf..000000000 --- a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -# To use an OpenStack cloud you need to authenticate against the Identity -# service named keystone, which returns a **Token** and **Service Catalog**. -# The catalog contains the endpoints for all services the user/tenant has -# access to - such as Compute, Image Service, Identity, Object Storage, Block -# Storage, and Networking (code-named nova, glance, keystone, swift, -# cinder, and neutron). -# -# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other -# OpenStack API is version 3. For example, your cloud provider may implement -# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is -# only for the Identity API served through keystone. -export OS_AUTH_URL=http://10.12.25.2:5000/v3 - -# With the addition of Keystone we have standardized on the term **project** -# as the entity that owns the resources. -export OS_PROJECT_ID="09d8566ea45e43aa974cf447ed591d77" -export OS_PROJECT_NAME="Integration-Jenkins" -export OS_USER_DOMAIN_NAME="Default" -if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi - -# unset v2.0 items in case set -unset OS_TENANT_ID -unset OS_TENANT_NAME - -# In addition to the owning entity (tenant), OpenStack stores the entity -# performing the action as the **user**. -if [ -z ${OS_USERNAME_INPUT+x} ]; then - read -sp "Please enter your OpenStack Username for project $OS_PROJECT_NAME: " OS_USERNAME_INPUT -fi -export OS_USERNAME=$OS_USERNAME_INPUT - -# With Keystone you pass the keystone password. -if [ -z ${OS_PASSWORD_INPUT+x} ]; then - read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT -fi -export OS_PASSWORD=$OS_PASSWORD_INPUT - -# If your configuration has multiple regions, we set that information here. -# OS_REGION_NAME is optional and only valid in certain environments. -export OS_REGION_NAME="RegionOne" -# Don't leave a blank variable, unset it if it was empty -if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi - -export OS_INTERFACE=public -export OS_IDENTITY_API_VERSION=3 diff --git a/test/ete/labs/windriver/Integration-SB-04-openrc.sh b/test/ete/labs/windriver/Integration-SB-04-openrc.sh deleted file mode 100644 index e7cee93b9..000000000 --- a/test/ete/labs/windriver/Integration-SB-04-openrc.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# To use an OpenStack cloud you need to authenticate against the Identity -# service named keystone, which returns a **Token** and **Service Catalog**. -# The catalog contains the endpoints for all services the user/tenant has -# access to - such as Compute, Image Service, Identity, Object Storage, Block -# Storage, and Networking (code-named nova, glance, keystone, swift, -# cinder, and neutron). -# -# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other -# OpenStack API is version 3. For example, your cloud provider may implement -# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is -# only for the Identity API served through keystone. -export OS_AUTH_URL=http://10.12.25.2:5000/v3 - -# With the addition of Keystone we have standardized on the term **project** -# as the entity that owns the resources. -export OS_PROJECT_ID="d570c718cbc545029f40e50b75eb13df" -export OS_PROJECT_NAME="Integration-SB-04" -export OS_USER_DOMAIN_NAME="Default" -if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi - -# unset v2.0 items in case set -unset OS_TENANT_ID -unset OS_TENANT_NAME - -# In addition to the owning entity (tenant), OpenStack stores the entity -# performing the action as the **user**. -# In addition to the owning entity (tenant), OpenStack stores the entity -# performing the action as the **user**. -if [ -z ${OS_USERNAME_INPUT+x} ]; then - read -sp "Please enter your OpenStack Username for project $OS_PROJECT_NAME: " OS_USERNAME_INPUT -fi -export OS_USERNAME=$OS_USERNAME_INPUT - -# With Keystone you pass the keystone password. -if [ -z ${OS_PASSWORD_INPUT+x} ]; then - read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT -fi -export OS_PASSWORD=$OS_PASSWORD_INPUT - -# If your configuration has multiple regions, we set that information here. -# OS_REGION_NAME is optional and only valid in certain environments. -export OS_REGION_NAME="RegionOne" -# Don't leave a blank variable, unset it if it was empty -if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi - -export OS_INTERFACE=public -export OS_IDENTITY_API_VERSION=3 diff --git a/test/ete/labs/windriver/Integration-Stable-openrc b/test/ete/labs/windriver/Integration-Stable-openrc new file mode 100644 index 000000000..0f0c6928e --- /dev/null +++ b/test/ete/labs/windriver/Integration-Stable-openrc @@ -0,0 +1,10 @@ +export OS_PROJECT_ID=3583253e932845a09cd4c8ca2f31d095 + +export OS_USER_DOMAIN_NAME=Default +export OS_PROJECT_NAME=Integration-Stable +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/scripts/install_openstack_cli.sh b/test/ete/scripts/install_openstack_cli.sh index c7af2d5f7..8f1529606 100755 --- a/test/ete/scripts/install_openstack_cli.sh +++ b/test/ete/scripts/install_openstack_cli.sh @@ -26,7 +26,7 @@ else source ${ONAP_VENV}/bin/activate pip install --upgrade pip - pip install --upgrade python-openstackclient python-heatclient python-designateclient + pip install openstacksdk==0.9.19 python-openstackclient python-heatclient python-designateclient echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties fi diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh index 2f0f014d3..c86fd453a 100755 --- a/test/ete/scripts/run-healthcheck.sh +++ b/test/ete/scripts/run-healthcheck.sh @@ -20,7 +20,9 @@ fi ssh-keygen -R ${ROBOT_IP} ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PROJECT_ID=$OS_PROJECT_ID OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD bash -s" < ./remote/run-robot.sh +RESULT=$? LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1") echo "Browse Robot results at http://${ROBOT_IP}:88/logs/${LOG_DIR}/" rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/ +exit $RESULT diff --git a/test/ete/scripts/teardown-onap.sh b/test/ete/scripts/teardown-onap.sh index eecef876b..60bfa638f 100755 --- a/test/ete/scripts/teardown-onap.sh +++ b/test/ete/scripts/teardown-onap.sh @@ -6,10 +6,16 @@ fi source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh -# delete all Designate DNS records; do this first since we rely on multi-vim for this +# delete all Proxy Designate DNS records; do this first since we rely on multi-vim for this $WORKSPACE/test/ete/scripts/dns-zones/delete-dns-zones.sh $OS_PROJECT_NAME sleep 1 +# delete all Desigate DNS zones +ZONES=$(openstack zone list -c "id" -f value) +for ZONE in ${ZONES}; do + openstack zone delete $ZONE +done + # delete all instances openstack server delete $(openstack server list -c ID -f value) sleep 1 @@ -42,7 +48,6 @@ sleep 1 STACKS=$(openstack stack list -c "Stack Name" -f value) if [ ! -z "${STACKS}" ]; then - echo "Deleting Stacks ${STACKS}" openstack stack delete -y $STACKS for STACK in ${STACKS}; do until [ "DELETE_IN_PROGRESS" != "$(openstack stack show -c stack_status -f value $STACK)" ]; do |