Multi-Cloud Terrarium (mc-terrarium) aims to provide an environment (i.e., infrastructure terrarium) and features to enrich multi-cloud infrastructure.
The infrastructure terrarium consists of:
- information of cloud resources/services, which is created and managed by Cloud-Barista,
- TF configuration files, which specify resources/services to be add, and
- OpenTofu, which create and manage resources on cloud platforms.
- and so on.
mc-terrarium currently provides features for multi-cloud network, such as site-to-site VPN. This will gradually evolve to enable you to build the multi-cloud infrastructure you need.
- See Installing OpenTofu
- Refer to the custom installer for Ubuntu 22.04
In this readme, the default root directory is ~/mc-terrarium
.
git clone https://github.com/cloud-barista/mc-terrarium.git ~/mc-terrarium
If you got an error because of missing swag, install swag:
go install github.com/swaggo/swag/cmd/swag@latest
Prepare credentials by looking at the README and templates in the /secrets
directory.
Note - There may be an issue regarding Credential settings. Contributions are welcome.
- Supported Docker Compose based execution.
- Required a Docker network,
terrarium_network
Note
services in other docker composes can access the mc-terrarium
service, like http://mc-terrarium:8055/terrarium
.
Condition: Set up terrarium_network
in external docker compose
You can do this by running the following command:
make compose-up
The command to build and run the source code is as follows:
make compose
You can find the default username and password to access to API dashboard when the API server runs.
URL: http://localhost:8055/terrarium/swagger/index.html
Note - You can find API documentation on Swagger UI.
The example of API call sequence
- POST /tr/{trId}/vpn/gcp-azure/env
- POST /tr/{trId}/vpn/gcp-azure/infracode
- POST /tr/{trId}/vpn/gcp-azure/plan
- POST /tr/{trId}/vpn/gcp-azure (Time-consuming API, return a request ID and be processed asynchronously)
- GET /tr/{trId}/vpn/gcp-azure/request/{requestId}/status (Check the above API status)
- GET /tr/{trId}/vpn/gcp-azure (Get resource info with detail (refined, raw))
- DELETE /tr/{trId}/vpn/gcp-azure (Time-consuming API, return a request ID and be processed asynchronously)
- DELETE /tr/{trId}/vpn/gcp-azure/env