Skip to content

Commit 4622182

Browse files
go-updates (#564)
* go-updates - golang updates for 1.5.11 release - some changes related to an upstream rig change - updated the terraform example test updates to recent versions to match the terraform Signed-off-by: James Nesbitt <[email protected]>
1 parent d853bfa commit 4622182

File tree

13 files changed

+130
-101
lines changed

13 files changed

+130
-101
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ linters:
5959
- reassign
6060
- revive
6161
- stylecheck
62-
- tenv
6362
- unconvert
6463
- unparam
6564
- usestdlibvars
65+
- usetesting
6666
- varnamelen
6767
- wastedassign
6868
- whitespace

examples/terraform/aws-simple/.terraform.lock.hcl

Lines changed: 32 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/terraform/aws-simple/launchpad.tf

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ locals {
4747
}
4848
}
4949
}
50+
"msr" = {
51+
description = "MSR ingress for UI and docker"
52+
nodegroups = [for k, ng in var.nodegroups : k if ng.role == "msr"]
53+
54+
routes = {
55+
"msr" = {
56+
port_incoming = 443
57+
port_target = 443
58+
protocol = "TCP"
59+
}
60+
}
61+
}
5062
}
5163

5264
// standard MCR/MKE/MSR firewall rules [here we just leave it open until we can figure this out]
@@ -91,6 +103,7 @@ locals {
91103
locals {
92104
// The SAN URL for the MKE load balancer ingress that is for the MKE load balancer
93105
MKE_URL = module.provision.ingresses["mke"].lb_dns
106+
MSR_URL = module.provision.ingresses["msr"].lb_dns
94107

95108
// flatten nodegroups into a set of objects with the info needed for each node, by combining the group details with the node detains
96109
launchpad_hosts_ssh = merge([for k, ng in local.nodegroups : { for l, ngn in ng.nodes : ngn.label => {
@@ -124,8 +137,8 @@ locals {
124137
// ------- Ye old launchpad yaml (just for debugging)
125138

126139
locals {
127-
launchpad_yaml_14 = <<-EOT
128-
apiVersion: launchpad.mirantis.com/mke/v1.4
140+
launchpad_yaml_15 = <<-EOT
141+
apiVersion: launchpad.mirantis.com/mke/v1.5
129142
kind: mke%{if local.has_msr}+msr%{endif}
130143
metadata:
131144
name: ${var.name}
@@ -156,7 +169,7 @@ spec:
156169
repoURL: https://repos.mirantis.com
157170
installURLLinux: https://get.mirantis.com/
158171
installURLWindows: https://get.mirantis.com/install.ps1
159-
channel: stable
172+
channel: stable-25.0
160173
prune: true
161174
mke:
162175
version: ${var.launchpad.mke_version}
@@ -177,6 +190,7 @@ spec:
177190
"replicaIDs": "sequential"
178191
installFlags:
179192
- "--ucp-insecure-tls"
193+
- "--dtr-external-url=${local.MSR_URL}"
180194
%{endif}
181195
EOT
182196

@@ -185,7 +199,7 @@ EOT
185199
output "launchpad_yaml" {
186200
description = "launchpad config file yaml (for debugging)"
187201
sensitive = true
188-
value = local.launchpad_yaml_14
202+
value = local.launchpad_yaml_15
189203
}
190204

191205
output "mke_connect" {

examples/terraform/aws-simple/terraform.tfvars.template

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// used to name infrastructure (CHANGE THIS)
2-
//name = "test"
2+
//name = ""
33

44
aws = {
55
region = "us-east-2"
@@ -8,14 +8,14 @@ aws = {
88
launchpad = {
99
drain = false
1010

11-
mcr_version = "23.0.15"
12-
mke_version = "3.7.15"
13-
msr_version = ""
11+
mcr_version = "25.0.2"
12+
mke_version = "3.8.2"
13+
msr_version = "2.9.23"
1414

1515
mke_connect = {
1616
username = "admin"
1717
password = "" // an MKE passwords must be provided
18-
insecure = false
18+
insecure = true
1919
}
2020

2121
skip_create = false
@@ -25,17 +25,14 @@ launchpad = {
2525
// configure the network stack
2626
network = {
2727
"cidr": "172.31.0.0/16",
28-
"enable_nat_gateway": false,
29-
"enable_vpn_gateway": false,
30-
"tags": {}
3128
}
3229

3330
// configure the subnets in the vpc
3431
subnets = {
3532
"main" = {
3633
"cidr" = "172.31.0.0/17",
3734
"private" = false,
38-
"nodegroups" = ["MngrUbuntu22", "WrkUbuntu22"]
35+
"nodegroups" = ["MngrUbuntu22", "WrkUbuntu22", "MsrUbuntu22"]
3936
}
4037
}
4138

@@ -46,7 +43,6 @@ nodegroups = {
4643
"count" = 1,
4744
"type" = "m6a.2xlarge",
4845
"volume_size" = "100",
49-
"public" = true,
5046
"role" = "manager",
5147
"user_data" = "sudo ufw allow 7946/tcp ; sudo ufw allow 10250/tcp "
5248
},
@@ -55,10 +51,17 @@ nodegroups = {
5551
"count" = 1,
5652
"type" = "c6a.xlarge",
5753
"volume_size" = "100",
58-
"public" = true,
5954
"role" = "worker",
6055
"user_data" = "sudo ufw allow 7946/tcp ; sudo ufw allow 10250/tcp "
6156
}
57+
"MsrUbuntu22" = {
58+
"platform" = "ubuntu_22.04",
59+
"count" = 1,
60+
"type" = "c6a.xlarge",
61+
"volume_size" = "100",
62+
"role" = "msr",
63+
"user_data" = "sudo ufw allow 7946/tcp ; sudo ufw allow 10250/tcp "
64+
}
6265
}
6366

6467
// set a windows password, if you have windows nodes

go.mod

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
module github.com/Mirantis/launchpad
22

3-
go 1.23.2
3+
go 1.24
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/AlecAivazis/survey/v2 v2.3.7
7-
github.com/a8m/envsubst v1.4.2
9+
github.com/a8m/envsubst v1.4.3
810
github.com/alessio/shellescape v1.4.2
911
github.com/avast/retry-go v3.0.0+incompatible
1012
github.com/creasty/defaults v1.8.0
1113
github.com/denisbrodbeck/machineid v1.0.1
1214
github.com/gammazero/workerpool v1.1.3
13-
github.com/go-playground/validator/v10 v10.24.0
15+
github.com/go-playground/validator/v10 v10.25.0
1416
github.com/gruntwork-io/terratest v0.46.11
1517
github.com/hashicorp/go-version v1.7.0
1618
github.com/k0sproject/dig v0.4.0
17-
github.com/k0sproject/rig v0.19.0
19+
github.com/k0sproject/rig v0.20.0
1820
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
1921
github.com/logrusorgru/aurora v2.0.3+incompatible
2022
github.com/mattn/go-isatty v0.0.20
@@ -23,7 +25,7 @@ require (
2325
github.com/schollz/progressbar/v3 v3.18.0
2426
github.com/sirupsen/logrus v1.9.3
2527
github.com/stretchr/testify v1.9.0
26-
github.com/urfave/cli/v2 v2.27.5
28+
github.com/urfave/cli/v2 v2.27.6
2729
gopkg.in/segmentio/analytics-go.v3 v3.1.0
2830
gopkg.in/yaml.v2 v2.4.0
2931
helm.sh/helm/v3 v3.15.3
@@ -35,6 +37,7 @@ require (
3537
)
3638

3739
require (
40+
al.essio.dev/pkg/shellescape v1.6.0 // indirect
3841
cloud.google.com/go v0.112.0 // indirect
3942
cloud.google.com/go/compute/metadata v0.3.0 // indirect
4043
cloud.google.com/go/iam v1.1.6 // indirect
@@ -62,8 +65,8 @@ require (
6265
github.com/bodgit/windows v1.0.1 // indirect
6366
github.com/cespare/xxhash/v2 v2.3.0 // indirect
6467
github.com/chai2010/gettext-go v1.0.3 // indirect
65-
github.com/containerd/containerd v1.7.21 // indirect
66-
github.com/containerd/errdefs v0.1.0 // indirect
68+
github.com/containerd/containerd v1.7.27 // indirect
69+
github.com/containerd/errdefs v0.3.0 // indirect
6770
github.com/containerd/log v0.1.0 // indirect
6871
github.com/containerd/platforms v0.2.1 // indirect
6972
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
@@ -196,20 +199,20 @@ require (
196199
go.opentelemetry.io/otel/metric v1.28.0 // indirect
197200
go.opentelemetry.io/otel/trace v1.28.0 // indirect
198201
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
199-
golang.org/x/crypto v0.32.0 // indirect
200-
golang.org/x/net v0.34.0 // indirect
202+
golang.org/x/crypto v0.36.0 // indirect
203+
golang.org/x/net v0.37.0 // indirect
201204
golang.org/x/oauth2 v0.21.0 // indirect
202-
golang.org/x/sync v0.10.0 // indirect
203-
golang.org/x/sys v0.29.0 // indirect
204-
golang.org/x/term v0.28.0 // indirect
205-
golang.org/x/text v0.21.0 // indirect
205+
golang.org/x/sync v0.12.0 // indirect
206+
golang.org/x/sys v0.31.0 // indirect
207+
golang.org/x/term v0.30.0 // indirect
208+
golang.org/x/text v0.23.0 // indirect
206209
golang.org/x/time v0.6.0 // indirect
207210
google.golang.org/api v0.169.0 // indirect
208211
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
209212
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
210213
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
211214
google.golang.org/grpc v1.65.0 // indirect
212-
google.golang.org/protobuf v1.34.2 // indirect
215+
google.golang.org/protobuf v1.35.2 // indirect
213216
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
214217
gopkg.in/inf.v0 v0.9.1 // indirect
215218
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)