<?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>AWS archivos - Geko Cloud</title>
	<atom:link href="https://geko.cloud/en/tag/aws-en/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Servicios de consultoría cloud y devops</description>
	<lastBuildDate>Tue, 07 Jun 2022 07:29:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.7</generator>

<image>
	<url>https://geko.cloud/wp-content/uploads/2021/08/cropped-geko-fav-150x150.png</url>
	<title>AWS archivos - Geko Cloud</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Dynamic nodes in Jenkins via AWS Spot Fleet</title>
		<link>https://geko.cloud/en/dynamic-nodes-in-jenkins-via-aws-spot-fleet/</link>
					<comments>https://geko.cloud/en/dynamic-nodes-in-jenkins-via-aws-spot-fleet/#respond</comments>
		
		<dc:creator><![CDATA[Miguel]]></dc:creator>
		<pubDate>Tue, 07 Jun 2022 07:27:32 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Jenkins]]></category>
		<guid isPermaLink="false">https://geko.cloud/?p=8452</guid>

					<description><![CDATA[<p>Dynamic nodes in Jenkins via AWS Spot Fleet Provisionar nodos slave de jenkins dinámicamente gracias a aws spot fleet A few weeks ago, a customer contacted us. His request was simple: What can we do to further optimize our automated CI/CD process in Jenkins? After assesing the needs and the current infrastructure of the client, [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/dynamic-nodes-in-jenkins-via-aws-spot-fleet/">Dynamic nodes in Jenkins via AWS Spot Fleet</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3>Dynamic nodes in Jenkins via AWS Spot Fleet</h3>
<p>Provisionar nodos slave de jenkins dinámicamente gracias a aws spot fleet</p>
<p>A few weeks ago, a customer contacted us. His request was simple: What can we do to further optimize our automated CI/CD process in Jenkins?</p>
<p>After assesing the needs and the current infrastructure of the client, we decided to change the current paradigm in terms of task execution. Until now <a href="https://www.jenkins.io/" target="_blank" rel="noopener"><strong>Jenkins</strong></a> executed the tasks in its main node (the machine where Jenkins is running), by changing this paradigm to one based on dynamic provisioning of subordinate nodes we would gain the following benefits:</p>
<ul>
<li>Cost savings &#8211; By moving all the computational effort away from the main node. It can be hosted on a lower performance machine, reducing the overall cost of our infrastructure. The subordinate nodes would only be running during the execution of a task, also saving money while no task is running.</li>
<li>Security &#8211; As we will not execute any code on the main node, we ensure the system’s integrity even if the code has been compromised, and since it is only executed on an ephemeral instance the attacker will be isolated.</li>
<li>Performance &#8211; The subordinate node exists only to execute the task and can dedicate all of the node&#8217;s resources to it.</li>
</ul>
<p>&nbsp;</p>
<h2>Requirements</h2>
<p>For this change, we will perform the following tasks:</p>
<ul>
<li>Spot Fleet creation in AWS</li>
<li>Installation and configuration of the Jenkins plugin</li>
<li>Jenkinsfile adaptation</li>
</ul>
<p>For this publication we will make the following assumptions:</p>
<ul>
<li>We have an AWS account already set up</li>
<li>We host Jenkins on an EC2 server</li>
<li>We have knowledge of some basic Jenkins and AWS concepts</li>
</ul>
<p><span style="font-weight: 400;">That said, let&#8217;s get down to business.</span></p>
<p>&nbsp;</p>
<p>In this article on &#8220;Dynamic nodes in Jenkins via AWS Spot Fleet&#8221; we will develop all the necessary steps to obtain a good result.</p>
<h2>Creation of launch template and spot fleet</h2>
<p>An AWS Spot Fleet is nothing more than an AutoScaling Group of EC2 machines but with spot type instances &#8211; Amazon’s surplus hardware that nobody is using and that AWS sells cheaper than usual. The first step will be to create the Launch Template that the Spot Fleet will use:</p>
<p>&nbsp;</p>
<p><img fetchpriority="high" decoding="async" class="wp-image-8409 aligncenter" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-0.png" alt="" width="795" height="413" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-0.png 1541w, https://geko.cloud/wp-content/uploads/2022/05/Spot-0-300x156.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-0-1024x532.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-0-768x399.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-0-1536x797.png 1536w" sizes="(max-width: 795px) 100vw, 795px" /></p>
<p>&nbsp;</p>
<p>The important items to be filled in will be:</p>
<ol>
<li>Name and description</li>
<li>AMI to use &#8211; For example Ubuntu 22</li>
<li>Type of instance to use &#8211; Choose one according to your performance needs</li>
<li>Key Pair &#8211; We will need to add it later in Jenkins</li>
<li>Network &#8211; Use the same Subnet as Jenkins if possible</li>
<li>Security Group &#8211; For the connection between nodes to be established, it is important that we give access to port 22 from the main node. The easiest way is to create a rule that allows access either from the IP of the main node (if we have a Elastic IP assigned) or from its Security Group</li>
<li>Storage &#8211; Allocate the storage according to your needs</li>
<li>User data &#8211; For the Jenkins worker to run on the subordinate node, we will need to install JRE, we also installed Docker as a requirement:</li>
</ol>
<p>&nbsp;</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">#!/bin/bash
# Install docker
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
apt-get update
apt-get install -y docker-ce
usermod -aG docker ubuntu

# Install docker-compose
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

#Install JRE
sudo apt install -y default-jre</pre>
</div>
<p>&nbsp;</p>
<p>Once created we will have a Launch template similar to this one:</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter wp-image-8413" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-2.png" alt="" width="795" height="501" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-2.png 1543w, https://geko.cloud/wp-content/uploads/2022/05/Spot-2-300x189.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-2-1024x646.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-2-768x484.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-2-1536x969.png 1536w" sizes="(max-width: 795px) 100vw, 795px" /></p>
<p>&nbsp;</p>
<p>Now it is time to create the Spot fleet as such:</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter wp-image-8411" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-1.png" alt="" width="795" height="383" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-1.png 1407w, https://geko.cloud/wp-content/uploads/2022/05/Spot-1-300x144.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-1-1024x493.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-1-768x370.png 768w" sizes="(max-width: 795px) 100vw, 795px" /></p>
<p>&nbsp;</p>
<p>In this case, the items to be filled in are:</p>
<ol>
<li>Launch parameters &#8211; Select our Launch Template created above<img loading="lazy" decoding="async" class="aligncenter wp-image-8415" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-3.png" alt="" width="795" height="245" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-3.png 1054w, https://geko.cloud/wp-content/uploads/2022/05/Spot-3-300x93.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-3-1024x316.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-3-768x237.png 768w" sizes="(max-width: 795px) 100vw, 795px" /></li>
<li>Target Capacity &#8211; Set total to 0 for now, as it will be controlled by the Jenkins plugin. Enable Maintain Target Capacity<img loading="lazy" decoding="async" class=" wp-image-8417 aligncenter" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-4.png" alt="" width="760" height="388" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-4.png 915w, https://geko.cloud/wp-content/uploads/2022/05/Spot-4-300x153.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-4-768x392.png 768w" sizes="(max-width: 760px) 100vw, 760px" /></li>
<li>Network &#8211; Assign the VPC in which the main node is hosted</li>
<li>Instance type requirements &#8211; Choose the desired instance types in Manually select instance types, a larger quantity gives a better pool from which to start Spot instances<img loading="lazy" decoding="async" class="aligncenter wp-image-8419" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-5.png" alt="" width="795" height="347" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-5.png 1060w, https://geko.cloud/wp-content/uploads/2022/05/Spot-5-300x131.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-5-1024x446.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-5-768x335.png 768w" sizes="(max-width: 795px) 100vw, 795px" /></li>
<li>Allocation strategy &#8211; Capacity Optimized</li>
</ol>
<p>And that&#8217;s it, we have created our Spot Fleet.</p>
<p>&nbsp;</p>
<h2>Installing and configuring the Jenkins plugin</h2>
<p>Before installing the plugin, we will have to create and assign a new IAM role to the instance hosting the main node so that it will be able to manage our Spot fleet:</p>
<p>&nbsp;</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;application/json&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">{
   "Version":"2012-10-17",
   "Statement":[
      {
         "Effect":"Allow",
         "Action":[
            "ec2:DescribeSpotFleetInstances",
            "ec2:ModifySpotFleetRequest",
            "ec2:CreateTags",
            "ec2:DescribeRegions",
            "ec2:DescribeInstances",
            "ec2:TerminateInstances",
            "ec2:DescribeInstanceStatus",
            "ec2:DescribeSpotFleetRequests"
         ],
         "Resource":"*"
      },
      {
         "Effect":"Allow",
         "Action":[
            "autoscaling:DescribeAutoScalingGroups",
            "autoscaling:UpdateAutoScalingGroup"
         ],
         "Resource":"*"
      },
      {
         "Effect":"Allow",
         "Action":[
            "iam:ListInstanceProfiles",
            "iam:ListRoles",
            "iam:PassRole"
         ],
         "Resource":"*"
      }
   ]
}</pre>
</div>
<p>&nbsp;</p>
<p>Once this is done, we will install the<a href="https://plugins.jenkins.io/ec2-fleet/" target="_blank" rel="noopener"><strong> ec2-fleet-plugin</strong></a> and configure it from Manage Jenkins &gt; Manage Nodes &gt; Configure Clouds &gt; Add New Cloud &gt; Amazon EC2 Fleet.</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8425" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-6.png" alt="" width="795" height="429" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-6.png 2102w, https://geko.cloud/wp-content/uploads/2022/05/Spot-6-300x162.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-6-1024x552.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-6-768x414.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-6-1536x829.png 1536w, https://geko.cloud/wp-content/uploads/2022/05/Spot-6-2048x1105.png 2048w" sizes="(max-width: 795px) 100vw, 795px" /></p>
<p>&nbsp;</p>
<ol>
<li>Assign a name</li>
<li>AWS Credentials &#8211; We leave this blank, since our machine already has the role described above.</li>
<li>Region &#8211; Select the region in which we host our servers.</li>
<li>EC2 Fleet &#8211;<strong> It will only appear when we assign the region and the role is assigned to the machine correct</strong>ly. Once filled in, we select our Spot fleet<img loading="lazy" decoding="async" class="aligncenter wp-image-8427" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-7.png" alt="" width="795" height="443" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-7.png 2100w, https://geko.cloud/wp-content/uploads/2022/05/Spot-7-300x167.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-7-1024x571.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-7-768x428.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-7-1536x856.png 1536w, https://geko.cloud/wp-content/uploads/2022/05/Spot-7-2048x1141.png 2048w" sizes="(max-width: 795px) 100vw, 795px" /></li>
<li>Upload the Private key generated in the Launch template as <strong>SSH Username with private key</strong></li>
<li>Private IP &#8211; Select if we want the main node to connect to the subordinate node using the private IP instead of the public one</li>
<li>Always Reconnect &#8211; We recommend not to enable it, as Spot instances are ephemeral by nature</li>
<li>Restrict Usage &#8211; Restrict the use of this Spot Fleet only to tasks that specify the assigned tag, regardless of the global Jenkins configuration</li>
<li>Label &#8211; The label that identifies this node cloud, useful for assigning which tasks will be executed in the Fleet<img loading="lazy" decoding="async" class="aligncenter wp-image-8429" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-8.png" alt="" width="795" height="287" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-8.png 2074w, https://geko.cloud/wp-content/uploads/2022/05/Spot-8-300x108.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-8-1024x370.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-8-768x278.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-8-1536x555.png 1536w, https://geko.cloud/wp-content/uploads/2022/05/Spot-8-2048x741.png 2048w" sizes="(max-width: 795px) 100vw, 795px" /></li>
<li>Number of executors &#8211; The number of simultaneous jobs that each Spot Fleet instance will be able to host</li>
<li>Max Idle Minutes Before Scaledown &#8211; The number of minutes Jenkins will keep an instance active with no pending tasks. <strong>If left at 0 Jenkins will never terminate instances, even if they are unused</strong></li>
<li>Minimum/Maximum cluster Size &#8211; The minimum and maximum quantity of instances we want the Spot fleet to have. Ideally, the minimum should be set to 0 to reduce costs</li>
</ol>
<p><span style="font-weight: 400;">Once the configuration is saved, we will have a new section in the Jenkins dashboard, which indicates the current status of our Spot Fleet.</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class=" wp-image-8431 aligncenter" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-9.png" alt="" width="336" height="349" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-9.png 700w, https://geko.cloud/wp-content/uploads/2022/05/Spot-9-289x300.png 289w" sizes="(max-width: 336px) 100vw, 336px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Jenkinsfile adaptation</h2>
<p>Now that we have our Spot fleet configured, it is time to make some small changes so Jenkins uses this new type of nod. If we want it to be used systematically on a global level, we can disable the execution of tasks on the main node (the only other node in our case) from the node configuration screen.</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8433" src="https://geko.cloud/wp-content/uploads/2022/05/Spot-10.png" alt="" width="795" height="408" srcset="https://geko.cloud/wp-content/uploads/2022/05/Spot-10.png 1826w, https://geko.cloud/wp-content/uploads/2022/05/Spot-10-300x154.png 300w, https://geko.cloud/wp-content/uploads/2022/05/Spot-10-1024x526.png 1024w, https://geko.cloud/wp-content/uploads/2022/05/Spot-10-768x395.png 768w, https://geko.cloud/wp-content/uploads/2022/05/Spot-10-1536x789.png 1536w" sizes="(max-width: 795px) 100vw, 795px" /></p>
<p>&nbsp;</p>
<p>If, on the other hand, we want certain tasks to be executed in the subordinate nodes, we will have to specify them at Jenkinsfile level, here is an example of how to do it:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;groovy&quot;,&quot;mime&quot;:&quot;text/x-groovy&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">#!groovy
pipeline {
//Especificamos agente a nivel de Pipeline
  agent {
    label 'ec2-fleet'
  }

  stages {
        stage('Test') {
          agent {
            dockerfile {
              // Si usamos un agente en concreto, tendremos que volver a especificar la etiqueta
              label 'ec2-fleet'
              filename 'Dockerfile'
              dir 'docker/images/tests'
              args '-u root'
            }
          }
          steps {
            sh 'Hello World'
          }
        }
  }
}</pre>
</div>
<p>&nbsp;</p>
<p>With this last step, we are ready to execute any task on dynamically provisioned nodes within Spot Fleet instances.</p>
<p>&nbsp;</p>
<p>From Geko Consulting Cloud, we hope you liked this post and above all that you find it useful, nothing would make us happier.<br />
We invite you to contact us if you need information about the <a href="https://geko.cloud/en/" target="_blank" rel="noopener"><strong>Cloud and DevOps</strong></a> world and keep checking <a href="https://geko.cloud/en/blog/labs/" target="_blank" rel="noopener"><strong>our blog</strong> </a>to find other useful publications.</p>
<p>La entrada <a href="https://geko.cloud/en/dynamic-nodes-in-jenkins-via-aws-spot-fleet/">Dynamic nodes in Jenkins via AWS Spot Fleet</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/dynamic-nodes-in-jenkins-via-aws-spot-fleet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to recover an accidentally-deleted AWS elastic IP</title>
		<link>https://geko.cloud/en/recover-accidentally-deleted-aws-elastic-ip/</link>
					<comments>https://geko.cloud/en/recover-accidentally-deleted-aws-elastic-ip/#respond</comments>
		
		<dc:creator><![CDATA[Geko Cloud]]></dc:creator>
		<pubDate>Mon, 07 Feb 2022 17:31:52 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[DevOps specialist]]></category>
		<category><![CDATA[DevOps Support]]></category>
		<guid isPermaLink="false">https://geko.cloud/?p=7201</guid>

					<description><![CDATA[<p>Introduction Recover accidentally deleted AWS elastic IP. It may not be the most common thing for the average AWS user but for those who work in the cloud industry it&#8217;s an everyday task to manage several AWS accounts. Either through a catalog of login links or through a list of account IDs (and their matching [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/recover-accidentally-deleted-aws-elastic-ip/">How to recover an accidentally-deleted AWS elastic IP</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;">Recover accidentally deleted AWS elastic IP. It may not be the most common thing for the average AWS user but for those who work in the cloud industry it&#8217;s an everyday task to manage several AWS accounts. Either through a catalog of login links or through a list of account IDs (and their matching credentials), or through a role impersonation manager <span class="ILfuVd"><span class="hgKElc">—</span></span> the fact is that sooner or later it could happen that one account is mistakenly confused with another and an unwanted action is carried out.</p>
<p style="text-align: justify;">That&#8217;s the case it&#8217;s being exposed today, in which some tasks were being done on a new account and the created infra there was disposable. It happened that by mistake this new account was mistook with the base account <span class="ILfuVd"><span class="hgKElc">—</span></span> the Geko&#8217;s one <span class="ILfuVd"><span class="hgKElc">— where the elastic IP for the company&#8217;s bastion is hosted. Yes, indeed, that key point used to access other infrastructures in a secure way, and which these other infrastructures consider as a safe origin. In other words, that particular IP was used as one of the security measures when verifying the origin of the connections. An IP which was placed in many configurations, and which was not trivial to replace. Well, that IP was released by mistake. In AWS the word &#8220;release&#8221; is used to refer to the action of removing the IP from the account, leaving it available to the rest of the provider&#8217;s users.</span></span></p>
<p style="text-align: justify;"><span class="ILfuVd"><span class="hgKElc">It&#8217;s not necessary to describe the moments of maximum alert that followed the IP&#8217;s release but the possibility of having lost that address forever because it had been assigned to another user, began to take over the tension of the moment. </span></span>However, there&#8217;s a reason to have crisis cabinets, and above all there&#8217;s a big importance to be able to count on a team composed by professionals in the area. Brainstorming was fogging up the windows when suddenly a lightning of hope made everything to stop.  There was still a chance. AWS had foreseen this catastrophic event and Geko found the way to recover what had always been its own but which it had never valued that much.</p>
<p style="text-align: justify;">Has it happened to you? Would you like to know how it was solved? Keep reading and don&#8217;t miss out how this epic story ended!</p>
<h2>Recover the AWS elastic IP which was accidentally deleted</h2>
<p style="text-align: justify;">Recover accidentally deleted AWS elastic IP. As it was previously stated, once an elastic IP is released it then belongs to the pool of available IPs for the users, so recover it could be impossible in the case it was reassigned. Nonetheless, AWS realized this situation could cause troubles so <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-eip-recovering">they developed a procedure to recover from this scenario</a>. Despite this is not something you can do through the web console, recover the lost IP can be achieved by running <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/allocate-address.html">just one command</a>.</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">MY_IP=48.151.62.342
aws ec2 allocate-address --domain vpc --address $MY_IP</pre>
</div>
<p style="text-align: justify;">Yes, you need to know the IP address you want to recover but <span class="ILfuVd"><span class="hgKElc">—</span></span> if it&#8217;s critical enough to make you want to get it again <span class="ILfuVd"><span class="hgKElc">—</span></span> it should be something you should be able to retrieve.</p>
<p><img loading="lazy" decoding="async" class="n3VNCb aligncenter" src="https://c.tenor.com/A-ozELwp694AAAAC/thumbs-thumbs-up-kid.gif" alt="Thumbs Up Kid" width="498" height="373" data-noaft="1" data-pagespeed-url-hash="958420522" /></p>
<h2>What else could go wrong?</h2>
<p style="text-align: justify;">It happens that in this case there was an additional factor that could add more complexity to the situation, and in fact it did. At Geko <span class="ILfuVd"><span class="hgKElc">— in order to have credentials for the AWS CLI </span></span><span class="ILfuVd"><span class="hgKElc">— temporary keys are generated after going through a multi-factor verification process (which can also be revoked at any time), and these credentials are retrieved from the aforementioned</span></span> bastion. Connecting the dots it can be concluded that the situation had fallen into cyclic dependency since to fix the problem a credentials set needed to be generated while the problem itself was preventing us to do so. Of course there were alternative methods to get out of the loop, but in the end it was enough to use some not-yet-expired credentials we were able to obtain.</p>
<h2>Conclusion</h2>
<p style="text-align: justify;">Throughout this short <span class="ILfuVd"><span class="hgKElc">— but intense </span></span><span class="ILfuVd"><span class="hgKElc">— story, the importance of having a team around you has been shown</span></span>. Keeping aside pride and rising the alarm was what made the solution to appear in a matter of a few minutes. As it&#8217;s commonly said <span class="ILfuVd"><span class="hgKElc">—</span></span> <em>Two pair of eyes can see more than one</em>.</p>
<p style="text-align: justify;">On the other hand, we learned and reinforced a set of good practices which could be the key next time. They are the following ones.</p>
<ol>
<li style="text-align: justify;">Ensure you have some emergency credentials in case something happens in the bastion.</li>
<li style="text-align: justify;">Ensure the account you&#8217;re trying to modify is the one you actually want to modify. It&#8217;s better to spend a little bit more time checking twice than to be sorry later.</li>
<li style="text-align: justify;">Protect valuable resources at all cost, such as creating IAM policies to deny any harmful actions.</li>
</ol>
<p>&nbsp;</p>
<p style="text-align: justify;">We hope this article has helped you to learn something new and continue to expand your knowledge. If you need information about <strong><a href="https://geko.cloud/en/" target="_blank" rel="noopener">Cloud and the DevOps</a> </strong>world, we invite you to <a href="https://geko.cloud/en/contact/" target="_blank" rel="noopener"><strong>contact us</strong></a> and keep checking out <a href="https://geko.cloud/en/blog/labs/" target="_blank" rel="noopener"><strong>our blog</strong></a> in order to find other useful publications. See you soon!</p>
<p>La entrada <a href="https://geko.cloud/en/recover-accidentally-deleted-aws-elastic-ip/">How to recover an accidentally-deleted AWS elastic IP</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/recover-accidentally-deleted-aws-elastic-ip/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AWS Logs to OpenSearch via Kinesis</title>
		<link>https://geko.cloud/en/aws-logs-to-opensearch-via-kinesis/</link>
					<comments>https://geko.cloud/en/aws-logs-to-opensearch-via-kinesis/#respond</comments>
		
		<dc:creator><![CDATA[Iván González]]></dc:creator>
		<pubDate>Thu, 16 Dec 2021 10:09:30 +0000</pubDate>
				<category><![CDATA[Featured LABS]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Kinesis]]></category>
		<guid isPermaLink="false">https://geko.cloud/?p=6737</guid>

					<description><![CDATA[<p>Introduction By default, the AWS Simple Email Service (SES) service does not offer us to be able to view logs of your actions / events, we can only see some metrics in Cloudwatch. In Geko we have encountered more than once the need to see SES logs, either to diagnose incidents or to better understand [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/aws-logs-to-opensearch-via-kinesis/">AWS Logs to OpenSearch via Kinesis</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>By default, the AWS Simple Email Service (SES) service does not offer us to be able to view logs of your actions / events, we can only see some metrics in Cloudwatch. In Geko we have encountered more than once the need to see SES logs, either to diagnose incidents or to better understand the status of the service. Well, to make this possible, we use AWS Kinesis. We are going to explain how we make it. Let&#8217;s begin!</p>
<h2>Kinesis configuration</h2>
<p>Kinesis is a data collector, processor and transmitter. The first step is to create a Delivery Stream. We access the <a href="https://aws.amazon.com/kinesis/">Kinesis</a> service, Delivery Streams and create a Delivery Stream</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6731 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/1.png" alt="" width="1920" height="438" srcset="https://geko.cloud/wp-content/uploads/2021/12/1.png 1920w, https://geko.cloud/wp-content/uploads/2021/12/1-300x68.png 300w, https://geko.cloud/wp-content/uploads/2021/12/1-1024x234.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/1-768x175.png 768w, https://geko.cloud/wp-content/uploads/2021/12/1-1536x350.png 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></p>
<p>In &#8220;Source&#8221; we choose &#8220;Direct PUT&#8221; and in Destination &#8220;Amazon OpenSearch Service&#8221;. There are other destination options such as Redshift, S3, Dynatrace .. All available options appear in the drop-down list.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6742 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/2.png" alt="" width="914" height="522" srcset="https://geko.cloud/wp-content/uploads/2021/12/2.png 914w, https://geko.cloud/wp-content/uploads/2021/12/2-300x171.png 300w, https://geko.cloud/wp-content/uploads/2021/12/2-768x439.png 768w" sizes="(max-width: 914px) 100vw, 914px" /></p>
<p>We add a name to the object &#8220;Delivery Stream&#8221; and add our OpenSearch. In our case, as we already have an OpenSearch created and operational by simply accessing &#8220;Browse&#8221;, it has appeared to select it.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6772 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/4.png" alt="" width="896" height="779" srcset="https://geko.cloud/wp-content/uploads/2021/12/4.png 896w, https://geko.cloud/wp-content/uploads/2021/12/4-300x261.png 300w, https://geko.cloud/wp-content/uploads/2021/12/4-768x668.png 768w" sizes="(max-width: 896px) 100vw, 896px" /></p>
<p>We add the index name that we want it to create.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6746 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/6.png" alt="" width="897" height="768" srcset="https://geko.cloud/wp-content/uploads/2021/12/6.png 897w, https://geko.cloud/wp-content/uploads/2021/12/6-300x257.png 300w, https://geko.cloud/wp-content/uploads/2021/12/6-768x658.png 768w" sizes="(max-width: 897px) 100vw, 897px" /></p>
<p>And by default it selects VPC, Subnet and Security Group based on our OpenSearch.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6744 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/7.png" alt="" width="899" height="685" srcset="https://geko.cloud/wp-content/uploads/2021/12/7.png 899w, https://geko.cloud/wp-content/uploads/2021/12/7-300x229.png 300w, https://geko.cloud/wp-content/uploads/2021/12/7-768x585.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></p>
<p>Finally we create the object &#8220;Delivery Stream&#8221;</p>
<h2>SES Configuration</h2>
<p>Now we access the SES service, we access &#8220;Configuration Sets&#8221; and &#8220;Create Set&#8221;</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6740 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/9.png" alt="" width="1917" height="523" srcset="https://geko.cloud/wp-content/uploads/2021/12/9.png 1917w, https://geko.cloud/wp-content/uploads/2021/12/9-300x82.png 300w, https://geko.cloud/wp-content/uploads/2021/12/9-1024x279.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/9-768x210.png 768w, https://geko.cloud/wp-content/uploads/2021/12/9-1536x419.png 1536w" sizes="(max-width: 1917px) 100vw, 1917px" />We add the Configuration Set name and create it.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6766 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/10.png" alt="" width="903" height="487" srcset="https://geko.cloud/wp-content/uploads/2021/12/10.png 903w, https://geko.cloud/wp-content/uploads/2021/12/10-300x162.png 300w, https://geko.cloud/wp-content/uploads/2021/12/10-768x414.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></p>
<p>Once the &#8220;Configuration Set&#8221; is created we go to &#8220;Event Destionation&#8221; and &#8220;Add Destination&#8221; to create one.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6764 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/11.png" alt="" width="1921" height="522" srcset="https://geko.cloud/wp-content/uploads/2021/12/11.png 1921w, https://geko.cloud/wp-content/uploads/2021/12/11-300x82.png 300w, https://geko.cloud/wp-content/uploads/2021/12/11-1024x278.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/11-768x209.png 768w, https://geko.cloud/wp-content/uploads/2021/12/11-1536x417.png 1536w" sizes="(max-width: 1921px) 100vw, 1921px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6762 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/12.png" alt="" width="1537" height="512" srcset="https://geko.cloud/wp-content/uploads/2021/12/12.png 1537w, https://geko.cloud/wp-content/uploads/2021/12/12-300x100.png 300w, https://geko.cloud/wp-content/uploads/2021/12/12-1024x341.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/12-768x256.png 768w" sizes="(max-width: 1537px) 100vw, 1537px" /></p>
<p>We select the type of event that we want and go to the next step</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6760 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/13.png" alt="" width="825" height="783" srcset="https://geko.cloud/wp-content/uploads/2021/12/13.png 825w, https://geko.cloud/wp-content/uploads/2021/12/13-300x285.png 300w, https://geko.cloud/wp-content/uploads/2021/12/13-768x729.png 768w" sizes="(max-width: 825px) 100vw, 825px" /></p>
<p>We select &#8220;Amazon Kinesis Data Firehose&#8221;, we put a name and we select the &#8220;Delivery Stream&#8221; that we have created previously.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6758 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/14.png" alt="" width="818" height="744" srcset="https://geko.cloud/wp-content/uploads/2021/12/14.png 818w, https://geko.cloud/wp-content/uploads/2021/12/14-300x273.png 300w, https://geko.cloud/wp-content/uploads/2021/12/14-768x699.png 768w" sizes="(max-width: 818px) 100vw, 818px" /></p>
<p>&nbsp;</p>
<p>Watch out! Now you have to create an &#8220;IAM Role&#8221; so that SES can write to Firehose, we have created it like this:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6756 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/15.png" alt="" width="1596" height="539" srcset="https://geko.cloud/wp-content/uploads/2021/12/15.png 1596w, https://geko.cloud/wp-content/uploads/2021/12/15-300x101.png 300w, https://geko.cloud/wp-content/uploads/2021/12/15-1024x346.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/15-768x259.png 768w, https://geko.cloud/wp-content/uploads/2021/12/15-1536x519.png 1536w" sizes="(max-width: 1596px) 100vw, 1596px" /></p>
<p>Con esta Policy</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6754 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/16.png" alt="" width="1305" height="498" srcset="https://geko.cloud/wp-content/uploads/2021/12/16.png 1305w, https://geko.cloud/wp-content/uploads/2021/12/16-300x114.png 300w, https://geko.cloud/wp-content/uploads/2021/12/16-1024x391.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/16-768x293.png 768w" sizes="(max-width: 1305px) 100vw, 1305px" /></p>
<p>And this Trust Relationship</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6752 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/17.png" alt="" width="609" height="327" srcset="https://geko.cloud/wp-content/uploads/2021/12/17.png 609w, https://geko.cloud/wp-content/uploads/2021/12/17-300x161.png 300w" sizes="(max-width: 609px) 100vw, 609px" /></p>
<p>Finally we create the &#8220;Configuration Set&#8221;</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6750 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/18.png" alt="" width="822" height="780" srcset="https://geko.cloud/wp-content/uploads/2021/12/18.png 822w, https://geko.cloud/wp-content/uploads/2021/12/18-300x285.png 300w, https://geko.cloud/wp-content/uploads/2021/12/18-768x729.png 768w" sizes="(max-width: 822px) 100vw, 822px" /></p>
<p>&nbsp;</p>
<p>Now, to test it, you can send a test email from SES assigning to our test the &#8220;Configuration Set&#8221; that we have created. This &#8220;Configuration Set&#8221; can be applied to any Identity that we have in SES. In fact we are going to do a test by sending a test email. We see the test log that we have generated in our OpenSearch:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6786 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/20.png" alt="" width="1580" height="303" srcset="https://geko.cloud/wp-content/uploads/2021/12/20.png 1580w, https://geko.cloud/wp-content/uploads/2021/12/20-300x58.png 300w, https://geko.cloud/wp-content/uploads/2021/12/20-1024x196.png 1024w, https://geko.cloud/wp-content/uploads/2021/12/20-768x147.png 768w, https://geko.cloud/wp-content/uploads/2021/12/20-1536x295.png 1536w" sizes="(max-width: 1580px) 100vw, 1580px" /></p>
<p>And in the Kinesis Delivery monitoring:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-6748 size-full" src="https://geko.cloud/wp-content/uploads/2021/12/19.png" alt="" width="483" height="364" srcset="https://geko.cloud/wp-content/uploads/2021/12/19.png 483w, https://geko.cloud/wp-content/uploads/2021/12/19-300x226.png 300w" sizes="(max-width: 483px) 100vw, 483px" /></p>
<p>&nbsp;</p>
<p>From Geko we hope that if you have come this far, this entry is just what you were looking for! We also invite you to read other of our <a href="https://geko.cloud/es/blog/labs/">labs posts</a></p>
<p>La entrada <a href="https://geko.cloud/en/aws-logs-to-opensearch-via-kinesis/">AWS Logs to OpenSearch via Kinesis</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/aws-logs-to-opensearch-via-kinesis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>¿What is AWS?</title>
		<link>https://geko.cloud/en/what-is-aws/</link>
					<comments>https://geko.cloud/en/what-is-aws/#respond</comments>
		
		<dc:creator><![CDATA[Xènia Adan]]></dc:creator>
		<pubDate>Thu, 26 Aug 2021 10:23:19 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud provider]]></category>
		<guid isPermaLink="false">https://geko.cloud/?p=3724</guid>

					<description><![CDATA[<p>The 21st century has been defined as the age of technology, with businesses of all sizes, regions and industries moving to cloud services. Cloud adoption has increased in recent years with the aim of improving efficiency, flexibility and reducing management costs. Today, millions of organisations are leveraging AWS cloud services to build sophisticated applications that [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/what-is-aws/">¿What is AWS?</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-size: 18px;">The 21st century has been defined as the age of technology, with businesses of all sizes, regions and industries moving to cloud services. Cloud adoption has increased in recent years with the aim of improving efficiency, flexibility and reducing management costs.</span></p>
<p>T<span style="font-size: 18px;">oday, millions of organisations are leveraging AWS cloud services to build sophisticated applications that help them increase reliability, flexibility and scalability. This post on &#8220;What is AWS?&#8221; is designed to help you gain an in-depth understanding of this popular cloud platform, its benefits, services and more.</span></p>
<h3><span style="font-size: 25px;"><strong>What is AWS and what is it for?</strong></span></h3>
<p><span style="font-size: 18px;"><strong>Amazon Web Services</strong> (<strong>AWS</strong>) is a cloud services platform that offers a mix of software-as-a-service (SaaS), platform-as-a-service (PaaS) and infrastructure-as-a-service (IaaS) packages from dozens of data centres and multiple availability zones (AZs) in regions around the world. Each AZ contains multiple data centres. Customers can configure virtual machines and replicate their data across multiple AZs to provide a system that is highly resilient to server or data centre failure.</span></p>
<p><span style="font-size: 18px;"><strong>AWS</strong> aims to enable organisations to grow and profit through its wide range of services. With this platform, they can store, access, and manage their business data while protecting it from unauthorized access.</span></p>
<p><iframe loading="lazy" title="What is AWS? | Amazon Web Services" width="800" height="450" src="https://www.youtube.com/embed/a9__D53WsUs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<h3><span style="font-size: 25px;"><strong>What services/products does AWS offer?</strong></span></h3>
<p><span style="font-size: 18px;">Within all the services offered by <strong>AWS</strong>, we find various cloud computing products, databases, blockchain, application integration, internet of things, migration and transfer, networking and content delivery, and many more. Some of the most widely used <strong>Amazon Web Services</strong> technologies are:</span></p>
<p><b>1. Amazon EC2</b><br />
<span style="font-size: 18px;"><strong>Amazon EC2</strong>&#8216;s web interface is used to reduce costly physical servers by creating virtual machines and managing other server features, such as storage, security, ports, etc. With <strong>Amazon EC</strong>2 you can create servers in minutes with your preferred operating system.</span></p>
<p><b>2. Amazon RDS</b><br />
<span style="font-size: 18px;"><strong>Amazon</strong> helps us in every way it can to make our infrastructure less complicated, which is why it provides us with the <strong>RDS</strong> service. By using this <strong>AWS</strong> service, dedicated database instances can be created in a matter of minutes, fully managed by the <strong>AWS</strong> support team and capable of supporting multiple database engines such as MySQL, PostgreSQL, SQL Server, MariaDB, and many more.</span></p>
<p><b>3. Amazon Simple Storage Service (S3)</b><br />
<span style="font-size: 18px;"><strong>Amazon S3</strong> is <strong>AWS</strong>&#8216;s core service for file storage and retrieval via an API (Application Programming Interface).<strong> Amazon S3</strong> offers a file storage service as well as high-quality integrations such as PCI-DSS, HIPAA/HITECH and FedRAMP so that data is not compromised. In addition, the <strong>S3</strong> service offers you different types of storage to optimise the cost.</span></p>
<p><b>4. Amazon CloudFront</b><br />
<span style="font-size: 18px;"><strong>Amazon CloudFront</strong> helps you improve website speed and access to data in the cloud. It also manages all user content efficiently through a global content delivery service.</span></p>
<p><b>5. Amazon VPC</b><br />
<span style="font-size: 18px;">If you are ready to isolate your entire IT infrastructure from exposure, then the only way to do it is with <strong>Amazon VPC</strong>. This service creates a virtual private network that cannot be accessed by anyone or anything except the people and systems you authorise. These networks are logically isolated from other virtual networks in the <strong>AWS</strong> clouds.</span></p>
<p><b>6. Amazon SNS</b><br />
<span style="font-size: 18px;"><strong>SNS</strong> is a <strong>Simple Notification Service</strong> that alerts subscriber services to automatically perform tasks in response to specified triggers. <strong>Amazon SN</strong>S is a notification system that offers integration with any type of application, be it PHP, Python, Node, etc; and notifications can be sent to all types of users whether on the web or mobile.</span></p>
<p><b>7. AWS Lambda</b><br />
<span style="font-size: 18px;">Is your server getting saturated with requests?<strong> AWS Lambda</strong> is designed to scale to handle any traffic load. It is possibly one of the most innovative services on <strong>AWS</strong>, as it allows you to run your code in a serverless way, i.e. without the need to manage servers. In addition, it is compatible with the main programming languages such as Node.js, Python, Java, and more.</span></p>
<p><b>8. AWS Autoscaling</b><br />
<span style="font-size: 18px;">If you are looking to grow or expand your application to millions of users then <strong>AWS Autoscaling</strong> is the solution. This tool allows you to manage a fleet of servers when your application demands it, creating multiple instances when needed. The service is free, only charged for the number of instances used.</span></p>
<p><b>9. AWS Beanstalk</b><br />
<span style="font-size: 18px;"><strong>AWS Beanstalk</strong> was created to help developers manage website infrastructure and save time. This tool automates the installation, configuration and provisioning of other <strong>AWS</strong> services such as <strong>EC2</strong>, <strong>RDS</strong> and <strong>S3</strong>.</span></p>
<p><span style="font-size: 18px;">As you can see,<strong> AWS</strong> has a large number of services related to cloud infrastructure, related to data and the use of this data for any business, of any size and sector. If you want to know more about all the products offered by <strong>AWS</strong>, click on the following link to get all the information: <a href="https://aws.amazon.com/products/?nc1=h_ls" target="_blank" rel="noopener">Cloud Products (amazon.com)</a></span></p>
<h3><span style="font-size: 25px;"><strong>Advantages of using AWS</strong></span></h3>
<p><span style="font-size: 18px;">Many companies, small or large, rely on <strong>AWS</strong> for the wide range of services it offers. Here are some of the most notable advantages that differentiate it from other companies. These are:</span></p>
<p><b>SECURITY</b><br />
<span style="font-size: 18px;">Security is one of the most important issues when working in cloud environments. <strong>AWS</strong> has dozens of data centres around the world that are continuously monitored 24/7 and strictly maintained. In addition, AWS has certifications and accreditations, encryption of data at rest and in transit, hardware security modules and strong physical security.</span></p>
<p><b>PAY PER USE</b><br />
<span style="font-size: 18px;">One of the most important advantages is the <strong>AWS</strong> pay-as-you-go billing model. There is no upfront cost to build a storage system and no need to estimate usage. For organisations that have daily or seasonal peaks, this is a real advantage.</span></p>
<p><b>WIDE RANGE OF SERVICES</b><br />
<span style="font-size: 18px;">Over time, <strong>AWS</strong> has expanded its range of products and services to more than 175 products ranging from basic storage and computing to more specialised services such as robotics. In short, <strong>AWS</strong> offers such a wide variety of services that there is bound to be a product or service that fits your business needs perfectly.</span></p>
<p><b>COST-EFFECTIVE</b><br />
<span style="font-size: 18px;">Whether you are a start-up or a large enterprise organisation, you can benefit from the economic advantages that <strong>AWS</strong> offers, such as not having to pay upfront to use its services or resources.</span></p>
<p><b>GLOBAL LEADER</b><br />
<span style="font-size: 18px;"><strong>Amazon Web Services</strong> has networks in nearly 190 countries around the world and supports more than one million active customers. Its customers include large enterprises and public sector organisations. As businesses continue to migrate to the cloud, the choices of cloud-based services continue to multiply. However, only a handful of options manage to meet the different business needs that exist, such as <strong>Amazon Web Services</strong> (<strong>AWS</strong>).</span></p>
<h3><strong>How does AWS work?</strong></h3>
<p><span style="font-size: How does AWS work?18px;">First of all, you need to register with <strong>AWS</strong>. When you go to create your account, you will be asked for your credit card details. Once your account is created, you can start exploring the AWS management console and view its services. You can also watch 10-minute tutorials on <strong>Amazon</strong> to learn how each of their products works.</span></p>
<h3><span style="font-size: 25px;"><strong>AWS and Geko Cloud</strong></span></h3>
<p><span style="font-size: 18px;">At Geko Cloud we are cloud experts and we work with <a href="https://geko.cloud/en/devops/" target="_blank" rel="noopener">DevOps methodology</a>, accompanying our customers throughout the process from <a href="https://geko.cloud/en/cloud-services/migration/">cloud migration</a> to <a href="https://geko.cloud/en/cloud-services/cloud-management/" target="_blank" rel="noopener">cloud management</a>. <a href="https://geko.cloud/en/contact/" target="_blank" rel="noopener">Contact us with no commitment</a>! <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f60a.png" alt="😊" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></p>
<p>La entrada <a href="https://geko.cloud/en/what-is-aws/">¿What is AWS?</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/what-is-aws/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Error using AWS EFS for MySQL</title>
		<link>https://geko.cloud/en/error-using-aws-efs-for-mysql/</link>
					<comments>https://geko.cloud/en/error-using-aws-efs-for-mysql/#respond</comments>
		
		<dc:creator><![CDATA[Geko Cloud]]></dc:creator>
		<pubDate>Wed, 26 May 2021 14:02:34 +0000</pubDate>
				<category><![CDATA[Featured LABS]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/error-using-aws-efs-for-mysql/</guid>

					<description><![CDATA[<p>Introduction In this post we are going to see how to solve the following error that we face while working with MySQL databases using AWS EFS service for storage: ERROR 1030 (HY000) at line 1744: Got error 168 from storage engine Starting situation Our use case consisted of a Kubernetes EKS cluster, where we needed [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/error-using-aws-efs-for-mysql/">Error using AWS EFS for MySQL</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="display: none;"></div>
<div style="display: none;"></div>
<div style="display: none;"></div>
<div style="display: none;"></div>
<div style="display: none;"></div>
<div style="display: none;"></div>
<h3>Introduction</h3>
<p class="p1">In this post we are going to see how to solve the following error that we face while working with <em><strong>MySQL</strong></em> databases using <strong><em>AWS EFS</em></strong> service for storage:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">ERROR 1030 (HY000) at line 1744: Got error 168 from storage engine</pre>
</div>
<h3>Starting situation</h3>
<p>Our use case consisted of a <em>Kubernetes EKS </em>cluster, where we needed to create and destroy new environments for development as quickly as possible. Each of these environments had to contain several <strong><em>MySQL</em> databases</strong>, in addition to other tools such as <em>Redis</em>, <em>RabbitMQ</em>, etc.</p>
<p>To do this we decided to use <em>Helm Charts</em> that raised these tools as <em>StatefulSets</em>. At first, we did not specify any <em>StorageClass</em>, so the <em>EKS</em> default was used, which raises <em>EBS gp2</em> (General Purpose <em>SSD</em>) volumes when creating <em>PersistentVolumeClaims</em>.</p>
<p>The problem with using <strong><em>EBS</em> volumes</strong> is that each volume is available in a specific Availability Zone, so if the <em>Kubernetes</em> cluster needs to move a <em>pod</em> from, for example <em>MySQL</em>, it will not be able to lift it unless it is available in another worker node that is in the same Availability Zone as that <em>EBS</em> volume.</p>
<p>For this reason, we decided to use a new <strong><em>StorageClass</em> that uses <em>EFS</em></strong> instead of <em>EBS</em>. In this way, by having the <em>EFS</em> mounted on each worker node in the <a href="https://geko2.factoryfy.com/en/what-is-kubernetes/"><em>Kubernetes</em></a> cluster, the <em>pods</em> could move seamlessly between nodes, even if they were in different Availability Zones.</p>
<h3>Error with <em>EFS</em></h3>
<p>Since our use case required creating new environments as quickly as possible, when building a new <em>MySQL</em> database, we also executed an import of data from <em>sql</em> files to have an initial data set by default.</p>
<p>It was at this moment that we began to detect the error, since when importing this initial data, we continuously began to see the following error in the logs:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">ERROR 1030 (HY000) at line 1744: Got error 168 from storage engine
ERROR 1030 (HY000) at line 1744: Got error 168 from storage engine
ERROR 1030 (HY000) at line 1744: Got error 168 from storage engine
...</pre>
</div>
<p class="p1">This error began to appear after a certain number of <em>sql</em> instructions executed, and from that moment on, it was repeated until the <em>sql</em> file was finished reading.</p>
<h3>Resolution</h3>
<p>Upon investigation, we discovered that the problem resided with an <em>EFS</em> service boundary. Specifically, it was the limit of 256 unique locked files. We can see this limit in the quotas described in the <em>AWS</em> documentation:</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-4667 aligncenter" src="https://geko2.factoryfy.com/wp-content/uploads/captura-de-pantalla-2021-05-25-a-las-13.47.29.png" alt="" width="1144" height="54" /></p>
<p><a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-client-specific">https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-client-specific</a></p>
<p>Because our data import was trying to create more than 256 tables, this limit was reached and the error began to appear. This limit cannot be modified, but we were able to avoid it by modifying the <em>MySQL</em> parameters to, as far as possible, not reach those 256 locked files.</p>
<p>The <em>MySQL</em> parameter to modify is <strong><em>innodb_file_per_table</em></strong>. In our <em>MySQL</em> databases, this parameter was <strong>activated by default</strong>. This causes an <em>.idb</em> data file to be created for each table in the database instead of creating a single data file. We can modify this parameter in the <em>MySQL</em> configuration file as follows:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">[mysqld]
innodb_file_per_table=OFF</pre>
</div>
<p><a href="https://dev.mysql.com/doc/refman/5.7/en/innodb-file-per-table-tablespaces.html">https://dev.mysql.com/doc/refman/5.7/en/innodb-file-per-table-tablespaces.html</a></p>
<p>After disabling this parameter, we did not encounter the error again.</p>
<p>We want to thank the <em>blog</em> <em>ops.tips</em> for their work doing the post that we linked to, since it helped us a lot to understand this error, so that we could find this solution.</p>
<p><a href="https://ops.tips/blog/limits-aws-efs-nfs-locks/">https://ops.tips/blog/limits-aws-efs-nfs-locks/</a></p>
<h3>Conclusions</h3>
<p>When working with <strong><em>MySQL</em> databases using <em>EFS</em></strong> for storage, we can have errors when reaching the limit of 256 locked files whenever we have schemes with a large number of tables or, ultimately, any system that requires simultaneously locking large amounts of files, such as it would be the case of <em>MongoDB</em>, <em>Oracle</em>, etc.</p>
<p>To avoid reaching this limit, we can disable the <em>MySQL</em> parameter <strong><em>innodb_file_per_table</em></strong> so that a data file is not created for each table.</p>
<hr />
<p>I hope you&#8217;ve enjoyed this post and I encourage you to <a href="https://geko.cloud/en/blog/labs/">check our blog for other posts</a> that you might find helpful. <a href="https://geko.cloud/en/contact/">Do not hesitate to contact us</a> if you would like us to help you on your projects.</p>
<p>See you on the next post!</p>
<p>La entrada <a href="https://geko.cloud/en/error-using-aws-efs-for-mysql/">Error using AWS EFS for MySQL</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/error-using-aws-efs-for-mysql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AWS vs Azure, which one should I choose?</title>
		<link>https://geko.cloud/en/aws-vs-azure-which-one-should-i-choose/</link>
					<comments>https://geko.cloud/en/aws-vs-azure-which-one-should-i-choose/#respond</comments>
		
		<dc:creator><![CDATA[Xènia Adan]]></dc:creator>
		<pubDate>Mon, 01 Mar 2021 15:54:47 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/aws-vs-azure-which-one-should-i-choose/</guid>

					<description><![CDATA[<p>Introduction Migrating to the cloud is becoming increasingly common and convenient for most companies that work on the Internet, given that it offers advantages such as scalability, agility, cost reduction, availability, etc. But when it comes to deciding on a cloud provider, how do we decide which one is the most convenient? We are going [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/aws-vs-azure-which-one-should-i-choose/">AWS vs Azure, which one should I choose?</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3>Introduction</h3>
<p style="text-align: justify;"><a href="https://geko.cloud/en/cloud-services/migration/"><strong>Migrating to the cloud</strong></a> is becoming increasingly common and convenient for most companies that work on the Internet, given that it offers advantages such as scalability, agility, cost reduction, availability, etc. But when it comes to deciding on a cloud provider, how do we decide which one is the most convenient?</p>
<p style="text-align: left;">We are going to talk about the most popular providers, which offer a service with certain similarities but work under different schemes, are <strong>AWS (Amazon Web Services)</strong> <strong>and Microsoft Azure</strong>, being these the most chosen by companies that want to make the leap to the <a href="https://geko.cloud/en/what-is-the-cloud/">cloud</a>. But when it comes to choosing, we must take into account the advantages and service offerings of each one applied to our business strategy.</p>
<h3>A brief comparison between AWS and Azure</h3>
<p style="text-align: justify;">We will only compare two aspects that may be fundamental for this choice, the investment and the resources that each of these two providers have.</p>
<ul>
<li style="text-align: left;">The <strong>investment</strong> is one of the main unknowns in the equation when we are going to <a href="https://geko.cloud/en/cloud-services/migration/">migrate to the cloud</a>, as with any change we decide to make in the company. The increase in the number of <strong>cloud providers</strong>, which means increased competition, has led to a reduction in prices and the adoption of pay-per-use (PAYG), in order to offer the best option to the client. Something that was previously offered on a monthly payment basis. What has changed is the payment model:</li>
</ul>
<p><a href="https://geko2.factoryfy.com/wp-content/uploads/tabla-costes-aws-azure-english_mesa-de-trabajo-1.svg"><img loading="lazy" decoding="async" class="wp-image-3858 aligncenter" src="https://geko2.factoryfy.com/wp-content/uploads/tabla-costes-aws-azure-english_mesa-de-trabajo-1.svg" alt="" width="494" height="130" /></a></p>
<ul>
<li>We can also tell the difference between the <strong>resources</strong> offered by the two providers:</li>
</ul>
<p><img loading="lazy" decoding="async" class="wp-image-3855 aligncenter" src="https://geko2.factoryfy.com/wp-content/uploads/tabla-comparativa-aws-azure_mesa-de-trabajo-1-2.svg" alt="" width="506" height="407" /></p>
<h3>Other features to compare between AWS and Azure</h3>
<ul>
<li style="text-align: justify;"><strong>Amazon Web Services</strong> provides tools to set aside hardware, licenses and added costs, focusing on a serverless model.</li>
<li style="text-align: left;">On the other hand, <strong>Azure</strong> focuses on hybrid clouds, taking advantage of the fact that on-premise models work better because they are licensed by Microsoft.</li>
<li style="text-align: left;"><strong>AWS</strong> offers automated <strong>machine learning</strong> solution products.</li>
<li style="text-align: left;">Azure also has machine learning products but they need more development and may cause limitations for adaptability.</li>
<li style="text-align: left;">Scalability and flexibility without minimum consumption is one of the <strong>advantages of AWS</strong>.</li>
<li style="text-align: left;">In the case of <strong>Azure</strong>, it has a default storage package.</li>
</ul>
<h3>Conclusion</h3>
<p style="text-align: justify;">Taking into account the features mentioned above and others that we can find to make a <strong>comparison between AWS and Azure</strong>, we can establish the following reasons for choosing one provider or the other:</p>
<ul style="text-align: left;">
<li><strong>Why choose AWS?</strong></li>
</ul>
<p style="text-align: left;">If your company needs to significantly increase its scalability, has flexibility in payment models and needs consulting to migrate to the cloud yes or yes.</p>
<ul style="text-align: left;">
<li><strong>Why choose Azure?</strong></li>
</ul>
<p style="text-align: left;">If your company already uses or has a relationship with Microsoft and also needs a robust and very secure infrastructure.</p>
<h4 style="text-align: left;">At Geko we help you migrate to the <a href="https://geko.cloud/en/what-is-the-cloud/">cloud</a>.</h4>
<p style="text-align: left;">If you are looking for a service provider to migrate or manage your platform in the cloud, do not hesitate to consult with us, at <a href="https://geko.cloud/en/"><strong>Geko</strong> </a>we choose the provider that best suits your needs or technologies, and we adapt the <strong>DevOps consultancy</strong> to your work methodologies.</p>
<p style="text-align: center;"><a href="https://geko.cloud/en/contact/"><strong>Contact us without commitment!</strong></a></p>
<p><a href="https://geko.cloud/en/contact/"><img loading="lazy" decoding="async" class="aligncenter wp-image-3265" src="https://geko2.factoryfy.com/wp-content/uploads/geko-1-300x297.png" alt="" width="66" height="66" /></a></p>
<p>La entrada <a href="https://geko.cloud/en/aws-vs-azure-which-one-should-i-choose/">AWS vs Azure, which one should I choose?</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/aws-vs-azure-which-one-should-i-choose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A quick view of modules in Terraform</title>
		<link>https://geko.cloud/en/a-quick-view-of-modules-in-terraform/</link>
					<comments>https://geko.cloud/en/a-quick-view-of-modules-in-terraform/#respond</comments>
		
		<dc:creator><![CDATA[Jose Luis Sánchez]]></dc:creator>
		<pubDate>Mon, 18 Jan 2021 17:35:34 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/a-quick-view-of-modules-in-terraform/</guid>

					<description><![CDATA[<p>Introduction Modules in Terraform are a collection of resources that can be linked or just created individually. When we call a module, we are calling a file with a bunch of resources with some parameters inside, parameters we need either to specify in the resource itself or in another file which stores our variables. Why [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/a-quick-view-of-modules-in-terraform/">A quick view of modules in Terraform</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2 class="western"><span style="font-family: Open Sans, sans-serif;"><span style="color: #404040;"><span style="font-size: xx-large;">I</span></span><span style="color: #404040;"><span style="font-size: xx-large;">ntroduction</span></span></span></h2>
<p><span style="font-family: Open Sans, sans-serif;"><span style="color: #3a3a3a;"><span style="font-size: medium;">Modules in <strong>Terraform</strong> are a collection of resources that can be linked or just created individually. When we call a module, we are calling a file with a bunch of resources with some parameters inside, parameters we need either to specify in the resource itself or </span></span><span style="color: #3a3a3a;"><span style="font-size: medium;">in another file which stores </span></span><span style="color: #3a3a3a;"><span style="font-size: medium;">our variables.</span></span></span></p>
<h2>Why do we use Terraform?</h2>
<ul>
<li><span style="color: #000000;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">It is a very useful tool to develop, change and have a versioning of our infrastructure in an efficient and safe way.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">It is a tool that allows you to define infrastructure as code and enables you to change and track the infrastructure with ease.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">It is independent of the platform or ‘cloud agnostic’ and allows working with multiple cloud providers.</span></span></span></li>
</ul>
<h3 class="western"><span style="font-family: Open Sans, sans-serif;"><span style="color: #404040;"><span style="font-size: large;">What do we need for this lab?</span></span></span></h3>
<ul>
<li><span style="font-family: Open Sans, sans-serif;"><strong>Terraform</strong> installed. In this case w</span><span style="font-family: 'Open Sans', sans-serif;">e run v.0.12.7.</span></li>
<li><span style="font-family: Open Sans, sans-serif;">In our case, we are using <strong>AWS</strong> as our <strong>Cloud Provider</strong>, so we need a user with programmatic access. We need as well to give access to this user with the proper IAM Policy.</span></li>
<li><span style="font-family: Open Sans, sans-serif;">Your preferred code editor.</span></li>
</ul>
<h2 class="western"><span style="color: #404040;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: xx-large;">Let’s get started!</span></span></span></h2>
<p><span style="font-family: Open Sans, sans-serif;">Usually, first we should either set up a <strong>Terraform</strong> module with our required parameters or just get some official module from the network. In our case, I did myself a module with an S3 Bucket and its own policy and therefore, I specify what options I’d like the module to have.</span></p>
<p><span style="font-family: Open Sans, sans-serif;">It’d look something like this:</span></p>
<div class="wp-block-codemirror-blocks code-block">
<pre class="CodeMirror" data-setting="{">resource "aws_s3_bucket" "this" {
  bucket            = var.bucket_name
  acl               = var.type_acl
  force_destroy     = var.destroy

  tags = {
    Name            = var.tag_name
  }
  versioning {
    enabled         = var.versioning
  } 
}

resource "aws_s3_bucket_policy" "this" {
  bucket = var.bucket_name
  policy = templatefile("${path.module}/templates/s3_origin_access_identity.json", {
    origin_access_identity_arn         = aws_cloudfront_origin_access_identity.this.iam_arn,
    origin_access_identity_bucket_name = var.bucket_name
  })
}</pre>
</div>
<p><span style="font-family: Open Sans, sans-serif;">As you may noticed, everything is “<i><b>variablized</b></i><em>”<b></b></em><i><b>. </b></i>Hence, we’ll need to create a file with our variables stored with their custom values.</span></p>
<p><span style="font-family: Open Sans, sans-serif;">In the same folder we have our file “main.tf”, we create our “variables.tf”:</span></p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">### S3 VARIABLES

variable "bucket_name"      { }
variable "tag_name"         { }
variable "type_acl"         { }
variable "versioning"       { }
variable "destroy"          { }
variable "aliases"          { }
variable "certificate_arn"  { }</pre>
</div>
<p><span style="font-family: Open Sans, sans-serif;">In this particular case, you may ask yourselves why these variables don’t have any value stored. And the answer is, we’re using a main file called “terragrunt.hcl” which will store all our values when we call the module.</span></p>
<p><span style="font-family: Open Sans, sans-serif;">Another thing that may be confusing is how to specfiy the bucket policy. We can either specifyit with a heredoc file (EOF) or straightaway with a function of <strong>Terraform</strong> called “templatefile”.</span></p>
<p><span style="font-family: Open Sans, sans-serif;">The first example is in <strong>Terraform Documentation</strong>, a website that I strongly recommend you to visit to understand how powerful modules and its attributes are. </span></p>
<p><span style="font-family: Open Sans, sans-serif;">The second example, and the one we used, it’d look something like this:</span></p>
<p><span style="font-family: Open Sans, sans-serif;">On the same folder, we must have a folder called “templates” and inside, introduce the bucket policy as a JSON file.</span></p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">{
    "Version": "2012-10-17",
    "Id": "PolicyForCloudFrontPrivateS3Content",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "${origin_access_identity_arn}"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::${origin_access_identity_bucket_name}/*"
        }
    ]
  }</pre>
</div>
<p><span style="font-family: Open Sans, sans-serif;">You may’ve noticed we introduced ${origin_access_identity_arn} and </span><span style="font-family: 'Open Sans', sans-serif;">${origin_access_identity_bucket_name} and this is because we want to set such values manually like this:</span></p>
<p>&nbsp;</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">policy = templatefile("${path.module}/templates/s3_origin_access_identity.json", {
    origin_access_identity_arn         = aws_cloudfront_origin_access_identity.this.iam_arn,
    origin_access_identity_bucket_name = var.bucket_name
  })</pre>
</div>
<p><span style="font-family: Open Sans, sans-serif;">As you see, we introduce the<i> “</i><i>arn”</i><i> </i>calling another resource called “aws_cloudfront_origin_access_identity” and the bucket name we introduce it as we have seen before with our variables file.</span></p>
<p><span style="font-family: Open Sans, sans-serif;">Now you just need to specify your <strong>Terraform</strong> provider and to call the module with another file with the values you have specified and deploy it:</span></p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">provider "aws" {
  region     = var.region
  version    = "~&gt; 2.0"
}

provider "aws" {
  alias  = "aws_us_east_1"
  region = "us-east-1"
}
module "s3" {
    source               = "../../../../../../modules/s3-cloudfront/"
    bucket_name          = var.bucket_name
    tag_name             = var.tag_name
    type_acl             = var.type_acl
    versioning           = var.versioning
    destroy              = var.destroy
    aliases              = var.aliases
    certificate_arn      = var.certificate_arn    
}</pre>
</div>
<p><span style="font-family: Open Sans, sans-serif;">Deploy it with a<strong> terraform init</strong>, terraform plan and terraform apply.</span></p>
<h2 class="western"><span style="color: #404040;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: xx-large;">Conclusion</span></span></span></h2>
<p><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">So, we saw how to deploy an <strong>S3 Bucket</strong> with its policy with <strong>Terraform</strong>. I strongly recommend you visit the official <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs">Terraform Documentation</a> to keep learning about modules and all related to them.</span></span></span></p>
<p><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">I invite you </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">all in case you need </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">information about the </span></span></span><span style="color: #c5d31e;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;"><b><strong><a href="https://geko.cloud/en/devops/">DevOps</a> </strong></b></span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">world, </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">to</span></span></span> <span style="color: #009e00;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;"><a href="https://geko.cloud/en/contact/">contact us</a> </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">and keep checking </span></span></span><span style="color: #009e00;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;"><a href="https://geko.cloud/en/blog/labs/">our blog</a> </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">to find other useful </span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">posts</span></span></span><span style="color: #3a3a3a;"><span style="font-family: Open Sans, sans-serif;"><span style="font-size: medium;">.</span></span></span></p>
<p><a href="https://geko.cloud/en/contact/"><img loading="lazy" decoding="async" class="aligncenter wp-image-3265" src="https://geko2.factoryfy.com/wp-content/uploads/geko-1-150x150.png" alt="" width="82" height="82" /></a></p>
<p>La entrada <a href="https://geko.cloud/en/a-quick-view-of-modules-in-terraform/">A quick view of modules in Terraform</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/a-quick-view-of-modules-in-terraform/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>NFS volumes in Docker containers</title>
		<link>https://geko.cloud/en/nfs-volumes-docker-containers/</link>
					<comments>https://geko.cloud/en/nfs-volumes-docker-containers/#respond</comments>
		
		<dc:creator><![CDATA[Jose Luis Sánchez]]></dc:creator>
		<pubDate>Mon, 16 Nov 2020 10:14:54 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Docker]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/nfs-volumes-in-docker-containers/</guid>

					<description><![CDATA[<p>In many cases we find ourselves using a volume in the docker that is shared from another server via NFS. For this purpose, the docker includes its own NFS driver that will allow us to use this volume directly without having to run it on the host machine. We have different options when using these NFS [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/nfs-volumes-docker-containers/">NFS volumes in Docker containers</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In many cases we find ourselves<strong> using a volume in the docker that is shared from another server via NFS</strong>. For this purpose, the docker includes its own NFS driver that will allow us to use this volume directly without having to run it on the host machine.</p>
<p>We have different options when using these NFS volumes in our containers:</p>
<ul>
<li><span style="font-weight: 400;"><span style="font-weight: 400;">Firstly, we can create a volume that we can use either in <strong>docker compose</strong> or using a <strong>docker run</strong>. This is the reason why we will use the following command: </span></span>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">  $ docker volume create --driver local 
      --opt type=nfs 
      --opt o=nfsvers=4,addr=nfs.example-domain.com,rw 
      --opt device=:/path/to/dir 
      volume-name</pre>
</div>
<p><span style="font-weight: 400;"><span style="font-weight: 400;"> Once we have created the volume, we can mount it inside our container:</span></span></p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">  $ docker run -it --rm 
    --mount type=volume,dst=/container/path,volume-driver=local,volume-opt=type=nfs,"volume-opt=o=nfsvers=4,addr=nfs.example-domain.com",volume-opt=device=:/host/path 
    volume-name</pre>
</div>
</li>
<li>The same configuration <strong>can be applied within our docker-comper</strong>. Inside our <strong>docker-compose.yaml</strong> we will have to create the volume and mount it inside our container.
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{"># Container conf
  ...
  container-conf:
    container_name: foo/bar
    image: imagename:tag
    ports:
      - 80:80
    volumes:
      - new_volume:/path/inside/container
  ...
# Create volume
  ...
  volumes:
    new_volume:
      driver: local
      driver_opts:
        type: nfs
        o: nfsvers=4,addr=nfs.example-domain.com,rw
        device: ":/host/path/to/dir"
  ...</pre>
</div>
<p>We have found ourselves in the same situation needing to fit the container with an <strong>EFS</strong> (Elastic File System) from Amazon Web Services. This AWS service provides scalable, elastic and concurrent storage and we will be able to add it using the same NFS docker driver.</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{"># Container conf
 ...
  container-conf:
    container_name: foo/bar
    image: imagename:tag
    ports:
      - 80:80
    volumes:
      - new_volume:/path/inside/container
 ... 
# Create volume
 ...
  volumes:
    efs_volume:
      driver: local
      driver_opts:
        type: nfs
        o: addr=[EFS_DNS],nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2
        device: [EFS_DNS]:/
 ...</pre>
</div>
<p>Please note that if you have just created this EFS, it may be that <strong>when you try to create this volume you will get an error warning that you cannot find the EFS endpoint</strong>. This is due to the fact that these DNS will take a few minutes to propagate. If you cannot add it via the endpoint, you can do it directly from the EFS&#8217;s IP.</li>
</ul>
<p>We hope that this information has been useful to you and don&#8217;t forget that at <a href="https://geko.cloud/en/">Geko cloud</a> we are at your disposal for the management of <a href="https://geko.cloud/en/cloud-services/cloud-management/">cloud infrastructures</a> and microservices.</p>
<p>If you have other questions related to <a href="https://geko.cloud/en/cloud-services/microservices-architecture-docker/">docker</a> or <a href="https://geko.cloud/en/what-is-kubernetes/">Kubernetes</a>, perhaps you can find answers in other posts on our <a href="https://geko.cloud/en/blog/">blog</a>.</p>
<p>See you next time!</p>
<h4 style="text-align: center;"><a href="https://geko.cloud/en/contact/">Contact us and let&#8217;s talk about how we could help you make your platform more agile and secure!</a></h4>
<p><a href="https://geko.cloud/en/contact/"><img loading="lazy" decoding="async" class="aligncenter wp-image-3265" src="https://geko2.factoryfy.com/wp-content/uploads/geko-1-300x297.png" alt="" width="69" height="68" /></a></p>
<p>La entrada <a href="https://geko.cloud/en/nfs-volumes-docker-containers/">NFS volumes in Docker containers</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/nfs-volumes-docker-containers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>RDS performance issues by IOPS on GP SSD</title>
		<link>https://geko.cloud/en/rds-performance-issues-by-iops-on-gp-ssd/</link>
					<comments>https://geko.cloud/en/rds-performance-issues-by-iops-on-gp-ssd/#respond</comments>
		
		<dc:creator><![CDATA[Jose Luis Sánchez]]></dc:creator>
		<pubDate>Mon, 14 Sep 2020 11:37:54 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/rds-performance-issues-by-iops-on-gp-ssd/</guid>

					<description><![CDATA[<p>We want to share with you a problem that we have recently solved with a project. RDS is the managed database service offered by AWS that solves the main management, operation and maintenance problems involved in having a relational database platform. With RDS everything is very simple, you guarantee the service and the operative allowing [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/rds-performance-issues-by-iops-on-gp-ssd/">RDS performance issues by IOPS on GP SSD</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We want to share with you a problem that we have recently solved with a project.</p>
<p>RDS is the managed database service offered by AWS that solves the main management, operation and maintenance problems involved in having a relational database platform. With RDS everything is very simple, you guarantee the service and the operative allowing to grow and to decrease according to necessity.</p>
<p>In addition Amazon has its own engine based on Mysql, Aurora that even allows to have a serverless database platform! Which we will talk about in another post later.</p>
<p>&nbsp;</p>
<h3>The scenario we face</h3>
<p>A client with its full AWS-based platform with all its relational databases using RDS manifests in one of its platforms performance problems, crashes, wandering and unpredictable behavior etc.</p>
<p>It turns out that this problem does not occur from the beginning but at a certain point in time it started to degrade until it became a real problem. We appreciate that RDS was deployed using T3 bursting instance where credits seemed to decrease periodically.</p>
<p>We decided to change the instance to type M5 to have a better performance and resource availability . The performance improves very significantly until we noticed the following:</p>
<p>&nbsp;</p>
<p><a href="https://geko2.factoryfy.com/wp-content/uploads/rds-disk-latency.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2603" src="https://geko2.factoryfy.com/wp-content/uploads/rds-disk-latency.png" alt="" width="740" height="262" /></a><a href="https://geko2.factoryfy.com/wp-content/uploads/queuerdsaws.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2604" src="https://geko2.factoryfy.com/wp-content/uploads/queuerdsaws.png" alt="" width="518" height="272" /></a></p>
<p>The metrics continue to warn that there is write/read latency and IOPS are glued. How is this possible in a general purpose SSD?</p>
<p>The metric that for us is important to follow in any RDS is the one referring to the Disk QueueDepth, this metric indicates the size of the queue that the system has waiting to be processed in disk IO operation, that is, the debt in disk operations that the system has. Read Write disk latencies are nothing more than mirages of this fact.</p>
<p>&nbsp;</p>
<h3>The solution</h3>
<p>The explanation is simple, AWS RDS provides a total of<strong> 3 IOPS/Gb</strong> depending on the size of the EBS disk that is created. The client RDS was created with <strong>20Gb total size = 60 IOPS</strong> , which <strong>AWS by default always provides a minimum of 100 IOPS</strong>.</p>
<p>This explained why the <strong>CPU and RAM were not affected</strong> but the performance as such was.</p>
<p>As we detected the bottleneck, we simply proceeded to expand via Terraform the size of the associated <strong>EBS volume to 100Gb with its corresponding 300IOPS (three times as before)</strong>.</p>
<p>The result here you have it :</p>
<p>&nbsp;</p>
<p><a href="https://geko2.factoryfy.com/wp-content/uploads/readwritelatencyafterebs.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2605" src="https://geko2.factoryfy.com/wp-content/uploads/readwritelatencyafterebs.png" alt="" width="756" height="270" /></a><a href="https://geko2.factoryfy.com/wp-content/uploads/rdsquesolvedissue.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2606" src="https://geko2.factoryfy.com/wp-content/uploads/rdsquesolvedissue.png" alt="" width="519" height="274" /></a></p>
<p>Nothing more to add, no more latencies, no more blockages and no more problems with this platform, we leave you the link to the official <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html">AWS documentation on RDS and EBS</a></p>
<p>Remember that for productive environments, the recommendation is always to provide at least 100Gb per disk (even if we don&#8217;t need it) to obtain those 300 IOPS minimum.</p>
<p>Remember that<a href="https://geko.cloud/en/contact/"> at Geko we are still at your disposal to help you</a> with any performance problems you may have with your platform.</p>
<p>La entrada <a href="https://geko.cloud/en/rds-performance-issues-by-iops-on-gp-ssd/">RDS performance issues by IOPS on GP SSD</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/rds-performance-issues-by-iops-on-gp-ssd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Kubernetes backups with Velero</title>
		<link>https://geko.cloud/en/kubernetes-backups-with-velero/</link>
					<comments>https://geko.cloud/en/kubernetes-backups-with-velero/#respond</comments>
		
		<dc:creator><![CDATA[Jose Luis Sánchez]]></dc:creator>
		<pubDate>Mon, 25 May 2020 08:43:13 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<guid isPermaLink="false">https://geko2.factoryfy.com/kubernetes-backups-with-velero/</guid>

					<description><![CDATA[<p>Talk about backup in a Kubernetes cluster may sound weird and you may thing is not necessary as you can recreate at any time and in a very quick way any of your deployments or resources simply aplying a yaml file&#8230; but in some cases a backup of your resources can be very useful and [&#8230;]</p>
<p>La entrada <a href="https://geko.cloud/en/kubernetes-backups-with-velero/">Kubernetes backups with Velero</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Talk about backup in a <a href="https://geko.cloud/en/what-is-kubernetes/">Kubernetes</a> cluster may sound weird and you may thing is not necessary as you can recreate at any time and in a very quick way any of your deployments or resources simply aplying a yaml file&#8230; but in some cases a backup of your resources can be very useful and can be our life guard.</p>
<p><a href="https://velero.io" target="_blank" rel="noopener noreferrer">Velero</a> is an open source tool to safely backup and restore, perform disaster recovery, and migrate <a href="https://geko.cloud/en/what-is-kubernetes/">Kubernetes</a> cluster resources and persistent volumes.</p>
<p>That said, let&#8217;s enumerate in which situations Velero can help us:</p>
<ul>
<li>Backup stateful applications</li>
<li>Backup applications installed in a non-declarative way</li>
<li>Backup PVC information</li>
<li>Cluster migrations</li>
<li>Replicate cluster configurations (for example, from production to testing or development clusters)</li>
</ul>
<p>After the boring introduction we will start with the funny part. <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>Install Velero on your kubernetes cluster</h2>
<p>For this example <strong>we will use AWS EKS as our cloud provider</strong>.</p>
<p>First of all, you must install the Velero client on your workstation. To to do that, simply go <a href="https://github.com/vmware-tanzu/velero/releases" target="_blank" rel="noopener noreferrer">here</a> and download the latest tarball according to your workstation operating system and extract the tarball:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">tar -xvf RELEASE-TARBALL-NAME.tar.gz</pre>
</div>
<p>and move the Velero binary to somewhere in your $PATH. On MacOS simply execute this:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">brew install velero</pre>
</div>
<p>Once we have the Velero client installed on our system we can proceed to install Velero on our<a href="https://geko.cloud/en/what-is-kubernetes/"> kubernetes</a> cluster. Just execute this:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">velero install 
    --provider aws 
    --bucket where-to-store-velero-backups 
    --use-restic 
    --secret-file ~/.aws/credentials 
    --use-volume-snapshots=false 
    --plugins=velero/velero-plugin-for-aws:v1.0.0 
    --backup-location-config region=eu-west-1</pre>
</div>
<p>By default Velero is installed in the velero namespace but you can change it adding the &#8211;namespace flag. Velero uses restic to store the data of attached volumes. When the installation finishes you should see something like this in your k8s cluster:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">$ kubectl get all -n velero
NAME                          READY   STATUS    RESTARTS   AGE
pod/restic-4xr6v              1/1     Running   0          157d
pod/restic-bg58w              1/1     Running   0          157d
pod/restic-hf2fm              1/1     Running   0          157d
pod/restic-w4rvh              1/1     Running   0          157d
pod/velero-57cd659988-bd6nd   1/1     Running   0          73d

NAME                    DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/restic   4         4         4       4            4                     157d

NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/velero   1/1     1            1           157d

NAME                                DESIRED   CURRENT   READY   AGE
replicaset.apps/velero-57cd659988   1         1         1       157d
</pre>
</div>
<p>In our case, we have 4 worker nodes and restic is installed on every node we have (configures a daemonset).</p>
<p>By default, Velero <strong>will not include the volumes in the backup</strong>. To backup them you have to add an annotation. You can add it like this:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">$ kubectl -n annotate pod/your_pod backup.velero.io/backup-volumes=volume_1,volume_2</pre>
</div>
<p>(add volumes comma separated) or simply add it in your deployment definition, for example:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
      annotations:
        backup.velero.io/backup-volumes: myapp-logs
    spec:
      volumes:
        - name: myapp-logs
          persistentVolumeClaim:
           claimName: myapp-logs
      containers:
      - image: myapp:latest
        name: myapp
        ports:
        - containerPort: 80
        volumeMounts:
          - mountPath: "/var/log/myapp"
            name: myapp-logs
            readOnly: false</pre>
</div>
<p><em> Note: hostPath volumes are not supported, but the new local volume type is supported.</em></p>
<p>And finally, some utilization examples to create, restore and show backups:</p>
<p>One time backup:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{"># Backup ALL resources in the cluster (the whole cluster)
$ velero backup create my-backup-20200515

# Backup a namespace
$ velero backup create my-backup-20200515 --include-namespaces namespace_to_backup

# Backup ALL namespaces except ones specified
$ velero backup create my-backup-20200515 --exclude-namespaces namespace_1_to_exclude,namespace_2_to_exclude
</pre>
</div>
<p>Scheduled backup:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">$ velero create schedule myapp-backup-daily --schedule="0 7 * * *" --include-namespaces namespace_to_backup</pre>
</div>
<p>Velero will backup <strong>all resources included in your selection</strong> (pods, deployments, services, &#8230;)</p>
<p>The default backup retention is 30 days. If you want to change it add the &#8211;ttl flag. This flag allows you to specify the backup retention period with the value specified in hours, minutes and seconds in the form &#8211;ttl 24h0m0s. If not specified, a default TTL value of 30 days will be applied.</p>
<p>Restore a backup:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{">$ velero restore create --from-backup backup_name</pre>
</div>
<p>Some other useful commands:</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{"># To show all stored backups list (name, status, creation and expiration date)
$ velero get backups

# To show one specific backup details
$ velero describe backup backup_name
</pre>
</div>
<p>Velero is quite easy to install and run and it can save your life in some circumstances. <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<hr />
<p>I hope you&#8217;ve enjoyed this post and I encourage you to <a href="https://geko.cloud/en/blog/">check our blog for other posts</a> that you might find helpful. <a href="https://geko.cloud/en/contact/">Do not hesitate to contact us</a> if you would like us to help you with your projects.</p>
<p>See you in the next post!</p>
<p>La entrada <a href="https://geko.cloud/en/kubernetes-backups-with-velero/">Kubernetes backups with Velero</a> se publicó primero en <a href="https://geko.cloud/en/">Geko Cloud</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://geko.cloud/en/kubernetes-backups-with-velero/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
