committed by
GitHub
parent
7cb162bfb2
commit
bf2995d94b
@@ -42,12 +42,13 @@ Navigate to http://localhost:3001 to access the Bindplane console, the following
|
||||
This example will create a `cloud-config` that uses the module's defaults, creating a simple bindplane server with default (latest) docker image versions and setting localhost as remote url (suited only for local development).
|
||||
|
||||
```hcl
|
||||
module "cos-nginx" {
|
||||
source = "./fabric/modules/cloud-config-container/bindplane"
|
||||
password = "secret"
|
||||
module "cos-bindplane" {
|
||||
source = "./fabric/modules/cloud-config-container/bindplane"
|
||||
bindplane_license = "XXXXXXXXX"
|
||||
password = "secret"
|
||||
}
|
||||
|
||||
module "vm-nginx-tls" {
|
||||
module "bindplane" {
|
||||
source = "./fabric/modules/compute-vm"
|
||||
project_id = "my-project"
|
||||
zone = "europe-west8-b"
|
||||
@@ -57,7 +58,7 @@ module "vm-nginx-tls" {
|
||||
subnetwork = "gce"
|
||||
}]
|
||||
metadata = {
|
||||
user-data = module.cos-nginx.cloud_config
|
||||
user-data = module.cos-bindplane.cloud_config
|
||||
google-logging-enabled = true
|
||||
}
|
||||
boot_disk = {
|
||||
@@ -71,21 +72,21 @@ module "vm-nginx-tls" {
|
||||
}
|
||||
# tftest modules=2 resources=2
|
||||
```
|
||||
|
||||
<!-- BEGIN TFDOC -->
|
||||
## Variables
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [password](variables.tf#L63) | Default admin user password. | <code>string</code> | ✓ | |
|
||||
| [bindplane_license](variables.tf#L29) | BindPlane server license. | <code>string</code> | ✓ | |
|
||||
| [password](variables.tf#L68) | Default admin user password. | <code>string</code> | ✓ | |
|
||||
| [bindplane_config](variables.tf#L17) | Bindplane configurations. | <code title="object({ remote_url = optional(string, "localhost") bindplane_server_image = optional(string, "us-central1-docker.pkg.dev/observiq-containers/bindplane/bindplane-ee:latest") bindplane_transform_agent_image = optional(string, "us-central1-docker.pkg.dev/observiq-containers/bindplane/bindplane-transform-agent:latest") bindplane_prometheus_image = optional(string, "us-central1-docker.pkg.dev/observiq-containers/bindplane/bindplane-prometheus:1.56.0") })">object({…})</code> | | <code>{}</code> |
|
||||
| [cloud_config](variables.tf#L29) | Cloud config template path. If null default will be used. | <code>string</code> | | <code>null</code> |
|
||||
| [config_variables](variables.tf#L35) | Additional variables used to render the cloud-config and Nginx templates. | <code>map(any)</code> | | <code>{}</code> |
|
||||
| [file_defaults](variables.tf#L41) | Default owner and permissions for files. | <code title="object({ owner = string permissions = string })">object({…})</code> | | <code title="{ owner = "root" permissions = "0644" }">{…}</code> |
|
||||
| [files](variables.tf#L53) | Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null. | <code title="map(object({ content = string owner = string permissions = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [runcmd_post](variables.tf#L68) | Extra commands to run after starting nginx. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [runcmd_pre](variables.tf#L74) | Extra commands to run before starting nginx. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [users](variables.tf#L80) | List of additional usernames to be created. | <code title="list(object({ username = string, uid = number, }))">list(object({…}))</code> | | <code title="[ ]">[…]</code> |
|
||||
| [cloud_config](variables.tf#L34) | Cloud config template path. If null default will be used. | <code>string</code> | | <code>null</code> |
|
||||
| [config_variables](variables.tf#L40) | Additional variables used to render the cloud-config and Nginx templates. | <code>map(any)</code> | | <code>{}</code> |
|
||||
| [file_defaults](variables.tf#L46) | Default owner and permissions for files. | <code title="object({ owner = string permissions = string })">object({…})</code> | | <code title="{ owner = "root" permissions = "0644" }">{…}</code> |
|
||||
| [files](variables.tf#L58) | Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null. | <code title="map(object({ content = string owner = string permissions = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [runcmd_post](variables.tf#L73) | Extra commands to run after starting nginx. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [runcmd_pre](variables.tf#L79) | Extra commands to run before starting nginx. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [users](variables.tf#L85) | List of additional usernames to be created. | <code title="list(object({ username = string, uid = number, }))">list(object({…}))</code> | | <code title="[ ]">[…]</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ write_files:
|
||||
volumes:
|
||||
bindplane:
|
||||
prometheus:
|
||||
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
container_name: bindplane-prometheus
|
||||
@@ -57,14 +57,14 @@ write_files:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- prometheus:/prometheus
|
||||
|
||||
|
||||
transform:
|
||||
container_name: bindplane-transform-agent
|
||||
restart: always
|
||||
image: ${bindplane_transform_agent_image}
|
||||
ports:
|
||||
- "4568:4568"
|
||||
|
||||
|
||||
bindplane:
|
||||
container_name: bindplane-server
|
||||
restart: always
|
||||
@@ -72,6 +72,7 @@ write_files:
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- BINDPLANE_LICENSE=${license}
|
||||
- BINDPLANE_USERNAME=admin
|
||||
- BINDPLANE_PASSWORD=${password}
|
||||
- BINDPLANE_REMOTE_URL=http://${remote_url}:3001
|
||||
|
||||
@@ -21,6 +21,7 @@ locals {
|
||||
bindplane_transform_agent_image = var.bindplane_config.bindplane_transform_agent_image
|
||||
files = local.files
|
||||
password = var.password
|
||||
license = var.bindplane_license
|
||||
remote_url = var.bindplane_config.remote_url
|
||||
runcmd_pre = var.runcmd_pre
|
||||
runcmd_post = var.runcmd_post
|
||||
|
||||
@@ -26,6 +26,11 @@ variable "bindplane_config" {
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "bindplane_license" {
|
||||
description = "BindPlane server license."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "cloud_config" {
|
||||
description = "Cloud config template path. If null default will be used."
|
||||
type = string
|
||||
|
||||
Reference in New Issue
Block a user