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
ForX - get forex quotes from the terminal

A command line tool for checking exchange rates between currencies, both crypto and fiat.

Gabe Banks 52 Dec 10, 2022
A simple command line dumper written in Python 3.

A simple command line dumper written in Python 3.

ImFatF1sh 1 Oct 10, 2021
Play WORDLE game in your terminal.

Wordle TUI Play WORDLE game in your terminal. The game will be kept the same as the Web version. Prerequisites Python 3.7+ Linux/MacOS (Windows is not

Frost Ming 61 Oct 30, 2022
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022
pls is a better ls for developers, pronounced /pliːz/ as in 'please'

pls is a better ls for developers. The "p" stands for ("pro" as in "professional"/"programmer") or "prettier". It works in a manner similar to ls, in

Dhruv Bhanushali 572 Dec 28, 2022
Pastekan adalah website paste kode / teks sederhana

Pastekan pastekan adalah website paste kode / teks sederhana. install pip install pastekan penggunaan pastekan myfile.txt atau echo "hi" | pastekan

Sekai Kode 1 Dec 24, 2021
PwnWiki command line searching tool & bindings written in Python

pwsearch PwnWiki 数据库搜索命令行工具。 安装 您可以直接用 pip 命令从 PyPI 安装 pwsearch: pip3 install -U pwsearch 您也可以 clone 该仓库并直接从源码启动

PwnWiki 20 Jun 21, 2021
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
Gitfetch is a simple tool to get github user details

Gitfetch Just a (cli?) tool to get github user details 🙂 Installation 📂 Install Gitfetch via pypi pip install gitfetch or pip install git+https://g

I'm Not A Bot #Left_TG 7 Jan 23, 2022
Investing library and command-line interface inspired by the Bogleheads philosophy

Lakshmi (Screenshot of the lak command in action) Background This project is inspired by Bogleheads forum. Bogleheads focus on a simple but powerful p

Sarvjeet Singh 108 Dec 26, 2022
Make tree planting a part of your daily workflow. 🌳

Continuous Reforestation Make tree planting a part of your daily workflow. 🌳 A GitHub Action for planting trees within your development workflow usin

protontypes 168 Dec 22, 2022
A simple file transfer tools, similar to rz / sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar

trzsz A simple file transfer tools, similar to rz/sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar. Why

561 Jan 05, 2023
Basic python tools to generate shellcode runner in vba

vba_bin_runner Basic python tools to generate shellcode runner in vba. The stub use ZwAllocateVirtualMemory to allocate memory, RtlMoveMemory to write

4 Aug 24, 2021
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 09, 2023
Because sometimes you need to do it live

doitlive doitlive is a tool for live presentations in the terminal. It reads a file of shell commands and replays the commands in a fake terminal sess

Steven Loria 3.2k Jan 09, 2023
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries

Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries. It automates the boring stu

Yash Bhardwaj 3 Sep 27, 2022
CLI for SQLite Databases with auto-completion and syntax highlighting

litecli Docs A command-line client for SQLite databases that has auto-completion and syntax highlighting. Installation If you already know how to inst

dbcli 1.8k Dec 31, 2022
Display Images in your terminal with python

A python library to display images in the terminal

Pranav Baburaj 57 Dec 30, 2022
Python Command Line Application (CLI) using Typer, SQLModel, Async-PostgrSQL, and FastAPI

pyflycli is a command-line interface application built with Typer that allows you to view flights above your location.

Kevin Zehnder 14 Oct 01, 2022