Skip to content

Commit

Permalink
Merge pull request #7 from holywen/main
Browse files Browse the repository at this point in the history
show how to get admin password in the addon
  • Loading branch information
holywen authored Mar 19, 2024
2 parents 5965d8a + e8b6778 commit 590f50a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The main components of CloudBees CD, use a file system to persist data. Data is
| cbcd_domain_name | Route 53 Domain Name to host CloudBees CD Services. |
| cbcd_flowserver_pod | Flow Server Pod for CloudBees CD Add-on. |
| cbcd_namespace | Namespace for CloudBees CD Addon. |
| cbcd_password | Command to get the admin password of Cloudbees CD |
| cbcd_url | URL for CloudBees CD Add-on. |
| merged_helm_config | (merged) Helm Config for CloudBees CD |
<!-- END_TF_DOCS -->
Expand Down
2 changes: 1 addition & 1 deletion blueprints/01-getting-started/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ output "cbcd_url" {

output "cbcd_password" {
description = "Command to get the admin password of Cloudbees CD"
value = "kubectl get secret --namespace ${module.eks_blueprints_addon_cbcd.cbcd_namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 --decode; echo"
value = "module.eks_blueprints_addon_cbcd.cbcd_password"
}

output "acm_certificate_arn" {
Expand Down
2 changes: 1 addition & 1 deletion blueprints/02-at-scale/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ output "cbcd_url" {

output "cbcd_password" {
description = "command to get the admin password of Cloudbees CD"
value = "kubectl get secret --namespace ${module.eks_blueprints_addon_cbcd.cbcd_namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 --decode; echo"
value = "module.eks_blueprints_addon_cbcd.cbcd_password"
}

output "acm_certificate_arn" {
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
locals {
flow_db_secret_data = fileexists(var.flow_db_secrets_file) ? yamldecode(file(var.flow_db_secrets_file)) : {}
create_flow_db_secret = length(local.flow_db_secret_data) > 0
namespace = try(var.helm_config.namespace, "cbcd")
}

resource "kubernetes_namespace" "cbcd" {
metadata {
name = try(var.helm_config.namespace, "cbcd")
name = local.namespace
}
}

Expand All @@ -25,7 +26,7 @@ resource "kubernetes_secret" "flow_db_secret" {
resource "helm_release" "cloudbees_cd" {

name = try(var.helm_config.name, "cloudbees-cd")
namespace = try(var.helm_config.namespace, "cbcd")
namespace = local.namespace
create_namespace = false
description = try(var.helm_config.description, null)
chart = "cloudbees-flow"
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ output "cbcd_url" {
value = "https://${var.host_name}"
}

output "cbcd_password" {
description = "Command to get the admin password of Cloudbees CD"
value = "kubectl get secret --namespace ${local.namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 --decode; echo"
}

output "cbcd_domain_name" {
description = "Route 53 Domain Name to host CloudBees CD Services."
value = var.host_name
Expand Down

0 comments on commit 590f50a

Please sign in to comment.