Skip to content

Commit c80e047

Browse files
Add stack versioning and AI blueprints link (#59)
- Introduced CLUSTER_CREATION_STACK_VERSION and OCI_AI_BLUEPRINTS_STACK_VERSION files to manage versioning. - Updated outputs.tf to include stack version outputs for both cluster creation and AI blueprints. - Modified schema.yaml to reflect new version variables and outputs. - Replaced hardcoded version references with dynamic variables in locals and outputs. - Removed obsolete VERSION files from the repository.
1 parent f823175 commit c80e047

File tree

15 files changed

+88
-64
lines changed

15 files changed

+88
-64
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-ai-blueprints/releases/download/release-2025-05-16/release_2025_05_16_app.zip"

cluster_creation_terraform/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33
#
44

5+
output "cluster_creation_stack_version" {
6+
value = file("${path.module}/CLUSTER_CREATION_STACK_VERSION")
7+
}
8+
59
output "oke_cluster_name" {
610
value = oci_containerengine_cluster.oke_cluster[0].name
711
}

cluster_creation_terraform/schema.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ variableGroups:
2020
- region
2121
visible: false
2222

23+
- title: "Stack Version"
24+
variables:
25+
- cluster_creation_stack_version
26+
visible: true
27+
2328
- title: "Advanced Configuration?"
2429
variables:
2530
- show_advanced
@@ -131,6 +136,13 @@ variables:
131136

132137
outputs:
133138

139+
cluster_creation_stack_version:
140+
type: string
141+
title: "Stack Version"
142+
description: "The version of this stack"
143+
required: true
144+
visible: true
145+
134146
oke_cluster_name:
135147
type: string
136148
title: "OKE Cluster Name"
@@ -196,6 +208,11 @@ outputGroups:
196208
outputs:
197209
- oci_ai_blueprints_link_for_section
198210

211+
212+
- title: "Cluster Creation Stack Version"
213+
outputs:
214+
- cluster_creation_stack_version
215+
199216
- title: OKE Cluster Details
200217
outputs:
201218
- oke_cluster_name

cluster_creation_terraform/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33
#
44
variable "oci_ai_blueprints_link_variable" {
5-
default = "https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-ai-blueprints/releases/download/release-2025-05-16/release_2025_05_16_app.zip"
5+
type = string
6+
default = file("${path.module}/OCI_AI_BLUEPRINTS_LINK")
67
}
78

89
# OKE Variables
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.0

oci_ai_blueprints_terraform/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

oci_ai_blueprints_terraform/app-configmap.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "kubernetes_config_map" "corrino-configmap" {
1010
ADDON_GRAFANA_USER = local.addon.grafana_user
1111
BACKEND_SERVICE_NAME = local.app.backend_service_name
1212
COMPARTMENT_ID = local.oci.compartment_id
13-
CORRINO_VERSION = local.versions.corrino_version
13+
CONTROL_PLANE_VERSION = var.stack_version
1414
DJANGO_ALLOWED_HOSTS = local.django.allowed_hosts
1515
DJANGO_CSRF_TRUSTED_ORIGINS = local.django.csrf_trusted_origins
1616
DJANGO_SECRET = local.django.secret

oci_ai_blueprints_terraform/helm.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ resource "helm_release" "kueue" {
112112
wait = false
113113
version = "0.11.4"
114114

115-
count = var.bring_your_own_kueue ? 0 : 1
115+
count = var.bring_your_own_kueue ? 0 : 1
116+
depends_on = [kubernetes_job.corrino_migration_job, kubernetes_job.wallet_extractor_job]
116117
}
117118

oci_ai_blueprints_terraform/locals.tf

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ locals {
1111
backend_service_name_origin = "http://corrino-cp"
1212
backend_service_name_ingress = "corrino-cp-ingress"
1313
# backend_image_uri_base = join(":", [local.ocir.base_uri, local.ocir.backend_image])
14-
backend_image_uri = format("${local.ocir.base_uri}:${local.ocir.backend_image}-${local.versions.corrino_version}")
14+
backend_image_uri = format("${local.ocir.base_uri}:${local.ocir.backend_image}-${var.stack_version}")
1515
#frontend_image_uri = join(":", [local.ocir.base_uri, local.ocir.frontend_image])
16-
blueprint_portal_image_uri = join(":", [local.ocir.base_uri, local.ocir.blueprint_portal_image])
16+
blueprint_portal_image_uri = format("${local.ocir.base_uri}:${local.ocir.blueprint_portal_image}-${var.stack_version}")
1717
recipe_bucket_name = "corrino-recipes"
1818
recipe_validation_enabled = "True"
1919
recipe_validation_shape_availability_enabled = "True"
@@ -30,16 +30,16 @@ locals {
3030
object_filename = "corrino_registration.json"
3131
object_filepath = format("%s/%s", abspath(path.root), random_uuid.registration_id.result)
3232
object_content = jsonencode({
33-
"Registration ID" = random_uuid.registration_id.result
34-
"Deploy DateTime" = local.ts
35-
"Administrator" = var.corrino_admin_email
36-
"Workspace Name" = local.app_name
37-
"Deploy ID" = local.deploy_id
38-
"Corrino Version" = var.corrino_version
39-
"FQDN" = local.fqdn.name
40-
"Tenancy OCID" = local.oci.tenancy_id
41-
"OKE Cluster OCID" = local.oke.cluster_ocid
42-
"Region" = local.oci.region_name
33+
"Registration ID" = random_uuid.registration_id.result
34+
"Deploy DateTime" = local.ts
35+
"Administrator" = var.corrino_admin_email
36+
"Workspace Name" = local.app_name
37+
"Deploy ID" = local.deploy_id
38+
"Control Plane Version" = var.stack_version
39+
"FQDN" = local.fqdn.name
40+
"Tenancy OCID" = local.oci.tenancy_id
41+
"OKE Cluster OCID" = local.oke.cluster_ocid
42+
"Region" = local.oci.region_name
4343
})
4444
upload_path = "https://objectstorage.us-ashburn-1.oraclecloud.com/p/bqCfQwvzAZPCnxehCZs1Le5V2Pajn3j4JsFzb5CWHRNvtQ4Je-Lk_ApwCcurdpYT/n/iduyx1qnmway/b/corrino-terraform-registry/o/${random_uuid.registration_id.result}/"
4545
}
@@ -49,10 +49,6 @@ locals {
4949
"corrino_uuid" = random_uuid.registration_id.result
5050
}
5151

52-
versions = {
53-
corrino_version = var.corrino_version
54-
}
55-
5652
oke = {
5753
deploy_id = local.deploy_id
5854
cluster_ocid = var.existent_oke_cluster_id
@@ -139,7 +135,7 @@ locals {
139135
}
140136

141137
third_party_namespaces = {
142-
prometheus_namespace = var.bring_your_own_prometheus ? var.existent_prometheus_namespace : data.kubernetes_namespace.cluster_tools_namespace.0.id
138+
prometheus_namespace = var.bring_your_own_prometheus ? var.existent_prometheus_namespace : data.kubernetes_namespace.cluster_tools_namespace.0.id
143139
}
144140

145141
env_universal = [
@@ -227,9 +223,9 @@ locals {
227223
config_map_key = "COMPARTMENT_ID"
228224
},
229225
{
230-
name = "CORRINO_VERSION"
226+
name = "CONTROL_PLANE_VERSION"
231227
config_map_name = "corrino-configmap"
232-
config_map_key = "CORRINO_VERSION"
228+
config_map_key = "CONTROL_PLANE_VERSION"
233229
},
234230
{
235231
name = "DJANGO_ALLOWED_HOSTS"

0 commit comments

Comments
 (0)