anchor.diff:  ---
   layout: post
  -title: Use OpenLDAP for User Authentication in GoCD
  +title: Installing and Configuring GoCD on GKE using Helm
   type: post
   author: Mohamed Najiullah
   excerpt: "Understand more about how to use OpenLDAP and authenticate and scale your users in GoCD"
   summary_image: "/assets/images/blog/cd-hacks/open-ldap-gocd.jpg"
  -title_tag_of_header: "OpenLDAP for User Authentication in GoCD | GoCD Blog"
  +title_tag_of_header: "Installing and Configuring GoCD on GKE using Helm | GoCD Blog"
   meta_description: "Understand more about how to use OpenLDAP and authenticate and scale your users in GoCD"
  -meta_keywords: "ldap, openldap, user authentication, ci cd, authenticate users, active directory"
  -tags: CD Hacks
  +meta_keywords: "configuring gocd, gke, helm, kubernetes, ci/cd"
  +tags: 
   draft: true
   ---
   <% content_for :banner do %>
  
positive.code: 
  While exploring how to do it, we had to spend some time to find out all the information we needed just to install and configure GoCD without the migration. So I decided to write this post hoping someone like me would find it helpful.
  
  ## Creating a Cluster
  
  You can create the cluster using multiple options. You can use
  
  *[google-cloud-sdk](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster)
  *GKE UI interface
  *[terraform](https://www.terraform.io/docs/providers/google/index.html)
  
  You can specify the zone, GKE master version, the machine type and number of nodes among other things as per your requirements. Remember to allocate enough vCPUs and RAM to run the GoCD server as well as the agents.
  
  ##Deploy GoCD
  GoCD provides a [helm](https://github.com/helm/charts/tree/master/stable/gocd) chart to deploy GoCD easily in a cluster. You can also find a basic [tutorial](https://docs.gocd.org/current/gocd_on_kubernetes/gocd_helm_chart/helm_install.html) here which I’m repeating for better continuity.
  
  1.First you have to set the correct context so that we are able to deploy GoCD in the correct cluster.
  
  ~~~
  gcloud container clusters get-credentials <CLUSTER-NAME> —- zone <ZONE-NAME> —- project <PROJECT-NAME>
  ~~~
  
  2. Once the correct context is set, [helm](https://helm.sh/) needs to be installed. If you don’t have it in your machine, install it using one of the many options that helm offers. Then helm needs to be installed on the cluster. This can be done as
  
  ~~~
  helm init
  
negative.code:     secretName: gocd-server-ssh
  ~~~
  
  ##**Configuring Access to GitHub for GoCD Agent**
  
  Just because the GoCD Server has access doesn’t mean that it’s corresponding GoCD agents will also have access. Access for agents has to be configured separately. This is similar to configuring for the server. You can specify the secret name in the *agent.security.ssh* section as follows
  
  