How-to: Setup an MLN Multi-User Environment
From SOFTICE
|
Pedagogical Objectives
- Configure a single MLN installation for use by multiple users.
Developed by:
Synopsis
Manage Large Networks (MLN) builds upon User Mode Linux to create virtual networks made up of virtual nodes. This paper's objective is to walk the reader through the process of configuring a single MLN installation for use by multiple users.
In this setup, any local user with read/write priviledges to their home directory, and read/execute priviledges to a shared directory which will be created will be able to configure, build, and fully use UML hosts on an MLN network. The local user will have root access to each of their hosts.
Using a multi-user setup allows for the administration of updates to be centralized, and for a significant amount of disk space to be saved.
Dependencies
- Perl
- uml-utilities
- bridge-utils
- screen
- sudo
bridge-utils is officially a dependency, however, it appears to only be needed for Xen based installations. SOFTICE uses UML, and is able to run MLN without bridge-utils present.
Single User Installation
Download and unpack the latest version of MLN:
wget http://mln.sourceforge.net/files/mln-latest.tar.gz tar xzf mln-latest.tar.gz
Run the setup process
cd mln-latest ./mln setup
During the setup process, you will be asked a series of questions. Accepting all of the defaults will give you a functional installation.
You should now have an executable named mln in your current directory. This is the mln Perl script, and can be run in the current directory, or copied or linked into a directory located in your path.
./mln
Configuring MLN for Multiple Users
Coming soon
The Installation Script
- Once MLN has been configured for multiple MLN users, copy the softice-net-setup script below into /usr/local/bin/, or some other publicly readable directory. This is the script that users will run to configure their accounts to use MLN.
#!/bin/bash
# setup new MLN users
# written by Matt Rideout mrideout *at* windserve *dot* com
cd ~ # change to home directory
# update PATH at login
if [ `cat .bash_profile | grep 'PATH=/home/sys/net/bin:"${PATH}"'` ]; then
echo '/home/sys/net/bin is already included in your PATH at login.'
else
echo "" >> .bash_profile
echo "if [ -d /home/sys/net/bin ] ; then" >> .bash_profile
echo ' PATH=/home/sys/net/bin:"${PATH}"' >> .bash_profile
echo "fi" >> .bash_profile
echo '/home/sys/net/bin is now included in your PATH at login. To activate, you can logout, then back in.'
echo ""
fi
# configure .mln
if [ -f .mln ] ; then
echo ".mln configuration file already exists - not modifying."
else
echo "templates /home/sys/net/mln/templates" >> .mln
echo "files $HOME/mln/files/$USER" >> .mln
echo "projects $HOME/mln/projects" >> .mln
echo "uml $HOME/mln/uml" >> .mln
echo "default_kernel /home/sys/net/bin/linux-2.6.18.1/linux" >> .mln
echo "default_modules /home/sys/net/bin/linux-2.6.18.1" >> .mln
echo "Finished setting up .mln configuration file."
fi
if [ -d mln ] ; then
echo "mln directory already exists - not populating."
else
mkdir -p mln/files/$USER mln/projects mln/uml
ln -s /home/sys/net/mln/mln_files mln/mln_files
echo "Finished populating mln directory."
fi
- Set the softice-net-setup script to be executable by all local users.
chmod 711 /usr/local/bin/softice-net-setup
Configuring Individual Accounts to use MLN
- Run the softice-net-setup script:
softice-net-setup
Starting up an MLN Network
Coming soon.

