Configure An EdgeBox

From RifidiWiki

Jump to: navigation, search

This page explains how to configure a Rifidi Edge Box. It steps through the process of installing and configuring linux on a machine for the edge server to run on. It takes about 1 hour 30 min to complete.

Prepare a USB installer

  1. Download UNetbootin. This is a program that will automatically download Ubuntu's Net Installer and create a USB drive installer for you.
  2. Insert a blank USB key into your computer. Open UNetbootin. Select Ubuntu/9.04_NetInstall. Make sure you get the 32 bit version; don't get the 64 bit one.

Install and Configure Linux

  • Before you begin the installation, plug a monitor, keyboard, and ethernet cable into the Edge Box. For this installation, it is required that the Edge Box have access to the internet.
  • Turn the ebox on, and open up the BIOS configuration. Ensure that the ebox will boot from USB.
  • Insert the USB drive that you made in the previous step into the USB port. Restart the Edge Box.
  • Step through the Ubunutu installation wizard. Here is some important information about how to standardize the installation:
    • If the "Configure Network" step does not work, you may have the ethernet cable plugged in to the wrong port.
    • For the hostname use rifidi-ebox-#, where # is an id, such as 0.
    • When partitioning the disk, choose "guided partition, use entire disk". Make sure to select the hard drive and not the USB!
    • Make the full name "Rifidi"
    • Make the username "rifidi"
    • Make the password "rifidi"
    • Choose no automatic updates.
    • Choose to install OpenSSH server only.
  • After the installation is complete, remove the USB drive, and restart the Edge Box. Log into it using "rifidi/rifidi"
  • Install a text editor like VIm if you don't like nano.
sudo apt-get install vim
  • Now edit /etc/network/interfaces to look like this:
sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Use these two lines if you want DHCP
#auto eth0
#iface eth0 inet dhcp

#Use these lines if you want static
auto eth0
iface eth0 inet static
address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.1
  • To refresh the network changes, type this:
sudo ifdown eth0
sudo ifup eth0


Automatically Install Rifidi

There are some scripts that can be run to automate the process from this point forward. You can follow these instructions if you want to use them, or you can skip to the next section if you want to manually install Rifidi.

First, you want to download the zip file where the scripts exist. Make sure you download and unzip them to your home folder.

cd ~
sudo wget http://dl.dropbox.com/u/145150/rifidiscript.zip
sudo apt-get install unzip
unzip rifidiscript.zip

You will now see three scripts and a properties file:

  • rifidi.var - This is a properties file where you can set the location and file that you want to download and unzip. Can be left alone unless you want to manually change which version you want to download.
  • addrifidi.sh - This script automatically downloads and installs Rifidi to your system.
  • purgerifidi.sh - This script deletes Rifidi from the system.
  • upgraderifidi.sh - This script upgrades Rifidi to the latest version specified in the properties file.

If you want to install Rifidi to your ebox, you can do this:

sudo sh addrifidi.sh

and Rifidi Edge should automatically install to your system.

Manually Install Rifidi

If you want to manually install Rifidi on your ebox, these instructions should do the same thing as the automatic install:

  • Install java:
sudo apt-get install sun-java6-jre
  • Remove avahi-daemon for security reasons
sudo apt-get purge avahi-daemon

Install and Configure Edge Server

  • Copy the latest version of the Rifidi Edge Server into /home/rifidi
cd ~
sudo wget http://dl.dropbox.com/u/1513839/pramari/Rifidi-Edge-1.1.beta-3.zip
  • Unizp the server and move the rifidi folder to /usr/local/sbin
sudo apt-get install unzip
unzip Rifidi-Edge-1.1.beta-3.zip
cd Rifidi-Edge-1.1.beta-3
sudo mv rifidi /usr/local/sbin
  • Make rifidiserver an executable
cd /usr/local/sbin/rifidi
sudo chmod +x rifidiserver
  • Move the startup script to /etc/init.d
cd startupscript
sudo mv rifidiserver /etc/init.d
  • Now generate the symbolic links necessary for the init daemon to use the rifidiserver startup script when the system starts up:
cd /etc/init.d
sudo chmod 755 rifidiserver
sudo update-rc.d rifidiserver defaults
  • You can now start and stop the rifidi edgeserver like this:
sudo /etc/init.d/rifidiserver start
sudo /etc/inti.d/rifidiserver stop

You can edit the properties of the edge server in the rifidiserver.ini file in the /usr/local/sbin/rifidi folder. One important property that you don't change without knowing what you are doing is the osgi.console property. The osgi.console property opens up a telnet port at 2020 so that you can telnet into the server for administrative control. However, since telnet is not secure, the startup scripts blocks port 2020 from the outside. In order to access the osgi console, first ssh into the edge box, then telnet to localhost port 2020. If you need to change this port, you need to edit the startup script so that the new osgi console port is secured properly.

In order to open up access to the workbench over the network, set the rmi hostname and jms hostname to the address of the edge box (e.g. 192.168.1.125).

Personal tools