-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pat Losoponkul
committed
Mar 25, 2024
1 parent
2b458aa
commit fe29e35
Showing
19 changed files
with
125 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# How to run examples | ||
|
||
## Prerequisites | ||
|
||
- docker-compose version >= `2.23.1` | ||
|
||
## Running examples | ||
|
||
Most of the examples should follow the same pattern. | ||
Simply go to each example directory and spin up the docker-compose of each example. | ||
|
||
```bash | ||
cd <EXAMPLE_DIR> | ||
docker-compose up | ||
``` | ||
|
||
If some example requires a different command, it should be provided in its own local README. | ||
|
||
## Examples | ||
|
||
|example|description| | ||
|-|-| | ||
|`st`|single-tenant configuration without external services (except database)| | ||
|`st-multi`|3 instances of single-tenant configuration| | ||
|`st-vault`|single-tenant with Vault for secret storage| | ||
|`mt`|multi-tenant configuration using built-in IAM| | ||
|`mt-keycloak`|multi-tenant configuration using Keycloak for IAM| | ||
|`mt-keycloak-vault`|multi-tenant configuration using Keycloak and Vault| | ||
|
||
# Contributing | ||
|
||
All of the docker-compose files in examples are generated using [Nickel](https://nickel-lang.org/). | ||
They are defined in a shared `.nickel` directory and generated using the `build.sh` script. | ||
|
||
## Prerequisites | ||
|
||
- [Nickel](https://nickel-lang.org/) version >= `1.5` installed | ||
|
||
## Generate example compose files | ||
|
||
To generate the docker-compose config for all examples, run | ||
|
||
```bash | ||
cd .nickel | ||
./build.sh | ||
``` | ||
|
||
## Updating example compose files | ||
|
||
To update the configuration, simply edit the `*.ncl` config in the `.nickel` directory and regenerate the docker-compose files. | ||
|
||
## Adding new examples | ||
|
||
To add a new example with docker-compose file, simply create a new configuration key in the `root.ncl` and add a new entry in the `build.sh` script. | ||
You may need to create the target example directory if it does not already exist. | ||
|
||
## Example with bootstrapping script | ||
|
||
If any example requires initialize steps, it should be made part of the docker-compose `depends_on` construct. | ||
Ideally, infrastructure bootstrapping should be automatic (database, IAM), but not necessarily application bootstrapping (tenant onboarding). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Configuration | ||
|
||
|Exposed Service|Description| | ||
|-|-| | ||
|`localhost:8080/prism-agent`|Multi-tenant Cloud Agent| | ||
|`localhost:8080/keycloak/admin`|Keycloak| | ||
|`localhost:8200`|Vault| | ||
|
||
__Keycloak__ | ||
|
||
- Admin user `admin` | ||
- Admin password `admin` | ||
|
||
__Vault__ | ||
|
||
- Root token `admin` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Configuration | ||
|
||
|Exposed Service|Description| | ||
|-|-| | ||
|`localhost:8080/prism-agent`|Multi-tenant Cloud Agent| | ||
|`localhost:8080/keycloak/admin`|Keycloak| | ||
|
||
__Keycloak__ | ||
|
||
- Admin user `admin` | ||
- Admin password `admin` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Configuration | ||
|
||
|Exposed Service|Description| | ||
|-|-| | ||
|`localhost:8080/prism-agent`|Multi-tenant Cloud Agent| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Configuration | ||
|
||
|Exposed Service|Description| | ||
|-|-| | ||
|`localhost:8080/prism-agent`|Single-tenant Cloud Agent#1 (issuer)| | ||
|`localhost:8081/prism-agent`|Single-tenant Cloud Agent#2 (holder)| | ||
|`localhost:8082/prism-agent`|Single-tenant Cloud Agent#3 (verifier)| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.