GithubHelp home page GithubHelp logo

hello-node.js's Introduction

Setup kafka cluster Using Ansible

Follow the steps to setup kafka cluster

Step:1

  • Create k8s ServiceAccount
    Use this sample RBAC manifest to create serviceAccount.
    Note: This example have all the role permissions.You can change it to minimum necessary role permission as per your requirement.
apiVersion: v1
kind: ServiceAccount
metadata:
    name: litmus-kafka-sa
    namespace: default
    labels:
      name: litmus-kafka-sa
---

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: litmus-kafka-sa
  labels:
    name: litmus-kafka-sa
rules:
- apiGroups: ["*"]
  resources: ["*"]
  verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: litmus-kafka-sa
  labels:
    name: litmus-kafka-sa
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: litmus-kafka-sa
subjects:
- kind: ServiceAccount
  name: litmus-kafka-sa
  namespace: default

Step 2:

  • Create a k8s-secret and provide your aws credentials If your k8s-cluster is on aws-eks
apiVersion: v1
kind: Secret
metadata:
        name: aws-secret
data:
        AWS_ACCESS_KEY_ID: "your base64-encoded access key"   
        AWS_SECRET_ACCESS_KEY: "your base64-encoded secret key"
        AWS_DEFAULT_REGION: "your base64-encoded region"
        EKS_CLUSTER_NAME:  "your base64-encoded cluster name"
        

Step 3:

  • Create a litmus-kafka-deployer pod that will setup your kafka cluster

Supported ENV variables

Variables Description Specify In Pod Notes
MODE Provide setup to setup kafka cluster and cleanup for uninstallation Required It supports two value
MODE: setup
MODE: cleanup
PLATFORM Provide the target platform name. Like eks Optional Currently it supports only eks cluster
PLATFORM: eks
KUDO_VERSION Provide the Kudo version for kafka Installation Optional If KUDO_VERSION is not provided ,By-default It will Install the 0.12.0 version of KUDO
KAFKA_NAMESPACE Provide the namespace for kafka Required Example:
KAFKA_NAMESPACE: kafka
MONITORING_NAMESPACE Provide the namespace for prometheus and grafana Required Example:
MONITORING_NAMESPACE: monitoring
LITMUS_GIT_TAG Provide the tag of Litmus github Repository Required Example:
LITMUS_GIT_TAG: 2.0.0-Beta7
Use this Example to create litmus-kafka-deployer-pod.
apiVersion: v1
kind: Pod
metadata:
  name: litmus-kafka-deployer
  labels:
    app: litmus-kafka-deployer
spec:
  serviceAccountName: litmus-kafka-sa
  containers:
  - name: litmus-kafka-deployer-container
    image: litmuschaos/kafka-deployer:latest
    imagePullPolicy: Always
    envFrom:
        - secretRef:
              name: aws-secret
    env:
        ##  It defines the mode of the experiment
        ##Supported values: setup, cleanup
        - name: MODE
          value: "setup"
          
         ## It defines the platform of the k8s cluster
         ## Supported value: eks
        - name: PLATFORM
          value: "eks"
        
        ## It defines the kubectl-Kudo version
        - name: KUDO_VERSION
          value: 0.12.0
          
        ## Name of namespace where kafka will be installed
        - name: KAFKA_NAMESPACE
          value: "kafka"

        ## Name of namespace where prometheus and grafana will be installed
        - name: MONITORING_NAMESPACE
          value: "monitoring"

        ## Tag of LITMUS Repository that will be clone
        - name: LITMUS_GIT_TAG
          value: 2.0.0-Beta7

 

It takes few minutes to setup the kafka cluster

hello-node.js's People

Contributors

adarshkumar14 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.