mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-11 15:16:13 +02:00
ONOS-1328 Converted ONOS features to apps.
ONOS_FEATURES env. var is now deprecated! Cells are expected to use ONOS_APPS env. var to tailor which builtin apps should be activated by default. All builtin apps are installed by default, but can be uninstalled if desired. Cleaned up cell definitions accordingly. Change-Id: If3bb4691a73543a69197f4bf1855c8368f558450
This commit is contained in:
parent
da2f3cc041
commit
785f581408
@ -37,7 +37,17 @@ cp -r $ONOS_ROOT/tools/package/bin .
|
||||
cp -r $ONOS_ROOT/tools/package/debian $ONOS_STAGE/debian
|
||||
cp -r $ONOS_ROOT/tools/package/etc/* $ONOS_STAGE/$KARAF_DIST/etc
|
||||
|
||||
# Patch-in proper Karaf version into the startup script.
|
||||
# Stage all builtin ONOS apps for factory install
|
||||
mkdir $ONOS_STAGE/apps
|
||||
find $ONOS_ROOT -name 'app.xml' | egrep -v '/src/test/|/target/|org\.foo\.' | \
|
||||
xargs grep 'name=' | sed 's/<app name="//g;s/".*//g' | while read line; do
|
||||
appxml=${line%:*}
|
||||
app=${line#*:}
|
||||
mkdir $ONOS_STAGE/apps/$app
|
||||
cp $appxml $ONOS_STAGE/apps/$app/app.xml
|
||||
done
|
||||
|
||||
# Patch-in proper Karaf version into the startup script
|
||||
sed "s/\$KARAF_VERSION/$KARAF_VERSION/g" \
|
||||
$ONOS_ROOT/tools/package/bin/onos-service > bin/onos-service
|
||||
sed "s/\$KARAF_VERSION/$KARAF_VERSION/g" \
|
||||
@ -60,9 +70,9 @@ done
|
||||
perl -pi.old -e "s|^(featuresRepositories=.*)|\1,mvn:org.onosproject/onos-features/$ONOS_POM_VERSION/xml/features|" \
|
||||
$ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
|
||||
|
||||
# Patch the Apache Karaf distribution file to load ONOS features
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow"
|
||||
perl -pi.old -e "s|^(featuresBoot=.*)|\1,$ONOS_FEATURES|" \
|
||||
# Patch the Apache Karaf distribution file to load default ONOS boot features
|
||||
export BOOT_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui"
|
||||
perl -pi.old -e "s|^(featuresBoot=.*)|\1,$BOOT_FEATURES|" \
|
||||
$ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
|
||||
|
||||
# Patch the Apache Karaf distribution with ONOS branding bundle
|
||||
|
||||
@ -71,23 +71,32 @@ alias gui='onos-gui'
|
||||
alias sshctl='onos-ssh'
|
||||
alias sshnet='onos-ssh $OCN'
|
||||
|
||||
|
||||
# Sets the primary instance to the specified instance number.
|
||||
function setPrimaryInstance {
|
||||
export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2)
|
||||
echo $OCI
|
||||
}
|
||||
|
||||
# Applies the settings in the specified cell file or lists current cell definition
|
||||
# if no cell file is given.
|
||||
function cell {
|
||||
if [ -n "$1" ]; then
|
||||
[ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
|
||||
echo "No such cell: $1" >&2 && return 1
|
||||
unset ONOS_CELL ONOS_NIC ONOS_FEATURES ONOS_USER ONOS_GROUP
|
||||
unset OCI OCN
|
||||
unset ONOS_CELL ONOS_NIC ONOS_APPS ONOS_BOOT_FEATURES ONOS_USER ONOS_GROUP
|
||||
unset OCI OCN OCT
|
||||
unset ONOS_FEATURES # deprecated
|
||||
unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
|
||||
export ONOS_CELL=$1
|
||||
. $ONOS_ROOT/tools/test/cells/$1
|
||||
setPrimaryInstance 1 >/dev/null
|
||||
cell
|
||||
else
|
||||
env | egrep "ONOS_CELL"
|
||||
env | egrep "OCI"
|
||||
env | egrep "OC[0-9]+" | sort
|
||||
env | egrep "OCN"
|
||||
env | egrep "OC[NT]"
|
||||
env | egrep "ONOS_" | egrep -v 'ONOS_ROOT|ONOS_CELL'
|
||||
fi
|
||||
}
|
||||
@ -97,18 +106,12 @@ cell local >/dev/null # Default cell is the local VMs
|
||||
# Lists available cells
|
||||
function cells {
|
||||
for cell in $(ls -1 $ONOS_ROOT/tools/test/cells); do
|
||||
printf "%-12s %s\n" \
|
||||
printf "%-16s %s\n" \
|
||||
"$([ $cell = $ONOS_CELL ] && echo $cell '*' || echo $cell)" \
|
||||
"$(grep '^#' $ONOS_ROOT/tools/test/cells/$cell | head -n 1)"
|
||||
done
|
||||
}
|
||||
|
||||
# Sets the primary instance to the specified instance number.
|
||||
function setPrimaryInstance {
|
||||
export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2)
|
||||
echo $OCI
|
||||
}
|
||||
|
||||
# Miscellaneous
|
||||
function spy {
|
||||
ps -ef | egrep "$@" | grep -v egrep
|
||||
|
||||
@ -8,9 +8,11 @@
|
||||
|
||||
remote=$ONOS_USER@${1:-$OCI}
|
||||
|
||||
# Customize features
|
||||
export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow}"
|
||||
# ONOS boot features
|
||||
export ONOS_BOOT_FEATURES="${ONOS_BOOT_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui}"
|
||||
|
||||
# ONOS builtin apps and providers ignited by default
|
||||
export ONOS_APPS="${ONOS_APPS:-openflow}"
|
||||
|
||||
# Generate a cluster.json from the ON* environment variables
|
||||
CDEF_FILE=/tmp/${remote}.cluster.json
|
||||
@ -40,9 +42,14 @@ ssh $remote "
|
||||
echo "log4j.logger.com.hazelcast.cluster.impl.MulticastService= ERROR" \
|
||||
>> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/org.ops4j.pax.logging.cfg
|
||||
|
||||
# Patch the Apache Karaf distribution file to load ONOS features
|
||||
perl -pi.old -e \"s|^(featuresBoot=.*,management)(,webconsole,.*)|\1,$ONOS_FEATURES|\" \
|
||||
# Patch the Apache Karaf distribution file to load ONOS boot features
|
||||
perl -pi.old -e \"s|^(featuresBoot=.*,management)(,webconsole,.*)|\1,$ONOS_BOOT_FEATURES|\" \
|
||||
$ONOS_INSTALL_DIR/$KARAF_DIST/etc/org.apache.karaf.features.cfg
|
||||
|
||||
# Customize which builtin apps should be ignited
|
||||
for app in $(echo $ONOS_APPS | tr ',' ' '); do
|
||||
touch $ONOS_INSTALL_DIR/apps/org.onosproject.\$app/active
|
||||
done
|
||||
"
|
||||
|
||||
# Generate a default tablets.json from the ON* environment variables
|
||||
@ -52,4 +59,3 @@ scp -q $TDEF_FILE $remote:$ONOS_INSTALL_DIR/config/tablets.json
|
||||
|
||||
# copy tools/package/config/ to remote
|
||||
scp -qr ${ONOS_ROOT}/tools/package/config/ $remote:$ONOS_INSTALL_DIR/
|
||||
|
||||
|
||||
@ -51,5 +51,7 @@ for n in $( seq 0 ${max} ); do
|
||||
fi
|
||||
done
|
||||
echo "OCN=${OCN}"
|
||||
echo "OCT=${OCT}"
|
||||
echo "OCI=${OCI}"
|
||||
echo "ONOS_FEATURES=${ONOS_FEATURES}"
|
||||
echo "ONOS_APPS=${ONOS_APPS}"
|
||||
echo "ONOS_BOOT_FEATURES=${ONOS_BOOT_FEATURES}"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Bare metal cluster
|
||||
# Bare metal cluster (7-node)
|
||||
|
||||
# Use the 10G NIC for cluster communications
|
||||
export ONOS_NIC="192.168.200.*"
|
||||
# Use the 1G NIC for cluster communications
|
||||
export ONOS_NIC="10.254.1.*"
|
||||
|
||||
# ONOS Test proxy
|
||||
export OCT=10.254.1.200
|
||||
@ -15,6 +15,4 @@ export OC5=10.254.1.205
|
||||
export OC6=10.254.1.206
|
||||
export OC7=10.254.1.207
|
||||
|
||||
export OCI=${OC1}
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-null
|
||||
export ONOS_APPS=null,intentperf
|
||||
|
||||
12
tools/test/cells/beast-1
Normal file
12
tools/test/cells/beast-1
Normal file
@ -0,0 +1,12 @@
|
||||
# Bare metal cluster (1-node)
|
||||
|
||||
# Use the 1G NIC for cluster communications
|
||||
export ONOS_NIC="10.254.1.*"
|
||||
|
||||
# ONOS Test proxy
|
||||
export OCT=10.254.1.200
|
||||
|
||||
# Use the 1G NICs for external access
|
||||
export OC1=10.254.1.201
|
||||
|
||||
export ONOS_APPS=null,intentperf
|
||||
@ -1,7 +1,7 @@
|
||||
# Bare metal cluster
|
||||
# Bare metal cluster (3-node)
|
||||
|
||||
# Use the 10G NIC for cluster communications
|
||||
export ONOS_NIC="192.168.200.*"
|
||||
# Use the 1G NIC for cluster communications
|
||||
export ONOS_NIC="10.254.1.*"
|
||||
|
||||
# ONOS Test proxy
|
||||
export OCT=10.254.1.200
|
||||
@ -11,6 +11,4 @@ export OC1=10.254.1.201
|
||||
export OC2=10.254.1.202
|
||||
export OC3=10.254.1.203
|
||||
|
||||
export OCI=${OC1}
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-null
|
||||
export ONOS_APPS=null,intentperf
|
||||
|
||||
16
tools/test/cells/beast-5
Normal file
16
tools/test/cells/beast-5
Normal file
@ -0,0 +1,16 @@
|
||||
# Bare metal cluster (5-node)
|
||||
|
||||
# Use the 1G NIC for cluster communications
|
||||
export ONOS_NIC="10.254.1.*"
|
||||
|
||||
# ONOS Test proxy
|
||||
export OCT=10.254.1.200
|
||||
|
||||
# Use the 1G NICs for external access
|
||||
export OC1=10.254.1.201
|
||||
export OC2=10.254.1.202
|
||||
export OC3=10.254.1.203
|
||||
export OC4=10.254.1.204
|
||||
export OC5=10.254.1.205
|
||||
|
||||
export ONOS_APPS=null,intentperf
|
||||
@ -1,18 +0,0 @@
|
||||
# Bare metal cluster with rearranged nodes
|
||||
|
||||
# Use the 10G NIC for cluster communications
|
||||
export ONOS_NIC="10.254.1.*"
|
||||
|
||||
# ONOS Test proxy
|
||||
export OCT=10.254.1.200
|
||||
|
||||
# Use the 1G NICs for external access
|
||||
export OC1=10.254.1.207
|
||||
export OC2=10.254.1.202
|
||||
export OC3=10.254.1.203
|
||||
export OC4=10.254.1.204
|
||||
export OC5=10.254.1.206
|
||||
|
||||
export OCI=${OC1}
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-null
|
||||
@ -1,8 +0,0 @@
|
||||
# Local VirtualBox-based single ONOS instance & ONOS mininet box
|
||||
|
||||
export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.103"
|
||||
export OCN="192.168.56.103"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd"
|
||||
@ -1,4 +1,4 @@
|
||||
# Bare metal cluster
|
||||
# EC2-based cluster (7-node)
|
||||
|
||||
# Use the 10G NIC for cluster communications
|
||||
export ONOS_NIC="192.168.200.*"
|
||||
@ -15,6 +15,4 @@ export OC5=192.168.200.105
|
||||
export OC6=192.168.200.106
|
||||
export OC7=192.168.200.107
|
||||
|
||||
export OCI=${OC1}
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-null
|
||||
export ONOS_APPS=null,intentperf
|
||||
|
||||
@ -4,6 +4,5 @@ export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.101"
|
||||
export OC2="192.168.56.102"
|
||||
export OCN="192.168.56.103"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-gui,onos-rest,onos-app-fwd,onos-app-proxyarp"
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# ProxMox-based cell of ONOS instance; no mininet-box
|
||||
# ONLAB_OF Wifi ProxMox-based cell; single node; no mininet-box
|
||||
|
||||
export ONOS_NIC="10.1.10.*"
|
||||
export OC1="10.1.10.223"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-app-gui,onos-app-proxyarp"
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility"
|
||||
|
||||
|
||||
@ -4,6 +4,3 @@ export ONOS_NIC="10.1.9.*"
|
||||
export OC1="10.1.9.94"
|
||||
export OC2="10.1.9.82"
|
||||
export OCN="10.1.9.93"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES=""
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
# SDN-IP ProxMox cell
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-app-config,onos-app-proxyarp,onos-gui,onos-rest"
|
||||
|
||||
export ONOS_NIC=10.128.4.*
|
||||
export OC1="10.128.4.65"
|
||||
export OC2="10.128.4.66"
|
||||
export OC3="10.128.4.67"
|
||||
|
||||
export ONOS_USER=sdn
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility,config,sdnip"
|
||||
|
||||
@ -3,6 +3,5 @@
|
||||
export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.101"
|
||||
export OCN="192.168.56.103"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-gui
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Local VirtualBox-based single ONOS instance & ONOS mininet box
|
||||
# Optical use-case VirtualBox-based single ONOS instance & ONOS mininet box
|
||||
|
||||
export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.101"
|
||||
export OCN="192.168.56.103"
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-app-gui,onos-app-optical
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility,optical"
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
# Thomas' VirtualBox-based single ONOS instance & ONOS mininet box
|
||||
# Thomas' VirtualBox-based 3 ONOS instances & ONOS mininet box
|
||||
|
||||
export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.11"
|
||||
export OCN="192.168.56.7"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-mobility
|
||||
export OC2="192.168.56.12"
|
||||
export OC3="192.168.56.13"
|
||||
export OCN="192.168.56.14"
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
# Thomas' VirtualBox-based 3 ONOS instances & ONOS mininet box
|
||||
|
||||
export ONOS_NIC=192.168.56.*
|
||||
export OC1="192.168.56.11"
|
||||
export OC2="192.168.56.12"
|
||||
export OC3="192.168.56.13"
|
||||
export OCN="192.168.56.14"
|
||||
export OCI="${OC1}"
|
||||
|
||||
unset ONOS_FEATURES
|
||||
@ -1,13 +1,7 @@
|
||||
# Local VirtualBox-based ONOS instances 1,2,3 & ONOS mininet box
|
||||
# Office ProxMox ONOS instances 1,2,3 & ONOS mininet box
|
||||
|
||||
export ONOS_NIC=10.128.11.*
|
||||
export OC1="10.128.11.1"
|
||||
export OC2="10.128.11.2"
|
||||
export OC3="10.128.11.3"
|
||||
export OCN="10.128.11.4"
|
||||
|
||||
export OCI="${OC1}"
|
||||
export OCT="${OC1}"
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow"
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-null"
|
||||
|
||||
@ -5,6 +5,5 @@ export OC1="192.168.56.101"
|
||||
export OC2="192.168.56.102"
|
||||
export OC3="192.168.56.104"
|
||||
export OCN="192.168.56.103"
|
||||
export OCI="${OC1}"
|
||||
|
||||
export ONOS_FEATURES="webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-gui,onos-rest,onos-app-fwd,onos-app-proxyarp"
|
||||
export ONOS_APPS="openflow,fwd,proxyarp,mobility"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user