95 lines
3.6 KiB
Markdown
95 lines
3.6 KiB
Markdown
# Terraform config for drone
|
|
[](https://drone.thomasklein.me/thomasklein/terraform-app-drone)
|
|
|
|
Drone is a self-hosted Continuous Integration platform. This terraform root module will create a Gitea OAuth2 application, a persistent volume for Drone and installs Drone to a Kubernetes namespace on Lawndale.
|
|
|
|
**This module assumes Lawndale as the hosting environment!**
|
|
|
|
## Provider configurations
|
|
The following providers are used and should be configured before calling `init` or `apply`.
|
|
|
|
### AWS
|
|
AWS is only used for state backend. Check out [AWS Provider config](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration).
|
|
|
|
### Gitea
|
|
Either `GITEA_TOKEN` or `GITEA_USERNAME` and `GITEA_PASSWORD` must be set for authentication.
|
|
|
|
### Kubernetes / Helm
|
|
Drone is provisioned with Helm on a kubernetes cluster.
|
|
|
|
Helm is using the same environment variables as the Kubernetes provider.
|
|
|
|
Set `KUBE_CONFIG_PATH` to use a kubeconfig file, and `KUBE_CTX` to use a different context than set in the kubeconfig.
|
|
|
|
For token auth, set `KUBE_TOKEN` and `KUBE_HOST` environment vars.
|
|
|
|
A PEM-encoded root certificates bundle for TLS authentication can be sourced by setting
|
|
`KUBE_CLUSTER_CA_CERT_DATA`.
|
|
|
|
Sources:
|
|
[Kubernetes](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#argument-reference)
|
|
[Helm](https://registry.terraform.io/providers/hashicorp/helm/latest/docs)
|
|
|
|
## Persistent volume
|
|
Persistence is supported by [terraform-modules//9p-persistent-volume](git.thomasklein.me/thomasklein/terraform-modules/9p-persistent-volume).
|
|
|
|
|
|
<!-- BEGIN_TF_DOCS -->
|
|
## Requirements
|
|
|
|
The following requirements are needed by this module:
|
|
|
|
- <a name="requirement_aws"></a> [aws](#requirement\_aws) (~> 4.9.0)
|
|
|
|
- <a name="requirement_gitea"></a> [gitea](#requirement\_gitea) (>= 0.1.0)
|
|
|
|
- <a name="requirement_helm"></a> [helm](#requirement\_helm) (2.5.1)
|
|
|
|
- <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) (2.11.0)
|
|
|
|
## Providers
|
|
|
|
The following providers are used by this module:
|
|
|
|
- <a name="provider_gitea"></a> [gitea](#provider\_gitea) (0.1.0)
|
|
|
|
- <a name="provider_helm"></a> [helm](#provider\_helm) (2.5.1)
|
|
|
|
- <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) (2.11.0)
|
|
|
|
- <a name="provider_random"></a> [random](#provider\_random) (3.2.0)
|
|
|
|
## Modules
|
|
|
|
The following Modules are called:
|
|
|
|
### <a name="module_drone_persistance"></a> [drone\_persistance](#module\_drone\_persistance)
|
|
|
|
Source: git@git.thomasklein.me:thomasklein/terraform-modules//9p-persistent-volume
|
|
|
|
Version:
|
|
|
|
## Resources
|
|
|
|
The following resources are used by this module:
|
|
|
|
- [gitea_oauth2_app.this](https://registry.terraform.io/providers/malarinv/gitea/latest/docs/resources/oauth2_app) (resource)
|
|
- [helm_release.drone_runner](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource)
|
|
- [helm_release.drone_server](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource)
|
|
- [kubernetes_namespace.jobs](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) (resource)
|
|
- [kubernetes_namespace.server](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) (resource)
|
|
- [random_password.drone_rpc_secret](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) (resource)
|
|
|
|
## Required Inputs
|
|
|
|
No required inputs.
|
|
|
|
## Optional Inputs
|
|
|
|
No optional inputs.
|
|
|
|
## Outputs
|
|
|
|
No outputs.
|
|
<!-- END_TF_DOCS -->
|