From: garciadeblas Date: Wed, 22 Sep 2021 19:53:40 +0000 (+0200) Subject: Clean-up of jenkins and common folder X-Git-Tag: release-v11.0-start~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F11210%2F2;p=osm%2Fdevops.git Clean-up of jenkins and common folder Change-Id: I9cfdce4355f4fe7526f2e6b7da885f47b3a5f4e9 Signed-off-by: garciadeblas --- diff --git a/common/install_common b/common/install_common deleted file mode 100755 index 901d287b..00000000 --- a/common/install_common +++ /dev/null @@ -1,52 +0,0 @@ -# this file is meant to be sourced -# -# Copyright 2017 Sandvine -# -# 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. -# -# - -RELEASE="ReleaseTHREE" -REPOSITORY_KEY="OSM%20ETSI%20Release%20Key.gpg" -REPOSITORY="stable" -REPOSITORY_BASE="http://osm-download.etsi.org/repository/osm/debian" - -while getopts ":r:k:u:R:b:-:" o; do - case "${o}" in - r) - REPOSITORY=${OPTARG} - ;; - R) - RELEASE=${OPTARG} - ;; - k) - REPOSITORY_KEY=${OPTARG} - ;; - u) - REPOSITORY_BASE=${OPTARG} - ;; - b) - ## ignore branch option - ;; - -) - ;; - esac -done - -key_location=$REPOSITORY_BASE/$RELEASE/$REPOSITORY_KEY -echo $key_location - -curl $key_location | apt-key add - - -REPOSITORY_BASE=${REPOSITORY_BASE%/} -apt-get update && add-apt-repository -y "deb $REPOSITORY_BASE/$RELEASE $REPOSITORY SO UI RO MON IM osmclient openvim" diff --git a/jenkins/MON/SETTINGS b/jenkins/MON/SETTINGS deleted file mode 100644 index d1e190ed..00000000 --- a/jenkins/MON/SETTINGS +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 Intel Research and Development Ireland Limited -# ************************************************************* - -# This file is part of OSM Monitoring module -# All Rights Reserved to Intel Corporation - -# 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. - -# For those usages not covered by the Apache License, Version 2.0 please -# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com - -#__author__ = "Prithiv Mohan" -#__date__ = "25/Sep/2017" - -# This variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 - -# This variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=MON - -# This variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=MON diff --git a/jenkins/MON/install b/jenkins/MON/install deleted file mode 100755 index 7c081730..00000000 --- a/jenkins/MON/install +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Copyright 2017 Intel Research and Development Ireland Limited -# ************************************************************* - -# This file is part of OSM Monitoring module -# All Rights Reserved to Intel Corporation - -# 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. - -# For those usages not covered by the Apache License, Version 2.0 please -# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com - -#__author__ = "Prithiv Mohan" -#__date__ = "25/Sep/2017" - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOUR MDG repository name here -export OSM_MDG=MON -OSM_load_config - -. $OSM_JENKINS/common/install_common - -# Installation starts here - -#Release TWO - -apt-get update - -DEBIAN_FRONTEND=noninteractive apt-get install --yes python-all python-pip && pip install --upgrade pip -DEBIAN_FRONTEND=noninteractive apt-get --yes install default-jre python-stdeb -#FIXME -#DEBIAN_FRONTEND=noninteractive python kafkad -RC=$? -INFO "done, RC=$RC" -exit $RC diff --git a/jenkins/MON/start_build b/jenkins/MON/start_build deleted file mode 100755 index ffbcfa03..00000000 --- a/jenkins/MON/start_build +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Copyright 2017 Intel Research and Development Ireland Limited -# ************************************************************* - -# This file is part of OSM Monitoring module -# All Rights Reserved to Intel Corporation - -# 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. - -# For those usages not covered by the Apache License, Version 2.0 please -# contact: prithiv.mohan@intel.com or adrian.hoban@intel.com - -#__author__ = "Prithiv Mohan" -#__date__ = "25/Sep/2017" - -HERE=$(realpath $(dirname $0) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=MON -OSM_load_config -OSM_git_checkout "$@" -python -m py_compile kafkad -python kafkad -INFO "Starting Kafka" -service kafka start - -#Start VMWare install script -INFO "Installing vROPs Web Service" -. osm_mon/plugins/vRealiseOps/vROPs_Webservice/install.sh -INFO "Starting vrops Web Service" -python osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice - -RC=$? -INFO "done, RC=$RC" -exit $RC diff --git a/jenkins/README b/jenkins/README deleted file mode 100644 index 14e43b75..00000000 --- a/jenkins/README +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2016 RIFT.IO Inc -# -# 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 directory holds the scripts and tools needed by jenkins to run jobs - -The 'host' subdirectory is meant to be invoked directly by jenkins either in its own container or on the host. - -The 'template' subdirectory contains sample files needed to configure a new MDG - -The other subdirectories correspond to MDGs and contain the scripts that are run inside the container - -documentation is in the OSM wiki. See https://osm.etsi.org/wiki/index.php/Jenkins_Build_Scripts - diff --git a/jenkins/RO/SETTINGS b/jenkins/RO/SETTINGS deleted file mode 100644 index 8c37f162..00000000 --- a/jenkins/RO/SETTINGS +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# Authors: -# - Gerardo Garcia - gerardo.garciadeblas@telefonica.com -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=RO -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=RO diff --git a/jenkins/RO/install b/jenkins/RO/install deleted file mode 100755 index 4dfb011d..00000000 --- a/jenkins/RO/install +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# Authors: -# - Gerardo Garcia - gerardo.garciadeblas@telefonica.com -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOUR MDG repository name here -export OSM_MDG=RO -OSM_load_config - -. $OSM_JENKINS/common/install_common - -# Installation starts here - -#Release TWO - -DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:ocata -apt-get update -apt-get -y install python-osm-ro - -OSMIM_PATH=`python -c 'import osm_im; print osm_im.__path__[0]'` || FATAL "python-osm-im was not properly installed" -OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'` || FATAL "python-lib-osm-openvim was not properly installed" -OSMRO_PATH=`python -c 'import osm_ro; print osm_ro.__path__[0]'` || FATAL "python-osm-ro was not properly installed" - -DEBIAN_FRONTEND=noninteractive ${OSMRO_PATH}/database_utils/install-db-server.sh --updatedb || FATAL "osm-ro db installation failed" -DEBIAN_FRONTEND=noninteractive ${OSMLIBOVIM_PATH}/database_utils/install-db-server.sh -u mano -p manopw -d mano_vim_db --updatedb || FATAL "lib-osm-openvim db installation failed" -service osm-ro restart - -RC=$? -INFO "done, RC=$RC" -exit $RC - - diff --git a/jenkins/RO/start_build b/jenkins/RO/start_build deleted file mode 100755 index 01474eea..00000000 --- a/jenkins/RO/start_build +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# Authors: -# - Gerardo Garcia - gerardo.garciadeblas@telefonica.com -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=RO -OSM_load_config - -NOTEST="" -if [ "$1" = "--notest" ]; then - shift - NOTEST="y" -fi - -OSM_git_checkout "$@" - -INFO "installing RO packages and dependencies from current repo (--noclone)" -./scripts/install-openmano.sh --noclone --force -q -RC=$? - -if [ -n "$NOTEST" ]; then - INFO "done, RC=$RC" - exit $RC -fi - -INFO "starting build" - -INFO " cleaning .pyc" -rm -f *.pyc - -INFO " compiling *.py" -TEMPFILE="$(mktemp -q -p . "openmanolinker.XXXXXX.py")" -trap 'rm -f "$TEMPFILE"' EXIT -for i in `ls vimconn_*.py |sed "s/\.py//"`; do echo "import $i" >> $TEMPFILE; done - -python $TEMPFILE && -python -m py_compile *.py # && - -#INFO " basic_test" && -#./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim #&& #uncomment to add new tests -# OTHER TESTS HERE - -RC=$? -INFO "done, RC=$RC" -exit $RC - - diff --git a/jenkins/SETTINGS b/jenkins/SETTINGS deleted file mode 100644 index c0a2c1ff..00000000 --- a/jenkins/SETTINGS +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# Settings that are global to this installation -# MDG specific settings can be found in each MDG directory -# -# 24 June 2016 -- Jeremy Mordkoff -- Genesis -# -# base url for all repositories -OSM_GIT_URL=https://osm.etsi.org/gerrit/osm -# -# OSM_USE_LOCAL_DEVOPS -# -# this option disables the clone inside the -# the container and instead copies this directory tree -# into the container. Very useful for testing -# default is false -# -# OSM_USE_LOCAL_DEVOPS=true diff --git a/jenkins/SO/SETTINGS b/jenkins/SO/SETTINGS deleted file mode 100644 index 995e01d9..00000000 --- a/jenkins/SO/SETTINGS +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# sample SETTINGS file -# -# 24 June 2016 -- Jeremy Mordkoff -- Genesis -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=SO-ub -# -# this variable must be set to allow creating the build container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_BUILD_CONTAINER_PRIVILEGED=yes -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=SO-ub -# -# this variable must be set to allow creating the runtime container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes - diff --git a/jenkins/SO/install b/jenkins/SO/install deleted file mode 100755 index 9cad24a7..00000000 --- a/jenkins/SO/install +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2017 RIFT.IO Inc -# -# 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. -# -# Author(s): Jeremy Mordkoff -# Creation Date: 26 April 2017 -# -# - -# INSTALL.sh -# install launchpad SO and all of its dependencies -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/install_common - -# Defensive bash programming flags -set -o errexit # Exit on any error -trap 'echo ERROR: Command failed: \"$BASH_COMMAND\"' ERR -set -o nounset # Expanding an unset variable is an error. Variables must be - # set before they can be used. - -############################################################################### -# Set up repo and version -PLATFORM_REPOSITORY=OSM3 -PLATFORM_VERSION=5.2.0.2.72254 - -while getopts ":P:V:h" o; do - case "${o}" in - P) - PLATFORM_REPOSITORY=${OPTARG} - ;; - V) - PLATFORM_VERSION=${OPTARG} - ;; - h) - usage - exit 0 - ;; - *) - usage - exit 1 - ;; - esac -done - -function usage() { - echo - echo "NAME:" - echo " $0" - echo - echo "SYNOPSIS:" - echo " $0 -h|--help" - echo " $0 -P -V " - echo - echo "DESCRIPTION:" - echo " Prepare current system to run SO and UI." - echo - echo " PLATFORM_REPOSITORY (optional): name of the RIFT.ware repository." - echo " PLATFORM_VERSION (optional): version of the platform packages to be installed." - echo -} - - -############################################################################### -# Main block - -# enable the right repos -echo "### INSTALLING RIFT platform ${PLATFORM_VERSION} from repository ${PLATFORM_REPOSITORY}" - -curl http://repos.riftio.com/public/xenial-riftware-public-key | apt-key add - -curl -o /etc/apt/sources.list.d/rift.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/ - -# Make the Rift repo a higher priority to work around version conflicts. -cat < /etc/apt/preferences.d/rift -Package: * -Pin: origin repos.riftio.com -Pin-Priority: 600 -EOF - - - -####################### -# temp fix -# this is normally done by mkcontainer, but the last line is missing -# we can take this out when we update the RIFT platform - -cat <>/etc/systemd/user.conf -DefaultLimitNOFILE=65536 -DefaultLimitMSGQUEUE=8192000 -DefaultLimitNPROC=65536 -DefaultTasksMax=65536 -EOF -cat <>/etc/systemd/system.conf -DefaultLimitNOFILE=65536 -DefaultLimitMSGQUEUE=8192000 -DefaultLimitNPROC=65536 -DefaultTasksMax=65536 -EOF -systemctl daemon-reload - -################################## - - -apt-get update - -# and install the tools -apt remove -y tcpdump -apt-get install -y --allow-downgrades rw.tools-container-tools=${PLATFORM_VERSION} rw.tools-scripts=${PLATFORM_VERSION} python -/usr/rift/container_tools/mkcontainer --modes MANO-base,rw-platform --rw-version ${PLATFORM_VERSION} - -# now disable the RIFT OSM repo so that we'll get MANO from -# the OSM repos -rm -f /etc/apt/sources.list.d/rift.list - -apt-get update - -apt-get install -y \ - rw.core.mano-mano \ - rw.core.mano-rwcal-plugin-aws \ - rw.core.mano-rwcal-plugin-cloudsim \ - rw.core.mano-rwcal-plugin-cloudsimproxy \ - rw.core.mano-rwcal-plugin-openmano-vimconnector \ - rw.core.mano-rwcal-plugin-openstack \ - rw.core.mano-rwcal-plugin-mock - -# Install libjuju -apt-get install -y python3-pip python3-setuptools - -pip3 install juju==0.6.1 diff --git a/jenkins/SO/start_build b/jenkins/SO/start_build deleted file mode 100755 index a672e149..00000000 --- a/jenkins/SO/start_build +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# TEMPLATE script to start a build. This is run inside a container -# -# 6 July 2016 -- Jeremy.Mordkoff@riftio.com -- adapted from the riftware version -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=SO -OSM_load_config -OSM_git_checkout "$@" - -trap 'WARNING "INTERRUPT"; exit 1' INT - -INFO "starting build" -make clean || FATAL "make clean failed" -./BUILD.sh - -RC=$? - -INFO "done, RC=$RC" -exit $RC - - diff --git a/jenkins/UI/SETTINGS b/jenkins/UI/SETTINGS deleted file mode 100644 index 995e01d9..00000000 --- a/jenkins/UI/SETTINGS +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# sample SETTINGS file -# -# 24 June 2016 -- Jeremy Mordkoff -- Genesis -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=SO-ub -# -# this variable must be set to allow creating the build container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_BUILD_CONTAINER_PRIVILEGED=yes -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=SO-ub -# -# this variable must be set to allow creating the runtime container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes - diff --git a/jenkins/UI/install b/jenkins/UI/install deleted file mode 100755 index 33f651fb..00000000 --- a/jenkins/UI/install +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2017 RIFT.IO Inc -# -# 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. -# -# Author(s): Jeremy Mordkoff -# Creation Date: 26 April 2017 -# -# - -# INSTALL.sh -# install launchpad UI and create the service -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/install_common - - - -# Defensive bash programming flags -set -o errexit # Exit on any error -trap 'echo ERROR: Command failed: \"$BASH_COMMAND\"' ERR -set -o nounset # Expanding an unset variable is an error. Variables must be - # set before they can be used. - -############################################################################### -# Set up repo and version -PLATFORM_REPOSITORY=OSM3 -PLATFORM_VERSION=5.2.0.2.72254 - -while getopts ":P:V:h" o; do - case "${o}" in - P) - PLATFORM_REPOSITORY=${OPTARG} - ;; - V) - PLATFORM_VERSION=${OPTARG} - ;; - h) - usage - exit 0 - ;; - *) - usage - exit 1 - ;; - esac -done - -function usage() { - echo - echo "NAME:" - echo " $0" - echo - echo "SYNOPSIS:" - echo " $0 -h|--help" - echo " $0 -P -V " - echo - echo "DESCRIPTION:" - echo " Prepare current system to run SO and UI." - echo - echo " PLATFORM_REPOSITORY (optional): name of the RIFT.ware repository." - echo " PLATFORM_VERSION (optional): version of the platform packages to be installed." - echo -} - - -############################################################################### -# Main block - -# enable the right repos -curl http://repos.riftio.com/public/xenial-riftware-public-key | apt-key add - -curl -o /etc/apt/sources.list.d/rift.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/ - -# Make the Rift repo a higher priority to work around version conflicts. -cat < /etc/apt/preferences.d/rift -Package: * -Pin: origin repos.riftio.com -Pin-Priority: 600 -EOF - -apt-get update - -# and install the tools -apt-get install -y --allow-downgrades rw.tools-container-tools=${PLATFORM_VERSION} rw.tools-scripts=${PLATFORM_VERSION} python -/usr/rift/container_tools/mkcontainer --modes UI-base --rw-version ${PLATFORM_VERSION} - - -# now disable the RIFT OSM repo so that we'll get UI from -# the OSM repos -rm -f /etc/apt/sources.list.d/rift.list - -apt-get update -apt-get install -y rw.ui-skyquake -echo "Creating Service ...." -/usr/rift/bin/create_launchpad_service - diff --git a/jenkins/UI/start_build b/jenkins/UI/start_build deleted file mode 100755 index a103aa82..00000000 --- a/jenkins/UI/start_build +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# TEMPLATE script to start a build. This is run inside a container -# -# 6 July 2016 -- Jeremy.Mordkoff@riftio.com -- adapted from the riftware version -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=UI -OSM_load_config -OSM_git_checkout "$@" - -trap 'WARNING "INTERRUPT"; exit 1' INT - -INFO "starting build" -make clean || FATAL "Make clean failed" -./BUILD.sh - -RC=$? - -INFO "done, RC=$RC" -exit $RC - - diff --git a/jenkins/VCA/SETTINGS b/jenkins/VCA/SETTINGS deleted file mode 100644 index ded50438..00000000 --- a/jenkins/VCA/SETTINGS +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# sample SETTINGS file -# -# Authors: -# - Gerardo Garcia -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=VCA -# -# this variable must be set to allow creating the build container in privileged mode -# this variable should be removed in the future when no privileged mode is required -export OSM_BUILD_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -export OSM_BUILD_CONTAINER_ALLOW_NESTED=yes -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=VCA -# -# this variable must be set to allow creating the runtime container in privileged mode -# this variable should be removed in the future when no privileged mode is required -export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -export OSM_RUNTIME_CONTAINER_ALLOW_NESTED=yes -# diff --git a/jenkins/VCA/start_build b/jenkins/VCA/start_build deleted file mode 100755 index fc91aadc..00000000 --- a/jenkins/VCA/start_build +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# Copyright 2016 Telefónica Investigación y Desarrollo S.A.U. -# -# 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. -# -# 20 Sep 2016 -- Gerardo Garcia -- adapted from template -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -INFO "Installing packages" -add-apt-repository -y ppa:juju/stable -apt-get update -apt-get install -y juju lxd squid-deb-proxy - -echo 'streams.canonical' > /etc/squid-deb-proxy/mirror-dstdomain.acl.d/20-juju-streams -service squid-deb-proxy reload - -INFO "Configuring LXD" -# ZFS doesn't work inside a nested container. ZFS should be configured in the host LXD. -lxd init --auto -lxd waitready -systemctl stop lxd-bridge -systemctl --system daemon-reload -cat < /etc/default/lxd-bridge -USE_LXD_BRIDGE="true" -LXD_BRIDGE="lxdbr0" -UPDATE_PROFILE="true" -LXD_CONFILE="" -LXD_DOMAIN="lxd" -LXD_IPV4_ADDR="10.44.127.1" -LXD_IPV4_NETMASK="255.255.255.0" -LXD_IPV4_NETWORK="10.44.127.1/24" -LXD_IPV4_DHCP_RANGE="10.44.127.2,10.44.127.254" -LXD_IPV4_DHCP_MAX="252" -LXD_IPV4_NAT="true" -LXD_IPV6_ADDR="" -LXD_IPV6_MASK="" -LXD_IPV6_NETWORK="" -LXD_IPV6_NAT="false" -LXD_IPV6_PROXY="false" -EOF - -systemctl enable lxd-bridge -systemctl start lxd-bridge - -DEFAULT_INTERFACE=$(route -n | awk '$1~/^0.0.0.0/ {print $8}') -DEFAULT_MTU=$( ip addr show $DEFAULT_INTERFACE | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') - -INFO "Setting lxdbr0 MTU to $DEFAULT_MTU" - -# This sets the MTU of lxdbr0 on the host machine without the need to recycle -# the interface or reboot the machine. -ifconfig lxdbr0 mtu $DEFAULT_MTU - -# Setting the MTU in the default profile will be applied to every lxc container. -# Existing containers will need to be restarted for the new MTU to take effect. -# This will also persist the MTU change for the host's lxdbr0 -lxc profile device set default eth0 mtu $DEFAULT_MTU - -INFO "Pre-caching Ubuntu:16.04 image (this may take several minutes)..." - -# Setup a daily cron to update the cached image -cp $HERE/update-lxd-image.sh /etc/cron.daily - -# Run it for the first time -/etc/cron.daily/update-lxd-image.sh xenial - -INFO "Bootstrapping VCA" -juju bootstrap localhost osm \ ---config default-series=xenial \ ---config enable-os-refresh-update=true \ ---config enable-os-upgrade=false \ ---config apt-http-proxy=http://10.44.127.1:8000 - -RC=0 - -INFO "done, RC=$RC" -exit $RC diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh deleted file mode 100755 index 8cad93b8..00000000 --- a/jenkins/VCA/update-lxd-image.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# This script will create xenial and trusty lxd images that will be used by the -# lxd provider in juju 2.1+ It is for use with the lxd provider for local -# development and preinstalls a common set of production packages. -# -# This dramatically speeds up the install hooks for lxd deploys by -# pre-installing common packages. It is intended to run daily as part of -# a cron job. -set -eux - -# The basic charm layer also installs all the things. 47 packages. -LAYER_BASIC="gcc build-essential python3-pip python3-setuptools libyaml-dev python3-yaml python3-dev" - -# the basic layer also installs virtualenv, but the name changed in xenial. -TRUSTY_PACKAGES="python-virtualenv" -XENIAL_PACKAGES="virtualenv" - -# Predownload common packages used by your charms in development -DOWNLOAD_PACKAGES="" - -PACKAGES="$LAYER_BASIC $DOWNLOAD_PACKAGES" - -# Packages from pypi to pre-install -PYPI="charms.reactive charmhelpers paramiko>=1.16.0,<1.17" - -function cache() { - series=$1 - container=juju-${series}-base - alias=juju/$series/amd64 - - lxc delete $container -f || true - lxc launch ubuntu:$series $container - - # Wait for the container to get an IP address - lxc exec $container -- bash -c "for i in {1..60}; do sleep 1; ping -c1 10.44.127.1 &> /dev/null && break; done" - - # Wait for cloud-init to finish - lxc exec $container -- bash -c "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do sleep 1; done" - - lxc exec $container -- apt-get update -y - lxc exec $container -- apt-get upgrade -y -o Dpkg::Options::='--force-confold' - lxc exec $container -- apt-get install -y $PACKAGES $2 - lxc exec $container -- pip3 install --upgrade pip - lxc exec $container -- pip3 install --upgrade $PYPI - lxc stop $container - - lxc image delete $alias || true - lxc publish $container --alias $alias description="$series juju dev image ($(date +%Y%m%d))" - - lxc delete $container -f || true -} - -# Cache the image for the Ubuntu series or series to support -# cache trusty "$TRUSTY_PACKAGES" -cache xenial "$XENIAL_PACKAGES" diff --git a/jenkins/host/clean_container b/jenkins/host/clean_container deleted file mode 100755 index 601e6b86..00000000 --- a/jenkins/host/clean_container +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright 2016 Telefónica Investigación y Desarrollo S.A.U. -# -# 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. -# -# clean_container is run on a host to clean an MDG container -# -# 20 Sept 2016 -- Gerardo Garcia -- Genesis -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -[ $# -lt 1 ] && FATAL "arg is MDG name" - -export OSM_MDG=$1 -OSM_load_config - -if container_exists $OSM_BUILD_CONTAINER; then - INFO "Container exists. Deleting ..." - lxc stop $OSM_BUILD_CONTAINER - lxc delete $OSM_BUILD_CONTAINER - INFO "$OSM_BUILD_CONTAINER container deleted." -else - INFO "Container does not exist. Nothing to be done." -fi - -INFO "$OSM_MDG clean-container DONE." -exit 0 - diff --git a/jenkins/host/install b/jenkins/host/install deleted file mode 100755 index dfdbe596..00000000 --- a/jenkins/host/install +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# 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. -# -# install is run on a host to install a MDG from binaries -# - - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -[ $# -lt 1 ] && FATAL "arg is MDG name" - -export OSM_MDG=$1 -shift -OSM_load_config - -if ! container_exists $OSM_BUILD_CONTAINER; then - CONTAINER_OPTS="" - [[ "$OSM_BUILD_CONTAINER_PRIVILEGED" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -c security.privileged=true" - [[ "$OSM_BUILD_CONTAINER_ALLOW_NESTED" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -c security.nesting=true" - create_container $OSM_BASE_IMAGE $OSM_BUILD_CONTAINER $CONTAINER_OPTS - wait_container_up $OSM_BUILD_CONTAINER - if [ ${OSM_USE_LOCAL_DEVOPS:-false} != false ]; then - container_push_devops $OSM_BUILD_CONTAINER - else - container_exec $OSM_BUILD_CONTAINER git clone ${OSM_GIT_URL}/devops - fi -else - if [ ${OSM_USE_LOCAL_DEVOPS:-false} != false ]; then - container_push_devops $OSM_BUILD_CONTAINER - else - container_exec $OSM_BUILD_CONTAINER git -C devops pull - fi -fi - -container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/install $* -RC=$? -INFO "$OSM_MDG install complete. Return code was $RC" -exit $RC - diff --git a/jenkins/host/start_build b/jenkins/host/start_build deleted file mode 100755 index f7ada68a..00000000 --- a/jenkins/host/start_build +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# Copyright 2016 RIFT.IO Inc -# Copyright 2016 Telefónica Investigación y Desarrollo S.A.U. -# -# 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. -# -# start-build is run on a host to start a MDG build -# -# 24 June 2016 -- Jeremy Mordkoff -- Genesis -# -- Gerardo Garcia - - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -[ $# -lt 1 ] && FATAL "arg is MDG name" - -export OSM_MDG=$1 -shift -OSM_load_config - -if [ "$1" = "--build-container" ]; then - shift - [ $# -lt 1 ] && FATAL "missing container name with option --build-container" - export OSM_BUILD_CONTAINER=$1 - shift -fi - -if ! container_exists $OSM_BUILD_CONTAINER; then - CONTAINER_OPTS="" - [[ "$OSM_BUILD_CONTAINER_PRIVILEGED" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -c security.privileged=true" - [[ "$OSM_BUILD_CONTAINER_ALLOW_NESTED" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -c security.nesting=true" - [[ "$OSM_BUILD_CONTAINER_ALLOW_DOCKER" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -p docker -p default" - create_container $OSM_BASE_IMAGE $OSM_BUILD_CONTAINER $CONTAINER_OPTS - wait_container_up $OSM_BUILD_CONTAINER - RE="fedora|fc[0-9]" - if [[ $OSM_BASE_IMAGE =~ $RE ]]; then - container_exec $OSM_BUILD_CONTAINER yum -y install git tar make sudo - else - container_exec $OSM_BUILD_CONTAINER apt-get -y install git realpath make sudo - fi - if [ ${OSM_USE_LOCAL_DEVOPS:-false} ]; then - container_push_devops $OSM_BUILD_CONTAINER - else - container_exec $OSM_BUILD_CONTAINER git clone ${OSM_GIT_URL}/devops - fi -else - if [ ${OSM_USE_LOCAL_DEVOPS:-false} ]; then - container_push_devops $OSM_BUILD_CONTAINER - else - container_exec $OSM_BUILD_CONTAINER git -C devops pull - fi -fi - -container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/start_build $* -RC=$? -INFO "$OSM_MDG build complete. Return code was $RC" -exit $RC - diff --git a/jenkins/k8s/osmclient-robot.yaml b/jenkins/k8s/osmclient-robot.yaml deleted file mode 100644 index 6e03212d..00000000 --- a/jenkins/k8s/osmclient-robot.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2019 TATA ELXSI -# -# 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. -# Author: VIJAY NAG B S (vijaynag.bs@tataelxsi.co.in) - -################################################################ -# Please execute this command prior to deploying this yaml file. -# __tag__ , __testName__ and __tempdir__ are placeholders for osm rel, testname and tempdir respectively. -# -# $ sed "s|__tag__|$TAG|; s|__testName__|$TEST|; s|__tempdir__|$tempdir|" osmclient-robot.yaml -# -############################################################ - -apiVersion: batch/v1 -kind: Job -metadata: - name: osmclient-robot - labels: - ciStage: stage3 -spec: - containers: - - name: osm-client - image: opensourcemano/osmclient:__tag__ - envFrom: - - secretRef: - name: robot-secret - command: [ "bash", "-C", "/usr/share/osm-devops/robot-systest/run_test.sh", "--do_install", "-t", "__testName__" ] - volumeMounts: - - name: temp-dir - mountPath: /usr/share/osm-devops/systest/reports - restartPolicy: OnFailure - volumes: - - name: temp-dir - hostPath: - path: __tempdir__ diff --git a/jenkins/k8s/osmclient-systest.yaml b/jenkins/k8s/osmclient-systest.yaml deleted file mode 100644 index c810ecce..00000000 --- a/jenkins/k8s/osmclient-systest.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2019 TATA ELXSI -# -# 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. -# Author: VIJAY NAG B S (vijaynag.bs@tataelxsi.co.in) - -################################################################ -# Please execute this command prior to deploying this yaml file. -# __tag__ , __testName__ and __tempdir__ are placeholders for osm rel, testname and tempdir respectively. -# -# $ sed "s|__tag__|$TAG|; s|__testName__|$TEST|; s|__tempdir__|$tempdir|" osmclient-systest.yaml -# -############################################################ - -apiVersion: batch/v1 -kind: Job -metadata: - name: systest-client - labels: - ciStage: stage3 -spec: - containers: - - name: osm-client - image: opensourcemano/osmclient:__tag__ - envFrom: - - secretRef: - name: systest-secret - command: [ "make", "-C", "/usr/share/osm-devops/systest", "__testName__" ] - volumeMounts: - - name: temp-dir - mountPath: /usr/share/osm-devops/systest/reports - restartPolicy: OnFailure - volumes: - - name: temp-dir - hostPath: - path: __tempdir__ diff --git a/jenkins/osmclient/SETTINGS b/jenkins/osmclient/SETTINGS deleted file mode 100644 index 36e50151..00000000 --- a/jenkins/osmclient/SETTINGS +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2017 Sandvine -# -# 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 variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=osmclient -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=osmclient - -export OSM_BUILD_CONTAINER_ALLOW_DOCKER=yes diff --git a/jenkins/osmclient/start_build b/jenkins/osmclient/start_build deleted file mode 100755 index 155fefab..00000000 --- a/jenkins/osmclient/start_build +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 Sandvine -# -# 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. -# -# Authors: -# - Michael Marchetti - mmarchetti@sandvine.com -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=osmclient -OSM_load_config - -NOTEST="" -if [ "$1" = "--notest" ]; then - shift - NOTEST="y" -fi - -OSM_git_checkout "$@" - -apt-get update -apt-get install -y docker.io - -# cleanup all pre-existing builds. -# deb pkg build fails if previous build image is present -rm -rf deb_dist dist - -docker build -t $OSM_MDG . -DOCKER_ARGS="-v $(pwd):$(pwd) -w $(pwd) -u $(id -u):$(id -g) $OSM_MDG" - -if [ -n "$NOTEST" ]; then - docker run $DOCKER_ARGS /bin/bash -c "./docker_command.sh $(id -u -n) $(id -g -n) tox" -fi - -docker run $DOCKER_ARGS /bin/bash -c "./docker_command.sh $(id -u -n) $(id -g -n) tox -e build" - -RC=$? -INFO "done, RC=$RC" -exit $RC diff --git a/jenkins/release/delete-tag.sh b/jenkins/release/delete-tag.sh deleted file mode 100755 index 2c7690ef..00000000 --- a/jenkins/release/delete-tag.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -echo $OSM_JENKINS -. $OSM_JENKINS/common/all_funcs - -[ $# -ne 1 ] && FATAL "arg1 is tag to be deleted" - -TAG="$1" - -TEMPDIR="$(mktemp -q -d --tmpdir "tagosm.XXXXXX")" -trap 'rm -rf "$TEMPDIR"' EXIT - -list="juju-charms devops descriptor-packages openvim RO MON SO UI" -for i in $list; do - REPO_FOLDER="$TEMPDIR/$i" - echo - echo "Cloning $i" - #git -C $TEMPDIR clone ssh://garciadeblas@osm.etsi.org:29418/osm/$i - git -C $REPO_FOLDER tag -d $TAG - git -C $REPO_FOLDER push origin :refs/tags/$TAG - sleep 2 - rm -rf $REPO_FOLDER -done - diff --git a/jenkins/release/new-tag.sh b/jenkins/release/new-tag.sh deleted file mode 100755 index 7bba5d83..00000000 --- a/jenkins/release/new-tag.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -echo $OSM_JENKINS -. $OSM_JENKINS/common/all_funcs - -[ $# -ne 2 ] && FATAL "arg1 is branch, arg2 is new tag" - -#CURRENT_BRANCH="v1.1" -#TAG="v1.1.0" -CURRENT_BRANCH="$1" -TAG="$2" - -#tag_header="OSM Release ONE:" -tag_header="OSM" -tag_message="$tag_header version $TAG" - -TEMPDIR="$(mktemp -q -d --tmpdir "tagosm.XXXXXX")" -trap 'rm -rf "$TEMPDIR"' EXIT -#chmod 0600 "$TEMPDIR" - -#juju-charms and devops repos have no vx.y branch yet -list="juju-charms devops" -for i in $list; do - REPO_FOLDER="$TEMPDIR/$i" - echo - echo "Cloning and tagging $i" - #git -C $TEMPDIR clone ssh://garciadeblas@osm.etsi.org:29418/osm/$i - git -C $REPO_FOLDER checkout master - git -C $REPO_FOLDER tag -a $TAG -m"$tag_message" - git -C $REPO_FOLDER push origin $TAG --follow-tags - sleep 2 - rm -rf $REPO_FOLDER -done - -list="descriptor-packages openvim RO MON SO UI" -for i in $list; do - REPO_FOLDER="$TEMPDIR/$i" - echo - echo "Cloning and tagging $i" - #git -C $TEMPDIR clone ssh://garciadeblas@osm.etsi.org:29418/osm/$i - git -C $REPO_FOLDER checkout $CURRENT_BRANCH - git -C $REPO_FOLDER tag -a $TAG -m"$tag_message" - git -C $REPO_FOLDER push origin $TAG --follow-tags - sleep 2 - rm -rf $REPO_FOLDER -done - diff --git a/jenkins/system/SETTINGS b/jenkins/system/SETTINGS deleted file mode 100644 index 912799c6..00000000 --- a/jenkins/system/SETTINGS +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# sample SETTINGS file -# -# Authors: -# - Gerardo Garcia -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable must be set to allow creating the build container in privileged mode -# this variable should be removed in the future when no privileged mode is required -export OSM_BUILD_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -export OSM_BUILD_CONTAINER_ALLOW_NESTED=yes -# -# this variable must be set to allow creating the runtime container in privileged mode -# this variable should be removed in the future when no privileged mode is required -export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -export OSM_RUNTIME_CONTAINER_ALLOW_NESTED=yes -# -# -export OSM_BUILD_CONTAINER=osm -export OSM_RUNTIME_CONTAINER=osm diff --git a/jenkins/system/delete_old_containers.sh b/jenkins/system/delete_old_containers.sh deleted file mode 100755 index b8d1934b..00000000 --- a/jenkins/system/delete_old_containers.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Copyright 2017 Sandvine -# -# 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. -# -# A helper routine that cleans up old container images based -# on an input prefix to check. Jenkins builds will add an incrementing -# build suffix (build number) to the prefix -# -# -#$1 container prefix name - -keep_number=1 -prefix=$1 - -# keep the first build -keep=$(lxc list | grep $prefix | awk '{print $2}' | sort -rn | head -n$keep_number) -for container in $(lxc list | grep $prefix | awk '{print $2}' | sort -rn); do - if [ "$container" != "$keep" ]; then - echo "deleting old container $container" - lxc delete $container --force - fi -done diff --git a/jenkins/system/start_build b/jenkins/system/start_build deleted file mode 100755 index 328aa873..00000000 --- a/jenkins/system/start_build +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# Copyright 2017 -# -# 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. -# -# 01 May 2017 -- Michael Marchetti -- adapted from template -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs -. $OSM_JENKINS/common/install_common - -INFO "Installing packages" -apt-get update -apt-get install -y lxd - -INFO "Configuring LXD" -# ZFS doesn't work inside a nested container. ZFS should be configured in the host LXD. -lxd init --auto -lxd waitready -systemctl stop lxd-bridge -systemctl --system daemon-reload -cat < /etc/default/lxd-bridge -USE_LXD_BRIDGE="true" -LXD_BRIDGE="lxdbr0" -UPDATE_PROFILE="true" -LXD_CONFILE="" -LXD_DOMAIN="lxd" -LXD_IPV4_ADDR="10.44.126.1" -LXD_IPV4_NETMASK="255.255.255.0" -LXD_IPV4_NETWORK="10.44.126.1/24" -LXD_IPV4_DHCP_RANGE="10.44.126.2,10.44.126.254" -LXD_IPV4_DHCP_MAX="252" -LXD_IPV4_NAT="true" -LXD_IPV6_ADDR="" -LXD_IPV6_MASK="" -LXD_IPV6_NETWORK="" -LXD_IPV6_NAT="false" -LXD_IPV6_PROXY="false" -EOF - -systemctl enable lxd-bridge -systemctl start lxd-bridge - -apt-get install -y python-pip python python-pycurl charm-tools python-pytest python-openstackclient - -apt-get install -y python-osmclient - -export OSM_USE_LOCAL_DEVOPS=true -echo "devops/installers/full_install_osm.sh --test --soui $*" -devops/installers/full_install_osm.sh --test --soui $* -#echo "devops/installers/full_install_osm.sh --test $*" -#devops/installers/full_install_osm.sh --test $* -RC=$? - -# workaround. for upload packages, lxdbr0 needs to be promiscuous -# as the upload calls back to the UI server so the lxdbr0 needs -# to operate as a bridge -ifconfig lxdbr0 promisc - -if [ $RC == 0 ]; then - # success. find all the resulting containers - . devops/installers/export_ips - - TO_ADD="export OSM_HOSTNAME=$SO_CONTAINER_IP" - grep -q OSM_HOSTNAME ~/.bashrc && sed -i "s/.*OSM_HOSTNAME.*/$TO_ADD/" ~/.bashrc || echo -e "$TO_ADD\n$(cat ~/.bashrc)" > ~/.bashrc - TO_ADD="export OSM_RO_HOSTNAME=$RO_CONTAINER_IP" - grep -q OSM_RO_HOSTNAME ~/.bashrc && sed -i "s/.*OSM_RO_HOSTNAME.*/$TO_ADD/" ~/.bashrc || echo -e "$TO_ADD\n$(cat ~/.bashrc)" > ~/.bashrc -fi - -INFO "done, RC=$RC" -exit $RC diff --git a/jenkins/template/SETTINGS b/jenkins/template/SETTINGS deleted file mode 100644 index 94154f3b..00000000 --- a/jenkins/template/SETTINGS +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2016 RIFT.IO Inc -# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U. -# -# 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. -# -# sample SETTINGS file -# -# Authors: -# 24 June 2016 -- Jeremy Mordkoff -- Genesis -# -- Gerardo Garcia -# -# this variable holds the name of the container image needed to build or run this product -export OSM_BASE_IMAGE=ubuntu:16.04 -# -# this variable holds the name of the container to be used to build a package -# if this container already exists, the build process can skip the container build -export OSM_BUILD_CONTAINER=container_name-build -# -# this variable must be set to allow creating the build container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_BUILD_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -#export OSM_BUILD_CONTAINER_ALLOW_NESTED=yes -# -# this variable holds the name of the container to be used to run a package -# if this container already exists, the run processes can skip the container build -export OSM_RUNTIME_CONTAINER=container_name-runtime -# -# this variable must be set to allow creating the runtime container in privileged mode -# this variable should be removed in the future when no privileged mode is required -#export OSM_RUNTIME_CONTAINER_PRIVILEGED=yes -# -# this variable must be set to allow ensted containers in the build container -#export OSM_RUNTIME_CONTAINER_ALLOW_NESTED=yes -# diff --git a/jenkins/template/start_build b/jenkins/template/start_build deleted file mode 100755 index 43ef1610..00000000 --- a/jenkins/template/start_build +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# TEMPLATE script to start a build. This is run inside a container -# -# 6 July 2016 -- Jeremy.Mordkoff@riftio.com -- adapted from the riftware version -# - -HERE=$(realpath $(dirname $0)) -OSM_JENKINS=$(dirname $HERE) -. $OSM_JENKINS/common/all_funcs - -# SET YOU MDG repository name here -export OSM_MDG=XXXX -OSM_load_config -OSM_git_checkout "$@" - -INFO "starting build" -### for start_build -### put your commands here to -### build, test and produce coverage reports -# E.G. -#make clean || FATAL "make clean failed" -#make || FATAL "make failed" -#sudo make install || FATAL "make install failed" - -RC=0 - -INFO "done, RC=$RC" -exit $RC - -