Skip to content

VM launch and configuration utility tools for scripting and automation

Notifications You must be signed in to change notification settings

mkaapu/vm-utility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vm-utility

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.

Setup

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.

Configuration

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.

Tools to enhance Multipass

The multipass directory contains bash scripts to extend the usability, scripting and automation possiblities of the Multipass tool.

mp-ssh

  • 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

mp-lauch

  • 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

Tools to setup Jenkins CI with VMs

The jenkins directory contains bash scripts to help to setup Jenkins CI with controller isolation and distributed build agents based on virtual machines.

launch-vm-jenkins

  • 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

launch-vm-agent

  • 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

Tools to enable remote login with SSH

The ssh directory contains bash scripts to enable automated remote login and command-line execution of SSH application.

make-ssh-tunnel

  • Creates a persistent SSH tunnel between servers as systemd service.
  • Documentation

rm-ssh-tunnel

About

VM launch and configuration utility tools for scripting and automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages