improvements, adding paths
diff --git a/onos-setup-lxc.sh b/onos-setup-lxc.sh
index 8f0704b..e5471a0 100644
--- a/onos-setup-lxc.sh
+++ b/onos-setup-lxc.sh
@@ -20,6 +20,8 @@
sudo chown $name:$name /home/$name/.ssh/id_rsa
sudo -u $name sh -c "echo \"export ONOS_ROOT=/home/mininet/onos\" >> /home/$name/.bashrc"
+ sudo -u $name sh -c "echo \"export KARAF_ROOT=/home/mininet/apache-karaf-3.0.2\" >> /home/$name/.bashrc"
+ sudo -u $name sh -c "echo \"export M2_REPO=/home/mininet/.m2/repository\" >> /home/$name/.bashrc"
sudo -u $name sh -c "echo \". /home/mininet/onos/tools/dev/bash_profile\" >> /home/$name/.bashrc"
sudo -u $name ssh -o "StrictHostKeyChecking no" sdn@10.0.3.11 ls
@@ -29,6 +31,8 @@
# ------------- Set up desktop environment -------------
+echo "Setting up desktop environment"
+
# Remove kernel boot options that will prevent the gui from running
sudo sed -i s/text// /etc/default/grub
sudo sed -i s/ipv6.disable=1// /etc/default/grub
@@ -66,30 +70,38 @@
xset -dpms
EOF
-echo $PATH
+echo "Enabling non-root wireshark"
+echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
+sudo dpkg-reconfigure -f noninteractive wireshark-common
# -------------- Install ONOS ----------------
+echo "Installing ONOS"
+
USER=mininet
USER_HOME=/home/${USER}
-echo `whoami`
-
cd ~
+
+# Download a local karaf so we can use the bin directory
+wget http://archive.apache.org/dist/karaf/3.0.2/apache-karaf-3.0.2.tar.gz
+tar -xzf apache-karaf-3.0.2.tar.gz
+
+
git clone https://gerrit.onosproject.org/onos
cd onos && git checkout onos-1.1 && cd -
mkdir -p ~/Downloads
-echo $PATH
echo "export ONOS_ROOT=${USER_HOME}/onos" >> ~/.bashrc
+echo "export KARAF_ROOT=${USER_HOME}/apache-karaf-3.0.2" >> ~/.bashrc
echo ". ~/onos/tools/dev/bash_profile" >> ~/.bashrc
export ONOS_ROOT=${USER_HOME}/onos
+export KARAF_ROOT=${USER_HOME}/apache-karaf-3.0.2
. ~/onos/tools/dev/bash_profile
-echo $PATH
echo $ONOS_ROOT
@@ -117,7 +129,6 @@
cell 3node
-echo $PATH
onos-package
onos-group install -f
@@ -125,10 +136,15 @@
onos-wait-for-start $OC2
onos-wait-for-start $OC3
-sleep 20
+echo "ONOS install and startup complete"
+
+sleep 1
onos-service --cell status
-echo $PATH
+# Prevent ONOS services from starting automatically
+sudo sh -c "echo manual >> /var/lib/lxc/onos1/rootfs/etc/init/onos.override"
+sudo sh -c "echo manual >> /var/lib/lxc/onos2/rootfs/etc/init/onos.override"
+sudo sh -c "echo manual >> /var/lib/lxc/onos3/rootfs/etc/init/onos.override"
# ------------- Set up each tutorial -------------
@@ -138,6 +154,10 @@
wget -O tutorial1-setup-lxc.sh $URL
sudo -u tutorial1 -H sh -c 'cp tutorial1-setup-lxc.sh ~/ && cd ~/ && sh tutorial1-setup-lxc.sh'
+create_user sdnip "SDN-IP Tutorial"
+create_user distributed "Distributed Tutorial"
+create_user optical "Optical Tutorial"
+
# ------------- Zero Unused Blocks -------------
#TODO investigate zerofree
#echo "Zeroing unused blocks"
diff --git a/tutorial1-setup-lxc.sh b/tutorial1-setup-lxc.sh
index f6ed297..4c48bcd 100644
--- a/tutorial1-setup-lxc.sh
+++ b/tutorial1-setup-lxc.sh
@@ -1,28 +1,5 @@
#!/bin/bash
-function create_user {
- local name=$1
- local description=$2
-
- sudo /usr/sbin/useradd -c "$description" -d /home/$name -U -m -p $(openssl passwd -1 $name) -s /bin/bash $name
- echo "$name ALL=(ALL) NOPASSWD:ALL" >> $name
- sudo mv $name /etc/sudoers.d
- sudo chown root:root /etc/sudoers.d/$name
- sudo usermod -aG wireshark $name
-
- sudo mkdir /home/$name/.ssh
- sudo chown $name:$name /home/$name/.ssh
- sudo cp /home/mininet/.ssh/id_rsa /home/$name/.ssh/
- sudo chown $name:$name /home/$name/.ssh/id_rsa
-
- sudo -u $name sh -c "echo \"export ONOS_ROOT=/home/mininet/onos\" >> /home/$name/.bashrc"
- sudo -u $name sh -c "echo \". /home/mininet/onos/tools/dev/bash_profile\" >> /home/$name/.bashrc"
-
- sudo -u $name ssh -o "StrictHostKeyChecking no" sdn@10.0.3.11 ls
- sudo -u $name ssh -o "StrictHostKeyChecking no" sdn@10.0.3.12 ls
- sudo -u $name ssh -o "StrictHostKeyChecking no" sdn@10.0.3.13 ls
-}
-
export USER=tutorial1
#create_user $USER "Basic ONOS Tutorial"
diff --git a/vm-setup-lxc.sh b/vm-setup-lxc.sh
index 4f40449..b7bfcb9 100644
--- a/vm-setup-lxc.sh
+++ b/vm-setup-lxc.sh
@@ -8,8 +8,8 @@
# TODO erlang, quagga, wireshark
#sudo apt-get install -y git openjdk-8-jdk maven unzip curl make gcc wget autoconf openssl libssl0.9.8 libssl-dev libncurses5 libncurses5-dev lxc
-sudo apt-get install -y git openjdk-8-jdk maven unzip curl wget lxc virtualbox-guest-utils
-#sudo apt-get install -y git wget curl lxc
+sudo apt-get install -y git openjdk-8-jdk maven unzip curl wget lxc virtualbox-guest-utils wireshark
+
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac