Skip to content

Commit 46fc48d

Browse files
committed
Merge branch 'dev' into feat/dora-metrics
fix dashboard
2 parents 0f30b35 + 22a3a6e commit 46fc48d

File tree

9 files changed

+288
-131
lines changed

9 files changed

+288
-131
lines changed

packages/grafana/manifests/devlake.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
instanceSelector:
1010
matchLabels:
1111
dashboards: "external-grafana"
12-
url: "https://github.com/apache/incubator-devlake/tree/main/grafana/dashboards/DORA.json"
12+
url: "https://raw.githubusercontent.com/apache/incubator-devlake/tree/main/grafana/dashboards/DORA.json"
1313
---
1414
# apiVersion: grafana.integreatly.org/v1beta1
1515
# kind: GrafanaDashboard

platform/infra/terraform/database/ec2/main.tf

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,38 @@ resource "aws_ssm_document" "session_manager_prefs" {
234234
})
235235
}
236236

237+
# Get latest SQL Server AMI
238+
data "aws_ami" "sql_server" {
239+
most_recent = true
240+
owners = ["amazon"] # AWS-owned AMIs
241+
242+
filter {
243+
name = "name"
244+
values = ["Windows_Server-2022-English-Full-SQL_2019_Standard*"] # Adjust version as needed
245+
}
246+
247+
filter {
248+
name = "virtualization-type"
249+
values = ["hvm"]
250+
}
251+
252+
filter {
253+
name = "root-device-type"
254+
values = ["ebs"]
255+
}
256+
257+
filter {
258+
name = "state"
259+
values = ["available"]
260+
}
261+
}
262+
237263
resource "aws_instance" "sql_server_instance" {
238-
ami = "ami-0848f4d849e5b4667"
239-
instance_type = "t3a.xlarge"
264+
ami = data.aws_ami.sql_server.id
265+
instance_type = "t3a.2xlarge"
240266
#subnet_id = var.vpc_private_subnets[0]
241267
subnet_id = length(var.vpc_private_subnets) > 0 ? var.vpc_private_subnets[0] : null
242268

243-
244269
vpc_security_group_ids = [aws_security_group.ec2_sg.id]
245270

246271
root_block_device {
@@ -308,6 +333,28 @@ resource "aws_instance" "sql_server_instance" {
308333
Start-Sleep -Seconds 60
309334
Invoke-WebRequest -Uri $jreUrl -OutFile "C:\jre-installer.exe"
310335
Start-Process -FilePath "C:\jre-installer.exe" -ArgumentList "/s" -Wait
336+
337+
# Verify Java installation
338+
$javaVersion = java -version 2>&1
339+
Write-Host "Java version installed: $javaVersion"
340+
341+
# Optional: Set JAVA_HOME environment variable
342+
[Environment]::SetEnvironmentVariable(
343+
"JAVA_HOME",
344+
(Get-ChildItem "C:\Program Files\Java\jre*" | Select-Object -First 1).FullName,
345+
[EnvironmentVariableTarget]::Machine
346+
)
347+
348+
# Add Java to system PATH
349+
$javaPath = "$env:JAVA_HOME\bin"
350+
$currentPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine)
351+
if (-not $currentPath.Contains($javaPath)) {
352+
[Environment]::SetEnvironmentVariable(
353+
"Path",
354+
"$currentPath;$javaPath",
355+
[EnvironmentVariableTarget]::Machine
356+
)
357+
}
311358
312359
# Install Babelfish Compass
313360
$owner = "babelfish-for-postgresql"

platform/infra/terraform/mgmt/terraform/ack.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ resource "kubectl_manifest" "application_argocd_ack" {
2929
)
3030

3131
provisioner "local-exec" {
32-
when = create
33-
3432
command = "kubectl wait --for=jsonpath=.status.health.status=Healthy -n argocd application/ack --timeout=300s && kubectl wait --for=jsonpath=.status.sync.status=Synced --timeout=300s -n argocd application/ack"
3533

3634
interpreter = ["/bin/bash", "-c"]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
apiVersion: eks.amazonaws.com/v1
3+
kind: NodeClass
4+
metadata:
5+
name: modern-engineering-nodeclass
6+
spec:
7+
role: "modern-engineering"
8+
ephemeralStorage: # EKS Auto Mode section that handles temporary storage.
9+
size: "50Gi"
10+
subnetSelectorTerms:
11+
- tags:
12+
eks.amazonaws.com/discovery: modern-engineering
13+
securityGroupSelectorTerms:
14+
- tags:
15+
eks.amazonaws.com/discovery: modern-engineering
16+
tags:
17+
eks.amazonaws.com/discovery: modern-engineering
18+
---
19+
apiVersion: karpenter.sh/v1
20+
kind: NodePool
21+
metadata:
22+
name: modern-engineering-nodepool
23+
spec:
24+
template:
25+
spec:
26+
nodeClassRef:
27+
group: eks.amazonaws.com
28+
kind: NodeClass
29+
name: modern-engineering-nodeclass # Calls the NodeClass modern-engineering-nodeclass in this file.
30+
requirements:
31+
- key: "eks.amazonaws.com/instance-category"
32+
operator: In
33+
values: ["c", "m", "r"]
34+
- key: "eks.amazonaws.com/instance-cpu"
35+
operator: In
36+
values: ["4", "8", "16", "32"]
37+
- key: "eks.amazonaws.com/instance-hypervisor"
38+
operator: In
39+
values: ["nitro"]
40+
- key: "kubernetes.io/arch"
41+
operator: In
42+
values: ["amd64"]
43+
- key: "eks.amazonaws.com/instance-generation"
44+
operator: Gt
45+
values: ["2"]
46+
limits:
47+
cpu: "1000"
48+
disruption:
49+
consolidationPolicy: WhenEmpty
50+
consolidateAfter: 300s
51+
weight: 10

0 commit comments

Comments
 (0)