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
Tstock - Check stocks from the terminal

tstock - Check stocks from the terminal! 📈 tstock is a tool to easily generate stock charts from the command line. Just type tstock aapl to get a 3 m

Gabe Banks 502 Dec 30, 2022
A webmining CLI tool & library for python.

minet is a webmining command line tool & library for python (= 3.6) that can be used to collect and extract data from a large variety of web sources

médialab Sciences Po 165 Dec 17, 2022
RSS reader client for CLI (Command Line Interface),

rReader is RSS reader client for CLI(Command Line Interface)

Lee JunHaeng 10 Dec 24, 2022
A minimal ascii-representation of your local weather.

Ascii-Weather A simple, ascii-based weather visualizer for the terminal. The ascii-art updates to match the current weather and conditions. Uses ipinf

Aaron R. 12 Jan 29, 2022
pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo

pyGinit pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo Requirements Requirements be

AlphaBeta 15 Feb 26, 2022
CLI tool for typescript tasks & migrations

typed CLI tool for typescript tasks & migrations Installation Usage $ typed --list Subcommands: bootstrap 🔨 Bootstrap your environment for TypeS

Lob 1 Nov 15, 2021
Command line util for grep.app - Search across a half million git repos

grepgithub Command line util for grep.app - Search across a half million git repos Grepgithub uses grep.app API to search GitHub repositories, providi

Nenad Popovic 18 Dec 28, 2022
Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

CalvinLoke 186 Dec 01, 2022
command line tool for frequent nmigen tasks (generate sources, show design)

nmigen-tool command line tool for frequent nmigen tasks (generate sources, show design) Usage: generate verilog: nmigen generate verilog nmigen_librar

Hans Baier 8 Nov 27, 2022
frogtrade9000 - a command-line Rich client for the freqtrade REST API

frogtrade9000 - a command-line Rich client for the freqtrade REST API I found FreqUI too cumbersome and slow on my Raspberry Pi 400 when running multi

Robert Davey 79 Dec 02, 2022
LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

Jannis Zahn 7 Jun 21, 2022
A simple command line virtual operating system, written in python

Virtual operating system A simple virtual operating system written in python. (Under development). Currently, the following commands are supported: Co

B.Jothin kumar 7 Nov 15, 2022
A Reverse Shell Python Packages

A Reverse Shell Python Packages

1 Nov 03, 2021
Another (unofficial) Qt CLI Installer on multi-platforms

Another Qt installer(aqt) Release: Documentation: Test status: and Coverage: This is a utility alternative to the official graphical Qt installer, for

Hiroshi Miura 528 Jan 02, 2023
An ZFS administration tool inspired on Midnight commander

ZC - ZFS Commander An ZFS administration tool inspired on Midnight commander Work in Progress Description ZFS Commander is a simple front-end for the

34 Dec 07, 2022
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

Junegunn Choi 30.2k Jan 08, 2023
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

Fabian Keller 132 Dec 27, 2022
A selfbot made with DPY, doesn't have much commands but there's some useful commands to use.

Phantom Selfbot A selfbot made in DPY, made by Zenith. How to use Add your token in token = 'YOUR-MOMS-TOKEN-HERE' Change the prefix in prefix = If

[Ͼ⁴] Ƶephyr 2 Dec 02, 2021
Display Images in your terminal with python

A python library to display images in the terminal

Pranav Baburaj 57 Dec 30, 2022
This is a repository for collecting global custom management extensions for the Django Framework.

Django Extensions Django Extensions is a collection of custom extensions for the Django Framework. Getting Started The easiest way to figure out what

Django Extensions 6k Jan 03, 2023