Skip to content

Commit 479981a

Browse files
committed
re-enable full deployment
1 parent 132e09c commit 479981a

5 files changed

Lines changed: 157 additions & 156 deletions

File tree

releases/3.4/terraform/modules/observability/integrations.tf

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -179,48 +179,48 @@ resource "juju_integration" "history_server_grafana_agent_metrics" {
179179
}
180180
}
181181
#
182-
# resource "juju_integration" "kyuubi_grafana_agent_metrics" {
183-
# model = data.juju_model.spark.name
184-
#
185-
# application {
186-
# name = var.spark_charms.kyuubi
187-
# endpoint = "metrics-endpoint"
188-
# }
189-
#
190-
# application {
191-
# name = juju_application.grafana_agent.name
192-
# endpoint = "metrics-endpoint"
193-
# }
194-
# }
195-
#
196-
# resource "juju_integration" "kyuubi_grafana_agent_dashboards" {
197-
# model = data.juju_model.spark.name
198-
#
199-
# application {
200-
# name = var.spark_charms.kyuubi
201-
# endpoint = "grafana-dashboard"
202-
# }
203-
#
204-
# application {
205-
# name = juju_application.grafana_agent.name
206-
# endpoint = "grafana-dashboards-consumer"
207-
# }
208-
# }
209-
#
210-
# resource "juju_integration" "kyuubi_grafana_agent_logging" {
211-
# model = data.juju_model.spark.name
212-
#
213-
# application {
214-
# name = var.spark_charms.kyuubi
215-
# endpoint = "logging"
216-
# }
217-
#
218-
# application {
219-
# name = juju_application.grafana_agent.name
220-
# endpoint = "logging-provider"
221-
# }
222-
# }
223-
#
182+
resource "juju_integration" "kyuubi_grafana_agent_metrics" {
183+
model = data.juju_model.spark.name
184+
185+
application {
186+
name = var.spark_charms.kyuubi
187+
endpoint = "metrics-endpoint"
188+
}
189+
190+
application {
191+
name = juju_application.grafana_agent.name
192+
endpoint = "metrics-endpoint"
193+
}
194+
}
195+
196+
resource "juju_integration" "kyuubi_grafana_agent_dashboards" {
197+
model = data.juju_model.spark.name
198+
199+
application {
200+
name = var.spark_charms.kyuubi
201+
endpoint = "grafana-dashboard"
202+
}
203+
204+
application {
205+
name = juju_application.grafana_agent.name
206+
endpoint = "grafana-dashboards-consumer"
207+
}
208+
}
209+
210+
resource "juju_integration" "kyuubi_grafana_agent_logging" {
211+
model = data.juju_model.spark.name
212+
213+
application {
214+
name = var.spark_charms.kyuubi
215+
endpoint = "logging"
216+
}
217+
218+
application {
219+
name = juju_application.grafana_agent.name
220+
endpoint = "logging-provider"
221+
}
222+
}
223+
224224
resource "juju_integration" "integration_hub_grafana_agent_logging" {
225225
model = data.juju_model.spark.name
226226

releases/3.4/terraform/modules/spark/applications.tf

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,60 +17,60 @@ resource "juju_application" "history_server" {
1717
constraints = "arch=amd64"
1818
}
1919

20-
# resource "juju_application" "kyuubi" {
21-
# name = "kyuubi"
22-
# model = data.juju_model.spark.name
23-
#
24-
# charm {
25-
# name = "kyuubi-k8s"
26-
# channel = "3.4/stable"
27-
# revision = var.kyuubi_revision
28-
# }
29-
#
30-
# resources = var.kyuubi_image
31-
#
32-
# config = merge(
33-
# {
34-
# enable-dynamic-allocation = var.enable_dynamic_allocation
35-
# expose-external = "loadbalancer"
36-
# gpu-enable = var.kyuubi_gpu_enable
37-
# gpu-engine-executors-limit = var.kyuubi_gpu_engine_executors_limit
38-
# gpu-pinned-memory = var.kyuubi_gpu_pinned_memory
39-
# namespace = data.juju_model.spark.name
40-
# profile = var.kyuubi_profile
41-
# service-account = var.kyuubi_user
42-
# },
43-
# var.kyuubi_k8s_node_selectors == null ? {} : {
44-
# k8s-node-selectors = var.kyuubi_k8s_node_selectors
45-
# },
46-
# var.kyuubi_loadbalancer_extra_annotations == null ? {} : {
47-
# loadbalancer-extra-annotations = var.kyuubi_loadbalancer_extra_annotations
48-
# },
49-
# var.tls_private_key == null ? {} : {
50-
# tls-client-private-key = "secret:${juju_secret.system_users_and_private_key_secret[0].secret_id}"
51-
# },
52-
# var.admin_password == null ? {} : {
53-
# system-users = "secret:${juju_secret.system_users_and_private_key_secret[0].secret_id}"
54-
# },
55-
# var.kyuubi_executor_cores == null ? {} : {
56-
# executor-cores = var.kyuubi_executor_cores
57-
# },
58-
# var.kyuubi_executor_memory == null ? {} : {
59-
# executor-memory = var.kyuubi_executor_memory
60-
# },
61-
# var.kyuubi_driver_pod_template == null ? {} : {
62-
# driver-pod-template = var.kyuubi_driver_pod_template
63-
# },
64-
# var.kyuubi_executor_pod_template == null ? {} : {
65-
# executor-pod-template = var.kyuubi_executor_pod_template
66-
# }
67-
# )
68-
#
69-
# units = var.kyuubi_units
70-
# trust = true
71-
#
72-
# constraints = "arch=amd64"
73-
# }
20+
resource "juju_application" "kyuubi" {
21+
name = "kyuubi"
22+
model = data.juju_model.spark.name
23+
24+
charm {
25+
name = "kyuubi-k8s"
26+
channel = "3.4/stable"
27+
revision = var.kyuubi_revision
28+
}
29+
30+
resources = var.kyuubi_image
31+
32+
config = merge(
33+
{
34+
enable-dynamic-allocation = var.enable_dynamic_allocation
35+
expose-external = "loadbalancer"
36+
gpu-enable = var.kyuubi_gpu_enable
37+
gpu-engine-executors-limit = var.kyuubi_gpu_engine_executors_limit
38+
gpu-pinned-memory = var.kyuubi_gpu_pinned_memory
39+
namespace = data.juju_model.spark.name
40+
profile = var.kyuubi_profile
41+
service-account = var.kyuubi_user
42+
},
43+
var.kyuubi_k8s_node_selectors == null ? {} : {
44+
k8s-node-selectors = var.kyuubi_k8s_node_selectors
45+
},
46+
var.kyuubi_loadbalancer_extra_annotations == null ? {} : {
47+
loadbalancer-extra-annotations = var.kyuubi_loadbalancer_extra_annotations
48+
},
49+
var.tls_private_key == null ? {} : {
50+
tls-client-private-key = "secret:${juju_secret.system_users_and_private_key_secret[0].secret_id}"
51+
},
52+
var.admin_password == null ? {} : {
53+
system-users = "secret:${juju_secret.system_users_and_private_key_secret[0].secret_id}"
54+
},
55+
var.kyuubi_executor_cores == null ? {} : {
56+
executor-cores = var.kyuubi_executor_cores
57+
},
58+
var.kyuubi_executor_memory == null ? {} : {
59+
executor-memory = var.kyuubi_executor_memory
60+
},
61+
var.kyuubi_driver_pod_template == null ? {} : {
62+
driver-pod-template = var.kyuubi_driver_pod_template
63+
},
64+
var.kyuubi_executor_pod_template == null ? {} : {
65+
executor-pod-template = var.kyuubi_executor_pod_template
66+
}
67+
)
68+
69+
units = var.kyuubi_units
70+
trust = true
71+
72+
constraints = "arch=amd64"
73+
}
7474

7575
resource "juju_application" "kyuubi_users" {
7676
name = "kyuubi-users"

releases/3.4/terraform/modules/spark/integrations.tf

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
# Copyright 2024 Canonical Ltd.
22
# See LICENSE file for licensing details.
33

4-
# resource "juju_integration" "kyuubi_metastore" {
5-
# model = data.juju_model.spark.name
6-
#
7-
# application {
8-
# name = juju_application.metastore.name
9-
# endpoint = "database"
10-
# }
11-
#
12-
# application {
13-
# name = juju_application.kyuubi.name
14-
# endpoint = "metastore-db"
15-
# }
16-
# }
4+
resource "juju_integration" "kyuubi_metastore" {
5+
model = data.juju_model.spark.name
176

18-
# resource "juju_integration" "kyuubi_users" {
19-
# model = data.juju_model.spark.name
20-
#
21-
# application {
22-
# name = juju_application.kyuubi_users.name
23-
# endpoint = "database"
24-
# }
25-
#
26-
# application {
27-
# name = juju_application.kyuubi.name
28-
# endpoint = "auth-db"
29-
# }
30-
# }
7+
application {
8+
name = juju_application.metastore.name
9+
endpoint = "database"
10+
}
3111

32-
# resource "juju_integration" "kyuubi_service_account" {
33-
# model = data.juju_model.spark.name
34-
#
35-
# application {
36-
# name = juju_application.kyuubi.name
37-
# endpoint = "spark-service-account"
38-
# }
39-
#
40-
# application {
41-
# name = juju_application.integration_hub.name
42-
# endpoint = "spark-service-account"
43-
# }
44-
# }
12+
application {
13+
name = juju_application.kyuubi.name
14+
endpoint = "metastore-db"
15+
}
16+
}
17+
18+
resource "juju_integration" "kyuubi_users" {
19+
model = data.juju_model.spark.name
20+
21+
application {
22+
name = juju_application.kyuubi_users.name
23+
endpoint = "database"
24+
}
25+
26+
application {
27+
name = juju_application.kyuubi.name
28+
endpoint = "auth-db"
29+
}
30+
}
31+
32+
resource "juju_integration" "kyuubi_service_account" {
33+
model = data.juju_model.spark.name
34+
35+
application {
36+
name = juju_application.kyuubi.name
37+
endpoint = "spark-service-account"
38+
}
39+
40+
application {
41+
name = juju_application.integration_hub.name
42+
endpoint = "spark-service-account"
43+
}
44+
}
4545

4646
# resource "juju_integration" "kyuubi_zookeeper" {
4747
# model = data.juju_model.spark.name
@@ -57,19 +57,19 @@
5757
# }
5858
# }
5959

60-
# resource "juju_integration" "kyuubi_tls" {
61-
# model = data.juju_model.spark.name
62-
#
63-
# application {
64-
# name = juju_application.kyuubi.name
65-
# endpoint = "certificates"
66-
# }
67-
#
68-
# application {
69-
# name = var.tls_app_name
70-
# endpoint = var.tls_certificates_endpoint
71-
# }
72-
# }
60+
resource "juju_integration" "kyuubi_tls" {
61+
model = data.juju_model.spark.name
62+
63+
application {
64+
name = juju_application.kyuubi.name
65+
endpoint = "certificates"
66+
}
67+
68+
application {
69+
name = var.tls_app_name
70+
endpoint = var.tls_certificates_endpoint
71+
}
72+
}
7373

7474
# resource "juju_integration" "kyuubi_data_integrator" {
7575
# model = data.juju_model.spark.name

releases/3.4/terraform/modules/spark/outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ output "charms" {
66
value = {
77
history_server = juju_application.history_server.name
88
integration_hub = juju_application.integration_hub.name
9+
kyuubi = juju_application.kyuubi.name
910
kyuubi_users = juju_application.kyuubi_users.name
1011
metastore = juju_application.metastore.name
1112
}

releases/3.4/terraform/modules/spark/resources.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ resource "juju_secret" "system_users_and_private_key_secret" {
2222
info = "This secret contains password for admin user and the TLS private key."
2323
}
2424

25-
# resource "juju_access_secret" "system_users_and_private_key_secret_access" {
26-
# count = var.tls_private_key == null && var.admin_password == null ? 0 : 1
27-
# model = var.model
28-
# applications = [
29-
# juju_application.kyuubi.name
30-
# ]
31-
# secret_id = juju_secret.system_users_and_private_key_secret[0].secret_id
32-
# }
25+
resource "juju_access_secret" "system_users_and_private_key_secret_access" {
26+
count = var.tls_private_key == null && var.admin_password == null ? 0 : 1
27+
model = var.model
28+
applications = [
29+
juju_application.kyuubi.name
30+
]
31+
secret_id = juju_secret.system_users_and_private_key_secret[0].secret_id
32+
}

0 commit comments

Comments
 (0)