tom

Added a few javadocs.

Split onos-install into install and config.
1 +/**
2 + * Implementation of device store using Hazelcast distributed structures.
3 + */
4 +package org.onlab.onos.store.device.impl;
...\ No newline at end of file ...\ No newline at end of file
1 +/**
2 + * Common facilities for use by various distributed stores.
3 + */
4 +package org.onlab.onos.store.impl;
...\ No newline at end of file ...\ No newline at end of file
...@@ -250,10 +250,7 @@ ...@@ -250,10 +250,7 @@
250 </configuration> 250 </configuration>
251 </plugin> 251 </plugin>
252 252
253 - <!-- TODO: add jacoco plugin for unit test coverage; for explicit invocation only -->
254 <!-- TODO: add findbugs plugin for static code analysis; for explicit invocation only --> 253 <!-- TODO: add findbugs plugin for static code analysis; for explicit invocation only -->
255 - <!-- TODO: add sonarqube plugin for code analysis; for explicit invocation only -->
256 -
257 </plugins> 254 </plugins>
258 </pluginManagement> 255 </pluginManagement>
259 256
...@@ -359,7 +356,7 @@ ...@@ -359,7 +356,7 @@
359 <group> 356 <group>
360 <title>Core Subsystems</title> 357 <title>Core Subsystems</title>
361 <packages> 358 <packages>
362 - org.onlab.onos.net.trivial.*:org.onlab.onos.net.*.impl:org.onlab.onos.impl:org.onlab.onos.event.impl 359 + org.onlab.onos.net.trivial.*:org.onlab.onos.net.*.impl:org.onlab.onos.impl:org.onlab.onos.event.impl:org.onlab.onos.store.*
363 </packages> 360 </packages>
364 </group> 361 </group>
365 <group> 362 <group>
......
1 +#!/bin/bash
2 +#-------------------------------------------------------------------------------
3 +# Remotely configures & starts ONOS for the first time.
4 +#-------------------------------------------------------------------------------
5 +
6 +[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 +. $ONOS_ROOT/tools/build/envDefaults
8 +
9 +remote=$ONOS_USER@${1:-$OCI}
10 +
11 +LOG=$ONOS_INSTALL_DIR/config.log
12 +onos=$ONOS_INSTALL_DIR/bin/onos
13 +
14 +ssh $remote "
15 + echo 'Starting...'
16 + nohup $ONOS_INSTALL_DIR/bin/onos-ctl server </dev/null | 1>/opt/onos/svc.log 2>&1 &
17 +
18 + # Wait until we reach the run-level 100
19 + echo 'Waiting for cluster bootstrap...'
20 + running=""
21 + while [ -z \$running ]; do
22 + $onos bundle:list 2>>$LOG | grep -q 'START LEVEL 100' && running=1 || sleep 2
23 + done
24 +
25 + # Now create group onos and join it, while quitting the default one
26 + if ! $onos cluster:group-list 2>>$LOG | cut -d \\ -f3 | grep -q onos; then
27 + echo 'Creating ONOS group...'
28 + installRole=primary
29 + $onos cluster:group-create onos 1>>$LOG 2>&1
30 + fi
31 +
32 + echo 'Configuring group membership...'
33 + node=\$($onos cluster:node-list 2>>$LOG | grep '^x' | cut -d \\ -f3)
34 + $onos cluster:group-join onos \$node 1>>$LOG 2>&1
35 + $onos cluster:group-quit default \$node 1>>$LOG 2>&1
36 +
37 + if [ X\$installRole = Xprimary ]; then
38 + echo 'Installing ONOS bundles...'
39 + $onos cluster:feature-install onos onos-api 1>>$LOG 2>&1
40 + $onos cluster:feature-install onos onos-core 1>>$LOG 2>&1
41 + $onos cluster:feature-install onos onos-openflow 1>>$LOG 2>&1
42 + $onos cluster:feature-install onos onos-cli 1>>$LOG 2>&1
43 + # $onos cluster:feature-install onos onos-gui 1>>$LOG 2>&1
44 + # $onos cluster:feature-install onos onos-rest 1>>$LOG 2>&1
45 + $onos cluster:feature-install onos onos-app-tvue 1>>$LOG 2>&1
46 + $onos cluster:feature-install onos onos-app-fwd 1>>$LOG 2>&1
47 + fi
48 +
49 + echo 'Started...'
50 +"
1 #!/bin/bash 1 #!/bin/bash
2 #------------------------------------------------------------------------------- 2 #-------------------------------------------------------------------------------
3 -# Remotely pushes bits to a remote machine and install & starts ONOS. 3 +# Remotely pushes bits to a remote machine and installs ONOS.
4 #------------------------------------------------------------------------------- 4 #-------------------------------------------------------------------------------
5 5
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
8 8
9 # If the first option is -f attempt uninstall first. 9 # If the first option is -f attempt uninstall first.
10 -[ "$1" = "-f" ] && shift && echo 'Uninstalling...' && onos-uninstall ${1:-$OCI} 10 +[ "$1" = "-f" ] && shift && onos-uninstall ${1:-$OCI}
11 11
12 remote=$ONOS_USER@${1:-$OCI} 12 remote=$ONOS_USER@${1:-$OCI}
13 13
14 scp -q $ONOS_TAR $remote:/tmp 14 scp -q $ONOS_TAR $remote:/tmp
15 15
16 -LOG=$ONOS_INSTALL_DIR/install.log
17 -onos=$ONOS_INSTALL_DIR/bin/onos
18 -
19 ssh $remote " 16 ssh $remote "
20 [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1 17 [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
21 18
22 # Prepare a landing zone and unroll the bits 19 # Prepare a landing zone and unroll the bits
23 - echo 'Unpacking...'
24 sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR 20 sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown sdn:sdn $ONOS_INSTALL_DIR
25 tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1 21 tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
26 22
27 # Make a link to the log file directory. 23 # Make a link to the log file directory.
28 ln -s $ONOS_INSTALL_DIR/$KARAF_DIST/data/log /opt/onos/log 24 ln -s $ONOS_INSTALL_DIR/$KARAF_DIST/data/log /opt/onos/log
29 -
30 - # TODO: Setup ONOS to run as a daemon; for now we at least startup
31 - echo 'Starting...'
32 - nohup $ONOS_INSTALL_DIR/bin/onos-ctl server </dev/null | 1>/opt/onos/svc.log 2>&1 &
33 -
34 - # Wait until we reach the run-level 100
35 - echo 'Waiting for cluster bootstrap...'
36 - running=""
37 - while [ -z \$running ]; do
38 - $onos bundle:list 2>>$LOG | grep -q 'START LEVEL 100' && running=1 || sleep 2
39 - done
40 -
41 - # Now create group onos and join it, while quitting the default one
42 - if ! $onos cluster:group-list 2>>$LOG | cut -d \\ -f3 | grep -q onos; then
43 - echo 'Creating ONOS group...'
44 - installRole=primary
45 - $onos cluster:group-create onos 1>>$LOG 2>&1
46 - fi
47 -
48 - echo 'Configuring group membership...'
49 - node=\$($onos cluster:node-list 2>>$LOG | grep '^x' | cut -d \\ -f3)
50 - $onos cluster:group-join onos \$node 1>>$LOG 2>&1
51 - $onos cluster:group-quit default \$node 1>>$LOG 2>&1
52 -
53 - if [ X\$installRole = Xprimary ]; then
54 - echo 'Installing ONOS bundles...'
55 - $onos cluster:feature-install onos onos-api 1>>$LOG 2>&1
56 - $onos cluster:feature-install onos onos-core 1>>$LOG 2>&1
57 - $onos cluster:feature-install onos onos-openflow 1>>$LOG 2>&1
58 - $onos cluster:feature-install onos onos-cli 1>>$LOG 2>&1
59 - # $onos cluster:feature-install onos onos-gui 1>>$LOG 2>&1
60 - # $onos cluster:feature-install onos onos-rest 1>>$LOG 2>&1
61 - $onos cluster:feature-install onos onos-app-tvue 1>>$LOG 2>&1
62 - $onos cluster:feature-install onos onos-app-fwd 1>>$LOG 2>&1
63 - fi
64 -
65 - echo 'Started...'
66 " 25 "
......