Skip to content

Commit f39e0b0

Browse files
chore(e2e): Added windows based boundary worker scenario and module (#5973)
* Added windows based boundary worker scenario and module * powershell script to run boundary on startup * merged member server scenario
1 parent 71fc7a5 commit f39e0b0

File tree

10 files changed

+604
-30
lines changed

10 files changed

+604
-30
lines changed

enos/enos-modules.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ module "aws_windows_client" {
127127
source = "./modules/aws_windows_client"
128128
}
129129

130+
module "aws_rdp_member_server_with_worker" {
131+
source = "./modules/aws_rdp_member_server_with_worker"
132+
}
133+
130134
module "vault" {
131135
source = "./modules/aws_vault"
132136

enos/enos-scenario-e2e-aws-windows.hcl

Lines changed: 69 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,19 @@ scenario "e2e_aws_windows" {
5252
}
5353
}
5454

55-
step "read_boundary_license" {
56-
module = module.read_license
55+
step "create_base_infra" {
56+
module = module.aws_vpc_ipv6
57+
58+
depends_on = [
59+
step.find_azs,
60+
]
5761

5862
variables {
59-
license_path = local.boundary_license_path
63+
availability_zones = step.find_azs.availability_zones
64+
common_tags = local.tags
6065
}
6166
}
6267

63-
step "create_db_password" {
64-
module = module.random_stringifier
65-
}
66-
6768
step "build_boundary_linux" {
6869
module = matrix.builder == "crt" ? module.build_crt : module.build_local
6970

@@ -77,7 +78,7 @@ scenario "e2e_aws_windows" {
7778
module = matrix.builder == "crt" ? module.build_crt : module.build_local
7879

7980
depends_on = [
80-
step.build_boundary_linux
81+
step.build_boundary_linux,
8182
]
8283

8384
variables {
@@ -90,19 +91,6 @@ scenario "e2e_aws_windows" {
9091
}
9192
}
9293

93-
step "create_base_infra" {
94-
module = module.aws_vpc_ipv6
95-
96-
depends_on = [
97-
step.find_azs,
98-
]
99-
100-
variables {
101-
availability_zones = step.find_azs.availability_zones
102-
common_tags = local.tags
103-
}
104-
}
105-
10694
step "create_windows_client" {
10795
module = module.aws_windows_client
10896

@@ -119,6 +107,14 @@ scenario "e2e_aws_windows" {
119107
}
120108
}
121109

110+
step "read_boundary_license" {
111+
module = module.read_license
112+
113+
variables {
114+
license_path = local.boundary_license_path
115+
}
116+
}
117+
122118
step "create_vault_cluster" {
123119
module = module.vault
124120
depends_on = [
@@ -142,13 +138,29 @@ scenario "e2e_aws_windows" {
142138
}
143139
}
144140

141+
step "create_db_password" {
142+
module = module.random_stringifier
143+
}
144+
145+
step "create_rdp_domain_controller" {
146+
module = module.aws_rdp_domain_controller
147+
depends_on = [
148+
step.create_base_infra,
149+
]
150+
151+
variables {
152+
vpc_id = step.create_base_infra.vpc_id
153+
server_version = matrix.rdp_server
154+
}
155+
}
156+
145157
step "create_boundary_cluster" {
146158
module = module.aws_boundary
147159
depends_on = [
148160
step.create_base_infra,
149-
step.create_windows_client,
150161
step.create_db_password,
151162
step.build_boundary_linux,
163+
step.create_windows_client,
152164
step.create_vault_cluster,
153165
step.read_boundary_license
154166
]
@@ -210,15 +222,29 @@ scenario "e2e_aws_windows" {
210222
}
211223
}
212224

213-
step "create_rdp_domain_controller" {
214-
module = module.aws_rdp_domain_controller
225+
step "create_windows_worker" {
226+
module = module.aws_rdp_member_server_with_worker
215227
depends_on = [
216228
step.create_base_infra,
229+
step.create_rdp_domain_controller,
230+
step.build_boundary_windows,
231+
step.create_boundary_cluster,
217232
]
218233

219234
variables {
220-
vpc_id = step.create_base_infra.vpc_id
221-
server_version = matrix.rdp_server
235+
vpc_id = step.create_base_infra.vpc_id
236+
server_version = matrix.rdp_server
237+
boundary_cli_zip_path = step.build_boundary_windows.artifact_path
238+
kms_key_arn = step.create_base_infra.kms_key_arn
239+
controller_ip = step.create_boundary_cluster.public_controller_addresses[0]
240+
iam_name = step.create_boundary_cluster.iam_instance_profile_name
241+
boundary_security_group = step.create_boundary_cluster.boundary_sg_id
242+
active_directory_domain = step.create_rdp_domain_controller.domain_name
243+
domain_controller_aws_keypair_name = step.create_rdp_domain_controller.keypair_name
244+
domain_controller_ip = step.create_rdp_domain_controller.private_ip
245+
domain_admin_password = step.create_rdp_domain_controller.password
246+
domain_controller_private_key = step.create_rdp_domain_controller.ssh_private_key
247+
domain_controller_sec_group_id_list = step.create_rdp_domain_controller.security_group_id_list
222248
}
223249
}
224250

@@ -347,4 +373,20 @@ scenario "e2e_aws_windows" {
347373
output "windows_client_ssh_key" {
348374
value = step.create_windows_client.ssh_private_key
349375
}
350-
}
376+
377+
output "windows_worker_admin_username" {
378+
value = step.create_windows_worker.admin_username
379+
}
380+
381+
output "windows_worker_admin_password" {
382+
value = step.create_windows_worker.admin_password
383+
}
384+
385+
output "windows_worker_public_ip" {
386+
value = step.create_windows_worker.public_ip
387+
}
388+
389+
output "windows_worker_private_ip" {
390+
value = step.create_windows_worker.private_ip
391+
}
392+
}

enos/modules/aws_boundary/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ output "public_controller_addresses" {
211211
value = var.ip_version == "4" ? aws_instance.controller[*].public_ip : aws_instance.controller[*].ipv6_addresses[0]
212212
}
213213

214+
output "boundary_sg_id" {
215+
description = "A secruity group id that covers basic boundary ports and ssh"
216+
value = aws_security_group.boundary_sg.id
217+
}
218+
214219
output "controller_aux_sg_id" {
215220
description = "A security group ID that covers the controllers for adding extra rules to"
216221
value = aws_security_group.boundary_aux_sg.id

enos/modules/aws_boundary/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ variable "worker_instance_type" {
3131
variable "worker_type_tags" {
3232
description = "Tag to set on worker for use in worker filters"
3333
type = list(string)
34-
default = ["collocated", "prod", "webservers"]
34+
default = ["collocated", "prod", "webservers", "linux"]
3535
}
3636

3737
variable "worker_ebs_iops" {

0 commit comments

Comments
 (0)