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

[Blueprint 02-At scale] Migration to helm-openldap/openldap-stack-ha (part I) #140

Merged
merged 41 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2461d52
Addressing #72
carlosrodlop May 15, 2024
81d56f5
Adding main for ci
carlosrodlop May 15, 2024
7b03742
fix line
carlosrodlop May 15, 2024
152f194
terraform-docs: automated action
github-actions[bot] May 15, 2024
87acb13
Update blueprints/02-at-scale/README.md
carlosrodlop May 15, 2024
812eb76
Update blueprints/02-at-scale/README.md
carlosrodlop May 15, 2024
2057eb3
terraform-docs: automated action
github-actions[bot] May 15, 2024
f507f8b
Update blueprints/02-at-scale/outputs.tf
carlosrodlop May 15, 2024
a8f8311
Update blueprints/02-at-scale/outputs.tf
carlosrodlop May 15, 2024
b0ccb68
Update blueprints/02-at-scale/outputs.tf
carlosrodlop May 15, 2024
3094544
Update blueprints/02-at-scale/outputs.tf
carlosrodlop May 15, 2024
643bcfc
terraform-docs: automated action
github-actions[bot] May 15, 2024
3c5d134
Update blueprints/02-at-scale/main.tf
carlosrodlop May 15, 2024
0072ba3
Preparing bundle
carlosrodlop May 15, 2024
44d2178
Removing old secret hardcoded in the file
carlosrodlop May 15, 2024
8da46a7
Replacing osixia-openldap by openldap-stack
carlosrodlop May 15, 2024
4457a03
Merge branch 'ldap' of github.com:cloudbees/terraform-aws-cloudbees-c…
carlosrodlop May 15, 2024
ea28c16
Removing osixia-ldap
carlosrodlop May 19, 2024
2112e4b
Casc. Test ldap password
carlosrodlop May 19, 2024
b3670a0
casc test
carlosrodlop May 19, 2024
2956470
Casc: Adding Ldap configuration for Example Org
carlosrodlop May 20, 2024
26061e0
Casc - refactor names
carlosrodlop May 20, 2024
7f54859
Adding notes on users and groups configuration
carlosrodlop May 20, 2024
929d7c2
Reformat names on secrets
carlosrodlop May 20, 2024
34933e0
Prepare secrets to be templating
carlosrodlop May 20, 2024
4eb885d
Template secrets
carlosrodlop May 20, 2024
59713f4
Casc: enabling Rbac configuraion
carlosrodlop May 20, 2024
ed31b61
Setting ldap branch
carlosrodlop May 20, 2024
5f42e79
Secrets passed as String not as file path
carlosrodlop May 20, 2024
08234dd
Update blueprints/02-at-scale/k8s/openldap-stack-values.yml
carlosrodlop May 20, 2024
fea0242
Update variables.tf
carlosrodlop May 20, 2024
4c563f2
Update blueprints/02-at-scale/k8s/openldap-stack-values.yml
carlosrodlop May 20, 2024
179df16
Replace to ACME Coorporation
carlosrodlop May 21, 2024
f71506a
Merge branch 'ldap' of github.com:cloudbees/terraform-aws-cloudbees-c…
carlosrodlop May 21, 2024
6814aac
Replacing by global password
carlosrodlop May 21, 2024
3397e61
typo and disabling phpldapadmin
carlosrodlop May 21, 2024
fe66954
typo
carlosrodlop May 21, 2024
bc021d3
Moving to local.global_pass_jsonpath
carlosrodlop May 21, 2024
ff8388c
Merge branch 'develop' into ldap
carlosrodlop May 21, 2024
e092815
terraform-docs: automated action
github-actions[bot] May 21, 2024
e9bbc45
terraform-docs: automated action
github-actions[bot] May 21, 2024
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
4 changes: 2 additions & 2 deletions blueprints/02-at-scale/casc/oc/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ items:
- items
plugins:
- plugins
# rbac:
# - rbac
rbac:
- rbac
variables:
- variables
2 changes: 1 addition & 1 deletion blueprints/02-at-scale/k8s/cbci-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OperationsCenter:
Retriever:
Enabled: true
scmRepo: https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon.git
scmBranch: main
scmBranch: ldap
scmBundlePath: blueprints/02-at-scale/casc/oc
scmPollingInterval: PT20M
Persistence:
Expand Down
4 changes: 2 additions & 2 deletions blueprints/02-at-scale/k8s/openldap-stack-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ customLdifFiles:
o: Example, Inc
objectclass: dcObject
objectclass: organization

#CloudBees RBAC groups (in Casc) are mapped to the following LDAP groups.
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved
01-groups.ldif: |-
dn: ou=Groups,dc=example,dc=org
changetype: add
Expand All @@ -41,7 +41,7 @@ customLdifFiles:
objectclass: groupOfUniqueNames
uniqueMember: cn=developer_3,dc=example,dc=org
uniqueMember: cn=developer_4,dc=example,dc=org

#Use these users cn and global password for logging into CloudBees CI.
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved
02-users.ldif: |-
dn: cn=developer_1,dc=example,dc=org
changetype: add
Expand Down
6 changes: 4 additions & 2 deletions blueprints/02-at-scale/k8s/secrets-values.yml.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Copyright (c) CloudBees, Inc.

secGithubUser: "exampleUser" #Required for OC casc security.yaml
secGithubToken: "ExampleToken" #Required for OC casc security.yaml
sec_ldapPassword: ${ldap_password} # Do not change this variable name

sec_githubUser: "exampleUser"
sec_githubToken: "ExampleToken"
# secLicenseCert: |
# License certificate from CloudBees
# secLicenseKey: |
Expand Down
9 changes: 6 additions & 3 deletions blueprints/02-at-scale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ resource "time_static" "epoch" {
# CloudBees CI Add-ons

module "eks_blueprints_addon_cbci" {
source = "cloudbees/cloudbees-ci-eks-addon/aws"
version = ">= 3.17108.0"
source = "../../"
#source = "cloudbees/cloudbees-ci-eks-addon/aws"
#version = ">= 3.17108.0"

hosted_zone = var.hosted_zone
cert_arn = module.acm.acm_certificate_arn
Expand All @@ -105,7 +106,9 @@ module "eks_blueprints_addon_cbci" {
}

create_k8s_secrets = true
k8s_secrets_file = "k8s/secrets-values.yml"
k8s_secrets = templatefile("k8s/secrets-values.yml", {
ldap_password = local.global_password
})

prometheus_target = true

Expand Down
5 changes: 2 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
locals {
cbci_ns = "cbci"
cbci_secrets_name = "cbci-secrets"
secret_data = fileexists(var.k8s_secrets_file) ? yamldecode(file(var.k8s_secrets_file)) : {}
create_secret = alltrue([var.create_k8s_secrets, length(local.secret_data) > 0])
create_secret = alltrue([var.create_k8s_secrets, length(var.k8s_secrets) > 0])
oc_secrets_mount = [
<<-EOT
OperationsCenter:
Expand Down Expand Up @@ -57,7 +56,7 @@ resource "kubernetes_secret" "oc_secrets" {
namespace = kubernetes_namespace.cbci[0].metadata[0].name
}

data = yamldecode(file(var.k8s_secrets_file))
data = yamldecode(var.k8s_secrets)
}

resource "kubectl_manifest" "service_monitor_cb_controllers" {
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ variable "create_k8s_secrets" {
type = bool
}

variable "k8s_secrets_file" {
description = "Secrets file .yml path containing the secrets names:values for cbci-secrets."
variable "k8s_secrets" {
description = "Secrets file .yml as String containing the secrets names:values. It is required when create_k8s_secrets is enabled."
carlosrodlop marked this conversation as resolved.
Show resolved Hide resolved
default = "secrets-values.yml"
type = string
}
Expand Down
Loading