Skip to content

INTO-CPS-Association/workspace

Repository files navigation

Workspace

A new workspace image for DTaaS.

We are still very much in the explorative phase. Everything that is working is subject to change.

πŸ“¦ Pre-built Images

Pre-built Docker images are available from:

  • GitHub Container Registry: ghcr.io/into-cps-association/workspace:latest
  • Docker Hub: intocps/workspace:latest

You can pull the image directly:

# From GitHub Container Registry
docker pull ghcr.io/into-cps-association/workspace:latest

# From Docker Hub
docker pull intocps/workspace:latest

🦾 Build Workspace Image

If you want to build the image locally instead of using pre-built images, then:

Either
Using plain docker command:

docker build -t workspace:latest -f workspaces/Dockerfile.ubuntu.noble.gnome ./workspaces

Or using docker compose:

docker compose -f workspaces/test/dtaas/compose.yml build

πŸƒ Run it

Either
Using plain docker command:

docker run -d --shm-size=512m \
  -p 8080:8080 \
  -e MAIN_USER=user1 --name workspace  workspace:latest

πŸ‘‰ You can change the MAIN_USER variable to any other username of your choice.

πŸ§‘β€πŸ’» Use Services

An active container provides the following services. :warning: please remember to change user1 to the username (USERNAME1) set in the .env file.

Service Discovery

The workspace provides a /services endpoint that returns a JSON list of available services. This enables dynamic service discovery for frontend applications.

Example: Get service list for user1

curl http://localhost:8080/user1/services

Response:

{
  "desktop": {
    "name": "Desktop",
    "description": "Virtual Desktop Environment",
    "endpoint": "tools/vnc?path=user1%2Ftools%2Fvnc%2Fwebsockify"
  },
  "vscode": {
    "name": "VS Code",
    "description": "VS Code IDE",
    "endpoint": "tools/vscode"
  },
  "notebook": {
    "name": "Jupyter Notebook",
    "description": "Jupyter Notebook",
    "endpoint": ""
  },
  "lab": {
    "name": "Jupyter Lab",
    "description": "Jupyter Lab IDE",
    "endpoint": "lab"
  }
}

The endpoint values are dynamically populated with the user's username from the MAIN_USER environment variable.

🧹 Clean Up

Either
Using plain docker command:

docker stop workspace
docker rm workspace

πŸ”„ Deployment Options

This workspace supports multiple deployment configurations depending on your needs. All deployment-relevant files can be found in workspaces/test/dtaas/.

1. Standalone Development (Single User)

File: compose.yml
Use case: Local development, single user
Features: Basic workspace without reverse proxy
Documentation: SINGLE_USER.md

2. Multi-User Development (HTTP)

File: compose.traefik.yml
Use case: Multi-user development/testing without authentication
Features: Traefik reverse proxy, multiple workspaces
Documentation: TRAEFIK.md

3. Multi-User with OAuth2 (HTTP)

File: compose.traefik.secure.yml
Use case: Development/testing with OAuth2 authentication
Features: Traefik reverse proxy, OAuth2 authentication, HTTP only
Documentation: TRAEFIK_SECURE.md

4. Production Deployment (HTTPS + OAuth2)

File: compose.traefik.secure.tls.yml
Use case: Production deployment with full security
Features: Traefik reverse proxy, OAuth2 authentication, TLS/HTTPS
Documentation: TRAEFIK_TLS.md

Choose the configuration that best matches your deployment requirements.

πŸ“Š Deployment Comparison

Feature compose.yml compose.traefik.yml compose.traefik.secure.yml compose.traefik.secure.tls.yml
Reverse Proxy ❌ βœ… βœ… βœ…
Multi-user ❌ βœ… βœ… βœ…
OAuth2 Auth ❌ ❌ βœ… βœ…
TLS/HTTPS ❌ ❌ ❌ βœ…
Production Ready ❌ ❌ ❌ βœ…
Use Case Local dev Multi-user dev Secure dev/test Production

πŸ“¦ Publishing

For information about publishing Docker images to registries, see PUBLISHING.md.

Development

Code Quality

This project enforces strict code quality checks via GitHub Actions:

  • Dockerfile: Linted with hadolint - all errors must be fixed
  • Shell scripts: Checked with shellcheck - all warnings must be addressed
  • Python scripts: Linted with flake8 and pylint - all errors must be resolved
  • YAML files: Validated with yamllint - all issues must be corrected
  • Markdown files: Checked with markdownlint - all style violations must be fixed

All quality checks must pass before code can be merged. The workflows will fail if any linting errors are detected.

Configuration Files

Linting behavior is configured through:

  • .shellcheckrc - shellcheck configuration
  • .pylintrc - pylint configuration
  • .yamllint.yml - yamllint configuration
  • .markdownlint.yaml - markdownlint configuration

About

Workspace for Digital Twin as a Service

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •