diff --git a/workspaces/base-workspace/Dockerfile b/workspaces/base-workspace/Dockerfile index 80a6a6d..c8e47f9 100755 --- a/workspaces/base-workspace/Dockerfile +++ b/workspaces/base-workspace/Dockerfile @@ -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} diff --git a/workspaces/base-workspace/README.md b/workspaces/base-workspace/README.md index c9c0376..4c5cb3d 100644 --- a/workspaces/base-workspace/README.md +++ b/workspaces/base-workspace/README.md @@ -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: diff --git a/workspaces/base-workspace/img/base-workspace.gif b/workspaces/base-workspace/img/base-workspace.gif new file mode 100644 index 0000000..8577153 Binary files /dev/null and b/workspaces/base-workspace/img/base-workspace.gif differ diff --git a/workspaces/base-workspace/mkdocs/docs/README.md b/workspaces/base-workspace/mkdocs/docs/README.md index 4ced905..2883ecb 100644 --- a/workspaces/base-workspace/mkdocs/docs/README.md +++ b/workspaces/base-workspace/mkdocs/docs/README.md @@ -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` diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home.md b/workspaces/base-workspace/mkdocs/docs/pages/home/home.md index 4de2d4d..330758c 100644 --- a/workspaces/base-workspace/mkdocs/docs/pages/home/home.md +++ b/workspaces/base-workspace/mkdocs/docs/pages/home/home.md @@ -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" } ] %} diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg new file mode 100644 index 0000000..03c56be Binary files /dev/null and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.png b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.png deleted file mode 100644 index f0a831a..0000000 Binary files a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Cronicle.png and /dev/null differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Filebrowser.png b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Filebrowser.png index f2e2385..f4b5700 100644 Binary files a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Filebrowser.png and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Filebrowser.png differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Htop.jpg b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Htop.jpg new file mode 100644 index 0000000..994bc13 Binary files /dev/null and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Htop.jpg differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/MC.jpg b/workspaces/base-workspace/mkdocs/docs/pages/home/home/MC.jpg new file mode 100644 index 0000000..9b0a92a Binary files /dev/null and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/MC.jpg differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Terminal.png b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Terminal.png differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.jpg b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.jpg differ diff --git a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.png b/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.png deleted file mode 100644 index 3e626ae..0000000 Binary files a/workspaces/base-workspace/mkdocs/docs/pages/home/home/Ungit.png and /dev/null differ diff --git a/workspaces/base-workspace/mkdocs/macros/helpers.py b/workspaces/base-workspace/mkdocs/macros/helpers.py index c0db95f..af11934 100644 --- a/workspaces/base-workspace/mkdocs/macros/helpers.py +++ b/workspaces/base-workspace/mkdocs/macros/helpers.py @@ -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 + } diff --git a/workspaces/base-workspace/supervisord-workspace-base.conf b/workspaces/base-workspace/supervisord-workspace-base.conf index e92ba34..b6e395d 100755 --- a/workspaces/base-workspace/supervisord-workspace-base.conf +++ b/workspaces/base-workspace/supervisord-workspace-base.conf @@ -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' " diff --git a/workspaces/workspace-in-docker/Dockerfile b/workspaces/workspace-in-docker/Dockerfile index 3dd8a5e..e7ec217 100644 --- a/workspaces/workspace-in-docker/Dockerfile +++ b/workspaces/workspace-in-docker/Dockerfile @@ -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 diff --git a/workspaces/workspace-in-docker/mkdocs/docs/README.md b/workspaces/workspace-in-docker/mkdocs/docs/README.md index 4ced905..9d5b02c 100644 --- a/workspaces/workspace-in-docker/mkdocs/docs/README.md +++ b/workspaces/workspace-in-docker/mkdocs/docs/README.md @@ -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` diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home.md b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home.md index 8718625..1a66c50 100644 --- a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home.md +++ b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home.md @@ -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" } ] %} diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.jpg b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.jpg new file mode 100644 index 0000000..03c56be Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.jpg differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.png b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.png deleted file mode 100644 index f0a831a..0000000 Binary files a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Cronicle.png and /dev/null differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Filebrowser.png b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Filebrowser.png index f2e2385..f4b5700 100644 Binary files a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Filebrowser.png and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Filebrowser.png differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Htop.jpg b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Htop.jpg new file mode 100644 index 0000000..994bc13 Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Htop.jpg differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/IDE.jpg b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/IDE.jpg new file mode 100644 index 0000000..0330ae5 Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/IDE.jpg differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/MC.jpg b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/MC.jpg new file mode 100644 index 0000000..9b0a92a Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/MC.jpg differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Terminal.png b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Terminal.png differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Theia.png b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Theia.png deleted file mode 100755 index ad5d5f4..0000000 Binary files a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Theia.png and /dev/null differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.jpg b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.jpg differ diff --git a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.png b/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.png deleted file mode 100644 index 3e626ae..0000000 Binary files a/workspaces/workspace-in-docker/mkdocs/docs/pages/home/home/Ungit.png and /dev/null differ diff --git a/workspaces/workspace-in-docker/mkdocs/macros/helpers.py b/workspaces/workspace-in-docker/mkdocs/macros/helpers.py index bb30fd0..2a48fee 100644 --- a/workspaces/workspace-in-docker/mkdocs/macros/helpers.py +++ b/workspaces/workspace-in-docker/mkdocs/macros/helpers.py @@ -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): """ diff --git a/workspaces/workspace-in-docker/mkdocs/mkdocs.yml b/workspaces/workspace-in-docker/mkdocs/mkdocs.yml index 389f974..916f378 100644 --- a/workspaces/workspace-in-docker/mkdocs/mkdocs.yml +++ b/workspaces/workspace-in-docker/mkdocs/mkdocs.yml @@ -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: ""