2024-01-23 20:33:35 +00:00
# Docker deployment of IdHub and tools
2023-10-10 08:07:46 +00:00
2024-01-23 20:30:22 +00:00
## About the pilots that this repository deploys
2023-10-31 10:00:08 +00:00
2024-01-23 20:30:22 +00:00
- xo9b:
- motivation: one idhub connects to the other using OIDC4VP flow
- components: idhub1, idhub2
- setem:
- motivation: a user from org 1 connects to org 2 to get a discount code
- components: idhub1, idhub2
- lafede:
- motivatiion: a user gets a verifiable credential presentation from idhub, optionally could be signed also using EIDAS1
- components: idhub1
- pangea:
- motivation:
- a user from org 1 connects to org 1 services
- a user from org 1 connects to org 2 services
- components: idhub1, idhub2, goauthentik services, orchestra (with also nginx api rproxy), musician
- test: intended for software quality such as testing, CI/CD, etc.
2023-11-03 09:16:42 +00:00
2024-01-23 20:30:22 +00:00
## Installation
2023-11-03 09:16:42 +00:00
2024-01-23 20:30:22 +00:00
Considering debian stable distribution (Debian 12 bookworm)
2023-10-31 10:00:08 +00:00
2024-01-23 20:32:01 +00:00
- docker: [install using the convenience script ](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script )
2024-01-23 20:30:22 +00:00
- make: some of the actions are declared in `Makefile` , you will need `sudo apt install make` .
- figlet: display large texts, better visibility when running all the pilots together `sudo apt install figlet` .
2023-10-31 10:00:08 +00:00
2024-01-23 20:30:22 +00:00
## Deployment
2023-10-10 08:07:46 +00:00
2024-01-23 20:30:22 +00:00
Execute `./build__all.sh` to run all the pilots, that includes building locally all the docker images and deploying its docker compose (each pilot has its `docker-compose__pilot-example.yml` ).
2023-10-10 08:07:46 +00:00
2024-01-23 20:30:22 +00:00
Or run a specific pilot with `./build__pilot-example.sh` .
All the scripts are written in POSIX Shell. I hope they are easy enough and structured to be adapted to your needs.
2023-10-10 08:07:46 +00:00
2024-01-23 20:30:22 +00:00
## Development
You can use these docker images for developing the software. This repo is targeted on integrating, deploying and testing the IdHub tools. You can do the same with the other tools, the trick used is to override the docker's directory with a local directory. Example found on all pilots instances
2023-10-10 08:07:46 +00:00
2024-01-23 20:32:41 +00:00
```yaml
2024-01-23 20:30:22 +00:00
volumes:
- ./idhub1__pilot-example:/opt/idhub
2023-10-10 08:07:46 +00:00
```
2024-01-23 20:30:22 +00:00
If you are developing IdHub, all the instances generate a copy of the target repository such as `idhub1__pilot-example` , which you can modify there, and the changes will apply to the deployment
In the `.env` there are some variables intended to be used for debugging purposes
### Commands that you might like
2023-10-10 08:07:46 +00:00
if you want to enter a shell inside a new container:
2024-01-23 20:32:41 +00:00
```sh
2023-10-10 08:07:46 +00:00
docker run -it --entrypoint= ${target_docker_image} bash
```
if you want to enter a shell on already running container:
2024-01-23 20:32:41 +00:00
```sh
2023-10-10 08:07:46 +00:00
docker exec -it ${target_docker_image} bash
```
2024-01-23 20:30:22 +00:00
Where `target_docker_image` contains the ID of the container you want to run (see `docker ps` or `docker ps -a` )