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
Command-line tool for looking up colors and palettes.

Colorpedia Colorpedia is a command-line tool for looking up colors, shades and palettes. Supported color models: HEX, RGB, HSL, HSV, CMYK. Requirement

Joohwan Oh 282 Dec 27, 2022
CLI client for FerrisChat

A CLI Client for @FerrisChat using FerrisWheel

FerrisChat 2 Apr 01, 2022
A CLI/Shell supporting OpenRobot API and more!

A CLI/Shell supporting JeyyAPI, OpenRobot API and RePI API.

OpenRobot Packages 1 Jan 06, 2022
Convert ACSM files to DRM-free EPUB files with one command on Linux

Knock Convert ACSM files to DRM-free EPUB files using one command. This software does not utilize Adobe Digital Editions nor Wine. It is completely fr

Benton Edmondson 622 Dec 09, 2022
This tool is a free and unlimited python CLI for google translate. based on google_trans_new.

GoTransPy A free and unlimited python CLI for google translate based on google_trans_new. It's very easy to use and solve the problem that the old api

Youssef Mohamed 2 Jan 10, 2022
Bear-Shell is a shell based in the terminal or command prompt.

Bear-Shell is a shell based in the terminal or command prompt. You can navigate files, run python files, create files via the BearUtils text editor, and a lot more coming up!

MichaelBear 6 Dec 25, 2021
Features terminal for python

Features Terminal V1.0 (23/10/2021) Um programa para linux com diferentes ferramentas! Recursos: Criador de QR code Gerador de senhas Teste de velocid

1 Oct 26, 2021
An easy-to-bundle GTK terminal emulator.

EasyTerm An easy-to-bundle GTK terminal emulator. This project is meant to be used as a dependency for other

Bottles 4 May 15, 2022
Simple Terminal Styling for Python

escape Escape is a very simple terminal styling library largely inspired by the excellent javascript chalk library. There are other terminal styling l

Syed Abbas 8 Sep 03, 2019
Access hacksec.in from your command-line

Access hacksec.in from your command-line

hacksec.in 3 Oct 26, 2022
Animefetch is an anime command-line system information tool written in python

Animefetch - v0.0.3 An anime command-line system information tool written in python. Description Animefetch is an anime command-line system informatio

Thadeuks 6 Jun 17, 2022
Autosub - Command-line utility for auto-generating subtitles for any video file

Auto-generated subtitles for any video Autosub is a utility for automatic speech recognition and subtitle generation. It takes a video or an a

Anastasis Germanidis 3.9k Jan 05, 2023
Command-line search tool for GitHub

cligh is a command-line search tool for GitHub.

1 Oct 02, 2022
Play videos in the terminal.

Termvideo Play videos in the terminal (stdout). python main.py /path/to/video.mp4 Terminal size: -x output_width, -y output_height. Default autodetect

Patrick 11 Jun 13, 2022
Proman is a simple tool for managing projects through cli.

proman proman is a project manager. It helps you manage your projects from a terminal. The features are listed below. Installation Step 1: Download or

Arjun Somvanshi 2 Dec 06, 2021
GoSearch for anything from your terminal

GoSearch for anything from your terminal Requirements pip install beautifulsoup4

Malik Mouhiidine 1 Oct 02, 2021
Todo - You could use terminal to set your todo

Python Tutorial You can learn how to build a terminal application(CLI applicatio

29 Jun 29, 2022
WazirX Portfolio Tracker on your Terminal!

If you have been investing in crypto in India, there is a very good chance that you are using WazirX. If you are using WazirX, then you definitely know that there is no P&L report, no green arrows no

Raunit 15 Jan 10, 2022
A CLI tool for using GLIDE to generate images from text.

Text-Glided-Diffusion Installation First clone this repository: git clone https://github.com/afiaka87/text-glided-diffusion.git cd text-glided-diffusi

Clay Mullis 68 Dec 30, 2022
Analyzing the most strategic words to guess on Wordle, based on letter frequency distributions

wordle-analysis Evaluating different heuristics to determine the most effective solving strategy and building an AI-powered assistant tool to help you

Sejal Dua 9 Feb 27, 2022