Secure self-hosted cloud IDE. Theia IDE workspaces secured with Keycloak.
292
The following script will start up all the necessary services on a docker host environment. Before running it you should:
Place SSL certificate and key files "tls.crt" and "tls.key" in a "~/.keycloak" folder (see later note if you need to generate your own self-signed certificate)
Change "my-host-name" in the script to the name of your docker host machine
Change the passwords in the script
docker network create cade docker volume create keycloak-data docker volume create cade-data docker run -d --net cade -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -v keycloak-data:/var/lib/postgresql/data --name keycloak-postgres postgres:11.1-alpine docker run -d --net cade -e POSTGRES_USER=cade -e POSTGRES_PASSWORD=password -v cade-data:/var/lib/postgresql/data --name cade-postgres postgres:11.1-alpine docker run -d --net cade -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=password -e KEYCLOAK_HOSTNAME=my-host-name -e DB_ADDR=keycloak-postgres -e DB_VENDOR=postgres -e DB_USER=keycloak -e DB_PASSWORD=password -v ~/.keycloak:/etc/x509/https -p 7443:8443 --name keycloak jboss/keycloak:6.0.0 docker run -d --net cade -e POSTGRES_USER=cade -e POSTGRES_PASSWORD=password -e SERVER_HOST=my-host-name -e KEYCLOAK_PORT=7443 -p 8080:8080 -p 8443:8443 -v ~/.keycloak:/keys -v /var/run/docker.sock:/var/run/docker.sock --name cade k25nick/cade:1.0.0-beta-6
TBD...(log into keycloak admin at https://my-host-name:7443, create a realm, create a client with the root URL "https://my-host-name:8443", set up authentication, make sure users have the role "user")
Access the web interface on https://my-host-name:8443
Please note that the first time you start a workspace it can take some time as it needs to pull the Theia docker image.
If you need to generate a self-signed certificate for testing purposes you can do this with the following command (replace "my-host-name" with the name of your host machine matching the one used in the above installation script):
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout tls.key -out tls.crt -subj '/CN=localhost' -addext 'subjectAltName=DNS:my-host-name,DNS:localhost,IP:127.0.0.1'
Please raise any issues on the gitlab project page: https://gitlab.com/k25nick/cade
Copyright © 2019 Nick Wilson [email protected]. All rights reserved.
Content type
Image
Digest
Size
225.1 MB
Last updated
over 7 years ago
docker pull k25nick/cade:1.0.0-beta-6