mptools 2.3.0
Utility to create multipass virtual nodes
Loading...
Searching...
No Matches
Installing mptools

Note
We assume that multipass have already been installed, (see https://multipass.run/ for more details on how to install.) If you are on a OSX system and have homebrew installed the easiest way to install is to call brew install --cask multipass

It is recommended to download an official release (or use a tagged version in the repo) as there is no guarantee that the latest main branch is ready for deployment since that by definition is work in progress.

  1. Download the latest tar-ball mptools-x.y.z.tar.gz, e.g.
    % curl -LO https://github.com/johan162/mptools/releases/download/v2.3.0/mptools-2.3.0.tar.gz
  2. Unpack and install the package
    % tar xzf mptools-2.3.0.tar.gz
    % cd mptools-2.3.0
    % make install

The install step will also create customized cloud-init files that matches the current users public SSH keys.

Note: If curl is not installed wget could be used to download the package as so

% wget -q --show-progress https://github.com/johan162/mptools/releases/download/v2.3.0/mptools-2.3.0.tar.gz

The make install will install the scripts under /usr/local/bin . The get the shell autocompletion updated either the terminal have to restarted or call rehash to update the shell auto-completion hash.
 
In addition to installing the scripts the install target will also create a hidden directory in the current users home directory at ~/.mptools. In that directory a number of customized cloud-init files will be stored. These are customized with the current users public SSH key as well as also setting up user account with the same name as the current user in the created nodes.
 
This setup will then make it simple to ssh into the node for example as % ssh 192.168.yy.xx (where the IPv4 address is assigned to the node)
 

Note
The scripts can also be run directly from the downloaded package directory (e.g. mptools-2.3.0). The one thing to remember is that the script files are named with the *.sh suffix. When the package is installed the symlink is the basename of the script without this suffix to make it slightly easier to call the script.*

Changing install location

By default, the scripts will be installed using the prefix /usr/local for the installation directory. This means that the package will be installed under /usr/local/share and the binaries will be linked in /usr/local/bin.

This can be changed by adjusting the INSTALL_PREFIX makefile variable either permanently in the Makefile or as an override in the call to make. So for example, to install into /usr/share and /usr/bin, i.e using the prefix /usr the following invocation would be needed:

% make INSTALL_PREFIX=/usr install

Remember, the same prefix has to be used when uninstalling the package, i.e.

% make INSTALL_PREFIX=/usr uninstall