Skip to content

Latest commit

 

History

History
155 lines (117 loc) · 7.5 KB

README.md

File metadata and controls

155 lines (117 loc) · 7.5 KB

Helm for Blazemeter Private Location

Deploy Blazemeter private location engine to your Kubernetes cluster using HELM chart. Plus the chart allows to make additional configurations if required.

Helm-Blazemeter-crane

[1.0] Requirements

  1. A BlazeMeter account
  2. A Kubernetes cluster
  3. Latest Helm installed
  4. The kubernetes cluster needs to fulfill Blazemeter Private location requirements

[2.0] Usage

There are 2 methods for installing this Helm chart, or any Helm chart for that matter. In any case, the user will need Harbour_ID, Ship_ID & Auth_token from Blazemeter.

[2.1] Here is how to generate Harbour_ID, Ship_ID and Auth_token

  1. Get the Harbour_ID, Ship_ID and Auth_token through BlazeMeter GUI

    • Login to Blazemeter & create a Private Location
    • Copy the Harbour_ID once the private location has been created in BlazeMeter.
    • Create an Agent
    • Copy the Ship_ID & Auth_token, you can copy Harbour_ID if you missed it earlier.
  2. Get the Harbour_ID, Ship_ID and Auth_token through BlazeMeter API

    • You should have Blazemeter API key and secret
    • Create a Private location using API
    • Copy the Harbour ID
    • Create an Agent using API
    • Copy the Ship_ID
    • Generate the docker command using API
    • Copy Auth_token.

[2.2] Two common methods of installing HELM chart

  1. Using helm install method - read documentation
  2. Pulling the chart using helm pull and then install the chart using helm install along with additional configurations. read documentations

[2.3] We recommend adding the blazemeter-crane repo to your helm repo list

  1. We will add blazemeter helm reporsitory to our cluster, read documentations
helm repo add blazemeter https://helm-repo-bm.storage.googleapis.com/charts
  1. Confirm the addition of this repository using the following:
helm repo list

Once the repository has been added, we can simply use the repository name (blazemeter in our case) to install the charts through chart name (instead of using the complete url all the time).

[2.3.1] Method 1

Install the chart directly this does not work as we are passing more than 2 arguments.

Do not use this:

helm install crane blazemeter/blazemeter-crane --set env.harbour_id="Harbour_ID" env.ship_id="Ship_ID" env.authtoken="Auth_token" --create-namespace --namespace=bm

Use the method 2

[2.3.2] Method 2

  1. Pull the chart
helm pull blazemeter/blazemeter-crane --untar=true

Again, blazemeter is our repo name as added before [2.3], and blazemeter-crane is the chart name. This above command will by-default pull the latest version of the chart, i.e. 0.1.2 which allows configuring CA_bundle. However, if you are interested in other version please use the flag --version= in the pull command.

  1. Open values file to make ammendments as per requirements
vi values.yaml
  1. Add the Harbour_ID, Ship_ID and Auth_token in the values.yaml file. Harbour_ID, Ship_ID and authtoken is the one we aquired before see[2.1].
env:
  authtoken: "[auth-token]"
  harbour_id: "[harbour-id]"
  ship_id: "[ship-id]"
  1. If the proxy needs to be configured, change the value for use to yes. Now, add the configuration for http_proxy or/and https_proxy. Make sure the values are set to yes before adding the proxy path, as shown below:
proxy:
  use: yes
  http_proxy: yes
  http_path: "http://server:port" 
  https_proxy: yes
  no_proxy: "kubernetes.default,127.0.0.1,localhost,myHostname.com"
  1. Change auto_update: false if you do not want the cluster to be auto-updated (Not recommended though).
  auto_update: "'true'"
  1. Lastly, you can name the namespace for this deployment, just add the name in namespace, this helm chart will be installed under that namespace.
deployment:
  name: crane
  namespace: "bm"
  1. Please avoid switching the serviceAccount.create to yes, as serviceAccount other than default will cause issues with Blazemeter crane deployments. Though I have setup code which will successfully create a new serviceAccount and assign it to all resources in this Helm chart, this is something we need to avoid for now.

  2. Now, if you want to configure your Kubernetes installation to use CA certificates, make changes to this section of the values.yaml file:

  • Change the use to yes
  • Provide the path to certificate file respectively for both (ca_subpath & aws_subpath). The best thing is to just copy/move these cert files in the same directory as this chart and just provide the name of the certs instead of complete path.
ca_bundle:
  use: no
  ca_subpath: "certificate.crt"
  aws_subpath: "certificate.crt"
volume:
  volume_name: "volume-cm"
  mount_path: "/var/cm"
  1. Once the values are updated, please verify if the values are correctly used in the helm chart:
helm template .

This will print the template helm will use to install this chart. Check the values and if something is missing, please make ammends.

  1. Install the helm chart
helm install crane blazemeter-crane --create-namespace --namespace=bm

Here, crane is the name we are setting for the chart on our system and blazemeter-crane is the actual name of the chart. Make sure the namespace declared here is the same as the one we declared in the values file (see 2.3.2.6 section).

[2.4] Varify the chart installation

To varify the installation of our Helm chart run:

helm list -A

[3.0] Recommendations

It is recommended to install this Helm chart onto the auto-scalable cluster for example - EKS, GKE or AKS.

However, make sure you are scalling the nodes, as it is not recommended to go with EKS Fargate or GKE Autopilot, those types of autoscalling is not supported for Blazemeter crane deployments.

Therefore, always go with Node autoscalling

[4.0] Changelog:

  • 0.1.2 - Supports Proxy, CA_certs as an additional configurable aspect of Blazemeter crane installation
  • o.1.1 - Support proxy as an additional configurable aspect of Blazemeter crane installation
  • 0.1.0 - Supports standard - vanila installation of Blazemeter crane installation (no proxy or CA_Bundle configurable)