<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>manideep &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/manideep/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Thu, 15 Jul 2021 12:32:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>module in terraform</title>
		<link>https://www.bestdevops.com/module-in-terraform/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Thu, 15 Jul 2021 12:32:19 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17702</guid>

					<description><![CDATA[Write a 2 Module in Terraform. One Local Module, Second remote module. &#8211; Local Module Spec &#8211; in Ubuntu &#8211; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Write a 2 Module in Terraform. One Local Module, Second remote module. &#8211; Local Module Spec &#8211; in Ubuntu &#8211; Setup a webserver &#8211; Remote module &#8211; Setup VPC</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"manideep"</span> {
  ami           = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  
  tags = {
    Name = <span class="hljs-string">"Manideep_Module"</span>
  }
}

<span class="hljs-built_in">module</span> <span class="hljs-string">"Manideep_Module"</span> {
  source = <span class="hljs-string">"./modules/Manideep_module"</span>
}

<span class="hljs-built_in">module</span> <span class="hljs-string">"web-server"</span> {
  source  = <span class="hljs-string">".web-server/web-module"</span>
  version = <span class="hljs-string">"0.0.10"</span>
  
  cluster_name           = <span class="hljs-string">"webservers-stage"</span>
  db_remote_state_bucket = <span class="hljs-string">"(BUCKET_NAME)"</span>
  db_remote_state_key    = <span class="hljs-string">"stage/data-stores/mysql/terraform.tfstate"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  min_size      = <span class="hljs-number">2</span>
  max_size      = <span class="hljs-number">2</span>
}

<span class="hljs-built_in">module</span> <span class="hljs-string">"vpc"</span> {
  source = <span class="hljs-string">"terraform-aws-modules/vpc/aws"</span>

  name = <span class="hljs-string">"my-vpc"</span>
  cidr = <span class="hljs-string">"10.0.0.0/16"</span>

  azs             = &#91;<span class="hljs-string">"us-west-2a"</span>, <span class="hljs-string">"us-west-2b"</span>, <span class="hljs-string">"us-west-2c"</span>]
  private_subnets = &#91;<span class="hljs-string">"10.0.1.0/24"</span>, <span class="hljs-string">"10.0.2.0/24"</span>, <span class="hljs-string">"10.0.3.0/24"</span>]
  public_subnets  = &#91;<span class="hljs-string">"10.0.101.0/24"</span>, <span class="hljs-string">"10.0.102.0/24"</span>, <span class="hljs-string">"10.0.103.0/24"</span>]

  enable_nat_gateway = <span class="hljs-literal">true</span>
  enable_vpn_gateway = <span class="hljs-literal">true</span>

  tags = {
    Terraform = <span class="hljs-string">"true"</span>
    Environment = <span class="hljs-string">"dev"</span>
  }
}</code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Terraform script for ubuntu ec2 and following</title>
		<link>https://www.bestdevops.com/terraform-script-for-ubuntu-ec2-and-following/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Thu, 15 Jul 2021 10:43:42 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17665</guid>

					<description><![CDATA[ubuntu ec2-instance and copy a ansible playbook, install ansible and run it:::. Step 1 &#8211; Create ec2-instance with key and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>ubuntu ec2-instance and copy a ansible playbook, install ansible and run it</strong>:::.</p>



<p class="wp-block-paragraph">Step 1 &#8211; Create ec2-instance with key and group </p>



<p class="wp-block-paragraph">Step 2 &#8211; COpy playbook using file prov* </p>



<p class="wp-block-paragraph">Step 3 &#8211; Install Ansible using remote prov* </p>



<p class="wp-block-paragraph">Step 4 &#8211; RUn Ansinle playbook command using remote prv*</p>


<pre class="wp-block-code"><span><code class="hljs language-php">terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
  }
}
provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-west-2"</span>

  access_key = <span class="hljs-string">"XXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"</span>
}
resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"manideep"</span> {
  ami           = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  key_name = <span class="hljs-string">"manideep"</span>

    tags = {
    Name = <span class="hljs-string">"manideep"</span>
  }
connection {
	
      type     = <span class="hljs-string">"ssh"</span>
      user     = <span class="hljs-string">"ubuntu"</span>
      private_key = file(<span class="hljs-string">"manideep.pem"</span>)
      host = <span class="hljs-keyword">self</span>.public_ip
}
 provisioner <span class="hljs-string">"file"</span> {
    source      = <span class="hljs-string">"C:\Users\ansible\playbook.yaml"</span>
    destination = <span class="hljs-string">"/tmp/"</span>
  } 
provisioner <span class="hljs-string">"remote-exec"</span> {
    inline = &#91;
	  <span class="hljs-string">"sudo apt-get update"</span>,
          <span class="hljs-string">"sudo apt-get install ansible -y"</span>,
	  <span class="hljs-string">"sudo systemctl start ansible"</span>,
    ]
  }
provisioner <span class="hljs-string">"remote-exec"</span> {
              inline = &#91;
ansible-playbook -i inventory playbook.yaml -u root -k,
] 
}


}</code></span></pre>


<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>terraform variable script</title>
		<link>https://www.bestdevops.com/terraform-variable-script/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Thu, 15 Jul 2021 06:41:52 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17610</guid>

					<description><![CDATA[&#8211; Types of Terraform variable – Number &#8211; Types of Terraform variable – String &#8211; Types of Terraform variable – [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">&#8211; Types of Terraform variable – Number </p>



<p class="wp-block-paragraph">&#8211; Types of Terraform variable – String </p>



<p class="wp-block-paragraph">&#8211; Types of Terraform variable – List </p>



<p class="wp-block-paragraph">&#8211; Types of Terraform variable – Map </p>



<p class="wp-block-paragraph">-Types of Terraform variable – Boolean</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment">#Types of Terraform variable - Number</span>
terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
  }
}

<span class="hljs-comment"># Configure the AWS Provider</span>
provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-west-2"</span>
  access_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"</span>
}


variable <span class="hljs-string">"usercount"</span> {
  type = number
  description = <span class="hljs-string">"This is for demo of number variable"</span>
  <span class="hljs-keyword">default</span> = <span class="hljs-number">3</span>
}

resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"manideep_number"</span> {
  ami = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  count = <span class="hljs-string">"${var.usercount}"</span>
  tags = {
    Name = <span class="hljs-string">"Manideep.${count.index}"</span>
  }
  
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment">#Types of Terraform variable – String </span>

terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
  }
}

<span class="hljs-comment"># Configure the AWS Provider</span>
provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-west-2"</span>
  access_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
}


variable <span class="hljs-string">"username"</span> {
  type = string
  description = <span class="hljs-string">"This is for demo of string variable"</span>
  <span class="hljs-keyword">default</span> = <span class="hljs-string">"demouser"</span>
}

resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"manideep"</span> {
  ami           = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  tags = {
    Name = <span class="hljs-string">"mani.${var.username}"</span>
  }  
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment">#Types of Terraform variable – List</span>

terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
  }
}

<span class="hljs-comment"># Configure the AWS Provider</span>
provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-west-2"</span>
  access_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
}


variable <span class="hljs-string">"users"</span> {
    type    = <span class="hljs-keyword">list</span>
    <span class="hljs-keyword">default</span> = &#91;<span class="hljs-string">"dev1"</span>, <span class="hljs-string">"dev2"</span>, <span class="hljs-string">"dev3"</span>]
    description = <span class="hljs-string">"This is for demo of list variable"</span>
}

resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"Manideep"</span> {
  ami           = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  tags = {
    Name = <span class="hljs-string">"new.${var.users&#91;0]}"</span>
  } 
 
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment">#Types of Terraform variable – Map</span>

terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
  }
}

<span class="hljs-comment"># Configure the AWS Provider</span>
provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-west-2"</span>
  access_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXXXXXXXXX"</span>
}

variable <span class="hljs-string">"amis"</span> {
  type = <span class="hljs-string">"map"</span>
  <span class="hljs-keyword">default</span> = {
    
    <span class="hljs-string">"us-west-2"</span> = <span class="hljs-string">"ami-03d5c68bab01f3496"</span>
  }
}


resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"manideep"</span> {
  ami           = <span class="hljs-string">"{$var.amis&#91;var.region]}"</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  
  tags = {
    Name = <span class="hljs-string">"Manideep_map"</span>
  }
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># Types of Terraform variable – Boolean</span>

variable <span class="hljs-string">"pass"</span> {
  type    = bool
  <span class="hljs-keyword">default</span> = <span class="hljs-keyword">false</span>
}

resource <span class="hljs-string">"git_password"</span> <span class="hljs-string">"example"</span> {
  create_password = ${<span class="hljs-keyword">var</span>.pass}
}</code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>terraform script and some differences b/w docker,ansible</title>
		<link>https://www.bestdevops.com/terraform-script-and-some-differences-b-w-dockeransible/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Wed, 14 Jul 2021 11:14:26 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17563</guid>

					<description><![CDATA[comparison between Ansible Vs Docker Vs Terraform:: what is Ansible? Ansible is an open-source automation engine that helps in DevOps [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>comparison between Ansible Vs Docker Vs Terraform</strong>::</p>



<p class="wp-block-paragraph"><strong>what is Ansible? </strong>Ansible is an open-source automation engine that helps in DevOps and comes to the rescue to improve your technological environment’s scalability, consistency, and reliability. It is mainly used for rigorous IT tasks such as configuration management, application deployment, intraservice orchestration, and provisioning</p>



<p class="wp-block-paragraph"><strong>What is Docker?</strong> <em>Enterprise Container Platform for High-Velocity Innovation</em>. The Docker Platform is the industry-leading container platform for continuous, high-velocity innovation, enabling organizations to seamlessly build and share any application — from legacy to what comes next — and securely run them anywhere.</p>



<p class="wp-block-paragraph"><strong>What is Terraform?</strong> <em>Describe your complete infrastructure as code and build resources across providers</em>. With Terraform, you describe your complete infrastructure as code, even as it spans multiple service providers. Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel.</p>



<p class="wp-block-paragraph"><strong>Terraform script using group and key</strong>:: </p>


<pre class="wp-block-code"><span><code class="hljs language-php">terraform {
  required_providers {
    aws = {
      source  = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"~&gt; 3.0"</span>
    }
	
  }
}

<span class="hljs-comment"># Configure the AWS Provider</span>
provider <span class="hljs-string">"aws"</span> {
  region     = <span class="hljs-string">"us-west-2"</span>
  access_key = <span class="hljs-string">"XXXXXXXXXXXXXXX"</span>
  secret_key = <span class="hljs-string">"XXXXXXXXXXXXXXXXXXXXXXXXXX"</span>
}

<span class="hljs-comment">#aws resources</span>
resource <span class="hljs-string">"aws_instance"</span> <span class="hljs-string">"linux_instance"</span> {
  ami           = <span class="hljs-string">"ami-0dc8f589abe99f538"</span> <span class="hljs-comment"># linux ami in aws</span>
  instance_type = <span class="hljs-string">"t2.micro"</span>
  
  tags = {
    Name = <span class="hljs-string">"linux_instance"</span>
  }
}



</code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>key points in Jenkins</title>
		<link>https://www.bestdevops.com/key-points-in-jenkins/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 11:51:26 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17513</guid>

					<description><![CDATA[What is jenkins:: Jenkins is a free and open source automation server. It helps automate the parts of software development related to building, testing, and deploying it will [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">What is <strong>jenkins</strong>::</p>



<ul class="wp-block-list"><li><strong>Jenkins</strong> is a free and open source automation server.</li><li> It helps automate the parts of software development related to building, testing, and deploying</li><li>it will support facilitating continuous integration and continuous delivery</li><li>Jenkins can be installed through native system packages, Docker</li><li>even run standalone by any machine with a Java Runtime Environment (JRE) installed</li><li> It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC</li><li>It can execute Apache Ant, Apache Maven and sbt based projects as well as arbitrary shell scripts and Windows batch command</li><li>Discover the 1800+ community contributed Jenkins plugins to support building, deploying and automating any project.</li><li>Organizations can accelerate the software development process through automation.</li><li>Plugins have been released for Jenkins that extend its use to projects written in languages other than Java. Plugins are available for integrating Jenkins with most version control systems and bug databases. </li><li>Many build tools are supported via their respective plugins. Plugins can also change the way Jenkins looks or add new functionality.</li><li>Jenkins is a self-contained Java program that is agnostic of the platform on which it is installed.</li><li>Easy to install and configure plugins</li><li>Jenkins will be installed on a server where the central build will take place.</li></ul>



<p class="wp-block-paragraph"><strong>Top 10 popular Jenkins Plugins</strong>::</p>



<ul class="wp-block-list"><li>Kubernetes plugin</li><li>Docker Plugin for Jenkins</li><li>Jira Plugin</li><li>Slack Notification Plugin</li><li>Maven Plugin</li><li>Amazon EC2 Plugin</li><li>JUnit Plugin</li><li>Pipeline Plugin</li><li>Mailer Plugin</li><li>Green Balls Plugin</li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Quick notes for prometheus</title>
		<link>https://www.bestdevops.com/quick-notes-for-prometheus/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 11:10:43 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17470</guid>

					<description><![CDATA[&#8211; What is Time Series database? Time series databases are simply measurements or events that are tracked, monitored, downsampled, and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">&#8211; <strong>What is Time Series database?</strong> </p>



<p class="wp-block-paragraph">Time series databases are simply measurements or events that are tracked, monitored, downsampled, and aggregated over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data</p>



<p class="wp-block-paragraph">&#8211;<strong> How prometheus is good for time series metrix?</strong> </p>



<p class="wp-block-paragraph"><strong>Prometheus</strong> is a very <strong>good</strong> tool for processing and monitoring <strong>time series</strong> data. This versatile tool can be used with Graphana, a statistics visualization, and anomaly observation tool. This tool can collect data from highly loaded servers, various IoT devices, complex data processing systems, and many more.</p>



<p class="wp-block-paragraph">&#8211; <strong>What are components of prometheus? </strong></p>



<ul class="wp-block-list"><li> Prometheus server: which scrapes and stores time series data</li><li>client libraries: for instrumenting application code</li><li>push gateway: for supporting short-lived jobs</li><li>exporters: for services like HAProxy, StatsD, Graphite, etc.</li><li>alertmanager: to handle alerts</li></ul>



<p class="wp-block-paragraph">&#8211; <strong>How prometheus works?</strong></p>



<p class="wp-block-paragraph">Prometheus can scrape numerical data and store it as a time series in a local time series database. It can also integrate with remote storage options.In addition to the stored time series, impermanent times series from the source are produced by queries. These series are recognized by metric name and key value pairs known by labels<em>.</em> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ansible playbook</title>
		<link>https://www.bestdevops.com/ansible-playbook/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Fri, 09 Jul 2021 12:21:02 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17385</guid>

					<description><![CDATA[Write a Ansible Playbook to create a group called “deploy” Write a Ansible Playbook to create a user called “deploy-user” [&#8230;]]]></description>
										<content:encoded><![CDATA[
<ol class="wp-block-list"><li>Write a Ansible Playbook to create a group called “deploy”</li></ol>


<pre class="wp-block-code"><span><code class="hljs">- name: group creation 
  hosts: hostserver
  tasks:
   - name: deploy
     group:
       name: deploy
       state: present
 </code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to create a user called “deploy-user” which is part of group called “deploy” and with /bin/bash shell.</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-javascript">- name: user creation
  <span class="hljs-attr">hosts</span>: hostserver
  <span class="hljs-attr">tasks</span>:
    - name: deploy-user
      <span class="hljs-attr">user</span>: 
        name=deploy-user 
        groups=deploy
        shell=<span class="hljs-regexp">/bin/</span>bash
        </code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to install package named “httpd” in RHEL/centos.</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">-</span> <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">installinng</span> <span class="hljs-selector-tag">apache</span> <span class="hljs-selector-tag">on</span> <span class="hljs-selector-tag">centos</span>
  <span class="hljs-selector-tag">hosts</span>: <span class="hljs-selector-tag">web</span>

  <span class="hljs-selector-tag">tasks</span>:
  <span class="hljs-selector-tag">-</span> <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">Apache</span> <span class="hljs-selector-tag">installation</span>
    <span class="hljs-selector-tag">ansible</span><span class="hljs-selector-class">.builtin</span><span class="hljs-selector-class">.yum</span>:
      <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">httpd</span>
      <span class="hljs-selector-tag">state</span>: <span class="hljs-selector-tag">latest</span>
  
</code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to start and enable the service named “httpd”</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">-</span> <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">Update</span> <span class="hljs-selector-tag">web</span> <span class="hljs-selector-tag">servers</span>
  <span class="hljs-selector-tag">hosts</span>: <span class="hljs-selector-tag">web</span>

  <span class="hljs-selector-tag">tasks</span>:
  <span class="hljs-selector-tag">-</span> <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">Starting</span> <span class="hljs-selector-tag">a</span> <span class="hljs-selector-tag">Apache</span> <span class="hljs-selector-tag">Server</span>
    <span class="hljs-selector-tag">ansible</span><span class="hljs-selector-class">.builtin</span><span class="hljs-selector-class">.service</span>:
      <span class="hljs-selector-tag">name</span>: <span class="hljs-selector-tag">httpd</span>
      <span class="hljs-selector-tag">state</span>: <span class="hljs-selector-tag">started</span></code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to create a file called “index.html” in /var/www/html with some dummy html contents.</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment">#create a file called index.html using touch or vi </span>
- name: file creation
  hosts: web
task:
- name: creating index.html
    file:
       dest: /<span class="hljs-keyword">var</span>/www/html/index.html
       status:touch</code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to reboot a self machine.</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-php">- name: rebooting <span class="hljs-keyword">self</span> machine
  hosts: web
    task:
    - name: Rebooting machine 
        reboot:
 </code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to install a package called “git”, “wget”.</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-javascript">- name: To install a package <span class="hljs-string">"git"</span> and <span class="hljs-string">"wget"</span>
  <span class="hljs-attr">hosts</span>: web
  <span class="hljs-attr">tasks</span>:
  - name: Install git packages 
    <span class="hljs-attr">yum</span>:
      name: git
      <span class="hljs-attr">state</span>: present
 
  - name: Install wget packages 
    <span class="hljs-attr">yum</span>:
      name: wget
      <span class="hljs-attr">state</span>: present</code></span></pre>


<ol class="wp-block-list"><li>Write a Ansible Playbook to clone git repo. thttps://github.com/scmgalaxy/ansible-role-template</li></ol>


<pre class="wp-block-code"><span><code class="hljs language-javascript">- name: Cloning git repo
  <span class="hljs-attr">hosts</span>: web
  <span class="hljs-attr">environment</span>:
      http_proxy: <span class="hljs-string">'http://web-proxy:8080'</span>
      <span class="hljs-attr">https_proxy</span>: <span class="hljs-string">'http://web-proxy:8080'</span>
  <span class="hljs-attr">tasks</span>:
  - name: cloning....
    git: repo=https:<span class="hljs-comment">//github.com/scmgalaxy/ansible-role-template clone=yes dest=./ansible-role-template</span></code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ansible Adhoc Commands</title>
		<link>https://www.bestdevops.com/ansible-adhoc-commands-2/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Fri, 09 Jul 2021 10:08:40 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17345</guid>

					<description><![CDATA[Program 1 – Write a Ansible Adhoc Commands to create a group called “deploy How to verify?$ more /etc/group &#124; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Program 1 – Write a Ansible Adhoc Commands to create a group called “deploy</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ more /etc/group | grep deploy</p><cite>ansible localhost -m ansible.builtin.group -a&#8221;name=deploy state=present&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 2 – Write a Ansible Adhoc Commands to create a user called “deploy-user” which is part of group called “deploy” and with /bin/bash shell.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ more /etc/passwd | grep deploy-user</p><cite>ansible -m user -a &#8220;name=deploy-user group=deploy shell=/bin/bash&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 3 – Write a Ansible Adhoc commands install package named “httpd” in RHEL/centos.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ which httpd</p><cite> ansible localhost -m yum -a&#8221;name=httpd state=present&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 4 – Write a Ansible Adhoc commands to start and enable the service named “httpd”</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ ps -eaf | grep httpd</p><cite>ansible localhost -m service -a&#8221;name=httpd state=started</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 5 – Write a Ansible commands to create a file called “index.html” in /var/www/html with some dummy html contents.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>Browse http://x.x.x.x:80</p><cite>ansible localhost -m copy -a&#8221;src=index.html dest=/var/www/html/index.html&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 6 – Write a Ansible commands to copy a file called “second.html” in /var/www/html/second.html with some dummy html contents.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>Browse http://x.x.x.x/second.html</p><cite>ansible all -i  ACS,ARS, -m copy -a&#8221;src=index.html dest=/var/www/html/second.html&#8221; -u root -k</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 7 – Write a Ansible commands to install a package called “git”, “wget”.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ which git<br>$ which wget</p><cite>ansible all -m <strong>ansible.builtin.package</strong>  -a &#8220;name=git,wget&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 8 – Write a Ansible Adhoc commands to clone git repo. https://github.com/scmgalaxy/ansible-role-template.</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>How to verify?<br>$ ls</p><cite>ansible all -m ansible.builtin.git -a&#8221;repo=https://github.com/scmgalaxy/ansible-role-template clone=yes&#8221;</cite></blockquote>



<p class="wp-block-paragraph"><strong>Program 9 – Write a Ansible commands to reboot a self machine.</strong></p>



<p class="wp-block-paragraph">&#8211; ansible  all -m reboot -a &#8220;name=reboot&#8221;</p>



<p class="wp-block-paragraph"><strong>Program 10 – Write a Ansible commands to touch a file called “devopsschool.txt” in /opt/ and delete after using ansible adhoc command.</strong></p>



<p class="wp-block-paragraph">-ansible all -m ansible.builtin.file -a &#8220;path = /opt/devopsschool.txt state = touch &#8220;</p>



<p class="wp-block-paragraph">-ansible all -m ansible.builtin.file -a &#8220;path = /opt/devopsschool.txt state = absent&#8221;</p>



<p class="wp-block-paragraph">                       </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Services available in Kubernetes</title>
		<link>https://www.bestdevops.com/services-available-in-kubernetes/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Thu, 08 Jul 2021 12:29:55 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17302</guid>

					<description><![CDATA[service :: A Kubernetes service is a logical abstraction for a deployed group of pods in a cluster On the other hand, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>service ::</strong></p>



<p class="wp-block-paragraph">A <strong>Kubernetes service</strong> is a logical abstraction for a deployed group of pods in a cluster On the other hand, a service is responsible for exposing an interface to those pods, which enables network access from either within the cluster or between external processes and the service.</p>



<p class="wp-block-paragraph"><strong>types of services offered::</strong></p>



<ul class="wp-block-list"><li><strong>ClusterIP</strong>. Exposes a service which is only accessible from within the cluster.</li><li><strong>NodePort</strong>. Exposes a service via a static port on each node’s IP.</li><li><strong>LoadBalancer</strong>. Exposes the service via the cloud provider’s load balancer.</li><li><strong>ExternalName</strong>. Maps a service to a predefined externalName field by returning a value for the CNAME record.</li></ul>



<p class="wp-block-paragraph"><strong>Use Of Service named Kubernetes in default Namespace::</strong></p>



<p class="wp-block-paragraph">A <strong>Service in Kubernetes</strong> is an abstraction which defines a logical set of Pods and a policy by which to access them. <strong>Services</strong> enable a loose coupling between dependent Pods. A <strong>Service</strong> is defined using YAML (preferred) or JSON, like all <strong>Kubernetes</strong> objects.</p>



<p class="wp-block-paragraph"><strong>How services works::</strong></p>



<p class="wp-block-paragraph">For a service to work, the label selector at the load balancer should match the label selector of the pod so that the endpoint IP can be configured and the services can be accessible accordingly.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>one pod with two containers</title>
		<link>https://www.bestdevops.com/one-pod-with-two-containers/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Thu, 08 Jul 2021 06:40:43 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17257</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<pre class="wp-block-code"><span><code class="hljs language-php">apiVersion: v1
kind: Pod
metadata:
  name: multi-container
  labels:
    app: helloworld
spec:
  containers:
<span class="hljs-comment">#container one</span>
  - name: devopsschool1
    image: scmgalaxy/nginx-devopsschoolv1
    ports:
    - name: nginx-port
      containerPort: <span class="hljs-number">80</span>
<span class="hljs-comment">#container two</span>
  - name: devopsschool2
    image: webimp/mysql<span class="hljs-number">-56</span>-slim
    ports:
    - name: mysql-port
      containerPort: <span class="hljs-number">3306</span></code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>About Declarative language</title>
		<link>https://www.bestdevops.com/about-declarative-language/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Wed, 07 Jul 2021 10:26:06 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17165</guid>

					<description><![CDATA[Diff between Compiled Lang Vs Interpreted Lang Vs Declarative Lang:: compile lang:: A compiled language is a programming language whose implementations are typically compilers [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Diff between Compiled Lang Vs Interpreted Lang Vs Declarative Lang</strong>::</p>



<p class="wp-block-paragraph">compile lang:: A <strong>compiled language</strong> is a programming <strong>language</strong> whose implementations are typically compilers like c, c++,ALGOL,BASIC</p>



<p class="wp-block-paragraph">interpreter lang::  <strong>interpreter</strong> is a computer programming  that directly executes instructions written in a programming and scripting</p>



<p class="wp-block-paragraph">Declarative lang:: In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs.</p>



<p class="wp-block-paragraph"><strong>Example of Declarative Lang</strong>:: we have some language like sql,prolog</p>



<p class="wp-block-paragraph"><strong>Pros and Cons</strong>::</p>



<p class="wp-block-paragraph">pros : short,efficient code</p>



<p class="wp-block-paragraph">cons : Sometimes hard to understand for external people</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>complete details about pod</title>
		<link>https://www.bestdevops.com/complete-details-about-pod/</link>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Wed, 07 Jul 2021 10:09:13 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=17093</guid>

					<description><![CDATA[What is POD:: Pods are used in Kubernetes. pods contain one or more container, such as Docker containers. When a Pod [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What is POD</strong>::  <strong>Pods</strong> are used in Kubernetes. pods contain one or more container, such as Docker containers. When a Pod runs multiple containers,  if one container got stopped working whole pod will not be accessable</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="296" height="170" src="https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-pod.png" alt="" class="wp-image-17113" /></figure>



<p class="wp-block-paragraph"><strong>Types of PODS</strong>::pod has two types which run on single container and multiple container</p>



<p class="wp-block-paragraph"><strong>What POD contains</strong>:: pod contains container each container has it own port number but they all are in same network it has volume, containerized app</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="308" src="https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain-1024x308.png" alt="" class="wp-image-17146" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain-1024x308.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain-300x90.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain-768x231.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain-1536x462.png 1536w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-pod-contain.png 1754w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>pod life cycle</strong>:: pod has mainly three phase</p>



<p class="wp-block-paragraph">pending phase : when it is initiated, </p>



<p class="wp-block-paragraph">Running phase: when it is in use</p>



<p class="wp-block-paragraph">Succeed/fail: when the pod is exited/terminated</p>



<figure class="wp-block-image size-large"><img decoding="async" width="960" height="288" src="https://www.bestdevops.com/wp-content/uploads/2021/07/pod-life-cycle.png" alt="" class="wp-image-17159" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/pod-life-cycle.png 960w, https://www.bestdevops.com/wp-content/uploads/2021/07/pod-life-cycle-300x90.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/07/pod-life-cycle-768x230.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>KUBERNETES for Beginners:</title>
		<link>https://www.bestdevops.com/kubernetes-for-beginners/</link>
					<comments>https://www.bestdevops.com/kubernetes-for-beginners/#respond</comments>
		
		<dc:creator><![CDATA[manideep]]></dc:creator>
		<pubDate>Wed, 07 Jul 2021 07:53:14 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=16978</guid>

					<description><![CDATA[What is KUBERNETES :: Kubernetes is a platform where all the containers will be managed,where it perform auto- scaling,managing work [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What is KUBERNETES</strong> :: Kubernetes is a platform where all the containers will be managed,where it perform auto-            scaling,managing work loads,in short it is called as k8,it is written in go lang/go, it is available at github.com, it has master node and worker node</p>



<p class="wp-block-paragraph">        IMAGE ::</p>



<figure class="wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="1024" height="636" src="https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-1024x636.png" alt="" data-id="17011" data-full-url="https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1.png" data-link="https://www.bestdevops.com/?attachment_id=17011" class="wp-image-17011" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-1024x636.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-300x186.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-768x477.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-1536x954.png 1536w, https://www.bestdevops.com/wp-content/uploads/2021/07/what-is-kubernetes-1-2048x1272.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></li></ul></figure>



<p class="wp-block-paragraph"><strong>Why Kubernetes</strong>::  In real time need not to go down if we need 100 container to run the specific task we need to maintain it manually with out going it to down , at that time we use kubernetes to do that task, kubernetes will maintain the desired requirement it will automate if container goes down kubernetes will create a new container automatically</p>



<p class="wp-block-paragraph">image::</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="761" height="516" src="https://www.bestdevops.com/wp-content/uploads/2021/07/why-container.png" alt="" class="wp-image-17021" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/why-container.png 761w, https://www.bestdevops.com/wp-content/uploads/2021/07/why-container-300x203.png 300w" sizes="auto, (max-width: 761px) 100vw, 761px" /></figure>



<p class="wp-block-paragraph"><strong>Kubernetes Architecuture</strong>::In kubernetes we have two notes master and worker in master node we have apiserver,scheduler ,cluster store, controller for high availability we can create upto 3 master , in worker node we have docker, kubelet, kube-proxy</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture-1024x576.jpg" alt="" class="wp-image-17031" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture-1024x576.jpg 1024w, https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture-300x169.jpg 300w, https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture-768x432.jpg 768w, https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture-375x210.jpg 375w, https://www.bestdevops.com/wp-content/uploads/2021/07/kubernetes-architecture.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>How Kubernetes Works</strong>:: when a request comes apiserver will handle and the content will be stored in cluster-store,controller will controll all the managing task scheduler will schedule the task which container will do which task in worker node we can have any number of pod and each pod can contain any number of container but all the master and worker should be in one cluster </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="698" src="https://www.bestdevops.com/wp-content/uploads/2021/07/how-Kubernetes-architecture-diagram-1024x698.png" alt="" class="wp-image-17046" srcset="https://www.bestdevops.com/wp-content/uploads/2021/07/how-Kubernetes-architecture-diagram-1024x698.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/07/how-Kubernetes-architecture-diagram-300x205.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/07/how-Kubernetes-architecture-diagram-768x524.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/07/how-Kubernetes-architecture-diagram.png 1101w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/kubernetes-for-beginners/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
