Showing
3 changed files
with
8 additions
and
2 deletions
| ... | @@ -50,7 +50,7 @@ perl -pi.old -e "s|^(featuresRepositories=.*)|\1,mvn:org.onlab.onos/onos-feature | ... | @@ -50,7 +50,7 @@ perl -pi.old -e "s|^(featuresRepositories=.*)|\1,mvn:org.onlab.onos/onos-feature |
| 50 | $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg | 50 | $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg |
| 51 | 51 | ||
| 52 | # Patch the Apache Karaf distribution file to load ONOS features | 52 | # Patch the Apache Karaf distribution file to load ONOS features |
| 53 | -perl -pi.old -e 's|^(featuresBoot=.*)|\1,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-tvue|' \ | 53 | +perl -pi.old -e 's|^(featuresBoot=.*)|\1,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-tvue,onos-app-fwd|' \ |
| 54 | $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg | 54 | $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg |
| 55 | 55 | ||
| 56 | # Patch the Apache Karaf distribution with ONOS branding bundle | 56 | # Patch the Apache Karaf distribution with ONOS branding bundle | ... | ... |
| ... | @@ -16,9 +16,13 @@ scp -q $ONOS_TAR $remote:/tmp | ... | @@ -16,9 +16,13 @@ scp -q $ONOS_TAR $remote:/tmp |
| 16 | ssh $remote " | 16 | ssh $remote " |
| 17 | [ -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 |
| 18 | 18 | ||
| 19 | + # Prepare a landing zone and unroll the bits | ||
| 19 | 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 |
| 20 | 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 |
| 21 | 22 | ||
| 23 | + # Make a link to the log file directory. | ||
| 22 | ln -s /opt/onos/$KARAF_DIST/data/log /opt/onos/log | 24 | ln -s /opt/onos/$KARAF_DIST/data/log /opt/onos/log |
| 23 | - | 25 | + |
| 26 | + # TODO: Setup ONOS to run as a daemon; for now we at least startup | ||
| 27 | + nohup /opt/onos/bin/onos-ctl server </dev/null 1>/opt/onos/svc.log 2>&1 & | ||
| 24 | " | 28 | " | ... | ... |
| ... | @@ -10,6 +10,8 @@ remote=$ONOS_USER@${1:-$OCI} | ... | @@ -10,6 +10,8 @@ remote=$ONOS_USER@${1:-$OCI} |
| 10 | 10 | ||
| 11 | LOG=$ONOS_INSTALL_DIR/log/karaf.log | 11 | LOG=$ONOS_INSTALL_DIR/log/karaf.log |
| 12 | 12 | ||
| 13 | +trap "ssh $remote 'ps -ef | grep \"tail -n 512\" | grep -v grep | cut -c10-15 | xargs kill'" EXIT | ||
| 14 | + | ||
| 13 | ssh $remote " | 15 | ssh $remote " |
| 14 | while true; do | 16 | while true; do |
| 15 | [ ! -f $LOG ] && sleep 2 && continue | 17 | [ ! -f $LOG ] && sleep 2 && continue | ... | ... |
-
Please register or login to post a comment