This model is designed to be used for GitHub Actions to create a test DB and export the pki/identities/DB to s3 buckets for later testing usage.
Only setup for AWS.
Designed to work with the pete-iperf branch of fablab.
You will need to supply your own keys/secrets.
Infrastructure is configured in the main.go in the model.
This is a very alpha release, minimal features.
There are several files that will likely need to be customized for your setup:
ziti/zititest/models/db-creation/main.go - mainly used to alter the model and also your Rsync and Disposal Actions (removing Route 53 A Record)
ziti/zititest/models/db-creation/actions/bootstrap.go - This is where the meat of the actions take place. Sets up AWS remotely from the GH Runner (using Fablab executable), then runs the DB Creation Script.
ziti/zititest/models/db-creation/resources/db_creator_script_external.sh - This is the script that interacts with Ziti and creates all the identities, services and policies.
ziti/zititest/models/db-creation/resources/aws_setup.sh - This will default to us-east-1 region and use JSON output, if you want to change those values do that here.
ziti/.github/workflows/fablab-db-creation.yml - This is where you will setup your GitHub workflow specifics, inserting your custom secret variable names, etc. As you can see at the end, the following 3 Fablab commands are all that is needed to run this:
./db-creation create db-creation
./db-creation up
./db-creation dispose
Once the DB is saved in s3, you will need to pull that and the pki from the proper buckets via the following steps:
Non Fablab import (manual) or something designed by you
Make sure AWS CLI is configured on the machine you want the DB imported to.
cd to the /home/ubuntu/fablab directory which is where the DB lies.
Within your main.go for the db-creation model, you should uncomment the 2 following lines within the Distribution portion of the model, around line 123 or so: