Pulse Multi-Node Rancher Based Deployment

This document explains the process of deploying Pulse on a single node Kubernetes (K8s). This deployment is performed by using Rancher.

Prerequisites

  • All the servers must be part of the same network.

  • You must manually set the hostname of the servers you create by executing the command hostnamectl set-hostname pulk8s01.sre.axl

  • Do ssh copy-id in all the list of IPs which is provided from datacenter.

    • If you do not have a key pair in your system, you must execute the command ssh-keygen.
    • ssh-copy-id root@<<IP address>>
  • Install Kubectl from the official Kubernetes documentation.

Rancher Cluster Setup in K8s

To set up a rancher based cluster:

  1. Clone the GIT repository git@bitbucket.org:acceldata/ad-platform-infrastructure.git.
  2. Copy the public key to the internal_infra folder. You can navigate to this folder by executing the following command. You must use the same key pair that was generated above.
Bash
Copy
  1. Edit the docker.yml, content. You must replace the id_rsa.pub, with the name of the file as shown in the following block
Bash
Copy
  1. Edit the docker password as shown in the following block.
Bash
Copy
  1. Save and exit the docker.yml file.
  2. Edit the hosts.ini file with the fully qualified domain name (FQDN) and the Internet Protocol (IP) and update the key. You can accomplish this by executing the following block.
Bash
Copy
  1. Test if the ping command works, based on the group name provided. You can accomplish this by executing the following command.
Bash
Copy
  1. Execute the following command to install docker and ntp in all the machines that are part of the group popk8s. You must execute the command in all the machines that are part of the popk8s group.
Bash
Copy

Install Rancher

  1. Download and install Ranched by executing the following block of code.
Bash
Copy
  1. Configure RKE/Rancher to bring up Kubernetes cluster. You can accomplish this by executing the following block.

Bash
Copy
  1. Edit the cluster.yml file. You must replace the entire ingress block the following block.
Bash
Copy
  1. Create the K8s cluster by executing the following code.
Bash
Copy

You get the following message on screen.

Bash
Copy

Important

If you encounter any error in getting the K8s cluster up, you must execute the following command in each node and reboot the node.

Bash
Copy

Important

You must now test the connectivity to the Kubernetes cluster. You may encounter an error with the message The connection to the server localhost:8080 was refused - did you specify the right host or port? . If you get this error, you must add the following command to .bashrc.

Bash
Copy
  1. You can check the list of hosts by executing the following command.
Bash
Copy

Note

To execute the kubectl command, you must install Kubectl tool. You can follow this documentation to install Kubectl.

Metallb and Nginx Setup

  1. Download the keyz binary for ECR secret and replace the following file For MAC system.

https://bitbucket.org/acceldata/ad-automation-test/src/Dev/ops/popk8scluster/

  1. Check out the Bitbucket repository https://bitbucket.org/acceldata/ad-service/src/development/.
Bash
Copy
  1. Open the helmfile-ha.yml or helmfile.yml file.
  2. Comment the lines of code as shown in the following block.
Bash
Copy

Nginx Deployment

If you are planning multiple Pulse installations and if each installation has a different namespace, you must execute the steps in the (Link Removed) document and then proceed with the steps.

  1. Execute the following commands to install the helmfile.
Bash
Copy
  1. Execute the following commands to install the helm.
Bash
Copy
  1. Execute the following commands in to install K9s.
Bash
Copy

You get the response as shown in the following block

Bash
Copy
  1. Execute the following commands to complete the installation.
Bash
Copy

You can now use the helmfile by executing the following commands.

Bash
Copy

You can verify the nginx deployment by executing the following commands.

Bash
Copy

Metallb Deployment

  1. Open the helm-controller values.yaml (the file location is helm-controller/ha/ad-mettlb/values.yaml)
  2. Ensure you use your subnet to specify the range and not some other subnet.
Bash
Copy
  1. Execute the commands in the following block to deploy Metallb.
Bash
Copy
  1. Verify if metallb pods and nginix services get an External IP from the range provided.
Bash
Copy

Rook-CEPH Deployment

Execute the following commands.

Bash
Copy

Deployment of Pulse DB, Core, and Add-ons

If you are planning multiple Pulse installations and if each installation has a different namespace, you must execute the steps in the (Link Removed) document and then proceed with the steps.

  1. Execute the following command for DB deployment.
Bash
Copy
  1. Execute the following command for deployment of accelo and deployer.
Bash
Copy
  1. ad-accelo is used to config cluster.
  2. ad-deployer is used to deploy agents for ansible based deployment like. HDP,kafka Standalone

The following sample commands must be used to push license file, keytab, certs, krb5.conf to pvc.

For HDP or Kafka standalone (ansible deployment), you must generate an SSH key and ensure that you are able to perform passwordless secure login to the cluster nodes, and then copy the key to the ad-accelo pod. sample command. The sample command is as follows.

Bash
Copy

Ensure that license file is in /data01/acceldata.

  1. Execute inside the ad-accelo-configure pod and verify below ENV’s.
Bash
Copy
  1. Configure core in the accelo pod by executing the following command.
Bash
Copy
  1. In the pod execute the following command.
Bash
Copy

You get the message as shown in the following block.

Bash
Copy

The deployer asks the following questions. You can respond to them according to your configurations.

Question AskedGuidelines for Response
Is the 'Database Service' up and running? [y/n]Type y if the database service is running.
Is this current node an 'Edge Node' of the cluster? [y/n]:Type n if the node is not an edge node. Else type y.
Enter Your Cluster's Display NameEnter the cluster name.
Enter Ambari URL (with http/https)Enter the full ambari URL with port number. For example [http://<<ip address>>:8080](http://<<ip address>>:8080).
Enter Ambari UsernameEnter your Ambari username.
Enter Ambari User PasswordEnter your Ambari password. This password is securely encrypted and stored on this machine.
Do you have hive metastore enabled (y/n)?Type y if you have enabled the hive metastore.
Select the hive metastore type: mysql/mariadbEnter either mysql or mariadb.
Enter the hive metastore DB UsernameEnter the username for hive metastore.
Enter the hive metastore DB PasswordEnter the password for hive metastore.
Enter the hive metastore Server Timezone (Example: IST/UTC)Enter the timezone for metastore. This can be IST or UTC.

The following block shows sample responses for each of the above questions.

Bash
Copy

The sample discovered configurations window is as follows. You can also find the next set of questions asked.

Bash
Copy

Notes

  • The IP addresses for Hydra is same as the container name, To Fix this issue, create a override.yml file in the /data01/acceldata/work/<Cluster_Name>/ location.
  • The cluster name for Victoria metrics is obtained from the acceldata__advisa__test.conf. You must replace it in override.yml file.
  • You must add the following environment.
Bash
Copy

The content of override.yml file is as follows.

Bash
Copy

Mongo DB URI Correction

  1. Execute the following commands in accelo pod.
Bash
Copy
  1. Replace the MONGO_URI=ZN4v8cuUTXYvdnDJIDp+R8Z+ZsVXXjv8zDOvh8UwQXosC8vfVkGYGWGPNnX64ZVSp9yHgErQknPBAfYZ9cOG1A== in the /data01/acceldata/config/acceldata<clusterName>.conf file.
Bash
Copy

For ansible based deployment of hydra (HDP/kafka), fix hydra_server_ ur manually by executing the following code block.

Bash
Copy
  1. Execute the following command.
Bash
Copy

Deploy Core Services

  1. Uncomment the following statements from helmfile-ha/helmfile.yml file, You must perform this step for all core and addon services. You must retain the comment if you wish to deploy rook-ceph, ad-accelo.
Bash
Copy
  1. The version/build number currently used is containers.tagName=2.1.9-200622. You must execute the following command.
Bash
Copy

Deploy Add-on Services

  1. Execute the following command to deploy the add on services.
Bash
Copy

You can now access the Pulse UI from the following URL.

HTML
Copy

FSA Load

You must execute these commands after configuring the add-on services.

  1. Connect to ad-accelo-configure, pod and run the following command.
Bash
Copy
  1. Execute the folloiwng to configure notifications.
Bash
Copy
  1. Validate if the ad-hydra server container is running and then execute the following command.
Bash
Copy

Other Configurations

Installation and Uninstallation of agents for HDP/Kafka (ansible based deployment). Once sync is run you must delete it before running with “uninstall tag“.

  1. Ensure that the /ad-service/ops/helm-controller/helmfile-ha.yaml file has the following content.
Bash
Copy

Note : clusterName is the same name that you provided in the accelo config cluster.

  1. Execute the commands in the following block to monitor weave scope.
Bash
Copy

You can access the weave UI from the http://localhost:4040 UI.

  1. Execute the following command to delete the add-ons.
Bash
Copy
  1. To deploy a new version of the build, execute the following command (Consider that the current version is 2.1.9-200622 and you want to upgrade to 2.1.9-200822).
Bash
Copy

Configurations for Kafka Standalone

For Kafka you need not deploy all the add-on services. You must add a new selection kafkastandalone: true.

Bash
Copy
  1. Execute the following commands to deploy addons for Kafka.
Bash
Copy
  1. The override.yaml file must have the following content. This file requires a access reconfigured cluster after the changes are done. This required for logs agent to understand and read the log files for Kafka.
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard