Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show how to get admin password in the addon #7

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading