<?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>thesandy06 &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/thesandy06/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, 30 Dec 2021 06:46:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Artifactory &#8211; Day1 &#8211; Assignment &#8211; Sandeep</title>
		<link>https://www.bestdevops.com/artifactory-day1-assignment-sandeep/</link>
		
		<dc:creator><![CDATA[thesandy06]]></dc:creator>
		<pubDate>Mon, 09 Aug 2021 12:09:48 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18912</guid>

					<description><![CDATA[Lifecycles of MavanMaven has 3 lifecycles1. Clean2. Default (Build)3. Site Goal is the single unit of task which does some [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table aligncenter"><table><tbody><tr><td></td><td><strong><span class="has-inline-color has-primary-color">Lifecycles of Mavan</span></strong><br>Maven has 3 lifecycles<br>1. Clean<br>2. Default (Build)<br>3. Site<br><br><strong><span class="has-inline-color has-primary-color">Goal</span></strong> is the single unit of task which does some real work. For example the compile goal (runs as mvn compiler:compile) which compiles the Java source. All goals are provided by plugins, either by default plugins or by user defined plugins (configured in pom file).<br><strong><span class="has-inline-color has-primary-color">Phase </span></strong>is a group of ordered goals or in other words: zero or more plugin goals are bound to a phase (either by default or by user). For example the compile phase (runs as &#8220;mvn compile&#8221;) consists only compiler:compile goal (plugin). Running a phase basically runs the plugins bound with it.<br><strong><span class="has-inline-color has-primary-color">Build Lifecycle</span></strong> is a group of ordered phases. There are three built-in lifecycle: default, clean and site.<br><br><strong><span class="has-inline-color has-primary-color">The build lifecycle is composed of the following phases:</span></strong><br><code><strong>validate</strong>: validate the project is correct and all necessary information is available. </code><br><code>compile: compile the source code of the project. </code><br><code>test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed. </code><br><code>package: take the compiled code and package it in its distributable format, such as a JAR. </code><br><code>integration-test: process and deploy the package if necessary into an environment where integration tests can be run. </code><br><code>verify: run any checks to verify the package is valid and meets quality criteria </code><br><code>install: install the package into the local repository, for use as a dependency in other projects locally. </code><br><code>deploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.</code><br><br><strong><span class="has-inline-color has-primary-color">What are the Top maven goals we have?</span></strong><br><br><span class="has-inline-color has-primary-color">Phase &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Goal</span><br>process-resources &#8212;&#8212;&#8212; resources:resources<br>compile  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- compiler:compile<br>process-test-resources &#8212; resources:testResources<br>test-compile &#8212;&#8212;&#8212;&#8212;&#8212;- compiler:testCompile<br>test &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; surefire:test<br>package &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; jar:jar<br>install &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; install:install<br>deploy &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; deploy:deploy<br></td><td></td></tr><tr><td></td><td><br><strong><span class="has-inline-color has-primary-color">What Ports Should I Expose when Setting up JFrog Applications?</span></strong><br><br><strong>Artifactory</strong>&nbsp;(Version 7.0 and above)<br><strong>External Network Port</strong> <br>8081 &amp; 8082<br><br><strong>Internal Network Ports (default)</strong><br>8081 for Artifactory<br>8040 and 8045 for Access<br>8048 and 9092 for the Replicator<br>8070 for Web<br>8086 for Metadata<br>8082, 8046, 8047, 8049, and 8091 for the Router<br>8061, and 8062 for Events<br></td><td></td></tr></tbody></table></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe  id="_ytid_72689"  width="675" height="379"  data-origwidth="675" data-origheight="379" src="https://www.youtube.com/embed/?enablejsapi=1&#038;list=PLTCuRW0ikUdNbCbppA72VxnZ3MU-oDiVH&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Kubernetes: Certificate Authentication &#8211; Block Storage &#8211; StorageClass &#8211; SANDEEP</title>
		<link>https://www.bestdevops.com/kubernetes-certificate-authentication-block-storage-storageclass/</link>
		
		<dc:creator><![CDATA[thesandy06]]></dc:creator>
		<pubDate>Thu, 29 Jul 2021 18:15:41 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18542</guid>

					<description><![CDATA[How certificates are used by your cluster&#8211; Kubernetes uses client certificates, bearer tokens, an authenticating proxy, or HTTP basic auth [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table is-style-regular"><table><tbody><tr><td><span class="has-inline-color has-primary-color"><strong>How certificates are used by your cluster</strong></span><br>&#8211; Kubernetes uses client certificates, bearer tokens, an authenticating proxy, or HTTP basic auth to authenticate API requests through authentication plugins<br>&#8211; Client certificates generated by kubeadm expire after 1 year.<br>&#8211; By default, kubeadm generates all the certificates needed for a cluster to run. You can override this behavior by providing your own certificates.<br>&#8211; you must place them in whatever directory is specified by the &#8211;cert-dir flag or the certificatesDir field of kubeadm&#8217;s ClusterConfiguration. By default this is /etc/kubernetes/pki.<br>If a given certificate and private key pair exists before running kubeadm init, kubeadm does not overwrite them. This means you can, for example, copy an existing CA into /etc/kubernetes/pki/ca.crt and /etc/kubernetes/pki/ca.key, and kubeadm will use this CA for signing the rest of the certificates.<br>command : kubeadm certs check-expiration<br><br><strong><span class="has-inline-color has-primary-color">Kubernetes requires PKI for the following operations:</span></strong><br>Client certificates for the kubelet to authenticate to the API server<br>Server certificate for the API server endpoint<br>Client certificates for administrators of the cluster to authenticate to the API server<br>Client certificates for the API server to talk to the kubelets<br>Client certificate for the API server to talk to etcd<br>Client certificate/kubeconfig for the controller manager to talk to the API server<br>Client certificate/kubeconfig for the scheduler to talk to the API server.<br>Client and server certificates for the front-proxy<br><br><span class="has-inline-color has-primary-color">Where certificates are stored</span><br>If you install Kubernetes with kubeadm, certificates are stored in /etc/kubernetes/pki.<br>ref : https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/<br><br><strong><span class="has-inline-color has-primary-color">volume plugins in kubernetes</span></strong><br>https://v1-17.docs.kubernetes.io/docs/concepts/storage/volumes/<br>https://kubernetes.io/docs/concepts/storage/volumes/<br><br> <strong><span class="has-inline-color has-primary-color">StorageClass  </span></strong><br>A StorageClass provides a way for administrators to describe the &#8220;classes&#8221; of storage they offer. Different classes might map to quality-of-service levels, or to backup policies, or to arbitrary policies determined by the cluster administrators.<br>Kubernetes itself is unopinionated about what classes represent.<br>This concept is sometimes called &#8220;profiles&#8221; in other storage systems.<br><span class="has-inline-color has-primary-color">A PersistentVolume (PV) </span>is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.<br>It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes,<br>but have a lifecycle independent of any individual Pod that uses the PV.<br>This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system.<br><span class="has-inline-color has-primary-color">A PersistentVolumeClaim (PVC) </span>is a request for storage by a user. It is similar to a Pod. Pods consume node resources and PVCs consume PV resources.<br>Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes<br><br><br><br><br><strong><span class="has-inline-color has-primary-color">Provisioning</span></strong><br>There are two ways PVs may be provisioned: statically or dynamically.<br><strong><span class="has-inline-color has-primary-color">Static</span></strong><br>A cluster administrator creates a number of PVs. They carry the details of the real storage, which is available for use by cluster users. They exist in the Kubernetes API and are available for consumption.<br><span class="has-inline-color has-primary-color">Dynamic</span><br>When none of the static PVs the administrator created match a user&#8217;s PersistentVolumeClaim, the cluster may try to dynamically provision a volume specially for the PVC.<br>This provisioning is based on StorageClasses: the PVC must request a storage class and the administrator must have created and configured that class for dynamic provisioning to occur.<br>Claims that request the class &#8220;&#8221; effectively disable dynamic provisioning for themselves.<br><br><strong><span class="has-inline-color has-primary-color">Block vs. object vs. file storage</span></strong><br>Block storage<br>Block storage is not alone in the world of data storage. Developers also use other systems, such as object storage and file storage. While the ultimate goal of each is to provide data to users and applications, each of those storage methods goes about storing and retrieving data differently.<br><br><strong><span class="has-inline-color has-primary-color">Object storage</span></strong><br>&#8211; Object storage, which is also known as object-based storage, breaks data files up into pieces called objects. It then stores those objects in a single repository, which can be spread out across multiple networked systems.<br>&#8211; In practice, applications manage all of the objects, eliminating the need for a traditional file system. Each object receives a unique ID, which applications use to identify the object. And each object stores metadata—information about the files stored in the object.<br>&#8211; One important difference between object storage and block storage is how each handles metadata.<br>In object storage, metadata can be customized to include additional, detailed information about the data files stored in the object.<br>For example, metadata accompanying a video file could be customized to tell where the video was made, the type of camera used to shoot it, and even what subjects were captured in each frame. In block storage, metadata is limited to basic file attributes.<br>Block storage is best suited for static files that aren’t changed often because any change made to a file results in the creation of a new object.<br><br><strong><span class="has-inline-color has-primary-color">File storage</span></strong><br>&#8211; File storage, which is also referred to as file-level or file-based storage, is normally associated with Network Attached Storage (NAS) technology. NAS presents storage to users and applications using the same ideology as a traditional network file system.<br>&#8211; In other words, the user or application receives data through directory trees, folders, and individual files. This functions similarly to a local hard drive. However, NAS or the Network Operating System (NOS) handle access rights, file sharing, file locking, and other controls.<br>&#8211; File storage can be very easy to configure, but access to data is constrained by a single path to the data, which can impact performance compared to block or object storage. File storage also only operates with common file-level protocols, such as a New Technology File System (NTFS) for Windows or a Network File System (NFS) for Linux. This could limit usability across dissimilar systems.</td></tr></tbody></table></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ReplicasSets-DeamonSets-Statefulsets-Service-Loadbalancer-Discovery Services-CoreDNS-SANDEEP</title>
		<link>https://www.bestdevops.com/replicassets-deamonsets-statefulsets-service-loadbalancer-discovery-services-coredns-sandeep/</link>
		
		<dc:creator><![CDATA[thesandy06]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 03:17:12 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18511</guid>

					<description><![CDATA[ReplicasSets-DeamonSets-Statefulsets-Service-Loadbalancer-Discovery Services-CoreDNS Assignment – 1What is ReplicasSets?A ReplicaSet is a process that runs multiple instances of a Pod and keeps [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table><tbody><tr><td><br><strong><span class="has-inline-color has-primary-color">ReplicasSets-DeamonSets-Statefulsets-Service-Loadbalancer-Discovery Services-CoreDNS</span></strong><br><br><br><strong><span class="has-inline-color has-primary-color">Assignment – 1</span></strong><br>What is ReplicasSets?<br>A ReplicaSet is a process that runs multiple instances of a Pod and keeps the specified number of Pods constant.<br>Its purpose is to maintain the specified number of Pod instances running in a cluster at any given time to prevent users from losing access to their application when a Pod fails or is inaccessible.<br><br>How to work with ReplicasSets?<br>ReplicaSet helps bring up a new instance of a Pod when the existing one fails,<br>scale it up when the running instances are not up to the specified number, and scale down or delete Pods if another instance with the same label is created.<br>A ReplicaSet ensures that a specified number of Pod replicas are running continuously and helps with load-balancing in case of an increase in resource usage.<br><br>Example of ReplicasSets?<br>apiVersion: apps/v1<br>kind: ReplicaSet<br>metadata:<br>name: my-replicaset<br>spec:<br>replicas: 2<br>selector:<br>matchLabels:<br>app: my-app<br>template:<br>metadata:<br>labels:<br>app: my-app<br>spec:<br>containers:<br>&#8211; name: my-container<br>image: nginx<br><br><strong><span class="has-inline-color has-primary-color">Assignment – 2</span></strong><br>What is DeamonSets?<br>The DaemonSet feature is used to ensure that some or all of your pods are scheduled and running on every single available node. This essentially runs a copy of the desired pod across all nodes.<br><br>How to work with DeamonSets?<br>When a new node is added to a Kubernetes cluster, a new pod will be added to that newly attached node.<br>When a node is removed, the DaemonSet controller ensures that the pod associated with that node is garbage collected. Deleting a DaemonSet will clean up all the pods that DaemonSet has created.<br>By default, the node that a pod runs on is decided by the Kubernetes scheduler. However, DaemonSet pods are created and scheduled by the DaemonSet controller<br><br>Example of DeamonSets?<br>apiVersion: apps/v1<br>kind: DaemonSet<br>metadata:<br>name: test-daemonset<br>namespace: test-daemonset-namespace<br>Labels:<br>app-type: test-app-type<br>spec:<br>template:<br>metadata:<br>labels:<br>name: test-daemonset-container<br>selector:<br>matchLabels:<br>name: test-daemonset-container<br>ref : https://www.bmc.com/blogs/kubernetes-daemonset/<br><br><strong><span class="has-inline-color has-primary-color">Assignment – 3</span></strong><br>What is Statefulsets?<br>A StatefulSet is a controller that helps you deploy and scale groups of Kubernetes pods.<br>How to work with Statefulsets?<br>When using Kubernetes, most of the time you don’t care how your pods are scheduled, but sometimes you care that pods are deployed in order, that they have a persistent storage volume, or that they have a unique, stable network identifier across restarts and reschedules.<br>In those cases, StatefulSets can help you accomplish your objective.<br><br>Example of Statefulsets?<br><br><strong>Assignment – 4</strong><br>What is Service?<br>Services provide network connectivity to Pods<br>The basic building block starts with the Pod, which is just a resource that can be created and destroyed on demand.<br>Because a Pod can be moved or rescheduled to another Node, any internal IPs that this Pod is assigned can change over time.<br>If we were to connect to this Pod to access our application, it would not work on the next re-deployment.<br>To make a Pod reachable to external networks or clusters without relying on any internal IPs, we need another layer of abstraction.<br>K8s offers that abstraction with what we call a Service Deployment.<br><br>How Service Works?<br>What are the types of Service?<br>Example Yaml of Service<br><br><strong>Assigment5</strong><br>What is Loadbalancer?<br>Load Balancer acts as a ‘traffic controller’ for your server and directs the requests to an available one, capable of fulfilling the request efficiently.<br>This ensures that requests are responded to fast and no server is over-stressed to degrade the performance.<br>In an organization’s attempt to meet the application demands, Load Balancer assists in deciding which server can efficiently handle the requests. This creates a better user experience.<br><br>What are the types of Loadbalancer?<br>a.) Network Load Balancer / Layer 4 (L4) Load Balancer: Transport Layer<br>Based on the network variables like IP address and destination ports, Network Load balancing is the distribution of traffic at the transport level through the routing decisions. Such load balancing is TCP<br>i.e. level 4, and does not consider any parameter at the application level like the type of content, cookie data, headers, locations, application behavior etc.<br>Performing network addressing translations without inspecting the content of discrete packets, Network Load Balancing cares only about the network layer information and directs the traffic on this basis only.<br>b.) Application Load Balancer / Layer 7 (L7) Load Balancer: Application Layer<br>Ranking highest in the OSI model, Layer 7 load balancer distributes the requests based on multiple parameters at the application level.<br>A much wider range of data is evaluated by the L7 load balancer including the HTTP headers and SSL sessions and distributes the server load based on the decision arising from a combination of several variables.<br>This way application load balancers control the server traffic based on the individual usage and behavior.<br>c.) Global Server Load Balancer/Multi-site Load Balancer:<br>With the increasing number of applications being hosted in cloud data centers, located at varied geographies, the GSLB extends the capabilities of general L4 and L7 across various data centers facilitating the efficient global load distribution,<br>without degrading the experience for end users. In addition to the efficient traffic balancing, multi-site load balancers also help in quick recovery and seamless business operations, in case of server disaster or disaster at any data center, as other data centers at any part of the world can be used for business continuity.<br>Load Balancing Methods<br>All kinds of Load Balancers receive the balancing requests, which are processed in accordance with a pre-configured algorithm.<br>3.1: Industry Standard Algorithms<br>The most common load balancing methodologies include:<br>a) Round Robin Algorithm:<br>It relies on a rotation system to sort the traffic when working with servers of equal value. The request is transferred to the first available server and then that server is placed at the bottom of the line.<br>b) Weighted Round Robin Algorithm:<br>This algorithm is deployed to balance loads of different servers with different characteristics.<br>c) Least Connections Algorithm:<br>In this algorithm, traffic is directed to the server having the least traffic. This helps maintain the optimized performance, especially at peak hours by maintaining a uniform load at all the servers.<br>d) Least Response Time Algorithm:<br>This algorithm, like the least connection one, directs traffic to the server with a lower number of active connections and also considers the server having the least response time as its top priority.<br>e) IP Hash Algorithm:<br>A fairly simple balancing technique assigns the client’s IP address to a fixed server for optimal performance.<br><br>How Loadbalancer works?<br>Distributes a set of tasks over different computing units (or related resources), to make the overall process easier to execute and much more efficient.<br>Ensuring no single server bears too much of demand and evenly spreading the load, it improves the responsiveness and availability of applications or websites for the user.<br><br><strong><span class="has-inline-color has-primary-color">Assigment6</span></strong><br>What is Discovery Services?<br>Service discovery is the actual process of figuring out how to connect to a service.<br>Automatically detecting devices and services on a network.<br>Service discovery protocol (SDP) is a networking standard that accomplishes detection of networks by identifying resources.<br><br>Types of service discovery<br>There are two types of service discovery:<br>Server-side service discovery allows clients applications to find services through a router or a load balancer.<br>Client-side service discovery allows clients applications to find services by looking through or querying a service registry, in which service instances and endpoints are all within the service registry.<br><br>How Discovery Services works?<br>There are three components to Service Discovery: the service provider, the service consumer and the service registry.<br>1) The Service Provider registers itself with the service registry when it enters the system and de-registers itself when it leaves the system.<br>2) The Service Consumer gets the location of a provider from the service registry, and then connects it to the service provider.<br>3) The Service Registry is a database that contains the network locations of service instances.<br>The service registry needs to be highly available and up to date so clients can go through network locations obtained from the service registry.<br>A service registry consists of a cluster of servers that use a replication protocol to maintain consistency.<br>ref : https://avinetworks.com/glossary/service-discovery/<br><br>What is CoreDNS?<br>The coredns add-on is a DNS server that provides domain name resolution services for Kubernetes clusters<br>coredns is an open-source software<br>It provides a means for cloud services to discover each other in cloud-native deployments<br><br>Use of CoreDNS?<br>In a Kubernetes cluster, coredns can automatically discover services in the cluster and provide domain name resolution for these services.<br>Kubernetes v1.11 and later back CoreDNS as the official default DNS for all clusters going forward.</td></tr></tbody></table></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Kubernetes &#8211; Day4 &#8211; Sandeep</title>
		<link>https://www.bestdevops.com/kubernetes-day4-sandeep/</link>
		
		<dc:creator><![CDATA[thesandy06]]></dc:creator>
		<pubDate>Fri, 23 Jul 2021 04:40:05 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18130</guid>

					<description><![CDATA[Master API Server Cluster store  (ETCD)   Controller manager Scheduler Worker Kubler Docker Kube-proxy Workstation kubectl]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table><tbody><tr><td><br>Master</td><td>API Server <br>Cluster store  (ETCD)   <br>Controller manager <br>Scheduler</td></tr></tbody></table></figure>



<figure class="wp-block-table"><table><tbody><tr><td>Worker</td><td>Kubler<br> Docker <br>Kube-proxy</td></tr></tbody></table></figure>



<figure class="wp-block-table"><table><tbody><tr><td>Workstation</td><td>kubectl</td></tr></tbody></table></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Docker &#8211; Lab &#8211; Day1-3 &#8211; Sandeep</title>
		<link>https://www.bestdevops.com/docker-lab-day1-3-sandeep/</link>
		
		<dc:creator><![CDATA[thesandy06]]></dc:creator>
		<pubDate>Thu, 22 Jul 2021 07:10:18 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18099</guid>

					<description><![CDATA[Create Ec2 ubuntu instance (freeetire) in AWS Copy the permissions keys to local Open putty key load and generate private [&#8230;]]]></description>
										<content:encoded><![CDATA[
<ol class="wp-block-list" type="1"><li>Create Ec2 ubuntu instance (freeetire) in AWS</li><li>Copy the permissions keys to local</li><li>Open putty key load and generate private key</li><li>Open Putty and browse the private key and login to the ubuntu instance</li><li>Auto logged in with no credentials</li><li>Install docker</li><li><a href="https://docs.docker.com/engine/install/ubuntu/">https://docs.docker.com/engine/install/ubuntu/</a></li><li>sudo apt install apache2</li><li>sudo apt-get install git</li><li>Install Ansible:<br>sudo apt-add-repository ppa:ansible/ansible</li></ol>



<p class="wp-block-paragraph">Log into the Ubuntu Server that will host Ansible</p>



<p class="wp-block-paragraph">Install the necessary repository with the command sudo apt-add-repository ppa:ansible/ansible.</p>



<p class="wp-block-paragraph">Update apt with the command sudo apt-get update.</p>



<p class="wp-block-paragraph">Install Ansible with the command sudo apt-get install ansible -y.</p>



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



<figure class="wp-block-table"><table><tbody><tr><td>ubuntu@ip-172-31-36-167:~$ docker -v<br>Docker version 20.10.6, build 370c289<br>ubuntu@ip-172-31-36-167:~$ which docker<br>/usr/bin/docker<br>ubuntu@ip-172-31-36-167:~$ which dockerd<br>/usr/bin/dockerd<br>ubuntu@ip-172-31-36-167:~$ which containerd<br>/usr/bin/containerd<br>sudo apt install apache2<br>ubuntu@ip-172-31-36-167:~$ sudo apt-get install git<br>Reading package lists&#8230; Done<br>Building dependency tree<br>Reading state information&#8230; Done<br>git is already the newest version (1:2.25.1-1ubuntu3.1).<br>0 upgraded, 0 newly installed, 0 to remove and 83 not upgraded.<br> <br>git version 2.25.1<br>docker start d2284fa3b876<br>docker stop d2284fa3b876<br>docker start d2284fa3b876<br>docker restart d2284fa3b876<br>docker pause d2284fa3b876<br>docker unpause d2284fa3b876<br>docker kill d2284fa3b876<br>docker rm d2284fa3b876<br>Docker ps -a<br>Docker images<br>Df -kh<br>overlay         7.7G  2.8G  5.0G  36% /var/lib/docker/overlay2/aa0adb35162df4589704c14803ba465a45ab493dccaead7d3cbc3b827ebec578/merged<br>ubuntu@ip-172-31-36-167:~$ sudo docker run -it -d ubuntu<br>4a6368fbfdf3134efa6c1b53c399d7e0a786fa5197ef2a4986ca1f81d52a46b9<br> <br>ubuntu@ip-172-31-36-167:~$ docker run -it ubuntu:latest /bin/bash<br>root@3495aa19c4ad:/#<br> <br>ubuntu@ip-172-31-36-167:~$ docker run -itd ubuntu:latest /bin/bash<br>52405e2c22b4f9526bbfd3b598d92055d20a1030d13752c476494fb482e56009<br> <br> <br> <br>ubuntu@ip-172-31-36-167:~$ docker start e220e9b0e897<br>ubuntu@ip-172-31-36-167:~$ docker attach e220e9b0e897 (ubuntu conatiner)<br>root@e220e9b0e897:/# pwd<br>/<br>root@e220e9b0e897:/# ls<br>bin  boot  dev  etc  home  lib  lib32  lib64  libx32  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var<br>Exit (command) : pushes you out of container and stops the container<br>ctrl+pq (shortcut) : pushes you out of container and let the container continue running<br> <br> <br> <br>ubuntu@ip-172-31-36-167:~$ mkdir dock-image<br>ubuntu@ip-172-31-36-167:~$ cd dock-image<br>ubuntu@ip-172-31-36-167:~/dock-image$ vi dockerfile<br>ubuntu@ip-172-31-36-167:~/dock-image$ touch index.html<br>ubuntu@ip-172-31-36-167:~/dock-image$ pwd<br>/home/ubuntu/dock-image<br> <br>ubuntu@ip-172-31-36-167:~/dock-image$ docker build -t ub-up-git .<br>Sending build context to Docker daemon   2.56kB<br>Step 1/5 : FROM ubuntu<br> &#8212;&gt; c29284518f49<br>Step 2/5 : MAINTAINER Sandeep Draksharapu &lt;thesdandy96@gmail.com&gt;<br> &#8212;&gt; Running in ed426586cda4<br>Removing intermediate container ed426586cda4<br> &#8212;&gt; 6db668bbb9d4<br>Step 3/5 : RUN apt-get update<br> &#8212;&gt; Running in 63a946079b3a<br>Get:1 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> focal InRelease [265 kB]<br>Get:2 <a href="http://security.ubuntu.com/ubuntu">http://security.ubuntu.com/ubuntu</a> focal-security InRelease [114 kB]<br>Get:3 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> focal-updates InRelease [114 kB]<br>Get:4 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> focal-backports InRelease [101 kB]<br>Get:5 <a href="http://archive.ubuntu.com/ubuntu%20focal/multiverse">http://archive.ubuntu.com/ubuntu focal/multiverse</a> amd64 Packages [177 kB]<br>ubuntu@ip-172-31-36-167:~/dock-image$ docker images<br>REPOSITORY    TAG       IMAGE ID       CREATED          SIZE<br>ub-up-git     latest    a78f67cafcec   23 seconds ago   204MB<br>ubuntu@ip-172-31-36-167:~$ docker login<br>Login with your Docker ID to push and pull images from Docker Hub. If you don&#8217;t have a Docker ID, head over to <a href="https://hub.docker.com">https://hub.docker.com</a> to create one.<br>Username: thesandy96<br>Password:<br>WARNING! Your password will be stored unencrypted in /home/ubuntu/.docker/config.json.<br>Configure a credential helper to remove this warning. See<br><a href="https://docs.docker.com/engine/reference/commandline/login/#credentials-store">https://docs.docker.com/engine/reference/commandline/login/#credentials-store</a><br> <br>Login Succeeded<br>ubuntu@ip-172-31-36-167:~/dock-image$ docker tag ub-up-git thesandy96/dockerlab<br>ubuntu@ip-172-31-36-167:~/dock-image$ docker images<br>REPOSITORY             TAG       IMAGE ID       CREATED         SIZE<br>ub-up-git              latest    a78f67cafcec   2 minutes ago   204MB<br>thesandy96/dockerlab   latest    a78f67cafcec   2 minutes ago   204MB<br> <br>ubuntu@ip-172-31-36-167:~/dock-image$ docker tag ub-up-git:latest thesandy96/dockerlab:myubuntuimage<br>ubuntu@ip-172-31-36-167:~/dock-image$ docker images<br>REPOSITORY             TAG             IMAGE ID       CREATED         SIZE<br>thesandy96/dockerlab   latest          a78f67cafcec   4 minutes ago   204MB<br>thesandy96/dockerlab   myubuntuimage   a78f67cafcec   4 minutes ago   204MB<br>ub-up-git              latest          a78f67cafcec   4 minutes ago   204MB<br> <br>ubuntu@ip-172-31-36-167:~$ docker push thesandy96/dockerlab:myubuntuimage<br>The push refers to repository [docker.io/thesandy96/dockerlab]<br>77a90f426ac1: Pushed<br>181a340af0cd: Pushed<br>f51af2ec0c1f: Pushed<br>a70daca533d0: Mounted from library/ubuntu<br>ubuntu@ip-172-31-36-167:~$ docker rmi thesandy96/dockerlab<br>Untagged: thesandy96/dockerlab:latest<br>Docker rm 4a6368fbfdf3<br> <br>ubuntu@ip-172-31-36-167:~$ docker images<br>REPOSITORY             TAG             IMAGE ID       CREATED          SIZE<br>ub-up-git              latest          8c689035cb0f   24 minutes ago   204MB<br>thesandy96/dockerlab   latest          8c689035cb0f   24 minutes ago   204MB<br>thesandy96/dockerlab   myubuntuimage   8c689035cb0f   24 minutes ago   204MB<br> <br>ubuntu@ip-172-31-36-167:~$ docker exec 4a6368fbfdf3 ps -ef<br>UID          PID    PPID  C STIME TTY          TIME CMD<br>root           1       0  0 06:44 pts/0    00:00:00 bash<br>root          15       0  0 06:46 ?        00:00:00 ps -ef<br> <br>ubuntu@ip-172-31-36-167:~$ docker exec 4a6368fbfdf3 df -kh<br>Filesystem      Size  Used Avail Use% Mounted on<br>overlay         7.7G  3.3G  4.4G  43% /<br>tmpfs            64M     0   64M   0% /dev<br>tmpfs           489M     0  489M   0% /sys/fs/cgroup<br>shm              64M     0   64M   0% /dev/shm<br>/dev/root       7.7G  3.3G  4.4G  43% /etc/hosts<br>tmpfs           489M     0  489M   0% /proc/acpi<br>tmpfs           489M     0  489M   0% /proc/scsi<br>tmpfs           489M     0  489M   0% /sys/firmware<br> <br>ubuntu@ip-172-31-36-167:~$ docker exec -it 4a6368fbfdf3 /bin/bash<br>root@4a6368fbfdf3:/# pwd<br>/<br> </td></tr></tbody></table></figure>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
