Skip to main content
Kafka Setup with Script Code प्रकाशित: 03 जुलाई 2026 | श्रेणी: DevOps | लेखक: तकनीकी विशेषज्ञ 🌙 Dark Mode Apache Kafka एक शक्तिशाली डेटा स्ट्रीमिंग प्लेटफॉर्म है। यहाँ इसे स्क्रिप्ट कोड के ज़रिए सेटअप करने की पूरी गाइड दी गई है। Twitter LinkedIn WhatsApp चरण 1: सिस्टम जावा अपडेट काफ्का के लिए जावा आवश्यक है, इसे इंस्टॉल करने की स्क्रिप्ट नीचे दी गई है: Copy sudo apt update && sudo apt install default-jdk -y चरण 2: काफ्का डाउनलोड स्क्रिप्ट Copy wget https://apache.org tar -xzf kafka_2.13-3.5.0.tgz cd kafka_2.13-3.5.0 चरण 3: ज़ूकीपर और सर्वर स्टार्ट टर्मिनल 1 में ज़ूकीपर चलाएं: ...

How do you share Terraform plans in PRs before applying changes ?

 Sharing Terraform plans in Pull Requests (PRs) is a standard DevOps practice designed to give reviewers visibility into infrastructure changes before they are applied. You can achieve this using specialized GitOps tools, managed platforms, or custom CI/CD pipelines. [1, 2, 3, 4, 5]


1. Dedicated GitOps Tools (Recommended)
Dedicated GitOps tools specialize in integrating Terraform operations directly into your repository's PR comment section. They handle plan visibility and state-locking natively. [1, 2, 3]
  • Atlantis: An open-source, self-hosted framework that automates Terraform via PR comments. When you open a PR, Atlantis automatically runs terraform plan and prints the output as a Markdown comment. Reviewers can type atlantis apply directly in the comment section to deploy the changes. [1, 2, 3, 4, 5]
  • Digger: An open-source alternative that allows you to orchestrate Terraform within your existing CI/CD provider (like GitHub Actions) rather than hosting a separate backend. It previews plans natively inside the PR and handles state-locking to prevent concurrent execution conflicts. [1, 2, 3, 4]

2. Managed Platforms (TACOS)
Terraform Automation and Collaboration Offerings (TACOS) are enterprise-ready, managed ecosystems that provide deep integration with GitHub, GitLab, and Bitbucket. [1, 2, 3]
  • Terraform Cloud / Enterprise: HashiCorp's official platform streams live plans straight into your PR interface. It shows a high-level summary (e.g., resources to add, change, or destroy) directly on the PR status check line. [1, 2, 3, 4, 5]
  • Spacelift / Scalr / Env0: Alternative cloud solutions that capture terraform plan outputs. They attach an interactive, expandable summary to your PR, allowing you to click through to their dedicated dashboards for full plan exploration. [1, 2, 3, 4]

3. Custom CI/CD Workflows (GitHub Actions & GitLab CI)
If you prefer not to use third-party tools, you can script your CI/CD platform to capture the CLI terminal output and write it to a PR comment. [1, 2]
GitHub Actions Approach
You can leverage community actions like actions/github-script or specialized marketplace extensions to inject text formatting into your workflow. A standard workflow utilizes: [1, 2]
  1. terraform plan -no-color: Generates the plan without terminal ANSI color codes so it remains readable as raw text.
  2. towardsthecloud/terraform-plan-pr-commenter: A popular GitHub action that formats and posts the output under an expandable Markdown <details> tag. [1, 2, 3]
yaml
# Simplified snippet for GitHub Actions
- name: Terraform Plan
  id: plan
  run: terraform plan -no-color -out=tfplan

- name: Post Plan to PR
  uses: towardsthecloud/terraform-plan-pr-commenter@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    plan_output: ${{ steps.plan.outputs.stdout }}
GitLab CI / Merge Request Approach
In GitLab, you can utilize built-in infrastructure tracking. By configuring your pipeline to output a artifact file named blueprint.json using terraform show -json, GitLab natively parses the file and creates a structured graphical widget directly inside your Merge Request interface.

Key Best Practices
  • Use Collapsible Formatting: Raw plan files can exceed thousands of lines. Wrap the text inside HTML <details> and <summary> tags to keep your PR interface clean. [1, 2, 3]
  • Mask Sensitive Data: Terraform plans sometimes display plain-text environment variables, tokens, or private certificates. Ensure your pipeline scripts strip out sensitive strings or pass files securely. [1, 2, 3, 4, 5]
  • Enforce Concurrency Locks: If multiple PRs modify the same cloud environment simultaneously, their plans will overlap and become inaccurate. Configure your workflow to process plans sequentially or implement branch locks. [1, 2]
Would you like help writing a complete pipeline script for a specific CI platform, or are you interested in setting up a particular tool like Atlantis?

Comments

Popular posts from this blog

देवोप्स की पढ़ाई कैसे करें?

 DevOps (डेवऑप्स) एक ऐसा तरीका है जो सॉफ्टवेयर डेवलपमेंट (Dev) और IT ऑपरेशन्स (Ops) को एक साथ लाता है। इसका मुख्य लक्ष्य सॉफ्टवेयर बनाने, टेस्ट करने और डिलीवर करने की प्रक्रिया को तेज और अधिक विश्वसनीय बनाना है। DevOps की पढ़ाई के लिए आप नीचे दिए गए स्टेप्स को फॉलो कर सकते हैं: 1. मूलभूत अवधारणाओं को समझें सबसे पहले, आपको DevOps क्या है, यह क्यों महत्वपूर्ण है, और इसके मुख्य चरण (जैसे कंटीन्यूअस इंटीग्रेशन, कंटीन्यूअस डिलीवरी, मॉनिटरिंग) को समझना होगा। DevOps एजाइल मेथोडोलॉजी (Agile methodology) से बहुत प्रेरित है, इसलिए एजाइल के सिद्धांतों को समझना भी मददगार होगा। 2. आवश्यक स्किल्स और टूल्स सीखें DevOps इंजीनियर बनने के लिए कुछ प्रमुख स्किल्स और टूल्स में महारत हासिल करनी होगी:  * प्रोग्रामिंग स्किल्स (Programming Skills): कम से कम एक स्क्रिप्टिंग भाषा (जैसे Python, Bash, Ruby) का ज्ञान आवश्यक है, क्योंकि ऑटोमेशन में इनका उपयोग होता है। Java, JavaScript, या SQL का ज्ञान भी फायदेमंद हो सकता है।  * Linux/Unix: ऑपरेटिंग सिस्टम (OS) की गहरी समझ, खासकर Linux कमांड-लाइन और फाइ...

What modifications are required in Jenkins after changing the public IP address?

When you change the public IP address of a server running Jenkins , several modifications and checks are required to ensure Jenkins continues to function properly and remains accessible. Here’s a list of key updates you might need to make: 🔧 1. Update Jenkins URL Configuration: Why : Jenkins uses its root URL for things like generating links in email notifications, webhook callbacks, and UI redirects.

How to setup host based routing in eks with ingress controller ?

Of course. To set up host-based routing in EKS, you define an Ingress resource with multiple rules. Each rule specifies a hostname (e.g., app1.example.com) and maps it to a corresponding backend Service. The AWS Load Balancer Controller reads this resource and provisions an Application Load Balancer (ALB) to route traffic based on the Host header of incoming requests. Here’s a complete guide. Prerequisites A running Amazon EKS cluster. kubectl configured to connect to your cluster. The AWS Load Balancer Controller installed in your cluster. This is the standard Ingress controller for EKS. A registered domain name (e.g., your-domain.com) that you can manage. Step 1: Deploy Sample Applications First, let's deploy two different applications to route traffic to: a "coffee" app ☕ and a "tea" app 🍵. Each application will have a Deployment and a Service. Save the following YAML as apps.yaml: # apps.yaml # --- Coffee App --- apiVersion: apps/v1 kind: Deployment metadat...