Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.8 KB

README.md

File metadata and controls

72 lines (50 loc) · 2.8 KB

Terraform(GCP): OpenWISP

Terraform GitHub license

Terraform files for deploying docker-openwisp infrastructure in Google Cloud. This module creates the infrastructure required for deploying the kubernetes cluster.

Requirements

  1. 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 is true)
    • Cloud SQL Admin (When google_services.use_cloud_sql is true)
  2. Enable following APIs allow terraform to create resources:

  3. If you using the following options, please follow the requirements as per the variable's documentation:

  • google_services.configure_gloud

Usage

Note: The following links work only when you are viewing on github.com

Variables

  • Inputs documentation available here.
  • Outputs documentation available here.

Examples

  • Standalone example available here.

Create:

  1. Configure the options in the module. (examples/ may be helpful)
  2. Apply the configurations: terraform apply
  3. If using Cloud DNS, get the NS records and add them in your domain registrar records.
  4. 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

Destroy:

Remember to use terraform when you want to destroy a resource created by terraform. To destroy all resources: terraform destroy

Contribute to documentation

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.

  1. Install MarkdownPP: pip install MarkdownPP
  2. Make changes in docs/build/ directory.
  3. 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