Terraform files for deploying docker-openwisp infrastructure in Google Cloud. This module creates the infrastructure required for deploying the kubernetes cluster.
-
Create a Google Cloud service account that has atleast the following roles:
- Compute Admin
- Compute Network Admin
- Compute Security Admin
- Kubernetes Engine Admin
- Service Account User
- Service Usage Admin
- DNS Administrator (When
google_services.use_cloud_dns
istrue
) - Cloud SQL Admin (When
google_services.use_cloud_sql
istrue
)
-
Enable following APIs allow terraform to create resources:
-
If you using the following options, please follow the requirements as per the variable's documentation:
google_services.configure_gloud
Note: The following links work only when you are viewing on github.com
- Standalone example available here.
- Configure the options in the module. (
examples/
may be helpful) - Apply the configurations:
terraform apply
- If using Cloud DNS, get the NS records and add them in your domain registrar records.
- Destroy resources only required for management (Creation / Updation)
terraform destroy \
--target=module.infrastructure.google_compute_router.openwisp_cluster_router \
--target=module.infrastructure.google_compute_router_nat.openwisp_connection_nat
Remember to use terraform when you want to destroy a resource created by terraform.
To destroy all resources: terraform destroy
Some of the parts of documentations are re-used from the terraform-kubernetes-openwisp to reduce maintenance, changes need to made in that repository in such cases.
- Install MarkdownPP:
pip install MarkdownPP
- Make changes in
docs/build/
directory. - To create documentation, in the root of repository:
markdown-pp docs/build/input.mdpp -o docs/input.md
markdown-pp docs/build/output.mdpp -o docs/output.md