mc, htop to be on web ui. workspace-in-docker:18.04-0.4

This commit is contained in:
vadoli 2021-08-01 21:46:20 +00:00
parent 3a48d5a372
commit c0f136e26b
30 changed files with 122 additions and 32 deletions

View file

@ -1,5 +1,5 @@
ARG docker_registry=docker.io/alnoda
ARG image_tag=18.04-0.5
ARG image_tag=18.04-0.7
FROM ${docker_registry}/ubuntu-workspace:${image_tag}

View file

@ -2,8 +2,25 @@
# Base-workspace
Base-Workspace is an enhanced docker image with Ubuntu and additional tools set up in order to develop applications directly inside docker container,
and have your dependencies, configuration and credential files, ssh keys and data isolated from other environments.
Base-Workspace - is an attemp to use docker as a light-weight Virtual Machine with batteries included, which is intended to be used
entirely through WEB-based interfaces - its own WEB-UI, WEB-based terminal, filebrowser, visual scheduler and other.
> TL;DR
> You can provide your users with many virtual environments, manage just one server, and have no hassle with server configuration.
Because Ddocker is not completely suitable to serve this purpose, Base-Workspace tries to cover some of the shortcomings: it has cron set up, supervisord, allows to start multiple processes
inside the same container, has docker-in-docker, and some other applications installed, such as Git, Gitflow, wget, nano, vim etc.
In addition Base-Workspace has some applications with WEB-UI, which make it easier to scheddule and monitor job executions, browse and
exchange files, work with terminal, monitor resources and processes running inside the docker container.
For convenience, Base-workspace has its own WEB UI, which you can use to quickly open in browser the UIs of the applications
running inside the workspace.
![base-workspace-presentation](./img/base-workspace.gif)
Base-Workspace can be used as isolated environment on local machine, or as alternative to VM on the cloud server. It can run as root,
or as default **abc** user that is allowed to use *apt-get*.
## Contents
@ -31,24 +48,36 @@ and have your dependencies, configuration and credential files, ssh keys and dat
## Use-cases
Base-Workspace was created as an intermediary step between `ubuntu-workspace` that has only terminal-based tools
and `workspace-in-docker` that includes a set of WEB-UI tools which trannsform docker into the full-power development
environment.
VMs are great, but they are too heavy and require way too much resources, even more than enhanced docker containers like this one. There exist
cases when we need isolation as in VMs, but not all the features and security of VMs. Hence there is no need to pay extra price.
Base-workspace does not include IDE, and serves as a building base for other workspaces with different IDEs.
A typical example of such use cases are virtual environments to run background jobs, check liveness of services or websites, do all kind of checks,
schedule maintenance tasks, have cli to a database, run internal non-critical services, launch WEB-scrapping applications, generate reports,
run ETL scripts and many others.
Since these jobs are owned by multiple users we need some kind of isolation. Running separate servers for every user would be too cost-inefficient.
Most periodic tasks utilize compute resources from time to time, and running the server all the time would be such a waste. It makes more sense
to have one server where all these virtual environments are running. Aslo it easier for sysops to monitor and maintain a single server.
Base-workspace is a way to provide isolated environments on a shared server, which is used by multiple users. It is more resource-efficient than VM,
it is secure (if running under defualit user), and it is convenient to use, becuause Base-workspace is bootstrapped with many commonly used applications,
it has WEB-UI, and users work with it entirely through browser.
## Features
Being an extension of [ubuntu-workspace-in-docker](https://github.com/Alnoda/ubuntu-workspace-in-docker) this image has all the features that
Being an extension of [ubuntu-workspace-in-docker](https://github.com/Alnoda/ubuntu-workspace-in-docker), this image has all the features that
ubuntu-workspace has.
Workspace includes several open-source tools with Web GUI:
Workspace includes several open-source tools with browser-based GUI:
- [**FileBrowser**](./features.md#filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace
- **Terminal** - Full-fledged browser-based terminal with Z-shell.
- [**Cronicle**](./features.md#cronicle) - task scheduler and runner, with a web based front-end UI. It handles both scheduled, repeating and on-demand jobs, targeting any number of worker servers, with real-time stats and live log viewer.
- [**Static File Server**](./features.md#static-file-server) - view any static html sites as easy as if you do it on your local machine. Serve static websites easily.
- [**Ungit**](./features.md#ungit) - rings user friendliness to git without sacrificing the versatility of it.
- [**MkDocs**](./docs.md) - create documentation for your workspace or project with only markdown.
- **Midnight Commander** - Feature rich visual file manager with internal text viewer and editor.
- **Process Monitor** - Monitor for running process and resource utilization.
Despite having WEB UI tools, Base-Workspace does not include IDE. This workspace serves eitehr of 2 use-cases:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 MiB

View file

@ -1,12 +1,15 @@
**This is a starting point to create docs for this workspace!**
In order to change this page, simply modify the file `/home/docs/docs/README.md`. Changes will be applied automatically.
> Don't neglect documenting your workspace! Soon you will forgot what you were doing with it.
> This page is designed for you to modify it and write down everything you need to know next time you come here.
In order to change this page, simply modify the file `/home/docs/docs/README.md`. Changes will be applied automatically - the
server that serves this page has live reload.
In order to add a new doc file, it is enough to create a file in the folder `/home/docs/docs` and add respective entry
to the configuratiion file `/home/docs/mkdcs.yaml`.
For example, [enter the terminal in the workspace](get-started.md#workspace-terminal),
and create new documentation file with some text at your will, and save changes
Open workspace terminal, and create new documentation file with some text at your will, and save changes
> `nano /home/docs/docs/new.md`

View file

@ -24,6 +24,10 @@
.tool-img{
box-shadow: rgba(0, 0, 0, 0.24) 0px 5px 5px;
border-radius: 5px;
min-width: 300px;
max-width: 300px;
max-height: 170px;
min-height: 170px;
}
.tool-caption{
font-family: Roboto, Helvetica, sans-serif;
@ -50,22 +54,28 @@
{%
set tools = [
{
"env": "TERMINAL_URL",
"name": "Terminal",
"image": "Terminal.png",
"description": "Full-fledged WEB-based Command Line Interface"
},
{
"env": "FILEBROWSER_URL",
"name": "File Browser",
"image": "Filebrowser.png",
"description": "Browse files inside running docker container. Upload and download files and folders to and from your Workspace, no matter where your Workspace is running: on local or in cloud"
"description": "Browse, upload and download files and folders to and from the Workspace"
},
{
"env": "CRONICLE_URL",
"name": "Cronicle",
"image": "Cronicle.png",
"description": "Schedule jobs, tasks and bacground scripts. Powerful tool to manage schedules, observe and monitor executions."
"image": "Cronicle.jpg",
"description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)"
},
{
"env": "UNGIT_URL",
"name": "Ungit",
"image": "Ungit.png",
"image": "Ungit.jpg",
"description": "Manage Git repositories and work flow using beautiful UI"
},
{
@ -73,6 +83,18 @@
"name": "Static File Server",
"image": "Static-server.png",
"description": "Serve any static websites like a breeze"
},
{
"env": "MC_URL",
"name": "M.Commander",
"image": "MC.jpg",
"description": "Feature rich visual file manager with internal text viewer and editor"
},
{
"env": "HTOP_URL",
"name": "Resource monitor",
"image": "Htop.jpg",
"description": "Monitor running process and resource utilization"
}
]
%}

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 KiB

View file

@ -9,7 +9,11 @@ port_increments = {
"FILEBROWSER_URL": 1,
"STATICFS_URL": 2,
"CRONICLE_URL": 3,
"UNGIT_URL": 4}
"UNGIT_URL": 4,
"TERMINAL_URL": 6,
"MC_URL": 7,
"HTOP_URL": 8
}

View file

@ -5,7 +5,6 @@ stderr_logfile = /var/log/mkdocs/mkdocs-stderr.log
stdout_logfile = /var/log/mkdocs/mkdocs-stdout.log
logfile_maxbytes = 1024
[program:filebrowser]
directory=/opt/filebrowser
command=/bin/sh -c " filebrowser "
@ -36,6 +35,13 @@ stderr_logfile = /var/log/ungit/ungit-stderr.log
stdout_logfile = /var/log/ungit/ungit-stdout.log
logfile_maxbytes = 1024
[program:mc]
directory=/
command=/bin/sh -c " export TERM=xterm; export EDITOR=mcedit; ttyd -p 8027 /bin/zsh -c '/usr/bin/mc' "
[program:htop]
directory=/usr/bin
command=/bin/sh -c " export TERM=xterm; ttyd -p 8028 /bin/zsh -c '/usr/bin/htop' "

View file

@ -1,7 +1,7 @@
ARG docker_registry=docker.io/alnoda
ARG image_tag=18.04-0.5
ARG image_tag=18.04-0.6
## Images used:
ARG BUILD_IMAGE=node:12.18.3

View file

@ -1,12 +1,15 @@
**This is a starting point to create docs for this workspace!**
In order to change this page, simply modify the file `/home/docs/docs/README.md`. Changes will be applied automatically.
> Don't neglect documentation for your workspace! Soon you will forget what you were doing with it.
> This page exists for you to modify it, and write down everything you need to know next time you come here.
In order to change this page, simply modify the file `/home/docs/docs/README.md`. Changes will be applied automatically - the
server that serves this page has live reload.
In order to add a new doc file, it is enough to create a file in the folder `/home/docs/docs` and add respective entry
to the configuratiion file `/home/docs/mkdcs.yaml`.
For example, [enter the terminal in the workspace](get-started.md#workspace-terminal),
and create new documentation file with some text at your will, and save changes
Open workspace terminal, and create new documentation file with some text at your will, and save changes
> `nano /home/docs/docs/new.md`

View file

@ -24,6 +24,10 @@
.tool-img{
box-shadow: rgba(0, 0, 0, 0.24) 0px 5px 5px;
border-radius: 5px;
min-width: 300px;
max-width: 300px;
max-height: 170px;
min-height: 170px;
}
.tool-caption{
font-family: Roboto, Helvetica, sans-serif;
@ -53,25 +57,31 @@
{
"env": "IDE_URL",
"name": "IDE",
"image": "Theia.png",
"description": "Powerful WEB-based IDE. Open source version of Visual Studio Code. Develop code in any language, install thousands of extensions or work in terminal directly from IDE"
"image": "IDE.jpg",
"description": "Browser-based version of Visual Studio Code. Develop in any language, install hundreeds of extensions"
},
{
"env": "TERMINAL_URL",
"name": "Terminal",
"image": "Terminal.png",
"description": "Full-fledged browser-based terminal with Z-shell"
},
{
"env": "FILEBROWSER_URL",
"name": "File Browser",
"image": "Filebrowser.png",
"description": "Browse files inside running docker container. Upload and download files and folders to and from your Workspace, no matter where your Workspace is running: on local or in cloud"
"description": "Browse, upload and download files and folders to and from the Workspace"
},
{
"env": "CRONICLE_URL",
"name": "Cronicle",
"image": "Cronicle.png",
"description": "Schedule jobs, tasks and bacground scripts. Powerful tool to manage schedules, observe and monitor executions."
"image": "Cronicle.jpg",
"description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)"
},
{
"env": "UNGIT_URL",
"name": "Ungit",
"image": "Ungit.png",
"image": "Ungit.jpg",
"description": "Manage Git repositories and work flow using beautiful UI"
},
{
@ -79,6 +89,18 @@
"name": "Static File Server",
"image": "Static-server.png",
"description": "Serve any static websites like a breeze"
},
{
"env": "MC_URL",
"name": "M.Commander",
"image": "MC.jpg",
"description": "Feature rich visual file manager with internal text viewer and editor"
},
{
"env": "HTOP_URL",
"name": "Process monitor",
"image": "Htop.jpg",
"description": "Monitor running process and resource utilization"
}
]
%}

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 KiB

View file

@ -10,11 +10,12 @@ port_increments = {
"STATICFS_URL": 2,
"CRONICLE_URL": 3,
"UNGIT_URL": 4,
"IDE_URL": 5
"TERMINAL_URL": 6,
"IDE_URL": 5,
"MC_URL": 7,
"HTOP_URL": 8
}
# this function name should not be changed
def define_env(env):
"""

View file

@ -12,7 +12,7 @@ nav:
# CONFIGURATION
# ===========================================================
site_name: Base Workspace
site_name: My Workspace
repo_url: https://github.com/Alnoda/workspaces-in-docker/tree/main/workspaces/base-workspace
site_url: https://alnoda.org
edit_uri: ""