| # ----------------------------------------------------------------------------- |
| # Remotely configures & starts Atomix for the first time. |
| # ----------------------------------------------------------------------------- |
| - [node] : The node to configure |
| Remotely configures and starts Atomix for the first time. |
| The procedure for configuring a node includes determining base features, |
| applications to load at startup, and clustering and logical network view |
| configurations, among others. |
| If [node] isn't specified, the default target becomes \$OCI. |
| [ "$1" = "-h" ] && _usage && exit 0 |
| [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| . $ONOS_ROOT/tools/build/envDefaults |
| remote=$ONOS_USER@[$node] |
| # Generate a default cluster.json from the ON* environment variables |
| CDEF_FILE=/tmp/${remote}.atomix.json |
| atomix-gen-config $node $CDEF_FILE |
| scp -q $CDEF_FILE $remote:$ATOMIX_INSTALL_DIR/atomix.json |
| LOGBACK_FILE="$ONOS_ROOT"/tools/test/configs/atomix/logback.xml |
| scp -q $LOGBACK_FILE $remote:/opt/atomix/conf/logback.xml |