Created
December 10, 2013 23:25
-
-
Save FlorianOtel/7902272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run as user "fedora" | |
if [ -f $1 ]; then | |
FILE1=`readlink -f $1`; | |
else | |
echo "Can't find $1 to use as primary devstack config file (e.g. localrc) . Bailing out"; | |
exit 0; | |
fi | |
sudo /usr/share/openvswitch/scripts/ovs-ctl start | |
### Do it here ? -- (!!!) Note: $2 is the local ip address. | |
sudo ovs-vsctl set-manager tcp:192.168.254.1:6640 | |
read ovstbl <<< $(sudo ovs-vsctl get Open_vSwitch . _uuid) | |
sudo ovs-vsctl set Open_vSwitch $ovstbl other_config={"local_ip"="$2"} | |
sudo ovs-vsctl list Open_vSwitch . | |
# For some reason if "python-pyudev" is not install Devstack breaks for me. Fix that (& misc) first | |
sudo yum -y install git screen python-pyudev | |
# 2013-11-20 -- Also needed for dual-node DevStack (Kyle's branch) | |
sudo yum -y install python-pip libxslt libxslt-devel libxslt-python libxml2 libxml2-devel libxml2-python | |
######### # Ubuntu | |
######### sudo apt-get install libxslt1.1 libxslt1-dev python-lxml libxml2 libxml2-dev python-libxml2 | |
######### | |
# Get Devstack going under "/mnt/git", all installation under "/mnt/opt" | |
# (!!) Note we wipe out everything under opt first | |
sudo mkdir -p /mnt/opt | |
sudo rm -fr /opt | |
sudo ln -s /mnt/opt /opt | |
sudo mkdir -p /mnt/git | |
sudo chown -R fedora:fedora /mnt | |
cd /mnt/git | |
rm -fr devstack | |
git clone https://github.com/CiscoSystems/devstack.git | |
cd devstack | |
git checkout opendaylight | |
cp $FILE1 /mnt/git/devstack/local.conf | |
# I like to run "./stack.sh" in its own "screen", called "ODL-devstak". Note that "./stack.sh" creates its own scren called "stack" | |
screen -d -m -S ODL-devstack | |
screen -S ODL-devstack -p 0 -X stuff "./stack.sh 2>&1 | tee stack.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment