Skip to content

Commit

Permalink
Improving 4fa2b07
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolinaFernandez committed Jan 17, 2014
1 parent 4fa2b07 commit 70b044c
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions install/flowvisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,46 @@

FLOWVISOR_RELEASE="1.4.0-1"

# 1. Obtain public key
# Obtain public repository key, install it, remove it
wget http://updates.onlab.us/GPG-KEY-ONLAB

# 2. Install the repository public key
apt-key add GPG-KEY-ONLAB
rm GPG-KEY-ONLAB

# 3. Add the following line to /etc/apt/sources.list (if not already there)
# Add the following line to /etc/apt/sources.list (if not already there)
if [ ! $(grep "deb http://updates.onlab.us/debian" /etc/apt/sources.list | grep -v "^#") ]; then
echo """# Release - the latest and greatest
deb http://updates.onlab.us/debian stable/
echo """
#
# FlowVisor at ON.LAB
#
## Release - the latest and greatest
deb http://updates.onlab.us/debian stable/
# Staging - what's coming next
deb http://updates.onlab.us/debian staging/
deb http://updates.onlab.us/debian staging/
# Nightly - the bleeding edge
deb http://updates.onlab.us/debian unstable/""" >> /etc/apt/sources.list
deb http://updates.onlab.us/debian unstable/""" >> /etc/apt/sources.list
fi

# 4. Update your apt database
# Update your apt database
apt-get update

# 5. Install chosen version of FlowVisor
# Install sudo package to be able to run some FlowVisor commands
apt-get install sudo
# Install chosen version of FlowVisor
apt-get install flowvisor=$FLOWVISOR_RELEASE

# 6. Modify to meet our requirements
# Generate new configuration and load it
if [ ! -f /etc/flowvisor/config.json ]; then
fvconfig generate /etc/flowvisor/config.json
fi
fvconfig load /etc/flowvisor/config.json

# Modify to meet our requirements
# Correct permissions in order to be able to pass this point and write to the DB
chown flowvisor:flowvisor /usr/share/db/flowvisor -R
chown flowvisor:flowvisor /etc/flowvisor -R
chmod 755 /usr/share/db/flowvisor/derby.log
# Modify log configuration to avoid writing on stdout
sed -i -e "s/log4j.rootCategory=WARN, system/#log4j.rootCategory=WARN, system\nlog4j.rootCategory=WARN/" /etc/flowvisor/fvlog.config
sed -i -e "s/^log4j.rootCategory=WARN, system/#log4j.rootCategory=WARN, system\nlog4j.rootCategory=WARN/" /etc/flowvisor/fvlog.config

# Start FlowVisor
/etc/init.d/flowvisor restart

0 comments on commit 70b044c

Please sign in to comment.