tom

Added a few javadocs.

Split onos-install into install and config.
/**
* Implementation of device store using Hazelcast distributed structures.
*/
package org.onlab.onos.store.device.impl;
\ No newline at end of file
/**
* Common facilities for use by various distributed stores.
*/
package org.onlab.onos.store.impl;
\ No newline at end of file
......@@ -250,10 +250,7 @@
</configuration>
</plugin>
<!-- TODO: add jacoco plugin for unit test coverage; for explicit invocation only -->
<!-- TODO: add findbugs plugin for static code analysis; for explicit invocation only -->
<!-- TODO: add sonarqube plugin for code analysis; for explicit invocation only -->
</plugins>
</pluginManagement>
......@@ -359,7 +356,7 @@
<group>
<title>Core Subsystems</title>
<packages>
org.onlab.onos.net.trivial.*:org.onlab.onos.net.*.impl:org.onlab.onos.impl:org.onlab.onos.event.impl
org.onlab.onos.net.trivial.*:org.onlab.onos.net.*.impl:org.onlab.onos.impl:org.onlab.onos.event.impl:org.onlab.onos.store.*
</packages>
</group>
<group>
......
#!/bin/bash
#-------------------------------------------------------------------------------
# Remotely configures & starts ONOS for the first time.
#-------------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
remote=$ONOS_USER@${1:-$OCI}
LOG=$ONOS_INSTALL_DIR/config.log
onos=$ONOS_INSTALL_DIR/bin/onos
ssh $remote "
echo 'Starting...'
nohup $ONOS_INSTALL_DIR/bin/onos-ctl server </dev/null | 1>/opt/onos/svc.log 2>&1 &
# Wait until we reach the run-level 100
echo 'Waiting for cluster bootstrap...'
running=""
while [ -z \$running ]; do
$onos bundle:list 2>>$LOG | grep -q 'START LEVEL 100' && running=1 || sleep 2
done
# Now create group onos and join it, while quitting the default one
if ! $onos cluster:group-list 2>>$LOG | cut -d \\ -f3 | grep -q onos; then
echo 'Creating ONOS group...'
installRole=primary
$onos cluster:group-create onos 1>>$LOG 2>&1
fi
echo 'Configuring group membership...'
node=\$($onos cluster:node-list 2>>$LOG | grep '^x' | cut -d \\ -f3)
$onos cluster:group-join onos \$node 1>>$LOG 2>&1
$onos cluster:group-quit default \$node 1>>$LOG 2>&1
if [ X\$installRole = Xprimary ]; then
echo 'Installing ONOS bundles...'
$onos cluster:feature-install onos onos-api 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-core 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-openflow 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-cli 1>>$LOG 2>&1
# $onos cluster:feature-install onos onos-gui 1>>$LOG 2>&1
# $onos cluster:feature-install onos onos-rest 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-app-tvue 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-app-fwd 1>>$LOG 2>&1
fi
echo 'Started...'
"
#!/bin/bash
#-------------------------------------------------------------------------------
# Remotely pushes bits to a remote machine and install & starts ONOS.
# Remotely pushes bits to a remote machine and installs ONOS.
#-------------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
# If the first option is -f attempt uninstall first.
[ "$1" = "-f" ] && shift && echo 'Uninstalling...' && onos-uninstall ${1:-$OCI}
[ "$1" = "-f" ] && shift && onos-uninstall ${1:-$OCI}
remote=$ONOS_USER@${1:-$OCI}
scp -q $ONOS_TAR $remote:/tmp
LOG=$ONOS_INSTALL_DIR/install.log
onos=$ONOS_INSTALL_DIR/bin/onos
ssh $remote "
[ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
# Prepare a landing zone and unroll the bits
echo 'Unpacking...'
sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR
tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
# Make a link to the log file directory.
ln -s $ONOS_INSTALL_DIR/$KARAF_DIST/data/log /opt/onos/log
# TODO: Setup ONOS to run as a daemon; for now we at least startup
echo 'Starting...'
nohup $ONOS_INSTALL_DIR/bin/onos-ctl server </dev/null | 1>/opt/onos/svc.log 2>&1 &
# Wait until we reach the run-level 100
echo 'Waiting for cluster bootstrap...'
running=""
while [ -z \$running ]; do
$onos bundle:list 2>>$LOG | grep -q 'START LEVEL 100' && running=1 || sleep 2
done
# Now create group onos and join it, while quitting the default one
if ! $onos cluster:group-list 2>>$LOG | cut -d \\ -f3 | grep -q onos; then
echo 'Creating ONOS group...'
installRole=primary
$onos cluster:group-create onos 1>>$LOG 2>&1
fi
echo 'Configuring group membership...'
node=\$($onos cluster:node-list 2>>$LOG | grep '^x' | cut -d \\ -f3)
$onos cluster:group-join onos \$node 1>>$LOG 2>&1
$onos cluster:group-quit default \$node 1>>$LOG 2>&1
if [ X\$installRole = Xprimary ]; then
echo 'Installing ONOS bundles...'
$onos cluster:feature-install onos onos-api 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-core 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-openflow 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-cli 1>>$LOG 2>&1
# $onos cluster:feature-install onos onos-gui 1>>$LOG 2>&1
# $onos cluster:feature-install onos onos-rest 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-app-tvue 1>>$LOG 2>&1
$onos cluster:feature-install onos onos-app-fwd 1>>$LOG 2>&1
fi
echo 'Started...'
"
......