This repository is just a collection of VM launch and configuration utility tools for scripting and automation. Scripts are written in Bash and tested on Ubuntu Linux distributions. Note that some of the tools need to be exectuted either with superuser privileges or as root user to complete some administrative commands.
When executed without arguments, the setup script will make symbolic links to the executable VM-utility tools in /usr/bin/local so they will be available for all users and other tools.
To clone and install tools, run:
git clone https://github.com/mkaapu/vm-utility.git
sudo vm-utility/setup
You may also give a directory path as an argument to the setup tool, and then add that directory to your PATH to make the tools available. So this would work with scripts:
git clone https://github.com/mkaapu/vm-utility.git
vm-utility/setup /mytooldir/vm-utility
export PATH="/mytooldir/vm-utility:$PATH"
The setup tool can be executed more interactively with -i option which allow prompt before removing any existing files/links in the destination directory.
The vm-config tool will set up the envrionment for the current user, but you should be able to use the VM-utility tools without further configuration steps after an initial setup. The first VM-utility tool used, which needs that configured environment, calls the vm-config script to set it automatically.
Your VM-utility environment and configuration files will be stored in your own ~/.vmu directory.
The multipass directory contains bash scripts to extend the usability, scripting and automation possiblities of the Multipass tool.
- Enables SSH connection to a Multipass instance from the host machine.
- Can be used to set a static IP address to a multipass instance.
- Provides a minimal interface suitable for use by other shell scripts and automation tools.
- Documentation
- Enables creation of a Multipass instance with a static IP address and SSH connection from the host machine without extra manual steps.
- Provides a minimal interface suitable for use by other shell scripts and automation tools.
- Documentation
The jenkins directory contains bash scripts to help to setup Jenkins CI with controller isolation and distributed build agents based on virtual machines.
- Creates a Ubuntu LTS VM and prepares it as a Jenkins server.
- Installs Docker to the VM
- Runs a Docker in Docker container in order to execute Docker commands inside Jenkins nodes on the VM
- Runs a Docker container hosting a Jenkins controller with Blue Ocean plugins and features on the VM
- Enables accessing Jenkins GUI through a local port of the host.
- Documentation
- Creates a Ubuntu LTS VM and prepares it as a Jenkis agent.
- Installs Java JDK 17 to the VM.
- Enables logging into the VM using SSH tunnel through a local port of the host.
- Documentation
The ssh directory contains bash scripts to enable automated remote login and command-line execution of SSH application.
- Creates a persistent SSH tunnel between servers as systemd service.
- Documentation
- Removes a SSH tunnel and systemd service created by the make-ssh-tunnel
- Documentation