blob: ab33549445775cf928342d9e914134bf18695023 [file] [log] [blame]
tom5c255702014-09-18 06:57:39 -07001# Environmental defaults for ONOS build, package and test
2
3# Root of the ONOS source tree
Thomas Vachuska045c01d2014-12-04 00:18:06 -08004export ONOS_ROOT=${ONOS_ROOT:-~/onos}
tom5c255702014-09-18 06:57:39 -07005
6# M2 repository and Karaf gold bits
7export M2_REPO=${M2_REPO:-~/.m2/repository}
Jon Hallb84df5d2017-01-31 11:19:48 -08008export KARAF_VERSION=${KARAF_VERSION:-3.0.8}
Thomas Vachuskab105fd42014-10-20 09:02:27 -07009export KARAF_ZIP=${KARAF_ZIP:-~/Downloads/apache-karaf-$KARAF_VERSION.zip}
10export KARAF_TAR=${KARAF_TAR:-~/Downloads/apache-karaf-$KARAF_VERSION.tar.gz}
tom5c255702014-09-18 06:57:39 -070011export KARAF_DIST=$(basename $KARAF_ZIP .zip)
12
Pavlin Radoslavovaa90bb52014-10-15 16:28:32 -070013# Add ONOS-specific directories to the exectable PATH
Thomas Vachuska4702a262016-03-02 15:31:52 -080014export PATH="$ONOS_ROOT/tools/dev/bin:$ONOS_ROOT/tools/test/bin:$PATH"
15export PATH="$ONOS_ROOT/tools/build:$PATH"
Pavlin Radoslavovaa90bb52014-10-15 16:28:32 -070016
Thomas Vachuska6066dff2016-10-26 13:57:36 -070017# Fallback build number us derived from from the user name
18export BUILD_NUMBER=${BUILD_NUMBER:-$(id -un)}
tom61e317d2014-10-08 11:18:02 -070019
tom5c255702014-09-18 06:57:39 -070020# ONOS Version and onos.tar.gz staging environment
ONOS Jenkins User8bb3a782018-08-21 00:46:20 +000021export ONOS_POM_VERSION="1.14.0-rc3"
22export ONOS_VERSION=${ONOS_VERSION:-1.14.0-rc3.$BUILD_NUMBER}
Thomas Vachuska734b7492015-03-11 20:42:07 -070023
Luca Pretef2049d12015-08-01 14:48:01 -070024# ONOS production bits (onos.tar.gz, onos.zip, onos.deb, onos.rpm) staging environment
tom61e317d2014-10-08 11:18:02 -070025export ONOS_BITS=onos-${ONOS_VERSION%~*}
tom5c255702014-09-18 06:57:39 -070026export ONOS_STAGE_ROOT=${ONOS_STAGE_ROOT:-/tmp}
tom5c255702014-09-18 06:57:39 -070027export ONOS_STAGE=$ONOS_STAGE_ROOT/$ONOS_BITS
Luca Pretee6183752015-07-29 01:55:50 -070028export ONOS_DEB_ROOT=$ONOS_STAGE_ROOT/deb
29export ONOS_DEB=$ONOS_STAGE.deb
Luca Pretef2049d12015-08-01 14:48:01 -070030export ONOS_RPM_ROOT=$ONOS_STAGE_ROOT/rpm
31export ONOS_RPM=$ONOS_STAGE.rpm
32export ONOS_RPM_VERSION=${ONOS_POM_VERSION//-/.}
tom5c255702014-09-18 06:57:39 -070033export ONOS_TAR=$ONOS_STAGE.tar.gz
Thomas Vachuska045c01d2014-12-04 00:18:06 -080034export ONOS_ZIP=$ONOS_STAGE.zip
tom5c255702014-09-18 06:57:39 -070035
Ray Milkey39332952018-07-16 13:42:51 -070036# If the bazel-built bits are newer than the buck-built bits, use the former.
Yuta HIGUCHI5b4d47d2016-12-07 20:25:03 -080037BUCK_TAR=$ONOS_ROOT/buck-out/gen/tools/package/onos-package/onos.tar.gz
Ray Milkey39332952018-07-16 13:42:51 -070038BAZEL_TAR=$ONOS_ROOT/bazel-bin/onos.tar.gz
39if [ -f $BAZEL_TAR ] && [ $BAZEL_TAR -nt $ONOS_TAR ]; then
40 rm -f $ONOS_TAR >/dev/null; ln -s $BAZEL_TAR $ONOS_TAR
41else
42 if [ -f $BUCK_TAR ] && [ $BUCK_TAR -nt $ONOS_TAR ]; then
43 rm -f $ONOS_TAR >/dev/null; ln -s $BUCK_TAR $ONOS_TAR
44 fi
Yuta HIGUCHI5b4d47d2016-12-07 20:25:03 -080045fi
46
Thomas Vachuska734b7492015-03-11 20:42:07 -070047# ONOS test bits (onos-test.tar.gz) staging environment
48export ONOS_TEST_BITS=onos-test-${ONOS_VERSION%~*}
Thomas Vachuska7f2a3562018-02-28 10:02:16 -080049export ONOS_TEST_TAR=$ONOS_STAGE_ROOT/$ONOS_TEST_BITS.tar.gz
50
51# ONOS admin bits (onos-admin.tar.gz) staging environment
52export ONOS_ADMIN_BITS=onos-admin-${ONOS_VERSION%~*}
53export ONOS_ADMIN_TAR=$ONOS_STAGE_ROOT/$ONOS_ADMIN_BITS.tar.gz
Thomas Vachuska734b7492015-03-11 20:42:07 -070054
tom5c255702014-09-18 06:57:39 -070055export ONOS_INSTALL_DIR="/opt/onos" # Installation directory on remote
Jordan Halterman00e92da2018-05-22 23:05:52 -070056export ATOMIX_INSTALL_DIR="/opt/atomix" # Installation directory for Atomix
Thomas Vachuska7f2a3562018-02-28 10:02:16 -080057export OCI="${OCI:-localhost}" # ONOS Controller Instance
Jonathan Hart716cb212014-11-12 00:33:25 -080058export ONOS_USER="${ONOS_USER:-sdn}" # ONOS user on remote system
Charles M.C. Chandfbc6d82014-12-18 23:11:36 +080059export ONOS_GROUP="${ONOS_GROUP:-sdn}" # ONOS group on remote system
tom5c255702014-09-18 06:57:39 -070060export ONOS_PWD="rocks" # ONOS user password on remote system
Thomas Vachuskae76f6532015-07-08 09:40:53 -070061export ONOS_SCENARIOS=$ONOS_ROOT/tools/test/scenarios
Brian O'Connor740e98c2017-06-29 17:07:17 -070062
63export ONOS_CLUSTER_KEY_FILE="/tmp/onos.jks"
Ray Milkey7e285192017-07-20 15:45:28 -070064export ONOS_CLUSTER_KEY_PASSWORD="changeit"