A Guacamole Extention, which listens for authentications and provides docker containers on demand.
Guacamole Docker Manager derived from the use case to provide container, such as rdesktop, to users on-demand. However, managing containers on the terminalserver is a bit tricky, so that is why we implemented this extension. The sequence diagramm below shows the intended workflow:
sequenceDiagram
actor User
User->>+Guacamole: Authenticate
Guacamole->>Guacamole: Get configuration
Guacamole->>+Docker Host: Request running containers
Docker Host-->>-Guacamole: Response running containers
alt not exists
Guacamole->>Docker Host: Create container
end
Guacamole->>-Docker Host: Connect
cd guacamole-docker-manager
mvn clean compile assembly:single
---
- name: Deploy Docker extension
hosts: guacamole
become: true
gather_facts: false
tasks:
- name: upload jar
ansible.builtin.copy:
src: ./guacamole_ext_docker-manager/guacamole-docker-manager/target/guacamole-docker-manager-1.0-SNAPSHOT-jar-with-dependencies-and-exclude-classes.jar
dest: /etc/guacamole/extensions/guacamole-docker-manager.jar
- name: Restart Tomcat
ansible.builtin.service:
name: tomcat9
state: restarted
docker-extension-image
: Docker image that is started during connection (IMPORTANT: The image has to available, an auto-pull feature has not been implemented so far).docker-extension-exposed-port
: The exposed port of the image. Default:3389
docker-extension-cert
: Certification path to connect to Docker host, see Docker remote configuration for more information.docker-extension-additional-env
: Additional environment variables to pass to Docker container, formatVAR_NAME=VAR_VALUE,VAR_NAME=VAR_VALUE,...
Each user needs a created connection in Guacamole, so that our extension can provide the container during connection.
hostname=1.1.1.1
password=...
port=....
username=...
- Maven
3.8.6
- Jave
1.8
- Guacamole
1.4.0