Skip to content

Commit 0053eb0

Browse files
Merge pull request #1 from Dan-Heath/patch-1
docs: Add `telemetry_enabled` to controller.hcl
2 parents 882d1a4 + b53d674 commit 0053eb0

File tree

6 files changed

+28
-34
lines changed

6 files changed

+28
-34
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Docker Deployment
22

3-
This directory contains an example deployment of Boundary using docker-compose
4-
and Terraform. The lab environment is meant to accompany the Hashicorp Learn
5-
[Boundary event logging
6-
tutorial](https://developer.hashicorp.com/boundary/tutorials/self-managed-deployment/event-logging).
3+
This directory contains an example deployment of Boundary using docker-compose and Terraform. The lab environment accompanies the Hashicorp Learn [Boundary event logging tutorial](https://developer.hashicorp.com/boundary/tutorials/self-managed-deployment/event-logging).
74

8-
In this example, Boundary is deployed using the
9-
[hashicorp/boundary](https://hub.docker.com/r/hashicorp/boundary) Dockerhub
10-
image. The Boundary service ports are forwarded to the host machine to mimic
11-
being in a "public" network.
5+
In this example, Boundary is deployed using the [hashicorp/boundary](https://hub.docker.com/r/hashicorp/boundary) Dockerhub image. The Boundary service ports are forwarded to the host machine to mimic being in a "public" network.
126

137
This deployment includes the following containers:
148

@@ -52,7 +46,7 @@ Login to the UI:
5246
- Auth method ID: find this in the UI when selecting the auth method or from TF output
5347

5448
```bash
55-
$ boundary authenticate password -login-name user1 -password password -auth-method-id <get_from_console_or_tf>
49+
$ boundary authenticate password -login-name user1 -password password -auth-method-id <get_id_from_console_or_tf>
5650

5751
Authentication information:
5852
Account ID: apw_gAE1rrpnG2
@@ -62,6 +56,7 @@ Authentication information:
6256
```
6357

6458
## Audit logs and ELK
59+
6560
The boundary controller is configured to write out audit events to a log file,
6661
`auditevents/controller.log`. The docker-compose.yml provides services for
6762
collecting and shipping these logs to elasticsearch with kibana for

compose/controller.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ events {
5757
audit_enabled = true
5858
observations_enabled = true
5959
sysevents_enabled = true
60+
telemetry_enabled = true
6061

6162
sink "stderr" {
6263
name = "all-events"

compose/docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) HashiCorp, Inc.
22
# SPDX-License-Identifier: MPL-2.0
33

4-
version: "3.8"
5-
64
networks:
75
default:
86
worker:
@@ -27,7 +25,7 @@ services:
2725
target: /etc/postgresql/
2826

2927
db-init:
30-
image: hashicorp/boundary:0.9.1
28+
image: hashicorp/boundary:0.17.1
3129
command: ["database", "init", "-config", "/boundary/controller.hcl"]
3230
volumes:
3331
- "${PWD}/:/boundary/"
@@ -38,7 +36,7 @@ services:
3836
condition: service_healthy
3937

4038
controller:
41-
image: hashicorp/boundary:0.9.1
39+
image: hashicorp/boundary:0.17.1
4240
cap_add:
4341
- IPC_LOCK
4442
# command: ["server", "-config", "/boundary/controller.hcl"]
@@ -66,7 +64,7 @@ services:
6664
retries: 5
6765

6866
worker:
69-
image: hashicorp/boundary:0.9.1
67+
image: hashicorp/boundary:0.17.1
7068
command: ["server", "-config", "/boundary/worker.hcl"]
7169
volumes:
7270
- "${PWD}/:/boundary/"

compose/worker.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ worker {
1616
description = "A worker for a docker demo"
1717
address = "worker"
1818
public_addr = "localhost:9202"
19-
controllers = ["boundary"]
19+
initial_upstreams = ["boundary"]
2020
}
2121

2222
kms "aead" {

terraform/main.tf

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
terraform {
55
required_providers {
6-
boundary = {
6+
boundary = {
77
source = "hashicorp/boundary"
8-
version = "1.0.9"
8+
version = "1.1.15"
99
}
1010
}
1111
}
@@ -68,45 +68,44 @@ resource "boundary_account_password" "user" {
6868
for_each = var.users
6969
name = each.key
7070
description = "User account for ${each.key}"
71-
type = "password"
7271
login_name = lower(each.key)
7372
password = "password"
7473
auth_method_id = boundary_auth_method.password.id
7574
}
7675

7776
resource "boundary_role" "global_anon_listing" {
7877
scope_id = boundary_scope.global.id
78+
principal_ids = ["u_anon"]
7979
grant_strings = [
80-
"id=*;type=auth-method;actions=list,authenticate",
80+
"ids=*;type=auth-method;actions=list,authenticate",
8181
"type=scope;actions=list",
82-
"id={{account.id}};actions=read,change-password"
82+
"ids={{account.id}};actions=read,change-password"
8383
]
84-
principal_ids = ["u_anon"]
8584
}
8685

8786
resource "boundary_role" "org_anon_listing" {
88-
scope_id = boundary_scope.org.id
87+
scope_id = boundary_scope.org.id
88+
principal_ids = ["u_anon"]
8989
grant_strings = [
90-
"id=*;type=auth-method;actions=list,authenticate",
90+
"ids=*;type=auth-method;actions=list,authenticate",
9191
"type=scope;actions=list",
92-
"id={{account.id}};actions=read,change-password"
92+
"ids={{account.id}};actions=read,change-password"
9393
]
94-
principal_ids = ["u_anon"]
9594
}
9695
resource "boundary_role" "org_admin" {
97-
scope_id = "global"
98-
grant_scope_id = boundary_scope.org.id
99-
grant_strings = ["id=*;type=*;actions=*"]
96+
scope_id = "global"
97+
grant_scope_ids = [boundary_scope.org.id]
98+
grant_strings = ["ids=*;type=*;actions=*"]
10099
principal_ids = concat(
101100
[for user in boundary_user.user : user.id],
102101
["u_auth"]
103102
)
104103
}
105104

106105
resource "boundary_role" "proj_admin" {
107-
scope_id = boundary_scope.org.id
108-
grant_scope_id = boundary_scope.project.id
109-
grant_strings = ["id=*;type=*;actions=*"]
106+
scope_id = boundary_scope.org.id
107+
grant_scope_ids = [boundary_scope.project.id]
108+
grant_strings = ["ids=*;type=*;actions=*"]
110109
principal_ids = concat(
111110
[for user in boundary_user.user : user.id],
112111
["u_auth"]
@@ -166,9 +165,9 @@ resource "boundary_target" "db" {
166165
}
167166

168167
resource "boundary_host_static" "postgres" {
169-
type = "static"
170-
name = "postgres"
171-
description = "Private postgres container"
168+
type = "static"
169+
name = "postgres"
170+
description = "Private postgres container"
172171
# DNS set via docker-compose
173172
address = "postgres"
174173
host_catalog_id = boundary_host_catalog_static.databases.id

terraform/outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
# SPDX-License-Identifier: MPL-2.0
33

44
output "username" {
5+
sensitive = true
56
value = boundary_account_password.user
67
}

0 commit comments

Comments
 (0)