<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aman kumar on Medium]]></title>
        <description><![CDATA[Stories by Aman kumar on Medium]]></description>
        <link>https://medium.com/@amankumar-ak?source=rss-97d3fd53d1ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y3Xn8xN-8kdtJO5gqhMDlw.jpeg</url>
            <title>Stories by Aman kumar on Medium</title>
            <link>https://medium.com/@amankumar-ak?source=rss-97d3fd53d1ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:15:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amankumar-ak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploying a Multi-Page Static Dashboard with ArgoCD and Zero-Downtime GitOps on Minikube]]></title>
            <link>https://medium.com/@amankumar-ak/deploying-a-multi-page-static-dashboard-with-argocd-and-zero-downtime-gitops-on-minikube-e4b6709191bb?source=rss-97d3fd53d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4b6709191bb</guid>
            <dc:creator><![CDATA[Aman kumar]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 15:40:22 GMT</pubDate>
            <atom:updated>2026-01-07T15:40:22.847Z</atom:updated>
            <content:encoded><![CDATA[<p>A hands-on guide to building a production-like GitOps workflow for static websites using ArgoCD, sidecar containers, and live file synchronization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQzIwxSZr_RuRDlh4DYkeA.png" /><figcaption>GlassDash — a beautiful glassmorphism admin dashboard running locally via ArgoCD GitOps</figcaption></figure><p>As a Junior AWS Cloud Engineer, I’ve been deepening my DevOps skills beyond basic CI/CD and cloud deployments. One of the most valuable patterns I’ve learned is GitOps — managing infrastructure and applications declaratively through Git.</p><p>In this project, I deployed a full multi-page glassmorphism admin dashboard (TemplateMo 607 Glass Admin) using ArgoCD on Minikube, with a custom git-sync sidecar that enables zero-downtime code updates. Push a change to GitHub → wait ~30 seconds → refresh the browser → new content is live, without restarting pods.</p><p>This is exactly the kind of scalable, production-ready pattern used for static sites, documentation portals, and marketing pages.</p><p>GitHub Repo: <a href="https://github.com/gaman5575/glassdash-gitops-deployment?referrer=grok.com">https://github.com/gaman5575/glassdash-gitops-deployment</a></p><h3>Why This Project?</h3><p>Static websites are simple to deploy, but doing it the “GitOps way” teaches powerful concepts:</p><ul><li>Declarative infrastructure (ArgoCD syncs manifests)</li><li>Separation of config (manifests) and code (HTML/CSS/JS)</li><li>Zero-downtime delivery for application changes</li><li>Overcoming Kubernetes limitations (e.g., ConfigMap size)</li></ul><p>I wanted something more advanced than my previous projects (MERN on EC2, serverless Lambda, LAMP with Terraform) — something that truly demonstrates <strong>continuous delivery in Kubernetes</strong>.</p><h3>The Dashboard</h3><p>The template is <strong>TemplateMo 607 Glass Admin</strong> — a stunning 6+ page dashboard with:</p><ul><li>Overview stats</li><li>Analytics charts</li><li>Users table</li><li>Settings forms</li><li>Login/Register pages</li><li>Shared CSS/JS for glassmorphism effects and interactivity</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aOwBiLvwif0BL6CWqJDRxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yz8Eg2w6H8rsREBXX5smsQ.png" /></figure><h3>Challenges I Faced</h3><p>Initial approach: Store all static files in an <strong>immutable ConfigMap</strong> mounted as a volume.</p><p>Problem: The template is large (~300–600KB total). Kubernetes adds a last-applied-configuration annotation that duplicates the data → exceeded 256KiB annotation limit → ConfigMap creation failed → pods stuck.</p><p>Lesson: ConfigMaps are great for small config, terrible for large static assets.</p><p>Next attempts:</p><ul><li>InitContainer git clone → required pod restarts for updates (downtime)</li><li>Official git-sync sidecar → flag incompatibilities and path issues in v4 caused crashes</li></ul><p>Final solution: Custom sidecar with alpine/git that clones, pulls every 30s, and copies files to the shared volume.</p><h3>Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ua5_Wm7TD2UOZbhGOo6ytQ.png" /></figure><ul><li><strong>ArgoCD</strong> watches manifests/ → syncs Kubernetes resources declaratively</li><li><strong>git-sync sidecar</strong> watches public/ code → live sync to shared volume</li><li><strong>Nginx</strong> serves files instantly</li></ul><p>No downtime for code changes. Manifest changes (rare) trigger rolling updates.</p><h3>ArgoCD in Action</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUE3C298ne_YoMtZ7_Ni2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4A3bRiRzEAUGVQNybsszNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LByf0ndeOoJrZIT-_7w-lQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efREbhSEYuOe_X0E4XzcxA.png" /></figure><h3>Zero-Downtime Updates Demo</h3><ol><li>Edit public/index.html (add visible text)</li><li>Commit &amp; push</li><li>Sidecar pulls → copies files</li><li>Refresh browser → change appears instantly</li></ol><p>No pod restart, no service interruption.</p><h3>Key Takeaways &amp; Lessons Learned</h3><ul><li><strong>GitOps separation</strong>: Manifests for infra, code for app → clean and scalable</li><li><strong>Sidecar pattern</strong>: Powerful for live sync use cases (static sites, docs, configs)</li><li><strong>Kubernetes limits matter</strong>: Avoid large ConfigMaps; use volumes + sidecars instead</li><li><strong>Debugging tips</strong>: Always check sidecar logs and use verbose output</li></ul><p>This project strengthened my understanding of ArgoCD, sidecars, volumes, and real-world GitOps workflows — skills directly applicable to production environments.</p><h3>Try It Yourself</h3><ol><li>Install Minikube + ArgoCD</li><li>Clone the repo</li><li>Create ArgoCD Application pointing to manifests/</li><li>Port-forward: kubectl port-forward svc/glassdash -n glassdash 8081:80</li><li>Open <a href="http://localhost:8081/?referrer=grok.com">http://localhost:8081</a></li></ol><p>Feel free to fork and experiment!</p><p><strong>Aman Kumar</strong> DevOps &amp; Cloud Engineer | AWS | Kubernetes | GitOps LinkedIn: <a href="https://linkedin.com/in/kumaraman-ak/?referrer=grok.com">https://linkedin.com/in/kumaraman-ak/</a> GitHub: <a href="https://github.com/gaman5575?referrer=grok.com">https://github.com/gaman5575</a></p><p>If you found this helpful, clap 👏 and follow for more DevOps projects! 🚀</p><p>#DevOps #Kubernetes #ArgoCD #GitOps #ZeroDowntim</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4b6709191bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Release Pipeline For Python Projects Using Jenkins]]></title>
            <link>https://medium.com/@amankumar-ak/create-a-release-pipeline-for-python-projects-using-jenkins-47e31fb1ebc6?source=rss-97d3fd53d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/47e31fb1ebc6</guid>
            <dc:creator><![CDATA[Aman kumar]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 07:14:44 GMT</pubDate>
            <atom:updated>2024-09-10T07:14:44.184Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The objective of the blog:</strong></p><p>Release Python projects once a month by creating an automated CI/CD pipeline.</p><p><strong>Summary of solution:</strong></p><p>To release Python projects automatically, we have taken two approaches. In the First Approach, using Bash script cloning reach repo and updating extracting version from ‘version.yml’ and increment them. At the end update the Docker image and push to the Docker Hub. I am running a Bash script using Jenkins.</p><p>The Second Approach creates a Jenkins pipeline for every repo and each pipeline clones its repo, version updating, Docker image building, and pushing. Also Creating a Centralized Jenkins Pipeline, clones a central repository, runs Python script, and triggers individual Jenkins jobs for each repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byIdlm-2qX5HWNljdQvfgg.png" /></figure><p>Let us understand each app in detail.</p><h4>Approach-1: Releasing Python projects using shell script, and Jenkins</h4><p><strong>Tools: </strong>Jenkins, Shell Script, Github, Docker</p><p><strong>Objective:</strong> To Create an automated pipeline to release Python-based microservices, where we are updating the Docker image of each Python project, and pushing these images to the Docker hub. This whole process is managed by Bash script and Jenkins Pipeline to ensure consistent and repeatable operation.</p><p>Core work is done by bash script shown below:</p><pre>#!/bin/bash<br><br>#1. # Set the repositories to clone and update<br>repos=(&quot;python-project-1&quot; &quot;python-project-2&quot; &quot;python-project-3&quot;  &quot;python-project-4&quot; &quot;python-project-5&quot; )  # add your repository names here<br><br><br>#2. # Clone each repository<br>for repo in &quot;${repos[@]}&quot;; do<br>  git clone https://${GIT_USERNAME}:${GIT_TOKEN}@github.com/${GIT_USERNAME}/${repo}.git&quot;<br>  cd &quot;${repo}&quot; || { echo &quot;Failed to enter repo directory&quot;; exit 1; }<br><br>  #3. # Configure git user<br>  git config user.email &quot;${GIT_USERNAME}@gmail.com&quot;<br>  git config user.name &quot;${GIT_USERNAME}&quot;<br><br><br>  #4. # Get the current version number<br>  current_version=$(grep -oP &#39;(?&lt;=version: )\K[\d\.]+&#39; version.yml)<br><br>  new_major_version=\$(echo &quot;\$current_version&quot; | awk -F. &#39;{print \$1 + 1}&#39;)<br>  new_version=&quot;\${new_major_version}.0.0&quot;<br>  new_branch=&quot;${new_version}-release&quot;<br><br>  #5. # Create a new branch with the entered name<br>  git checkout -b &quot;${new_branch}&quot;<br><br>  #6. # Update the version in version.yml<br>  sed -i &quot;s/version: .*/version: ${new_version}/&quot; version.yml<br><br><br><br>  #7. # Add and commit the changes<br>  git add .<br>  git commit -m &quot;Updated version to ${new_version}&quot;<br><br>  #7. # Push the changes to the remote repository with authentication<br>  git push &quot;https://${GIT_USERNAME}:${GIT_TOKEN}@github.com/${GIT_USERNAME}/${repo}.git&quot; &quot;${new_branch}&quot;<br><br><br>  #8. # Docker login<br>  docker login -u &quot;$DOCKER_USERNAME&quot; -p &quot;$DOCKER_PASSWORD&quot;<br><br>  # Build the Docker image<br>  docker build -t &quot;${docker_username}/${repo}:${new_version}&quot; .<br><br>  #9. # Push the Docker image to Docker Hub<br>  docker push &quot;${docker_username}/${repo}:${new_version}&quot;<br><br>   #10. <br>  cd ..<br>  rm -rf &quot;${repo}&quot;<br><br>done</pre><p><strong>Details of Bash script:</strong></p><ol><li>The first step is to create a variable for a list of Python-projects repositories.</li><li>We are cloning each repository.</li><li>We are configuring Git user credentials.</li><li>Extract the current version and then increment them.</li><li>Check out the new branch and then update the version.yml file.</li><li>Commits and pushes changes to the new branch on GitHub.</li><li>Each Repo has its Dockerfile.</li><li>Logs in Docker, build the image as the tag of the new version.</li><li>Pushes the docker image to dockerhub.</li><li>Cleans up the local python-project directory.</li></ol><p><strong>Generation Of Git Token:-</strong></p><ol><li>Open Your Git Profile On the Left side.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*aozSX7su9P_3b_73DEeTKg.png" /></figure><p>2. Open Settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*5qO89sZYv0z9mFf4DI8z4A.png" /></figure><p>3. In Settings, Go to ‘Developer Settings’ at the bottom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*5mI1BjTNrivaoprHzjBF8A.png" /></figure><p>4. Click on Personal Access Token and Choose ‘Token classic’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*TSxfOoMHmXIoj6wDwNDA_w.png" /></figure><p>5. After That, Click ‘Generate New Token’, and Choose ‘Generate New Token (Classic).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*sWJd6sj2vH0Iw-Y9DXSEvg.png" /></figure><p>6. After that, give a Note of the Token, Choose the token’s expiration then select Scopes of the repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*GaWdH-57NVTwUDMYCdcoxw.png" /></figure><p>7. In the Last Go to the Bottom, and Click on Generate Token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*XwpjGDw1iddxHRkIkJT9EA.png" /></figure><p>8. Copy The Git Token on Notepad for reuse.</p><blockquote>J<strong>enkins Pipeline:</strong></blockquote><pre>pipeline {<br>    agent any<br>    stages {<br>        stage(&#39;Git Checkout&#39;) {      //1.<br>            steps {<br>                // Git checkout<br>                git branch: &#39;main&#39;,<br>                    url: &#39;https://github.com/gaman5575/git-project.git&#39;<br>            }<br>        }<br>        stage(&#39;Run Script&#39;) {<br>            steps {                   //2.<br>                // Bind Jenkins credentials for Git and Docker authentication<br>                withCredentials([<br>                    usernamePassword(credentialsId: &#39;git-credentials&#39;, usernameVariable: &#39;GIT_USERNAME&#39;, passwordVariable: &#39;GIT_TOKEN&#39;),<br>                    usernamePassword(credentialsId: &#39;docker_credentials&#39;, usernameVariable: &#39;DOCKER_USERNAME&#39;, passwordVariable: &#39;DOCKER_PASSWORD&#39;)  <br>                ]) {                  //3.<br>                    sh &#39;chmod +x git-push.sh&#39;<br>                    sh &#39;./git-push.sh&#39;   <br>                }<br>            }<br>        }<br>    }<br>    post {                    //4.<br>        success {<br>            echo &#39;Script Runs Successfully!!!&#39;<br>        }<br>        failure {<br>            echo &#39;Script Failed!!!&#39;<br>        }<br>    }<br>}</pre><p><strong>Let&#39;s Understand Jenkins Pipeline:-</strong></p><ol><li>Check out the repository’s main branch containing the ‘release-version.sh’ script.</li><li>Loads Git and Docker credentials using Jenkins credentials binding.</li><li>Execute the ‘release-version.sh’ script.</li><li>Post-stage for success and failure message.</li></ol><p><strong>Installing Docker Plugins on Jenkins:-</strong></p><ol><li>In Jenkins Dashboard, Click on ‘Manage Jenkins’.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*I7pyvTqy6LXhE4ZMZ-wG4g.png" /></figure><p>2. In Manage Jenkins, ‘System Configuration’ section, Click on ‘Plugins’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GE-VrpjvYhUL68hAivtXvg.png" /></figure><p>3. In Plugins, Click on Available Plugins. Search For ‘Docker Pipeline’ and ‘Docker Plugins’. And Install them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJrp8rXWG5-wikX3afNJrQ.png" /></figure><p><strong>Installing Docker on Jenkins Machine and configuring:-</strong></p><ol><li>Firstly we have to install Docker on Jenkins machine.</li></ol><pre># Add Docker&#39;s official GPG key:<br>sudo apt-get update<br>sudo apt-get install ca-certificates curl -y<br>sudo install -m 0755 -d /etc/apt/keyrings<br>sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc<br>sudo chmod a+r /etc/apt/keyrings/docker.asc<br><br># Add the repository to Apt sources:<br>echo \<br>  &quot;deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \<br>  $(. /etc/os-release &amp;&amp; echo &quot;$VERSION_CODENAME&quot;) stable&quot; | \<br>  sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null<br>sudo apt-get update -y<br><br> sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</pre><p>2. Now Add a Jenkins user in the Docker group, it can get access to Docker permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*YlGl6zPKk-HdKfeqDWY5ag.png" /></figure><pre>sudo usermod -aG docker jenkins<br>sudo apt cat /etc/group | grep -i docker</pre><p>3. At the End, Restart Docker and Jenkins.</p><pre>sudo systemctl restart docker<br>sudo systemctl restart jenkins</pre><p><strong>Add Credentials on Jenkins:-</strong></p><ol><li>Go to Jenkins Dashboard and click on Manage Jenkins.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*I7pyvTqy6LXhE4ZMZ-wG4g.png" /></figure><p>2. In Manage Jenkins, Go to the Security Section and Click on Credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fcJ1iYKjgPDv9OR1DECgVQ.png" /></figure><p>3. In Credentials, Click on System, and at the system click “Global Credentials (unrestricted)”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*rDoKOp65SH1i5s_0BBZrXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*1pqb70Zt34oxZCQNhJT02Q.png" /></figure><p>4. In Global, Click on ‘Add Credentials’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lMGri6FFForWKKUwOfr44g.png" /></figure><p>5. In Add Credentials, Kind Sections, you have to choose which type of credentials you want to give. For Us, we have to choose ‘username and password’. You have to give your git username instead of password your git token, which you copied, and give your ID to call these credentials in the pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-q5EDlWzLv-XI25w1lB1Q.png" /></figure><p>6. Use the same steps for Adding Docker Credentials.</p><p><strong>Errors:-</strong></p><p>There are a few errors that come with running the script.</p><ol><li>The Shell script handles both Git repositories and Docker operations, making it more complex and hard to maintain.</li><li>Jenkinsfile runs script it will run the script in one pipeline, so a failure in any part of the script can halt the entire process without debugging errors.</li><li>Jenkins credentials for Docker and GitHub should be properly assigned but, what if we have different repos with different admins, so it will be difficult to create credentials for every repository? Its time taking and repos must have errors so it will fail if any error comes in any repos. Also, credentials are passed as environmental variables, which can be insecure if mishandled.</li><li>The Script is tightly coupled with the Jenkinsfile, making it more modular and harder to test individually.</li><li>Scaling this script to handle more repositories or complex workflows can be challenging.</li><li>Also, docker should be logged in with different users every time, for different repos.</li></ol><p>To get over all errors I’m coming up with another approach.</p><h4>Apporach-2: Releasing Python projects with Python script, Central Jenkinsfile, and individual Repository Jenkins Pipeline.</h4><p><strong>Overview:</strong> This project automates the version management process and Docker image building and publishing Docker images to dockerhub. Using Jenkins continuous integration and deployment (CI/CD), the pipeline ensures that release updates are systematically applied, committed, and pushed to GitHub, followed by Docker image creation and publication to Docker hub.</p><p><strong>Tools:</strong> Python Script, Shell Script, Github, Docker, Jenkins</p><p><strong>Approach Details:</strong></p><ol><li><strong>Central Jenkinsfile:</strong></li></ol><pre>pipeline {<br>    agent any<br><br>    environment {<br>        // Fetch credentials stored in Jenkins with the ID &#39;jenkins_credentials&#39;<br>        JENKINS_CREDENTIALS = credentials(&#39;jenkins_credentials&#39;)<br>    }<br><br>    stages {<br>        stage(&#39;Clone Repository&#39;) {<br>            steps {<br>                // Replace git url with your repo<br>                git url: &#39;https://github.com/gaman5575/python-release.git&#39;, branch: &#39;main&#39;<br>            }<br>        }<br><br>        stage(&#39;Run Python Script&#39;) {<br>            steps {<br>                // Set environment variables for the Python script and run it<br>                withEnv([&quot;JENKINS_USER=${JENKINS_CREDENTIALS_USR}&quot;, &quot;JENKINS_TOKEN=${JENKINS_CREDENTIALS_PSW}&quot;]) {<br>                    sh &#39;python3 jenkins-trigger.py&#39;    //Run Python Script<br>                }<br>            }<br>        }<br>    }<br><br>    post {<br>        always {<br>            echo &#39;Pipeline finished.&#39;<br>        }<br>        success {<br>            echo &#39;Pipeline completed successfully.&#39;<br>        }<br>        failure {<br>            echo &#39;Pipeline failed.&#39;<br>        }<br>    }<br>}</pre><p><strong>Understanding Central Jenkins Pipeline:-</strong></p><ul><li><strong>Clone a Central Repository: </strong>The pipeline starts with cloning the central repository where the version release script is stored.</li><li><strong>Run Python Script: </strong>The Pipeline runs a Python script that triggers individual jobs for multiple projects.</li><li><strong>Environment variable: </strong>Credentials for Github and Docker are securely passed as environment variables.</li></ul><p><strong>For Generating and Using Jenkins API:-</strong></p><ul><li>Firstly Go to Your Profile Section on the Top Right Side.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUXpmrCcHcwktDW1Gb67nQ.png" /></figure><ul><li>Then Click on Configure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*ZD1NhCottTkQtjY0fJY2ow.png" /></figure><ul><li>In Configure, please scroll down to API Token generate a token, and copy it. So you can reuse it for Jenkins Jobs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*k7Lesbubc7bernc5fCgtqA.png" /></figure><p>2. <strong>Python script for triggering Jenkins jobs:</strong></p><pre>import os<br>import requests<br>import sys<br><br>jenkins_user = os.getenv(&#39;JENKINS_USER&#39;)<br>jenkins_token = os.getenv(&#39;JENKINS_TOKEN&#39;)<br>jenkins_urls = [<br>       &quot;http://(Ip of jenkins machine):(port)/job/(pipeline name)/build&quot;,<br>    # Add more url <br>]<br><br>for url in jenkins_urls:<br>    result = requests.post(url, auth=(jenkins_user, jenkins_token))<br>    <br>    if result.status_code == 201:<br>        print(f&quot;Jenkins Job at {url} executed successfully&quot;)<br>    else:<br>        print(f&quot;Jenkins Job at {url} failed!! {result.status_code}&quot;)<br>        sys.exit(1)</pre><p><strong>Understanding Python Script:-</strong></p><ul><li><strong>Trigger Jenkins jobs:</strong> This script triggers various repositories using Jenkins API.</li><li><strong>Authentication: </strong>Uses Jenkins credentials stored in an environment variable for authentication.</li></ul><p>3. <strong>Individuals Repository Jenkins Pipelines:</strong></p><pre>pipeline {<br>    agent any<br><br>    stages {<br>        stage(&#39;Git Checkout&#39;) {<br>            steps {<br>                // Checkout your source code repository<br>                git branch: &#39;main&#39;,<br>                    url: &#39;https://github.com/gaman5575/(Your repository).git&#39;<br>            }<br>        }<br><br>        stage(&#39;Clone Repositories and Update Version.yaml&#39;) {<br>            steps {<br>                withCredentials([usernamePassword(credentialsId: &#39;git-credentials&#39;, usernameVariable: &#39;GIT_CREDENTIALS_USR&#39;, passwordVariable: &#39;GIT_CREDENTIALS_PSW&#39;),<br>                                 usernamePassword(credentialsId: &#39;docker_credentials&#39;, usernameVariable: &#39;DOCKER_USERNAME&#39;, passwordVariable: &#39;DOCKER_PASSWORD&#39;)]) {<br>                    script {<br>                        def new_version = &quot;&quot;<br>                        sh &quot;&quot;&quot;<br>                            echo &quot;Cloning the repository&quot;<br><br>                            git clone https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@github.com/${GIT_CREDENTIALS_USR}/(Your repository).git<br>                            cd (Your repository)<br><br>                            echo &quot;Configuring Git&quot;<br><br>                            git config user.email &#39;${GIT_CREDENTIALS_USR}@gmail.com&#39;<br>                            git config user.name &#39;${GIT_CREDENTIALS_USR}&#39;<br><br>                            echo &quot;Finding Version in version.yml and Updating&quot;<br><br>                            current_version=\$(grep -oP &#39;(?&lt;=version: )\\K[\\d\\.]+&#39; version.yml)<br>                            new_major_version=\$(echo &quot;\$current_version&quot; | awk -F. &#39;{print \$1 + 1}&#39;)<br>                            new_version=&quot;\${new_major_version}.0.0&quot;<br>                            new_branch=&quot;\${new_version}-release&quot;<br><br>                            echo &quot;Git checkout to new branch&quot;<br><br>                            git checkout -b &quot;\${new_branch}&quot;<br>                            git branch<br><br>                            echo &quot;Adding new version to version.yml&quot;<br><br>                            sed -i &quot;s/version: .*/version: \${new_version}/&quot; version.yml<br>                            cat version.yml<br><br>                            echo &quot;Add and commit in git &quot;<br>                            git add .<br>                            git commit -m &quot;Changed version to \${new_version}&quot;<br><br>                            echo &quot;Pushing to git repository&quot;<br>                            git push -u https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@github.com/${GIT_CREDENTIALS_USR}/(Your repository).git &quot;\${new_branch}&quot;<br><br>                            echo &quot;Building the Docker image&quot;<br>                            docker build -t &quot;${DOCKER_USERNAME}/(Your repository):\${new_version}&quot; .<br>                           <br>                            echo &quot;Pushing the Docker image to Docker Hub&quot;<br>                            docker login -u &quot;${DOCKER_USERNAME}&quot; -p &quot;${DOCKER_PASSWORD}&quot;<br>                            docker push &quot;${DOCKER_USERNAME}/(Your repository):\${new_version}&quot;<br><br>                            cd ..<br>                            rm -rf (Your repository)<br>                        &quot;&quot;&quot;<br>                    }<br>                }<br>            }<br>        }<br>    }<br>}</pre><p><strong>Details of Jenkins Individuals pipelines:-</strong></p><p>— <strong>Git Checkout:</strong> Each Repository has its own Jenkins Pipeline that checks out the code from the main branch.</p><p>— <strong>Clone Repositories and Update Version:</strong></p><ul><li><strong>Clone Repositories and Update Version:</strong> Clone the repositories to the Jenkins repositories.</li><li><strong>Configure the git user: </strong>Configure the git user with user credentials.</li><li><strong>Update version:</strong> Read the current version from ‘version.yml’, increment it, and create a new branch for release.</li><li><strong>Commit and Push changes:</strong> Commits the updated version file and pushes the changes to the new branch on GitHub.</li></ul><p><strong>— Docker Image Build and Push:</strong></p><ul><li><strong>Build Docker Image: </strong>Build a Docker image of each repository with the new version</li><li><strong>Push Docker Image:</strong> Push the Docker image of each repository of each new version.</li></ul><p><strong>Let’s create Jenkins Pipeline Jobs:-</strong></p><ol><li>Open the Jenkins dashboard using the machine’s IP with port 8080. In my case, http://192.168.125.147:8080.</li><li>Build a Central Pipeline for executing multiple Jenkins jobs.</li></ol><ul><li>In Jenkins Dashboard on the left ‘New Items’ click on that.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*sWnILm-0YuZEfFsHwaKONA.png" /></figure><ul><li>Give the name of the pipeline. And choose Pipeline and click on ‘ok’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kfwreCPASZKOmWj52B0zpA.png" /></figure><ul><li>In general, go to Build Triggers. In Build Triggers, click Trigger builds remotely (e.g., from scripts), and paste your Jenkins API.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHVeLWXZirLT9SFaQEHM6Q.png" /></figure><ul><li>Go to the Pipeline section, In Definition, Choose ‘Pipeline Script with SCM ’ and choose in SCM, Git as Source Code Management (SCM).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSHwEbOOeEIGw0riJ8B56Q.png" /></figure><ul><li>Give the URL of the git repo, and the branch name of your repo.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dajMPCMfWj9Wdm0Z3omgTA.png" /></figure><ul><li>In Script Path, Give the Jenkins Pipeline file name. In my case it&#39;s Jenkinsfile, and in general its name is always this name but you can change it if you want. Click on save.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WuJMIC37hQ4MZ0GzHA0CGg.png" /></figure><p>5. Now create pipeline jobs for other repositories as the above steps, but take the pipeline name as your repository for easy understanding if the error comes out.</p><p>6. Go to the central job pipeline where the Python script is stored, then click Build Now. It will start all the jobs one by one.</p><p><strong>Overcome Previous errors:</strong></p><ol><li><strong>Centralized Control:</strong> The new approach uses a central Jenkins pipeline to trigger builds, ensuring each repository pipeline runs in a controlled environment.</li><li><strong>Credentials Management:</strong> Credentials are securely managed using Jenkins credentials binding.</li><li><strong>Automated Versioning:</strong> The new approach systematically increments the version number and ensures the correct version sequence.</li><li><strong>Error handling:</strong> Improved error handling in Python script and Jenkins pipeline ensures better feedback and robustness.</li></ol><p><strong>Differences Between Both Approaches:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QRtPwM9HGIgZHNIDg141dQ.png" /></figure><p><strong>Commands for Scripting:</strong></p><ol><li><strong>echo</strong> = “Display line of text on terminal.”</li><li><strong>cd</strong> = “Change directory. Uses for changing directory.”</li><li><strong>grep</strong> = “Used for searching and matching text patterns in files contained in the regular expressions”</li><li><strong>awk</strong> = “Allows the user to use the numeric functions, variables, logical operators, and string functions.”</li><li><strong>sed</strong> = “A stream editor, can be used to edit text files, with its most common use being to replace occurrences of words in a file.”</li><li><strong>rm</strong> = “Permanent remove of any file or directory.”</li></ol><p><strong>References:-</strong></p><p>For Jenkins Pipeline:- <a href="https://www.jenkins.io/doc/book/pipeline/">Pipeline (jenkins.io)</a></p><p>Bash Scripting:- <a href="https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html">https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html</a></p><p>Python:- <a href="https://realpython.com/tutorials/devops/">https://realpython.com/tutorials/devops/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47e31fb1ebc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VSFTP Server Configuration on Linux RHEL9.0/Centos: A Comprehensive Overview]]></title>
            <link>https://medium.com/@amankumar-ak/vsftp-server-configuration-on-linux-rhel9-0-centos-a-comprehensive-overview-9d8cde56c090?source=rss-97d3fd53d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d8cde56c090</guid>
            <dc:creator><![CDATA[Aman kumar]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 08:37:44 GMT</pubDate>
            <atom:updated>2024-07-05T08:37:44.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Ie5sE6OSESRxsFQohLazJg.jpeg" /></figure><p>FTP server or VSFTP server, the Very Secure File Transfer Protocol is a network protocol, that was once widely used for moving files between client and server. It is Fast, Stable, and most importantly, Secure. It is built on client-server model architecture, which offers access to files and directories via an FTP client, to upload files to the server as well as Download files from it. VSFTP is still used to support legacy applications and workflow with very specific needs.</p><p>VSFTPD or Very Secure File Transfer Daemon is an FTP server use by many Unix-like server, including Linux, and is often default FTP server for many Linux distribution as well. It is providing strong security problems found in other FTP severs. Depending on the permission granted to user, they can traverse directories on the server, download the files to their local computer, and also upload files from local computer to the server. Till RHEL 7.0, by default anonymous user can ftp server and download the files from /var/ftp but not permission to upload to server. But After RHEL 8.0 only authenticate users can download and upload the files, but we can do for anonymous to download and upload the files.</p><blockquote><strong>Notes :</strong></blockquote><ol><li>In FTP, when we install vsftpd package, then a /var/ftp directory automatically created, where we can give any file or data and anyone can access this, even they don’t have password (Till RHEL 7.0).</li><li>Two types of FTP server:<br> (1) Local FTP Server: Local Ip have local area or a particular ftp server configurated.<br> (2) Public FTP Server: Cloud Server, we can configure a cloud server where we installed vsftpd and we can give permission to users or guest or anonymous to download and also upload files data.</li><li>FTP servers have two places: -<br>1.) Common Place: - It is also known as guest user or ftp user or anonymous user. The place where all data will be placed and can be access by anyone is: - /var/ftp<br>2.) Private place: - A valid user, which can sign up and download and upload their self-data called user’s home account.</li><li>Till RHEL 7.0, anonymous user can download from local place but not allowed to upload, because we don’t have any information of user. But From RHEL 8.0, anonymous user or guest user can’t access data from this place, to enable this we have to give access to them, by configuration file located in /etc/vsftpd/vsftpd.conf .</li><li>1.) FTP server basically uses to transfer any files over the network.<br>2.) It basically allows two types of operations: -<br> a.) Get or Download<br> b.) Put or Upload</li><li>FTP server support on every operation system with LAN and WAN environment.</li><li>In FTP server we have two types of user account: -<br> 1.) Anonymous User<br> 2.) Valid User account<br>notes: - In RHEL-8 anonymous user cannot login on FTP server by default. But FTP valid user account they can login by default.</li><li>Server Machine: -<br>Package: - vsftpd<br>daemon: - vsftpd<br>Port no.: - 21 (It is main port use to connection between server and client. we can say that it is control connection)<br>Port no.: - 20 (Only use to data transfer)<br>Configuration File: - /etc/vsftpd/vsftpd.conf<br>Log File:- /var/log/xferlog (Default file) or /var/log/vsftpd.log, (You can change this file in vsftpd.conf)</li><li>There is many tools to access server from client machine:<br>1. ftp <br>2. lftp<br>3. wget<br>4. sftp<br>5. Firefox<br>and many more…</li></ol><blockquote><strong>Q. How To Configure vsftp server on RHEL 9.0 machine?</strong></blockquote><ol><li>To configure vsftp server on RHEL 9.0 machine you need to configure or check package manager of rhel.</li><li>Now you have to install vsftpd package using dnf package manager.</li></ol><pre>$ sudo dnf install vsftpd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uin1YcXF22kpyvmbEQ_NCg.png" /></figure><p>press ‘y’ and enter to make installation complete, it will takes few seconds only. To confirm installation: -</p><pre>$ rpm -q vsftpd<br>vsftpd-3.0.3-31.el8.x86_64</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*O5C2LfZq-wCtvtW_0b2yoQ.png" /></figure><p>3. To start the service, you need to run this commands: -</p><pre>$ sudo systemctl start vsftpd<br><br>$ sudo systemctl enable vsftpd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2GH5VkK65qkxug0GYZN3A.png" /></figure><p>To Verify vsftpd service start or enable or not…</p><pre>$ sudo systemctl status vsftpd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*Jh5sd__WEtYcDlvAvXexwg.png" /></figure><p>4. Now Add Service entry in Firewall</p><pre>$ sudo firewall-cmd --permanent --add-service=ftp<br><br>#Then Update the changes<br><br>$ sudo firewall-cmd --reload</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*AQpfqVrHwaShLvZZ4cHZsg.png" /></figure><p>5. Check the port 21 is listening or not</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9RUX5r0Mr0R-My7hpWqAAw.png" /></figure><p>After all these steps, we configure the server of vsftp service. Now to Some points here to remember after setup.</p><blockquote><strong>Q. How to configure sftp client server?</strong></blockquote><p>To create a client server, you have to install sftp client on client machine, if not installed. On RHEL machine its already installed with ssh service.</p><p>Using this command, you can easily access the user account, you will realize that its similar to ssh but here you can get and put data not modify the data. Its more secure by only persons who knows account password can access data but not others users&#39; data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*jLNj5Yq55u4CvUXRyyGltw.png" /></figure><blockquote><strong>Q. How we make data access to valid user and anonymous user from client to server?</strong></blockquote><p>To access data, you have to send data to /var/ftp directory. Suppose in /var/ftp, I just created a directory “Linux” in which some files. For valid users to access those files, just run this command.</p><pre>$ sudo  ftp  &lt;Ip of server&gt;</pre><p>Using this command, you can easily get or download and put or upload. This command using ssh protocol to do this and more secure than simple ftp command, where you will only fetch from /var/ftp.</p><p>Anonymous user access: -</p><ol><li>First open server side vsftp config file: - /etc/vsftpd/vsftpd.conf</li><li>Now search for this phrase: -</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fiW_B_EJK1cnh8mRcQO8pw.png" /></figure><p>where you can change setting and then anonymous user can access or upload data.</p><p>After changing, restart the service.</p><p>Remember, this thing only for ftp command not for sftp command.</p><p>To install ftp command, follow this process: -</p><ol><li>Install ftp client on client machine.</li></ol><pre>$ sudo dnf install ftp -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYRibxRXsy-XyaW4mmWiwA.png" /></figure><p>2. To get in server side use this command: -</p><pre>$ sudo ftp &lt;ip-of-server&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*mCXNXNfMb1eR_BDF3vyhEw.png" /></figure><p>After running this command, you have to give username and password to access the data.</p><p>This is FTP Server and Client Configuration. There are many commands to access data such as scp, wget, rsync and many more.</p><p>If you have any suggestions regarding this, you can comment here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d8cde56c090" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Fundamentals of Swap: What Every Linux User Should Know]]></title>
            <link>https://medium.com/@amankumar-ak/the-fundamentals-of-swap-what-every-linux-user-should-know-9296f5d1801c?source=rss-97d3fd53d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9296f5d1801c</guid>
            <dc:creator><![CDATA[Aman kumar]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 14:16:46 GMT</pubDate>
            <atom:updated>2024-04-16T14:16:46.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-q8sdtj_wzYmqH3L" /><figcaption>Photo by <a href="https://unsplash.com/@lukash?utm_source=medium&amp;utm_medium=referral">Lukas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Welcome to the interesting world of Linux! Whether you’re a seasoned Linux user or just stepping in passionate ecosystem, there’s always something new learn. Today, we talk about fundamental concept of Swap space, it&#39;s a Linux important resource.</p><p>Swap space is a space on a hard disk that is a substitute for physical memory. It is used as virtual memory which contains process memory images. Whenever our computer runs short of physical memory it uses its virtual memory and stores information in memory on disk. Swap space helps the computer’s operating system in pretending that it has more RAM than it actually has. It is also called a swap file. This interchange of data between virtual memory and real memory is called swapping and space on disk as “swap space.”</p><p>The purpose of swap space is to free up physical memory (RAM) so that it can be used for more important tasks, while still allowing the system to maintain the illusion of having more memory than it actually has.</p><p>In general, it’s recommended to have a swap space equal to 1.5 times the size of the RAM. However, the exact size of the swap space needed will depend on the specific needs of the system and the applications running on it.</p><p>Operating systems like Windows or <a href="https://phoenixnap.com/kb/what-is-linux">Linux</a> provide a certain amount of swap space by default, which users can later change in accordance with their requirements. Users can also disable swap space, but that means that the kernel must <a href="https://phoenixnap.com/kb/how-to-kill-a-process-in-linux">kill some processes</a> to create enough free RAM for new processes.</p><p>Q. Why we cannot store data in swap?</p><p>Ans: Because swap has itself filesystem type and we cannot formatting in other filesystem type. So, we can’t write data.</p><p>Q. How to create Swap Space on your machine?</p><ul><li>First you have to check the details about your disk using “fdisk” or “parted” commands. And also you need to check free space on your disk and RAM(Random Access memory).</li></ul><pre>$ free -h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*6Orf99lyidyWBekhLqcCew.png" /></figure><pre>$ swapon --show</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*1rkmye1bV1vwrglcB-kTbg.png" /></figure><ul><li>First, add a disk of 5GB or whatever you need on your machine. Second, go into your disk using “fdisk” or “parted command” and create partition as per need and save it. Here i will create of 1GB partition.</li></ul><pre>$ sudo fdisk /dev/sdb     (&quot;Its my disk you can use as per disk you added&quot;)<br><br>Welcome to fdisk (util-linux 2.37.4).<br>Changes will remain in memory only, until you decide to write them.<br>Be careful before using the write command.<br><br>Device does not contain a recognized partition table.<br>Created a new DOS disklabel with disk identifier 0x64c9387b.<br><br>Command (m for help): n        (&quot;Here &quot;n&quot; is to add new partition&quot;)<br>Partition type<br>   p   primary (0 primary, 0 extended, 4 free)<br>   e   extended (container for logical partitions)<br>Select (default p): p            (&quot; p is primary type if primary available &quot;)<br>Partition number (1-4, default 1): 1       (&quot;Here you choose 1, <br>                                             which partition number its ask,<br>                                             by defalt you press Enter button&quot;)<br>First sector (2048-10485759, default 2048): <br>Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-10485759, default 10485759): +1G  (&quot;Here you give the Size of partition you want,<br>                                                                                       + for - to subtact, then number with K/M/G&quot;)<br><br>Created a new partition 1 of type &#39;Linux&#39; and of size 1 GiB.<br><br>Command (m for help): p    (&quot;Here p for print &quot;)<br>Disk /dev/sdb: 5 GiB, 5368709120 bytes, 10485760 sectors<br>Disk model: VMware Virtual S<br>Units: sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br>Disklabel type: dos<br>Disk identifier: 0x64c9387b<br><br>Device     Boot Start     End Sectors Size Id Type<br>/dev/sdb1        2048 2099199 2097152   1G 83 Linux<br><br>Command (m for help): t   (&quot;t for type, which type partition want, <br>                               for swap you can choose 82&quot;)<br>Selected partition 1<br>Hex code or alias (type L to list all): 82   (&quot; for swap&quot;)<br>Changed type of partition &#39;Linux&#39; to &#39;Linux swap / Solaris&#39;.<br><br>Command (m for help): p              (&quot; print &quot;)<br>Disk /dev/sdb: 5 GiB, 5368709120 bytes, 10485760 sectors<br>Disk model: VMware Virtual S<br>Units: sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br>Disklabel type: dos<br>Disk identifier: 0x64c9387b<br><br>Device     Boot Start     End Sectors Size Id Type<br>/dev/sdb1        2048 2099199 2097152   1G 82 Linux swap / Solaris<br><br>Command (m for help): w   (&quot;For Save and Exit if Every thing is correct&quot;) <br>The partition table has been altered.<br>Calling ioctl() to re-read partition table.<br>Syncing disks.<br><br></pre><pre>$ sudo partprobe /dev/sdb     # its update the partition table</pre><ul><li>Now we created swap partition, now we have to make swap partition to swap space:</li></ul><pre>$ sudo mkswap  /dev/sdb1  <br>Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)<br>no label, UUID=c0caca91-1e6a-49c8-a9c4-fa2b1baa7d25<br><br>(&quot;Output maybe diffrent&quot;)</pre><ul><li>Now, enable or activating swapping for swap partition.</li></ul><pre>$ swapon   /dev/sdb1<br><br></pre><ul><li>In the end, you must have to make entry in “/etc/fstab” file.</li></ul><pre>$ sudo vim /etc/fstab <br><br><br>/dev/sdb1      swap         swap    defaults        0 0<br><br># save and exit with using: press etc then write :wq</pre><p>You have learned how to create a swap file and activate and configure swap space on your Linux system.</p><p>If you hit a problem or have feedback, leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9296f5d1801c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Unlocking Linux: Easy User Management Commands”]]></title>
            <link>https://medium.com/@amankumar-ak/unlocking-linux-easy-user-management-commands-b86da76ec2ca?source=rss-97d3fd53d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/b86da76ec2ca</guid>
            <dc:creator><![CDATA[Aman kumar]]></dc:creator>
            <pubDate>Fri, 12 Apr 2024 19:12:21 GMT</pubDate>
            <atom:updated>2024-04-12T19:28:27.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s talk about handling users on Linux through commands. Linux OS gives us strong tools and command to control users and their rights or give them permission as per need. We’ll look at the main commands and tricks to get good at managing users on Linux.</p><p><strong>→ What’s User Management on Linux?</strong></p><blockquote>Users are basic parts of Linux, interacting with the system. Managing users means creating, changing, or deleting their accounts, giving them permissions, and handling their passwords.</blockquote><p><strong>→ Adding a New User</strong></p><blockquote>1. Adding a User: Use `adduser` with the new username.<br>2. Setting a Password: Use `passwd` to keep the account safe.<br>3. Customizing Settings: Use flags to set up their home folder and main command prompt.</blockquote><p><strong>→ Changing User Accounts</strong></p><blockquote>1. Modifying Accounts: Use `usermod` to change details like username, home folder, or main command prompt.<br>2. Adjusting Groups: Use `-aG` with the group name to change which groups they’re part of.</blockquote><p>→ <strong>Removing User Accounts</strong></p><blockquote>1. Deleting a User: Use `userdel` followed by the username.<br>2. Cleaning Up: Add `-r` to remove their home folder and related files.</blockquote><p>→ <strong>Checking User Info</strong></p><blockquote>1. Getting IDs: Use `id` to see user and group IDs.<br>2. List of Users: Use `cat /etc/passwd` to see all users.</blockquote><p><strong>→ Managing User Permissions</strong></p><p>→ <strong><em>Permissions decide what a user can do with files and folders, crucial for keeping the system safe</em></strong>.</p><p><strong>Basics of User Permissions</strong></p><blockquote>1. Three Permissions: Files and folders have read, write, and execute rights.<br>2. Changing Permissions: Use `chmod` to adjust who can do what with files.<br>3. Default Settings: Use `umask` to set how new files and folders should start.</blockquote><p><strong>→ Handling User Groups</strong></p><blockquote>1. Creating Groups: Use `groupadd` to make new groups.<br>2. Adding Users to Groups: Use `usermod` to give users access to group files.</blockquote><p><strong>→ Wrapping Up</strong></p><p>→ <strong><em>Knowing how to manage Linux users from the command line is vital for admins and users. As you get the hang of these commands, you’ll be able to manage user accounts and make sure they stay safe</em></strong>.</p><p>→ “Good user management keeps a Linux system organized and secure.”</p><p>Remember, the more you practice, the better you’ll get at handling Linux users.As you become familiar with these commands, you’ll gain the ability to handle user accounts securely.</p><p>Refrence Link For More Info:<br>Chapter Name:“Managing Users and Groups”</p><ul><li>Link: <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-managing_users_and_groups">https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-managing_users_and_groups</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b86da76ec2ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>