Install in Google Cloud Platform (GCP)
This topic explains how to use Helm to install the Harness Self-Managed Enterprise Edition in Google Cloud Platform (GCP).
For Helm installation instructions, go to Helm installation or the Harness Helm chart readme.
Prerequisites
This topic assumes you have experience with GCP, such as setting up projects, namespaces, and clusters.
In addition to a Harness account, you need the following:
- Access to Helm charts
- An external static IP address
- GCP
- GKE with gcloud CLI
To install in GCP manually, you first reserve your static IP, then install Harness Self-Managed Enterprise Edition.
Reserve an external static IP
To reserve an external static IP in GCP, do the following:
-
Go to your GCP project.
-
Select VPC network. The VPC networks page opens.
-
In the left nav, select IP addresses. The IP addresses page opens.
-
Select Reserve External Static IP Address, then select the following.
-
Network Service Tier: Premium.
-
IP Version: IPv4.
-
Type: Regional.
infoMake sure the IP address is in the same region as your cluster. Make a note of or copy the IP address. You'll need it later in the installation process.
-
-
Select Reserve.
Install Harness Self-Managed Enterprise Edition in GCP
-
Create a new cluster or use an existing one.
-
Create a new namespace:
-
Set your Kubernetes context to the GCP project you are using.
-
Run the following
kubectl create ns <namespace name>
-
-
Download the latest charts from the Harness Helm chart repo.
infoCharts are located under Assets. The file name looks like
harness-0.15.0.tgz
. -
Extract the
*.tgz
file. -
Open the
override-demo.yaml
file in a file editor. -
Add your external static IP address in the following fields.
loadbalancerURL: http://xx.xx.xx.xx
loadBalancerIP: xx.xx.xx.xx
-
Set the following fields.
loadbalancerURL: http://xx.xx.xx.xx
ingress:
# --- Enable Nginx ingress controller gateway
enabled: true
annotations: {}
loadBalancerIP: 34.136.145.137
className: "harness"
loadBalancerEnabled: true
useSelfSignedCert: false
ingressGatewayServiceUrl: ''
hosts:
- "" -
Search for "nginx:", and set
create:
totrue
.nginx:
create: true -
Search for "defaultbackend:", and set
create:
totrue
.defaultbackend:
create: true -
Save the file and exit.
-
Run the following from your terminal.
helm install <YOUR_RELEASE_NAME> <path to Harness directory> -n <YOUR_NAMESPACE_NAME> -f override.demo.yaml
for example:
helm install test-release harness/ -n smp-test -f harness/override-demo.yaml
-
After the installation is complete, paste the
loadbalancerURL
in your browser's address bar, and then sign in to the Harness UI. -
Complete to the post-install next steps.
To install in GKE using the gcloud CLI, you first create your test cluster, then install Harness Self-Managed Enterprise Edition.
Create a test cluster
To create your test cluster in GKE using the gcloud CLI, do the following:
-
Configure the gcloud CLI with your Google Cloud account.
infoThese can also be run in the Google Cloud Shell. For more information, go to Google Cloud Shell.
-
Run the following GKE cluster configuration, modifying the
< >
enclosed values with those from your own environment.gcloud beta container --project <gcp_project> clusters create "<cluster_name>" --no-enable-basic-auth --cluster-version "1.27.8-gke.1067004" --release-channel "regular" --machine-type "e2-standard-8" --image-type "COS_CONTAINERD" --disk-type "pd-balanced" --disk-size "100" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "7" --logging=SYSTEM,WORKLOAD --monitoring=SYSTEM --enable-ip-alias --network "projects/<gcp_project>/global/networks/default" --subnetwork "projects/<gcp_project>/regions/us-central1/subnetworks/default" --no-enable-intra-node-visibility --default-max-pods-per-node "110" --security-posture=standard --workload-vulnerability-scanning=disabled --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0 --binauthz-evaluation-mode=DISABLED --enable-managed-prometheus --enable-shielded-nodes --node-locations "<zone, example: us-central1-c>" --zone <zone, example: us-central1-c>
-
Create a Static IP in the same zone as your GKE cluster.
gcloud compute addresses create smp-test-ip --project=<gcp_project> --region=<example: us-central1>
-
Retrieve and note your IP address.
gcloud compute addresses describe smp-test-ip --region <region>
-
Get a Kubernetes config for your new cluster.
gcloud container clusters get-credentials smp-cluster --zone <zone, example: us-central1-c> --project <gcp_project>
Install Harness Self-Managed Enterprise Edition in GKE
-
Create a namespace for your deployment.
kubectl create namespace harness
-
Retrieve and extract the latest Harness Helm charts. The harness charts will look like
harness-<version_number>
. -
Open the
harness/override-demo.yaml
file in any editor, and modify the following values.Key Value global.ingress.enabled
true
global.loadbalancerURL
"https://<YOUR_IP_ADDRESS>"
global.ingress.hosts
""
global.ingress.loadBalancerIP
<YOUR_IP_ADDRESS>
global.ingress.loadBalancerEnabled
true
platform.bootstrap.networking.defaultbackend.create
true
platform.bootstrap.networking.nginx.create
true
platform.bootstrap.networking.nginx.loadBalancerEnabled
true
platform.bootstrap.networking.nginx.loadBalancerIP
<YOUR_IP_ADDRESS>
-
Install the Helm chart.
helm install harness harness/ -f override-demo.yaml -n harness
-
Navigate to the sign up UI at
https://<YOUR_IP_ADDRESS>/auth/#/signup
to create your admin user. -
Complete to the post-install next steps.
Post-install next steps
- Deploy the Harness modules you want to use. For more information, go to Deploy Harness modules.
- Add your Harness license. For more information, go to Add a Harness license.
- Configure SMTP to allow for additional user invitations. For more information, go to Add SMTP configuration.