Python CLI vm manager for remote access of docker images via noVNC

Overview

vmman

__   ___ __ ___  _ __ ___   __ _ _ __  
\ \ / / '_ ' _ \| '_ ' _ \ / _' | '_ \ 
 \ V /| | | | | | | | | | | (_| | | | |
  \_/ |_| |_| |_|_| |_| |_|\__,_|_| |_|
                                         

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

Usage

usage: vmman [-h] [-start START] [-stop STOP] [-list]

Start given docker containers, and give url for novnc.

optional arguments:
  -h, --help    show this help message and exit
  -start START  Starts the given docker container and gives url for novnc
  -stop STOP    Stops the given docker container
  -list         Lists all docker VMs and their current state

Starting vm

#Starts container with # 0
vmman -start 0

If run correctly, you will then get something like this output

Starting Docker container 0 with ID 31602fa90aa9, getting VNC URL
NOTE: This url will only last for the current session, do not save this url or use it after you have stopped your container
URL for VNC access is: https://23........

If you click on the link, you should then be able to view the vm from your browser.

Stopping vm

#Stops container with # 0
vmman -stop 0

Listing all vms

#Lists containers
vmman -list

Installation

Before using vmman, a proper installation of docker is required on the host linux machine. In addition, Python 3 and pip3 are required. These should be installed by default on your server, but they can be installed below with the following:

sudo apt install -y python3
sudo apt install -y python3-pip

Once docker, is installed, you can create new docker containers for the image provided. Use this docker image, it has noVNC and Anaconda ready for ML remote development. You can load and start a new docker container with:

sudo docker run -p 6080:80 -v /dev/shm:/dev/shm dillhix/mangrove:0.5

Do this for how many containers you want to be able to connect to, changing the port for each container (6080 to 6081, etc).

Once the docker containers are setup, we can now get the id's with:

sudo docker ps -all

The output should look like this:

CONTAINER ID   IMAGE                  COMMAND         CREATED       STATUS                      PORTS     NAMES
31602fa90aa9   dillhix/mangrove:0.3   "/startup.sh"   5 hours ago   Exited (0) 33 minutes ago             kind_kepler

Next, copy over the container ID's of the containers that you want into the container_ids.cfg file with whatever # identifier you want that container to have. We do this step and manually get the IDs so we don't have the ability to start and stop containers that are not vm's for general use servers. This is useful for our server in particular because we will have web hosting and general usage ML training.

The resulting config file should then look like this

screenshot

[ids]
#Don't worry about this - this isn't a key, just the id for reference
0 = 31602fa90aa9 
1 = .....

Now, with everything installed, we can install vmman by going into the same directory as container_ids.cfg and vmman.py, and type:

sudo bash install.sh

We can then use vmman anywhere in the server.

Owner
UCSD Engineers for Exploration
Exploration through technology
UCSD Engineers for Exploration
A simple python script to execute a command when a YubiKey is disconnected

YubiKeyExecute A python script to execute a command when a YubiKey / YubiKeys are disconnected. ‏‏‎ ‎ How to use: 1. Download the latest release and d

6 Mar 12, 2022
Bryce Geiser 4 Aug 04, 2022
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 09, 2022
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

UCSD Engineers for Exploration 1 Nov 29, 2021
Wordle breaker: A CLI tool to help you solve Wordle

Wordle Breaker A CLI tool to help you solve Wordle I decided to code a solution

Alex 4 Apr 27, 2022
A simple and easy-to-use CLI parse tool.

A simple and easy-to-use CLI parse tool.

AbsentM 1 Mar 04, 2022
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applicatio

Trevor White 69 Oct 24, 2022
gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases.

gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases. gget consists of a collection of separate but interoperable modules, each des

Pachter Lab 570 Dec 29, 2022
A simple command line dumper written in Python 3.

A simple command line dumper written in Python 3.

ImFatF1sh 1 Oct 10, 2021
CLI tool to computes CO2 emissions of HPC computations following green-algorithms.org methodology

gqueue gqueue is a CLI (command line interface) tool that computes carbon footprint of HPC computations on clusters running slurm. It follows the meth

4 Dec 10, 2021
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

37 Dec 15, 2022
Joji convert a text to corresponding emoji if emoji is available

Joji Joji convert a text to corresponding emoji if emoji is available How it Works ? 1. There is a json file with emoji names as keys and correspondin

Gopikrishnan Sasikumar 28 Nov 26, 2022
3DigitDev 29 Jan 17, 2022
A command line connect 4 game against a minimax agent.

A command line connect 4 game against a minimax agent.

1 Oct 17, 2021
PipeCat - A command line Youtube music player written in python.

A command line Youtube music player written in python. It's an app written for Linux. It also supports offline playlists that are stored in a

34 Nov 27, 2022
A library for creating text-based graphs in the terminal

tplot is a Python package for creating text-based graphs. Useful for visualizing data to the terminal or log files.

Jeroen Delcour 164 Dec 14, 2022
Themes for Windows Terminal

Windows Terminal Themes Preview and copy themes for the new Windows Terminal. Use the project at windowsterminalthemes.dev How to use the themes This

Tom 1.1k Jan 03, 2023
Command-line script to upload videos to Youtube using theYoutube APIv3.

Introduction Command-line script to upload videos to Youtube using theYoutube APIv3. It should work on any platform (GNU/Linux, BSD, OS X, Windows, ..

Arnau Sanchez 1.9k Jan 09, 2023
🦎 A NeoVim plugin for highlighting visual selections like in a normal document editor!

🦎 HighStr.nvim A NeoVim plugin for highlighting visual selections like in a normal document editor! Demo TL;DR HighStr.nvim is a NeoVim plugin writte

Pocco81 222 Jan 03, 2023
split-manga-pages: a command line utility written in Python that converts your double-page layout manga to single-page layout.

split-manga-pages split-manga-pages is a command line utility written in Python that converts your double-page layout manga (or any images in double p

Christoffer Aakre 3 May 24, 2022