release 2.0: doc fixes

This commit is contained in:
bluxmit 2022-05-11 22:42:51 +00:00
parent 812f584824
commit 05c1e0dccf
18 changed files with 361 additions and 58 deletions

View file

@ -6,7 +6,7 @@
Containerized Linux environment for running jobs on schedule with browser-based scheduler, terminal and file manager.
You can host on your favourite Rasberry Pi.
Start
## Start
```
docker run --name space-1 --user=root -d -p 8020-8030:8020-8030 alnoda/base-workspace

View file

@ -2,13 +2,13 @@
This tutorial shows how to scrap Google news on schedule with Base Workspace.
Navigate to Quickstart and open Terminal
Workspace has full-size browser-base terminal, file manager, and task scheduler.
<p align="center">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/base-workspace-terminal.gif" alt="Terminal" width="500">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/base-workspace-terminal.gif?raw=true" alt="Terminal" width="500">
</p>
Install Python package GNews
Install Python package GNews, execute in terminal
```
pip install gnews
@ -44,12 +44,12 @@ python3 scraper.py
Navigate to Quickstart and Open file browser. View and download the output file
<p align="center">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/filebrowser-demo.gif" alt="Filebrowser" width="500">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/filebrowser-demo.gif?raw=true" alt="Filebrowser" width="500">
</p>
Schedule daily executions with Cronicle
<p align="center">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/cronicle-demo.gif" alt="Filebrowser" width="500">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/base-workspace/img/cronicle-demo.gif?raw=true" alt="Filebrowser" width="500">
</p>

View file

@ -7,7 +7,7 @@ USER root
COPY supervisord-codeserver.conf /etc/supervisord/
COPY ./mkdocs/helpers.py /home/docs/macros
COPY ./mkdocs/README.md /home/docs/docs/README.md
COPY docs/getting-started.md /home/docs/docs/getting-started.md
COPY ./mkdocs/IDE.jpg /home/docs/docs/assets/home/
COPY README.md /home/docs/docs/docs.md

View file

@ -2,9 +2,7 @@
## Intro
The main feature of the workspace is IDE, a browser-based VS-Code version. Often IDE alone is not enough for convenient software development.
In addition, workspace includes full-screen terminal, file manager, and task scheduler. This workspace is based on the Ubuntu 20 docker image,
with typical terminal applications, such as Git installed.
Workspace has browser-based VS-Code version with full-screen terminal, file manager, and task scheduler.
## Quicklaunch
@ -18,14 +16,7 @@ From the quicklaunch page you can open workspace tools, such as code editor or t
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/ide-workspace/img/wid-ui.png" alt="wid-ui.png" width="750">
</p>
## Code Editor
The main code editor of this workspace is [Code-server](https://github.com/cdr/code-server) - an open-source version of popular Visual Studio Code IDE.
despite Code-server is a browser-based code editor, it is fast, responsive, and full-featured. It features code highlighting, autocompletion,
rendering of notebooks has a tree-based file browser, and many color themes.
You can install any extension from [open-vsx.org](https://open-vsx.org/) that has hundreeds of extensions for VS Code compatible editors.
The IDE is already configured to make code highlighting for many programming languages and file types.
You can install any extension from [open-vsx.org](https://open-vsx.org/) that has hundreeds of extensions for VS Code compatible editors.
<div align="center" style="font-style: italic;">
Demo: Code-server
@ -35,8 +26,6 @@ The IDE is already configured to make code highlighting for many programming lan
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/codeserver-workspace/img/codeserver-demo.gif" alt="Code-server demo" width="900">
</p>
## Terminal
Workspace has full-size browser-base terminal
<p align="center">

View file

@ -6,7 +6,7 @@ FROM ${docker_registry}/ide-workspace:${image_tag}
USER root
COPY settings.json /home/abc/.theia/settings.json
COPY README.md /home/docs/docs/docs.md
COPY docs/getting-started.md /home/docs/docs/getting-started.md
RUN apt-get -y update \
# && echo "------------------------------------------------------ utils" \

View file

@ -110,13 +110,13 @@ Wait untill the cluster is fully ready, open Kibana on [http://localhost:5601](/
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/elasticsearch-workspace/img/Kibana-sample.png" alt="Kibana" width="750">
</p>
Open workspace UI [http://localhost:8020/](http://localhost:8020/) for quick access to all the workspace tools
Open Quickstart page [localhost:8020](http://localhost:8020/) for quick access to all the workspace tools
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/workspace-in-docker/img/wid-demo.gif" alt="WID demo" width="900">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/workspaces/ide-workspace/img/wid-ui.png?raw=true" alt="WID demo" width="900">
</p>
Open browser-based terminal [http://localhost:8026/](http://localhost:8026/), check cluster nodes and shards
Open browser-based terminal [localhost:8026](http://localhost:8026/), check cluster nodes and shards
```
vulcanizer --host es01 nodes
@ -140,14 +140,14 @@ elasticdump \
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/elasticsearch-workspace/img/elasticdump-demo.png" alt="elasticdump" width="750">
</p>
Open browser-based IDE [http://localhost:8026/](http://localhost:8026/) and create file `/home/project/export.sh` file with the script to export data to S3.
Open browser-based IDE [localhost:8026](http://localhost:8026/) and create file `/home/project/export.sh` file with the script to export data to S3.
Make it executable with `chmod +x /home/project/export.sh`.
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/elasticsearch-workspace/img/IDE-demo.png" alt="IDE" width="750">
</p>
Open browser-based Scheduler [http://localhost:8026/](http://localhost:8026/) (user/pass: admin/admin),
Open browser-based Scheduler [localhost:8026](http://localhost:8026/) (user/pass: admin/admin),
and schedule script, for example weekly. Select category - "general", plugin - "Shell Script"
<p align="center">

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 KiB

View file

@ -0,0 +1,37 @@
ARG docker_registry=docker.io/alnoda
ARG image_tag=2.0
FROM ${docker_registry}/codeserver-workspace:${image_tag}
USER root
COPY examples/example /home/abc/example
COPY docs/getting-started.md /home/docs/docs/getting-started.md
RUN apt-get -y update \
&& echo "------------------------------------------------------ java 8" \
&& sudo apt-get install -y openjdk-17-jre \
&& apt-get install -y openjdk-17-jdk \
&& echo "------------------------------------------------------ maven" \
&& wget https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz -P /tmp \
&& tar xf /tmp/apache-maven-3.8.5-bin.tar.gz \
&& mv apache-maven-3.8.5 /opt/maven \
&& rm /tmp/apache-maven-3.8.5-bin.tar.gz \
&& echo "------------------------------------------------------ gradle" \
&& wget https://services.gradle.org/distributions/gradle-7.4.2-bin.zip -P /tmp \
&& unzip -d /opt/gradle /tmp/gradle-7.4.2-bin.zip \
&& rm /tmp/gradle-7.4.2-bin.zip \
&& find /home -type d | xargs -I{} chown -R abc {} \
&& find /home -type f | xargs -I{} chown abc {}
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ \
M2_HOME=/opt/maven \
MAVEN_HOME=/opt/maven \
PATH="/opt/maven/bin:${PATH}"
ENV GRADLE_HOME=/opt/gradle/gradle-7.4.2 \
PATH="/opt/gradle/gradle-7.4.2/bin:${PATH}"
USER abc

View file

@ -4,6 +4,9 @@ ARG image_tag=2.0
FROM ${docker_registry}/codeserver-workspace:${image_tag}
USER root
COPY examples/example /home/abc/example
COPY docs/getting-started.md /home/docs/docs/getting-started.md
RUN apt-get -y update \
&& echo "------------------------------------------------------ java 8" \
&& sudo apt-get install -y openjdk-8-jre \
@ -16,7 +19,9 @@ RUN apt-get -y update \
&& echo "------------------------------------------------------ gradle" \
&& wget https://services.gradle.org/distributions/gradle-7.4.2-bin.zip -P /tmp \
&& unzip -d /opt/gradle /tmp/gradle-7.4.2-bin.zip \
&& rm /tmp/gradle-7.4.2-bin.zip
&& rm /tmp/gradle-7.4.2-bin.zip \
&& find /home -type d | xargs -I{} chown -R abc {} \
&& find /home -type f | xargs -I{} chown abc {}
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ \
M2_HOME=/opt/maven \

View file

@ -1,9 +1,64 @@
# Java workspace
<p align="center">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/img/Alnoda-white.svg" alt="Alnoda logo" width="150">
</p>
Java 8, [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/) dockerized together with browser-based VS_Code version.
# Java workspace
Docker image with Java and browser-based VS-Code version.
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/codeserver-workspace/img/codeserver-collage-sm.jpg" alt="Collage" width="750">
</p>
## Why this images
1. If you need self-hosted remote development environment.
2. If you need to be just one command away from coding in Java.
## Start
```
java -version
mvn -version
gradle -v
```
docker run --name space-1 -d -p 8020-8035:8020-8035 alnoda/java-workspace
```
and open [localhost:8020](http://localhost:8020) in browser.
## Features
- Java
- [Maven](https://maven.apache.org/)
- [Gradle](https://gradle.org/)
**Dev tools:**
- [**Eclipse Theia**](https://theia-ide.org/docs/) - open source version of popular Visual Studio Code IDE. Theia is trully open-source, has
VS-Code extensions and works in browser. This means it can run inside a docker container on local machine or in cloud. A lot of beautiful color themes and many common plugins are already installed to save time.
- [**Terminal**](https://github.com/tsl0922/ttyd) - secure browser-based terminal.
- [**FileBrowser**](https://github.com/filebrowser/filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace
- [**Cronicle**](https://github.com/jhuckaby/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**](https://github.com/vercel/serve) - view any static html sites as easy as if you do it on your local machine. Serve static websites easily.
- [**Ungit**](https://github.com/FredrikNoren/ungit) - rings user friendliness to git without sacrificing the versatility of it.
- [**MkDocs**](https://squidfunk.github.io/mkdocs-material/) - create awesome documentation for your project with only markdown.
- [**Midnight Commander**](https://midnight-commander.org/) - Feature rich visual file manager with internal text viewer and editor.
- [**Process Monitor**](https://htop.dev/) - Monitor running process and resource utilization.
- Quicklaunch UI with getting started tutorial
Image is built from **Ubuntu 20.4** with the additional CLI apps
- [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/)
- Python 3, Pip
- Node/nodeenv
- curl, wget, telnet, jq
- **Git:** git, git-flow, lazygit
- **File browsers:** mc, xplr
- **Text editors:** nano, vim, mcedit
- **System monitors:** ncdu, htop, glances, vizex
- **Process Control:** supervisord
- **Job scheduler:** cron
## Docs
See our guides on [**getting started**](docs/getting-started.md) and [**advanced features**](../ubuntu-workspace/docs/workspaces.md).

View file

@ -1,23 +0,0 @@
Open terminal and check Java version
```
java -version
```
Open IDE and create file `Main.java` with the following content
```
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
```
Use terminal to compile and execute
```
cd /home/project
javac Main.java
java Main
```

View file

@ -0,0 +1,130 @@
## Intro
To start, open Quickstart page [http://localhost:8020/](http://localhost:8020/) for quick access to all the tools
From the quicklaunch page you can open workspace tools, such as code editor or terminal
<div align="center" style="font-style: italic;">
Demo: Workspace UI
</div>
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/ide-workspace/img/wid-ui.png" alt="wid-ui.png" width="750">
</p>
The main code editor of this workspace is [Code-server](https://github.com/cdr/code-server)
<div align="center" style="font-style: italic;">
Demo: Code-server
</div>
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/codeserver-workspace/img/codeserver-demo.gif" alt="Code-server demo" width="900">
</p>
Workspace has full-size browser-base terminal
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/base-workspace/img/base-workspace-terminal.gif" alt="Base-Workspace terminal" width="750">
</p>
## Example
```
java -version
```
Open IDE and create file `Main.java` with the following content
```
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
```
Use terminal to compile and execute
```
cd /home/project
javac Main.java
java Main
```
## Maven
Maven helps with:
- Making the build process easy
- Providing a uniform build system
- Providing quality project information
- Encouraging better development practices
Check Maven version in terminal
```
mvn -v
```
Build Java code
```
cp -r /home/abc/example /home/project/example
cd /home/project/example
mvn compile
```
This will run Maven, telling it to execute the compile goal. When its finished, you should find the compiled .class files in the target/classes directory.
Run the package goal
```
mvn package
```
To execute the JAR file run
```
java -jar target/gs-maven-0.1.0.jar
```
*(taken from https://spring.io/guides/gs/maven/)*
# Gradle
Copy example project
```
cp -r /home/abc/example /home/project/example
cd /home/project/example
```
Check Gradle installation, run Gradle from the command-line
```
cd /home/project/example
gradle
```
Initialize Gradle
```
gradle init
```
Now that Gradle is installed, see what it can do
```
gradle tasks
```
Build project with Gradle
```
gradle build
```

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>gs-maven</artifactId>
<packaging>jar</packaging>
<version>0.1.0</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>hello.HelloWorld</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,7 @@
package hello;
public class Greeter {
public String sayHello() {
return "Hello world!";
}
}

View file

@ -0,0 +1,12 @@
package hello;
import org.joda.time.LocalTime;
public class HelloWorld {
public static void main(String[] args) {
LocalTime currentTime = new LocalTime();
System.out.println("The current local time is: " + currentTime);
Greeter greeter = new Greeter();
System.out.println(greeter.sayHello());
}
}

View file

@ -0,0 +1,42 @@
ARG docker_registry=docker.io/alnoda
ARG image_tag=2.0
FROM ${docker_registry}/ide-workspace:${image_tag}
USER root
COPY settings.json /home/abc/.theia/settings.json
COPY README.md /home/docs/docs/docs.md
RUN apt-get -y update \
&& echo "------------------------------------------------------ nodejs-17" \
&& curl -fsSL https://deb.nodesource.com/setup_17.x | bash - \
&& apt-get install -y nodejs \
&& apt-get install nodejs
&& echo "------------------------------------------------------ esbulk" \
&& cd /tmp && wget https://github.com/miku/esbulk/releases/download/v0.7.5/esbulk_0.7.5_amd64.deb \
&& apt install /tmp/esbulk_0.7.5_amd64.deb \
&& rm /tmp/esbulk_0.7.5_amd64.deb \
&& echo "------------------------------------------------------ elasticsearch-dump" \
&& npm install -g elasticdump@6.79.3 \
&& echo "------------------------------------------------------ vulkanizer" \
&& cd /tmp && wget https://github.com/github/vulcanizer/releases/download/v0.8.0/vulcanizer_0.8.0_Linux_i386.tar.gz \
&& tar -xzf /tmp/vulcanizer_0.8.0_Linux_i386.tar.gz \
&& chmod +x /tmp/vulcanizer \
&& mv /tmp/vulcanizer /usr/bin/vulcanizer \
&& rm /tmp/vulcanizer_0.8.0_Linux_i386.tar.gz \
&& echo "------------------------------------------------------ user" \
&& chown -R abc /home/docs \
&& chown -R abc /home/abc/utils \
&& chown -R abc /home/abc/installed-python-packages \
&& find /home -type d | xargs -I{} chown -R abc {} \
&& find /home -type f | xargs -I{} chown abc {}
USER abc

View file

@ -15,7 +15,7 @@ static server, job scheduler.
1. If you need isolated dev environment where you can code and install packages and apps without affecting the base operating system.
2. If you need self-hosted remote development environment.
3. If you want to get started with Python fast.
3. If you need to be just one command away from coding in Python.
## Start

View file

@ -34,7 +34,7 @@ You can install any extension from [open-vsx.org](https://open-vsx.org/) that ha
</div>
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/workspace-in-docker/img/theia.gif" alt="Theia demo" width="900">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/ide-workspace/img/theia.png" alt="Theia" width="750">
</p>
## Terminal