<?xml version="1.0"?>
<feed xmlns="https://www.w3.org/2005/Atom">

  <title>CloudCaptain</title>
  <link href="https://cloudcaptain.sh/blog/"/>
  <link type="application/atom+xml" rel="self" href="/blog/atom.xml"/>
  <updated>2026-01-07T18:23:05+00:00</updated>
  <id>https://cloudcaptain.sh/blog/</id>
  <author>
    <name>CloudCaptain</name>
  </author>

  
  <entry>
    <id>https://cloudcaptain.sh/blog/cloudcaptain</id>
    <link type="text/html" rel="alternate" href="/blog/cloudcaptain"/>
    <title>Boxfuse is now CloudCaptain!</title>
    <published>2022-01-17T00:00:00+00:00</published>
    <updated>2022-01-17T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;/blog/welcome&quot;&gt;initial release of Boxfuse&lt;/a&gt; was in 2015. From then on Boxfuse’s feature set grew steadily as we
added support for additional payload types, additional AWS regions, additional AWS instance families, additional app
types and more!&lt;/p&gt;

&lt;h2 id=&quot;transition-and-improvements&quot;&gt;Transition and Improvements&lt;/h2&gt;

&lt;p&gt;In 2019, we sold the Flyway part of our business and entered a long transition phase. During this time our attention was
more divided than we would have liked, yet we still managed to &lt;a href=&quot;/docs/releasenotes&quot;&gt;deliver a number of major improvements&lt;/a&gt;
including:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;lightning fast AMI creation, usually in under 10 seconds&lt;/li&gt;
  &lt;li&gt;OpenJDK 11 and OpenJDK 17 support&lt;/li&gt;
  &lt;li&gt;m6i, r6i, c6i EC2 instances support&lt;/li&gt;
  &lt;li&gt;db.t4g RDS instances support&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introducing-cloudcaptain&quot;&gt;Introducing CloudCaptain&lt;/h2&gt;

&lt;p&gt;Today we are happy to announce that this transition phase has ended!&lt;/p&gt;

&lt;p&gt;As part of this, please join us in saying goodbye to Boxfuse and welcoming CloudCaptain!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/logo/cloudcaptain-h.svg&quot; alt=&quot;CloudCaptain&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As you no doubt have noticed the old &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cloudcaptain.sh&lt;/code&gt; domain has now been phased out and replaced by our brand new
&lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;cloudcaptain.sh&lt;/a&gt; where development will continue at an accelerated pace going forward!&lt;/p&gt;

&lt;p&gt;We have lots of innovation in store and we can’t wait to share it with you!&lt;/p&gt;

&lt;p&gt;Watch this space or follow &lt;a href=&quot;https://twitter.com/CloudCaptainSH&quot;&gt;@CloudCaptainSH&lt;/a&gt; on Twitter to stay updated!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/springboot2</id>
    <link type="text/html" rel="alternate" href="/blog/springboot2"/>
    <title>Spring Boot 2 and t3 and r5 instances support</title>
    <published>2018-08-23T00:00:00+00:00</published>
    <updated>2018-08-23T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Today CloudCaptain is introducing 2 important new features.&lt;/p&gt;

&lt;h2 id=&quot;spring-boot-2-support&quot;&gt;Spring Boot 2 support&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/springboot.png&quot; alt=&quot;Spring Boot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Building upon CloudCaptain’s existing [Spring Boot 1.x support] (/blog/spring-boot-ec2), CloudCaptain now fully supports 
&lt;strong&gt;Spring Boot 2.0&lt;/strong&gt; and newer apps.&lt;/p&gt;

&lt;p&gt;Spring Boot 2.0 is autodetected and CloudCaptain will then auto-configure ports, healthchecks and more based on the new
property names introduced in Spring Boot’s 2.0 release.&lt;/p&gt;

&lt;h2 id=&quot;t3-and-r5-instance-support&quot;&gt;T3 and R5 instance support&lt;/h2&gt;

&lt;p&gt;AWS recently released their new all hardware hypervisor called the &lt;strong&gt;Nitro System&lt;/strong&gt; and along with it a number of
&lt;a href=&quot;/blog/nitro&quot;&gt;new instance types&lt;/a&gt; making full use of it.&lt;/p&gt;

&lt;p&gt;Today CloudCaptain expands its instance support to two new instances families, both running on the Nitro System.&lt;/p&gt;

&lt;p&gt;First of all, CloudCaptain now supports the brand new t3 burstable instances. They are 10% more cost effective than t2 and
run on more powerful hardware. All t2 users are encouraged to make the switch.&lt;/p&gt;

&lt;p&gt;In addition to that, for RAM-heavy apps CloudCaptain now fully supports the new r5 instances. The are more cost effective,
support more memory and come in a larger sizes at the top end as previous r4 and r3 instances. All r4 and r3 users are
encouraged to make the switch.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;Spring Boot 2 and t3 and r5 instance support is available today at no additional charge to all CloudCaptain customers. Enjoy!&lt;/p&gt;

&lt;p&gt;And if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/fastami</id>
    <link type="text/html" rel="alternate" href="/blog/fastami"/>
    <title>Introducing FastAMI</title>
    <published>2018-03-28T00:00:00+00:00</published>
    <updated>2018-03-28T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;When CloudCaptain deploys your apps to AWS, a two-step process takes places. First, CloudCaptain creates 
Amazon Machine Images, simply known as AMIs. Using these, EC2 instances can then be launched.&lt;/p&gt;

&lt;p&gt;AMI creation has traditionally been rather time consuming. So much so that many AWS deployment technologies
chose to forgo custom AMIs and all their benefits, and instead go for the more brittle process of launching an instance
from a standard AMI and customizing it on startup.&lt;/p&gt;

&lt;p&gt;Not so with CloudCaptain. Not only does CloudCaptain fully embrace immutable infrastructure and the
&lt;a href=&quot;/blog/no-ssh&quot;&gt;benefits of no SSH&lt;/a&gt;, but today, building upon last month’s release of &lt;a href=&quot;/blog/private-vault&quot;&gt;Private Vault&lt;/a&gt;
we are unveiling a new fast and secure AMI provisioning mechanism which works across all supported AWS regions called
&lt;strong&gt;CloudCaptain FastAMI&lt;/strong&gt;.&lt;/p&gt;

&lt;h2 id=&quot;introducing-cloudcaptain-fastami&quot;&gt;Introducing CloudCaptain FastAMI&lt;/h2&gt;

&lt;p&gt;Today we are introducing &lt;strong&gt;CloudCaptain FastAMI&lt;/strong&gt;: a transparent, fast and secure way to rapidly provision AMIs fully within your
AWS account.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/fastami/fastami.png&quot; alt=&quot;FastAMI&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It works as follows: when CloudCaptain needs to create a new AMI it first launches a t2.micro instance in the default VPC of
that region of your account. This instance then securily listens to AMI conversion requests. Once it receives such a
request it pulls an image from your encrypted S3 private vault bucket and turns it into an encrypted AMI, all without
the image data ever leaving your AWS account. This instance stays active until it hasn’t seen a new request for 60
minutes, at which point it terminates automatically.&lt;/p&gt;

&lt;p&gt;This incurs a small cost of about 0.01 USD for AWS accounts that are no longer eligible for the AWS free tier. We felt
this was a reasonable trade-off for all the the privacy, security and speed advantages of CloudCaptain FastAMI.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;CloudCaptain FastAMI is available today at no additional charge to all CloudCaptain users who have already migrated their account to
&lt;a href=&quot;/blog/private-vault&quot;&gt;Private Vault&lt;/a&gt;. Support for this is fully transparent and initially
available in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;us-east-1&lt;/code&gt;and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;us-west-2&lt;/code&gt; regions. The remaining AWS regions will be enabled in the coming weeks.
Simply deploy images stored in your Private Vault to environments in any of those regions and you’ll
automatically benefit from the privacy, security and speed advantages of CloudCaptain FastAMI. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/private-vault</id>
    <link type="text/html" rel="alternate" href="/blog/private-vault"/>
    <title>Introducing Private Vault</title>
    <published>2018-02-12T00:00:00+00:00</published>
    <updated>2018-02-12T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;CloudCaptain has always made it easy to to push and pull images to and from the CloudCaptain Vault. Up until now the CloudCaptain
Vault was implemented as an S3 bucket within CloudCaptain’s account. This is a very convenient solution that makes it easy
to get started. It does however come with a disadvantage that is increasingly important for our customers: even though
their images are fully encrypted, they still lie within our AWS account and not theirs.&lt;/p&gt;

&lt;h2 id=&quot;introducing-private-vault&quot;&gt;Introducing Private Vault&lt;/h2&gt;

&lt;p&gt;Today we are introducing the successor of the CloudCaptain Vault: the &lt;strong&gt;Private Vault&lt;/strong&gt;. It retains the same ease of use as
the CloudCaptain Vault, but it is now also comes with the added security and privacy advantage of being stored in an S3
bucket on &lt;em&gt;your&lt;/em&gt; AWS account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private Vault is now enabled on all new CloudCaptain accounts by default.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;migrating-from-the-cloudcaptain-vault-to-your-private-vault&quot;&gt;Migrating from the CloudCaptain Vault to your Private Vault&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Existing accounts can be migrated within a few seconds in the CloudCaptain Console.&lt;/strong&gt; All you need to do is simply click
the &lt;strong&gt;Upgrade to Private Vault&lt;/strong&gt; button on the &lt;em&gt;Overview&lt;/em&gt; tab. An encrypted S3 bucket will then be created in the
default region for your AWS account (as selected under the globe on the overview tab in the CloudCaptain Console). All images
you push from then on will automatically be stored in your new encrypted S3 bucket.&lt;/p&gt;

&lt;p&gt;Existing images remain unaffected und can be accessed
as before. They still live within the legacy CloudCaptain Vault and can be removed either manually via the Console or
automatically on a least recently used basis when your Vault capacity has been exceeded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This migration can take place at your best convenience until the 30th of June 2018.&lt;/strong&gt; Starting July first, existing
accounts that have not yet been migrated to Private Vault will automatically be migrated for you.&lt;/p&gt;

&lt;p&gt;From then on any image stored in the legacy CloudCaptain Vault remains accessible as usual until the 31st of December 2018.
After that the CloudCaptain Vault will be retired and any images it still contains will be deleted.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;Private Vault is available today to all CloudCaptain users at no additional charge. Support for this is fully transparent.
All you need to do is upgrade your account and upgrade your client to version &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1.32.0.1441&lt;/code&gt; or newer and you’ll
automatically benefit from the privacy and security advantages of Private Vault. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/nitro</id>
    <link type="text/html" rel="alternate" href="/blog/nitro"/>
    <title>Launch M5 and C5 instances on the Nitro System</title>
    <published>2018-01-18T00:00:00+00:00</published>
    <updated>2018-01-18T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Six weeks ago at the last AWS re:Invent in Las Vegas, AWS introduced a new hypervisor that will pave the future of EC2.
It moves the virtualization tasks traditionally performed by their previous hypervisor, Xen, and its management node,
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dom0&lt;/code&gt; down into custom silicon and replaced the remaining bits with a very slim version of KVM.&lt;/p&gt;

&lt;p&gt;This new hypervisor is called the &lt;strong&gt;Nitro System&lt;/strong&gt;. It offers performance comparable to bare metal. And now that
reserving capacity for a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dom0&lt;/code&gt; management node is no longer needed, it also exposes the entire capacity of the
underlying hardware to EC2 instances. The first types of instances to run on the Nitro System and enjoy those benefits
are the &lt;strong&gt;M5&lt;/strong&gt; and &lt;strong&gt;C5&lt;/strong&gt; EC2 instances.&lt;/p&gt;

&lt;p&gt;This is a big change and it’s well worth familiraizing yourself with it. AWS did a great talk about it at re:Invent
which is now also available online:&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube-nocookie.com/embed/LabltEXk0VQ?rel=0&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;If you prefer to read, here is also a great article by Brendan Gregg from Netflix on the same subject: &lt;a href=&quot;https://www.brendangregg.com/blog/2017-11-29/aws-ec2-virtualization-2017.html&quot;&gt;https://www.brendangregg.com/blog/2017-11-29/aws-ec2-virtualization-2017.html&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;full-cloudcaptain-support&quot;&gt;Full CloudCaptain support&lt;/h2&gt;

&lt;p&gt;Starting today you can now use CloudCaptain to create AMIs and also launch M5 and C5 instances on the Nitro System in all
regions where it is already deployed. To make this possible, CloudCaptain made a number of changes.&lt;/p&gt;

&lt;p&gt;First of all we upgraded to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4.14.14&lt;/code&gt; Linux kernel. As part of this move we also open-sourced the kernel
configuration used by CloudCaptain images and &lt;a href=&quot;https://github.com/boxfuse/boxfuse-kernel&quot;&gt;made in available on GitHub&lt;/a&gt;.
Contributions and pull requests are welcome!&lt;/p&gt;

&lt;p&gt;Next we added support for the two essential technologies required for AMIs running on the Nitro System: NVMe storage
and Elastic Network Adapters. All new CloudCaptain images created with &lt;strong&gt;CloudCaptain client 1.31.0 and newer&lt;/strong&gt; will now automatically
include those drivers. The images are universal and able to run on Hyper-V, VirtualBox, EC2 with Xen and EC2 with Nitro,
unchanged of course.&lt;/p&gt;

&lt;p&gt;Finally we added support for the M5 and C5 instances, both to the CloudCaptain Client and the CloudCaptain Console.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;This is available today at no additional charge. Support for this is fully transparent and in traditional CloudCaptain fashion,
all the heavy lifting is done automatically for you behind the scenes. 
Our tests indicate that both instance types have the fastest launch and boot times of any EC2 instance type
so far. Simply update your client and enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/load-balanced-https</id>
    <link type="text/html" rel="alternate" href="/blog/load-balanced-https"/>
    <title>Introducing load-balanced-https apps</title>
    <published>2017-10-04T00:00:00+00:00</published>
    <updated>2017-10-04T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;CloudCaptain originally launched with two types of apps: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;single-instance&lt;/code&gt; for applications using Elastic IP addresses
and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;load-balanced&lt;/code&gt; for applications using Classic Elastic Load Balancers. Over time we have added support for additional
types of applications such as &lt;a href=&quot;/blog/worker&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;workers apps&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;/blog/one-off&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;one-off apps&lt;/code&gt;&lt;/a&gt; to support more diverse
types of workloads.&lt;/p&gt;

&lt;p&gt;Today CloudCaptain is expanding further with support for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;load-balanced-https&lt;/code&gt; apps using &lt;strong&gt;AWS Application Load Balancers&lt;/strong&gt;,
together with Auto Scaling Groups and optionally custom domains and TLS (SSL) certificates.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/load-balanced-https/load-balanced-https.png&quot; alt=&quot;load-balanced-https&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;how-does-it-work&quot;&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;When you create a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;load-balanced-https&lt;/code&gt; app using either the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Console&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/load-balanced-https/console.png&quot; alt=&quot;create&quot; class=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;or the &lt;a href=&quot;/docs/commandline&quot;&gt;CloudCaptain Client&lt;/a&gt;&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse create my-app &lt;strong&gt;-app.type=load-balanced-https&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;CloudCaptain will be set up to automatically provision and configure all necessary resources when the app is deployed.&lt;/p&gt;

&lt;p&gt;Just for the ALB this includes:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;a new ALB (Application Load Balancer)&lt;/li&gt;
  &lt;li&gt;a security group with the correct permissions for the ALB&lt;/li&gt;
  &lt;li&gt;one or more listeners for the correct ports on the ALB&lt;/li&gt;
  &lt;li&gt;a target group associated with the ALB&lt;/li&gt;
  &lt;li&gt;rules connecting the listeners to the target group&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;why-application-load-balancers&quot;&gt;Why Application Load Balancers?&lt;/h2&gt;

&lt;p&gt;AWS Application Load Balancers come with a number of important improvements for applications serving traffic over HTTP(S)
including &lt;strong&gt;HTTP/2&lt;/strong&gt; and &lt;strong&gt;WebSockets&lt;/strong&gt;, while building on the important features you already love like
Auto Scaling and automatic TLS certificate management.&lt;/p&gt;

&lt;h2 id=&quot;seeing-it-in-action&quot;&gt;Seeing it in action&lt;/h2&gt;

&lt;p&gt;So let’s see how this works if we deploy our sample Spring Boot application on AWS:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 90%&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run -app.type=load-balanced-https -env=test -tls.type=acm -domain=hello.boxfuse-example.com

Creating hello ...
&lt;strong class=&quot;success&quot;&gt;Successfully created app hello (type: load-balanced-https, tls: acm, db: none, logs: cloudwatch-logs)&lt;/strong&gt;
Fusing Image for hello.jar (Spring Boot) ...
Image fused in 00:03.673s (62850 K) -&amp;gt; myuser/hello:1.0
Pushing myuser/hello:1.0 ...
Verifying myuser/hello:1.0 ...
Waiting for AWS to create an encrypted AMI for myuser/hello:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:47.010s in eu-central-1 -&amp;gt; ami-75de631a
Creating security group boxsg-myuser-test-hello ...
Creating Log Stream boxfuse/test &amp;gt; myuser/hello ...
Creating Application Load Balancer for myuser/hello in test ...
Creating Target Group myuser-test-hello ...
Found certificate for hello.boxfuse-example.com =&amp;gt; arn:aws:acm:eu-central-1:...
Creating ALB Listener for port 80 ...
Creating security group boxsg-myuser-test-hello-1.0 ...
Creating Launch Configuration boxlc-myuser-test-hello-1.0 ...
Creating Auto Scaling Group boxasg-myuser-test-hello-1.0 ...
Waiting for Auto Scaling Group boxasg-myuser-test-hello-1.0 to launch 1 t2.micro Instance ...
Auto Scaling Group: i-063c0eab44eb5d87c [Pending]
Auto Scaling Group: i-063c0eab44eb5d87c [InService]
Waiting for ALB to become active (this may take up to 10 minutes) ...
Waiting for ALB Target Group to put instances in service ...
ALB: i-063c0eab44eb5d87c [healthy]
&lt;strong class=&quot;success&quot;&gt;Successfully running myuser/hello:1.0 in test at https://hello.boxfuse-example.com/&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;And our app is fully up and running, load balanced in an auto scaling group with a custom domain and an automatic TLS certificate.&lt;/p&gt;

&lt;p&gt;All deploys from here on are performed with zero downtime by simply launching a new auto scaling group and switch out the old one within the target group.&lt;/p&gt;

&lt;h2 id=&quot;byotg-bring-your-own-target-group&quot;&gt;BYOTG (Bring Your Own Target Group)&lt;/h2&gt;

&lt;p&gt;Advanced users also have the option to configure their own ALB and Target Group. From there all that is needed is
simply pointing CloudCaptain at the name of the &lt;a href=&quot;/docs/commandline/cfg#targetgroup&quot;&gt;desired Target Group&lt;/a&gt; and CloudCaptain will use
that one instead of the ALB and Target Group auto provisioning described above.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;Support for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;load-balanced-https&lt;/code&gt; apps is available today at no additional charge on all paid CloudCaptain plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/kwiqjobs</id>
    <link type="text/html" rel="alternate" href="/blog/kwiqjobs"/>
    <title>Customer Interview: KwiqJobs</title>
    <published>2017-09-11T00:00:00+00:00</published>
    <updated>2017-09-11T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Today we are kicking off a series of interview where CloudCaptain customers talk about their experiences. In this first
interview I chatted with Jannes Stubbemann, the CTO of &lt;a href=&quot;https://www.swarms.tech/&quot;&gt;KwiqJobs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/kwiqjobs/kwiqjobs-team.jpg&quot; alt=&quot;KwiqJobs Team&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;hi-jannes-can-you-tell-us-about-yourself-and-your-company&quot;&gt;Hi Jannes, can you tell us about yourself and your company?&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://www.swarms.tech/&quot;&gt;KwiqJobs&lt;/a&gt; wants to turn the waiting time of people into a new resource. We are building a mobile marketplace for microjobs that allows companies to gather data from our app users by placing jobs on our platform. These jobs vary from market research questionnaires to tasks in which users label or generate data that later can be used to train an artificial intelligence. For doing these jobs, which take a few seconds only, the users earn a few amount of money. 
My position is the one of the CTO. I am a proud co-founder of KwiqJobs and joined the team on a startup weekend in June last year. Currently we are about to close our seed investment and are building our developer team in a remote setup.&lt;/p&gt;

&lt;h3 id=&quot;that-sounds-great-what-does-your-infrastructure-setup-look-like&quot;&gt;That sounds great! What does your infrastructure setup look like?&lt;/h3&gt;

&lt;p&gt;Our product as such consists of two main pieces, the mobile application (for now only Android) and a Scala/Play Application as the backend. The backend is currently hosted in AWS where it gets deployed by CloudCaptain. As our version control system we are using git in combination with GitLab to organize our work and our continuous delivery pipelines. As we are working in a remote setup, we use slack as our main communication tool. It helps us not only to communicate with each other but also to get notified about app crashes via crashlytics or deployments from GitLab.&lt;/p&gt;

&lt;h3 id=&quot;why-did-you-choose-cloudcaptain&quot;&gt;Why did you choose CloudCaptain?&lt;/h3&gt;

&lt;p&gt;I think one of the key success factors of good software development is a good and easy to manage continuous delivery pipeline. As a startup we don’t have the capabilities to set it all up using e.g. Docker. Instead, we where looking for a managed solution that allowed us to have a working cd pipeline from the very beginning. When we where looking for such a solution we found CloudCaptain. It seemed really well suited and so far it hasn’t disappointed us. There is no need for us to care about the AWS environment as such and we can focus on the development of our platform instead.&lt;/p&gt;

&lt;h3 id=&quot;can-you-tell-us-a-bit-more-on-how-you-are-using-cloudcaptain-and-what-your-favorite-feature-is&quot;&gt;Can you tell us a bit more on how you are using CloudCaptain and what your favorite feature is?&lt;/h3&gt;

&lt;p&gt;We use CloudCaptain for our continuous delivery of the backend. Whenever code is merged into our develop or master branch, GitLab ci is running CloudCaptain in order to deploy the application in our test or production environment on AWS. My favorite feature is that with CloudCaptain we have one central program, even more one single command, to manage multiple things around our application. For instance we didn’t need to integrate New Relic by hand, CloudCaptain has first level support for that already! We just needed to include it in the command. Or the logs which are also set up by CloudCaptain and can even be accessed via it. This helps us to focus on the development of our application. We don’t get distracted by caring how to setup New Relic or accessing our EC2 instances to change some settings. It’s so many things in one place and easy to use which make it a really powerful tool particular for startups.&lt;/p&gt;

&lt;h3 id=&quot;awesome-can-you-share-something-about-your-plans-for-the-year-ahead&quot;&gt;Awesome! Can you share something about your plans for the year ahead?&lt;/h3&gt;

&lt;p&gt;After we built our mvp and onboarded our first customer in the last year, it is our goal this year to build a scalable application and onboard more customers that we have already in our pipeline.&lt;/p&gt;

&lt;h3 id=&quot;thanks&quot;&gt;Thanks!&lt;/h3&gt;

&lt;p&gt;This concludes our first interview. Stay tuned for more!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/one-off</id>
    <link type="text/html" rel="alternate" href="/blog/one-off"/>
    <title>One-off apps</title>
    <published>2017-09-04T00:00:00+00:00</published>
    <updated>2017-09-04T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;When it comes to running production apps, CloudCaptain offers a range of options, from single-instance to load-balanced and
&lt;a href=&quot;/blog/worker&quot;&gt;worker&lt;/a&gt; apps. They cover a wide range of scenarios from simple hobby apps to complex and robust
robust auto-scaling auto-recovering production workloads.&lt;/p&gt;

&lt;p&gt;But sometimes all you need is a single run of an administrative or maintenance task.&lt;/p&gt;

&lt;h2 id=&quot;introducing-one-off-apps&quot;&gt;Introducing one-off apps&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/one-off/one-off.png&quot; alt=&quot;one-off app&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today we are introducing a new type of app: &lt;strong&gt;one-off&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is an app that starts, does its thing and once it is done, the application process can safely exit and the instance
will terminate. This is particularly useful for administrative or maintenance workloads where you just want a single
task to complete and that’s it.&lt;/p&gt;

&lt;p&gt;Typical uses would be one-time data exports/imports, data transformation, batch operations or ad-hoc system maintenance.&lt;/p&gt;

&lt;h2 id=&quot;how-does-it-work&quot;&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;Say you have a maintenance job packaged as a jar file. You can simply run it on your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prod&lt;/code&gt; environment as follows:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run my-maintenance-job-1.0.jar &lt;strong&gt;-app.type=one-off&lt;/strong&gt; -env=prod&lt;/pre&gt;

&lt;p&gt;This will launch an AWS instance in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prod&lt;/code&gt; with environment with your job running. Once the main method terminates
or the application exits with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;System.exit()&lt;/code&gt; the instance will automatically shut down and AWS will stop charging you
for it.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;Support for &lt;strong&gt;one-off&lt;/strong&gt; apps is available today at no additional charge on all paid CloudCaptain plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/hyperv</id>
    <link type="text/html" rel="alternate" href="/blog/hyperv"/>
    <title>Hello Hyper-V!</title>
    <published>2017-06-28T00:00:00+00:00</published>
    <updated>2017-06-28T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;CloudCaptain lets you test your images rapidly and with great fidelity by allowing you to run them unchanged both locally and
on AWS. To run your images locally CloudCaptain supports VirtualBox. It’s easy to install and it’s available for Windows,
macOS and Linux.&lt;/p&gt;

&lt;p&gt;Windows 10 Pro however already ships with its own built-in hypervisor: Hyper-V. This is a great feature. It is however
only available on the Pro edition of Windows 10 (Home edition is not supported)
Not only that, but once it is active no other hypervisors are allowed to run. This effectively means you need to disable Hyper-V (and reboot your machine)
every time you want to use VirtualBox.&lt;/p&gt;

&lt;p&gt;No more! Starting today, &lt;strong&gt;CloudCaptain now also comes with first-class &lt;a href=&quot;/docs/hyperv&quot;&gt;Hyper-V support&lt;/a&gt; on Windows 10 Pro&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/hyperv.png&quot; alt=&quot;Hyper-V&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;how-it-works&quot;&gt;How it works&lt;/h3&gt;

&lt;p&gt;When running on Windows, by default CloudCaptain will autodetect whether you are using Windows 10 Pro and whether Hyper-V is
active. If that’s the case, CloudCaptain will automatically select Hyper-V for running instances in the local dev environment.&lt;/p&gt;

&lt;p&gt;Otherwise it will simply use VirtualBox as it always has.&lt;/p&gt;

&lt;p&gt;You can also explicitly influence this behavior by setting the new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;platform&lt;/code&gt; configuration property to either
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hyperv&lt;/code&gt; to force Hyper-V usage or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;virtualbox&lt;/code&gt; to force VirtualBox usage.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain support for &lt;strong&gt;Hyper-V&lt;/strong&gt; is available today for all Windows 10 Pro users. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running locally on Hyper-V in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/tags</id>
    <link type="text/html" rel="alternate" href="/blog/tags"/>
    <title>Add Custom Tags to your AWS Resources</title>
    <published>2017-06-09T00:00:00+00:00</published>
    <updated>2017-06-09T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;AWS lets you associate useful metadata with your provisioned resources in the form of tags. By default CloudCaptain uses
this to consistently tag your AMIs, EBS snapshots, EBS volumes, ELBs, Instances, Auto Scaling Groups, 
Launch Configurations, RDS databases, RDS snapshots and more.&lt;/p&gt;

&lt;p&gt;CloudCaptain does so using a combination of the following tags:&lt;/p&gt;

&lt;table class=&quot;table table-striped&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;AWS Tag Name&lt;/th&gt;
      &lt;th&gt;Description&lt;/th&gt;
      &lt;th&gt;Example&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;boxfuse:env&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;The CloudCaptain &lt;a href=&quot;/docs/environments&quot;&gt;environment&lt;/a&gt;&lt;/td&gt;
      &lt;td&gt;prod&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;boxfuse:app&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;The CloudCaptain application&lt;/td&gt;
      &lt;td&gt;myuser/myapp&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;boxfuse:image&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;The CloudCaptain image&lt;/td&gt;
      &lt;td&gt;myuser/myapp:1.2.3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Name&lt;/code&gt;&lt;/td&gt;
      &lt;td&gt;(For EC2 instances only) The CloudCaptain image and environment&lt;/td&gt;
      &lt;td&gt;boxfuse myuser/myapp:1.2.3@prod&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;introducing-dead-easy-custom-tags&quot;&gt;Introducing Dead-Easy Custom Tags&lt;/h2&gt;

&lt;p&gt;In addition to the standard tags automatically created by CloudCaptain you can now also specify one or more &lt;strong&gt;custom tags&lt;/strong&gt;
that should be applied to all created AWS resources that CloudCaptain creates.&lt;/p&gt;

&lt;h3 id=&quot;typical-uses&quot;&gt;Typical Uses&lt;/h3&gt;

&lt;p&gt;Being able to add custom tags is particularly useful in a number of scenarios:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cost allocation in your monthly AWS bill&lt;/li&gt;
  &lt;li&gt;Creating Resource Groups in the AWS Console&lt;/li&gt;
  &lt;li&gt;Automatic use of spot instances with &lt;a href=&quot;https://github.com/cristim/autospotting&quot;&gt;AutoSpotting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And much more!&lt;/p&gt;

&lt;h3 id=&quot;how-it-works&quot;&gt;How it works&lt;/h3&gt;

&lt;p&gt;For each app in each environment you can now define a set of custom tags that should be added in addition to the
existing CloudCaptain ones. To achieve this you can either use the CloudCaptain Console:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/tags/tags.png&quot; alt=&quot;AWS Console&quot; class=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Or if you prefer you can also simply use the CloudCaptain client:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse cfg myapp -env=prod &lt;strong&gt;-tags.&lt;/strong&gt;team=frontend-dev &lt;strong&gt;-tags.&lt;/strong&gt;spot-enabled=true&lt;/pre&gt;

&lt;p&gt;And that’s it! All new AWS resources CloudCaptain now provisions in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prod&lt;/code&gt; environment for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;myapp&lt;/code&gt; will now receive these
two custom tags in additional to the standard CloudCaptain ones.&lt;/p&gt;

&lt;h2 id=&quot;available-today&quot;&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain support for &lt;strong&gt;custom tags&lt;/strong&gt; is available today at no additional charge on all paid plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven’t already,
&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it’s free),
start deploying your application effortlessly to AWS today and have it running with custom tags in minutes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/tls-ssl-certificates</id>
    <link type="text/html" rel="alternate" href="/blog/tls-ssl-certificates"/>
    <title>Automatic TLS (SSL) Certificates</title>
    <published>2017-04-26T00:00:00+00:00</published>
    <updated>2017-04-26T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;This month CloudCaptain turned 2 and it&apos;s come a long way since &lt;a href=&quot;/blog/welcome&quot;&gt;its humble beginnings&lt;/a&gt;! In
fact only since &lt;a href=&quot;/blog/one-year&quot;&gt;last year&apos;s anniversary&lt;/a&gt; we have added a lot of major new features including
&lt;a href=&quot;/blog/oracle-jre&quot;&gt;custom JREs&lt;/a&gt;, &lt;a href=&quot;/blog/oracle-jre&quot;&gt;kernel tuning&lt;/a&gt;, &lt;a href=&quot;/blog/live-reloading&quot;&gt;live reloading&lt;/a&gt;,
    &lt;a href=&quot;/blog/worker&quot;&gt;worker apps&lt;/a&gt;, &lt;a href=&quot;/blog/go-aws&quot;&gt;Go and Revel support&lt;/a&gt;, &lt;a href=&quot;/blog/newrelic&quot;&gt;New Relic integration&lt;/a&gt;,
    &lt;a href=&quot;/blog/cloudwatch-logs&quot;&gt;CloudWatch Logs integration&lt;/a&gt;, &lt;a href=&quot;/blog/linux-x64&quot;&gt;generic Linux x64 apps&lt;/a&gt;,
    &lt;a href=&quot;/blog/custom-domains&quot;&gt;custom domains&lt;/a&gt; and &lt;a href=&quot;/blog/custom-elasticips&quot;&gt;custom Elastic IPs&lt;/a&gt;.
    And that&apos;s of course on top of the countless minor features and polish which have been integrated in the
    &lt;a href=&quot;/docs/releasenotes&quot;&gt;62 CloudCaptain Client updates&lt;/a&gt; released in the past year alone!&lt;/p&gt;

&lt;p&gt;Today we are kicking of CloudCaptain&apos;s third year with a very highly requested new feature: &lt;strong&gt;automatic TLS (SSL) certificate
    management&lt;/strong&gt; and renewal.&lt;/p&gt;

&lt;h2&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;Load balanced apps using a &lt;a href=&quot;/blog/custom-domains&quot;&gt;custom domains&lt;/a&gt; can now be configured to automatically
expose themselves via HTTPS with a TLS (SSL) certificate issued by the AWS Certificate Manager.&lt;/p&gt;

&lt;p&gt;CloudCaptain configures the ELB to terminate the client-facing TLS connection with a valid TLS certificate and
    forward the request to your backend instances using TLS connection with a self-signed certificate.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;screenshot&quot; width=&quot;300&quot; src=&quot;/assets/posts/tls-ssl-certificates/http-green-lock.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;Once set up, the &lt;strong&gt;certificates auto-renew&lt;/strong&gt; before they expire without any action required on your behalf.
    This ensures clients always see a green lock in the browser while at the same time always ensuring all data in motion
    travels encrypted.&lt;/p&gt;

&lt;h2&gt;Seeing it in action&lt;/h2&gt;

&lt;p&gt;Let&apos;s see what this looks like in action. For this post, we&apos;re going to deploy a Spring Boot application with HTTPS at
&lt;code&gt;boot.boxfuse-example.com&lt;/code&gt;, which will be a new subdomain of the &lt;code&gt;boxfuse-example.com&lt;/code&gt; domain which we own.&lt;/p&gt;

&lt;h2&gt;Obtaining our certificate&lt;/h2&gt;

&lt;p&gt;First, let&apos;s get the certificate part out of the way. To do so we&apos;re going to the
    &lt;a href=&quot;https://eu-central-1.console.aws.amazon.com/acm/home?region=eu-central-1#/&quot;&gt;AWS Certificate Manager&lt;/a&gt; page
    of the AWS Console and we request a wildcard certificate for our domain:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;max-width-image screenshot&quot; src=&quot;/assets/posts/tls-ssl-certificates/acm-request.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;Once we have received the email from AWS requesting us to confirm our ownership of the domain for the certificate,
    we click on the approval link:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;max-width-image screenshot&quot; src=&quot;/assets/posts/tls-ssl-certificates/acm-email.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;Our wildcard certificate is now ready to use.&lt;/p&gt;

&lt;h2&gt;Creating the app&lt;/h2&gt;

&lt;p&gt;We now need a basic Spring Boot app to deploy. For this we&apos;re going to generate one with the
    &lt;a href=&quot;https://start.spring.io&quot;&gt;Spring Initializr&lt;/a&gt; and add a basic controller. To do this, we simply follow the
    steps described in our &lt;a href=&quot;/getstarted/springboot&quot;&gt;Spring Boot getting started guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once that is done, we go ahead and build it:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; mvnw package&lt;/pre&gt;

&lt;h2&gt;Running our application&lt;/h2&gt;
&lt;p&gt;All we need to do now is run our application on AWS using our new subdomain (which will be auto-created) and
    our freshly created wildcard certificate. To do so we make sure the &lt;code&gt;app.type&lt;/code&gt;, &lt;code&gt;tls.type&lt;/code&gt;
    and &lt;code&gt;domain&lt;/code&gt; parameters are set correctly:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run &lt;strong&gt;-app.type=load-balanced -tls.type=acm -domain=boot.boxfuse-example.com&lt;/strong&gt; -env=prod

Creating getstarted-springboot ...
&lt;strong class=&quot;success&quot;&gt;Successfully created app getstarted-springboot (type: load-balanced, tls: acm, db: none, logs: cloudwatch-logs)&lt;/strong&gt;
Fusing Image for getstarted-springboot-1.0.jar (Spring Boot) ...
Image fused in 00:03.320s (59689 K) -&gt; axelfontaine/getstarted-springboot:1.0
Pushing axelfontaine/getstarted-springboot:1.0 ...
Verifying axelfontaine/getstarted-springboot:1.0 ...
Waiting for AWS to create an encrypted AMI for axelfontaine/getstarted-springboot:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:28.047s in eu-central-1 -&gt; ami-161cc079
Creating security group boxsg-axelfontaine-prod-getstarted-springboot ...
Creating Log Stream boxfuse/prod &gt; axelfontaine/getstarted-springboot ...
Found certificate for boot.boxfuse-example.com =&gt; arn:aws:acm:eu-central-1:103037756454:certificate/5ba59f97-5447-4b91-bb81-fa5729d80331
Creating Elastic Load Balancer for getstarted-springboot in prod ...
Creating security group boxsg-axelfontaine-prod-getstarted-springboot-1.0 ...
Creating Launch Configuration boxlc-axelfontaine-prod-getstarted-springboot-1.0 ...
Creating Auto Scaling Group boxasg-axelfontaine-prod-getstarted-springboot-1.0 ...
Waiting for Auto Scaling Group boxasg-axelfontaine-prod-getstarted-springboot-1.0 to launch 1 t2.micro Instance ...
Auto Scaling Group: i-050ff206b0370cefe [Pending]
Auto Scaling Group: i-050ff206b0370cefe [InService]
Waiting for ELB to put instances in service ...
ELB: i-050ff206b0370cefe [OutOfService] =&gt; Instance is in pending state.
ELB: i-050ff206b0370cefe [OutOfService] =&gt; Instance registration is still in progress.
ELB: i-050ff206b0370cefe [InService]
&lt;strong class=&quot;success&quot;&gt;Successfully running axelfontaine/getstarted-springboot:1.0 in prod at https://boot.boxfuse-example.com/&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;And here is our app up and running with a valid TLS (SSL) certificate and a green lock in the browser:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;max-width-image screenshot&quot; src=&quot;/assets/posts/tls-ssl-certificates/browser.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;And that&apos;s it! CloudCaptain automatically created and configured the AMI, the security groups, the Elastic Load Balancer,
    the CloudWatch Logs stream, the Auto-Scaling group and the instances and everything is fully set up and secure.
    And best of all, our &lt;strong&gt;TLS (SSL) certificate will be automatically renewed&lt;/strong&gt; and updated before it expires without any
    action required on our behalf.&lt;/p&gt;

&lt;h2&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain support for &lt;strong&gt;automatic TLS (SSL) certificate management and renewal&lt;/strong&gt; for
    &lt;code&gt;load-balanced&lt;/code&gt; apps with custom domains is available today at no additional charge on all paid plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free), start deploying
    your application effortlessly to AWS today and have it running online with SSL in minutes.
&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/custom-elasticips</id>
    <link type="text/html" rel="alternate" href="/blog/custom-elasticips"/>
    <title>Custom Elastic IPs</title>
    <published>2017-03-02T00:00:00+00:00</published>
    <updated>2017-03-02T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;When you need your application to have a unique public IP address that doesn&apos;t change over time, CloudCaptain lets you
    create your application as &lt;code&gt;single-instance&lt;/code&gt; to ensure it will always be deployed behind the same
    &lt;strong&gt;AWS Elastic IP&lt;/strong&gt; at runtime.&lt;/p&gt;

&lt;p&gt;Until now, CloudCaptain has always automatically provisioned that Elastic IP address (along with all other AWS resources) for you.
This is extremely convenient and by far the best choice for the vast majority of the &lt;code&gt;single-instance&lt;/code&gt; applications.&lt;/p&gt;

&lt;p&gt;There are however a number of cases where this falls short. The most common one is being able to know the exact IP address
in advance to ensure the necessary firewall or security group rules have been set up correctly. This is especially relevant when
 an application doesn&apos;t need to be up 24/7. So far killing an application meant terminating all related AWS resources,
    including the Elastic IP. When running it again the application would get the same &lt;code&gt;boxfuse.io&lt;/code&gt;
    or &lt;a href=&quot;/blog/custom-domains&quot;&gt;custom domain&lt;/a&gt;, however a new Elastic IP would be created and the DNS A record
    would then point at that one instead.&lt;/p&gt;

&lt;p&gt;Today we are introducing support for &lt;strong&gt;custom Elastic IPs&lt;/strong&gt; for &lt;code&gt;single-instance&lt;/code&gt; apps to fix this.&lt;/p&gt;

&lt;h2&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;First of all, ensure you have allocated the Elastic IP you need either via the AWS Console or some other client.&lt;/p&gt;

&lt;p&gt;From here on things couldn&apos;t be easier. Simply go to your application in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Console&lt;/a&gt;
and configure it for the environment you want:&lt;/p&gt;

&lt;img class=&quot;blog-post-image screenshot&quot; src=&quot;/assets/img/custom-elasticips.png&quot;&gt;

&lt;p&gt;And now simply select the Elastic IP of your choice from the list and your app will be deployed  behind it.&lt;/p&gt;

&lt;p&gt;Needless to say, once deployed the &lt;code&gt;boxfuse.io&lt;/code&gt; or &lt;a href=&quot;/blog/custom-domains&quot;&gt;custom domain&lt;/a&gt; will also point directly at that Elastic IP.&lt;/p&gt;

&lt;h2&gt;Using the CloudCaptain Client&lt;/h2&gt;

&lt;p&gt;If you prefer to use the CloudCaptain Client instead, you can simply specify the Elastic IP as follows:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run -env=prod &lt;strong&gt;-elasticip=&lt;/strong&gt;35.157.139.99&lt;/pre&gt;

&lt;p&gt;And for &lt;strong&gt;infrastructure as code&lt;/strong&gt; simply place it in your &lt;code&gt;boxfuse.conf&lt;/code&gt; file
    which you can check in to version control along with your sources:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;elasticip=35.157.139.99&lt;/pre&gt;

&lt;h2&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain support for &lt;strong&gt;custom Elastic IPs&lt;/strong&gt; for &lt;code&gt;single-instance&lt;/code&gt; apps is available today
    at no additional charge on all paid plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free), start deploying
    your application effortlessly to AWS today and have it running online under the Elastic IP of your choice in minutes.
&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/custom-domains</id>
    <link type="text/html" rel="alternate" href="/blog/custom-domains"/>
    <title>Custom Domains</title>
    <published>2017-02-24T00:00:00+00:00</published>
    <updated>2017-02-24T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;To get your JVM, Node.js or Go application up and running quickly and effortlessly on AWS all you need to do is type&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run -env=prod&lt;/pre&gt;

&lt;p&gt;This will provision all necessary resources, deploy your application and make it available under a brand new
    &lt;code&gt;boxfuse.io&lt;/code&gt; subdomain like &lt;code&gt;myapp-mygreatcompany.boxfuse.io&lt;/code&gt;. But wouldn&apos;t it be great
if you could make it available under &lt;code&gt;myapp.com&lt;/code&gt; or &lt;code&gt;myapp.mygreatcompany.com&lt;/code&gt; instead?&lt;/p&gt;

&lt;p&gt;Until now this meant manually creating a new CNAME record in your DNS that would point to your boxfuse.io subdomain
    which in turn would point to the underlying AWS resource.&lt;/p&gt;

&lt;p&gt;No more. Today we are introducing dead easy first-class support for &lt;strong&gt;custom domains&lt;/strong&gt; using AWS Route 53.&lt;/p&gt;

&lt;h2&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;First of all, ensure you have registered your domain using Route 53 or that you are using Route 53 for managing your domain&apos;s DNS.&lt;/p&gt;

&lt;p&gt;From here on things couldn&apos;t be easier. Simply go to your application in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Console&lt;/a&gt;
and configure it for the environment you want:&lt;/p&gt;

&lt;img class=&quot;blog-post-image screenshot&quot; src=&quot;/assets/img/custom-domain.png&quot;&gt;

&lt;p&gt;And now simply select the domain of your choice from the list and your app will be deployed at &lt;code&gt;mygreatcompany.com&lt;/code&gt;.
    And if you want to use a new subdomain that&apos;s easy too. Simply type the name of the subdomain in the textbox and voila!
    Your app will be deployed at &lt;code&gt;myapp.mygreatcompany.com&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;Those domains now point directly at the underlying AWS Elastic IP or Elastic Load Balancer.&lt;/p&gt;

&lt;h2&gt;Using the CloudCaptain Client&lt;/h2&gt;

&lt;p&gt;If you prefer to use the CloudCaptain Client instead, you can simply specify the domain as follows:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run -env=prod &lt;strong&gt;-domain=myapp.mygreatcompany.com&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;And if you lean towards &lt;strong&gt;infrastructure as code&lt;/strong&gt; simply place it in your &lt;code&gt;boxfuse.conf&lt;/code&gt; file
    which you can check in to version control along with your sources:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;domain=myapp.mygreatcompany.com&lt;/pre&gt;

&lt;h2&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain built-in support for &lt;strong&gt;custom domains&lt;/strong&gt; using AWS Route 53 is available today
    at no additional charge on all paid plans. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free), start deploying
    your application effortlessly to AWS today and have it running online under your own custom domain in minutes.
&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/jvm-native-bin-libs</id>
    <link type="text/html" rel="alternate" href="/blog/jvm-native-bin-libs"/>
    <title>Shipping native Linux x64 binaries and libs with JVM apps</title>
    <published>2017-01-24T00:00:00+00:00</published>
    <updated>2017-01-24T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;While CloudCaptain makes it dead easy to run your JVM applications (&lt;a href=&quot;/blog/spring-boot-ec2&quot;&gt;Spring Boot&lt;/a&gt;,
    &lt;a href=&quot;/getstarted/jhipster&quot;&gt;JHipster&lt;/a&gt;, &lt;a href=&quot;/blog/grails-aws&quot;&gt;Grails&lt;/a&gt;,
    &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;Dropwizard&lt;/a&gt;, &lt;a href=&quot;/docs/payloads/tomcat&quot;&gt;Tomcat&lt;/a&gt;,
    &lt;a href=&quot;/blog/javaee-aws&quot;&gt;TomEE&lt;/a&gt; or &lt;a href=&quot;/getstarted/jar&quot;&gt;executable jar&lt;/a&gt;)
    on AWS, sometimes those applications also depend on other native Linux x64 binaries and libs. Typically these would
    be native applications for audio, video or image processing, but they could be anything.&lt;/p&gt;

&lt;p&gt;Until now this meant
    writing some custom code to manually extract those binaries to the filesystem, giving them execute permissions and
    so on. Not exactly complicated. But certainly more complicated than things could and should be.&lt;/p&gt;

&lt;p&gt;No more. Today we are introducing dead easy built-in support for &lt;strong&gt;shipping native Linux x64 binaries with your JVM apps&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;Simply place your binaries under a special &lt;code&gt;native/bin&lt;/code&gt; directory and CloudCaptain
    will automatically add them to the &lt;code&gt;PATH&lt;/code&gt; at runtime in your instances.&lt;/p&gt;

&lt;p&gt;If those binaries also depend on additional shared libraries beyond the C library, place the .so files of your libraries
    under &lt;code&gt;native/lib&lt;/code&gt; and CloudCaptain
    will automatically add them to the &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt; at runtime in your instances.&lt;/p&gt;

&lt;p&gt;And that&apos;s all!&lt;/p&gt;

&lt;h2&gt;Seeing in action&lt;/h2&gt;

&lt;p&gt;For this post, we&apos;re going to build a remote version of the Linux &lt;code&gt;cowsay&lt;/code&gt; utility using &lt;a href=&quot;/blog/spring-boot-ec2&quot;&gt;Spring Boot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First let&apos;s start by taking the sources of this &lt;a href=&quot;https://github.com/shkschneider/c_unix/blob/master/cowsay.c&quot;&gt;simple c port of cowsay&lt;/a&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;#include &amp;lt;stdio.h&amp;gt;

int main(int argc, char **argv)
{
  int i;

  if (argc == 1)
    printf(&quot;&lt; moOh &gt;\n&quot;);
  for (i = 1; i &lt; argc; i++)
    if (i == 1)
      printf(&quot;/ %s \\\n&quot;, argv[i]);
    else if (i == argc - 1)
      printf(&quot;\\ %s /\n&quot;, argv[i]);
    else
      printf(&quot;| %s |\n&quot;, argv[i]);
  printf(&quot;  \\ ^__^\n&quot;);
  printf(&quot;    (oo)\\_______\n&quot;);
  printf(&quot;    (__)\\       )\\/\\\n&quot;);
  printf(&quot;        ||----w |\n&quot;);
  printf(&quot;        ||     ||\n&quot;);
  return (0);
}&lt;/pre&gt;

&lt;p&gt;and compiling them into a native Linux x64 binary:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;$ &lt;/span&gt;gcc -Wall -g cowsay.c -o cowsay.elf64&lt;/pre&gt;

&lt;p&gt;Now let&apos;s create a simple Spring Boot app to expose this:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;$ &lt;/span&gt;curl &apos;https://start.spring.io/starter.zip?type=maven-project&amp;bootVersion=1.4.3.RELEASE&amp;baseDir=remote-cowsay&amp;groupId=com.boxfuse.demo&amp;artifactId=remote-cowsay&amp;version=1.0&amp;name=remote-cowsay&amp;description=Remote+cowsay&amp;packageName=com.boxfuse.demo&amp;packaging=jar&amp;javaVersion=1.8&amp;language=java&amp;autocomplete=&amp;generate-project=&amp;style=web&apos; -o remote-cowsay.zip &amp;&amp; unzip remote-cowsay.zip&lt;/pre&gt;

&lt;p&gt;Next add our freshly compiled &lt;code&gt;cowsay.elf64&lt;/code&gt; Linux x64 binary to our project under the &lt;code&gt;src/main/resources/native/bin&lt;/code&gt;
    directory to ensure it will be added to the &lt;code&gt;PATH&lt;/code&gt; at runtime:&lt;/p&gt;

&lt;pre class=&quot;filetree&quot;&gt;&lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; remote-cowsay
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; src
    &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; main
      &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; java
        &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; com
          &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; boxfuse
            &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; demo
              &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; RemoteCowsayApplication.java
        &lt;span&gt;&lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; native
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; bin
    &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; cowsay.elf64&lt;/span&gt;
    &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; test
  &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; .mvn
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; .gitignore
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; mvnw
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; mvnw.cmd
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; pom.xml&lt;/pre&gt;

&lt;p&gt;And finally let&apos;s add a controller to our &lt;code&gt;RemoteCowsayApplication&lt;/code&gt; class:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;package com.boxfuse.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

@SpringBootApplication
@RestController
public class RemoteCowsayApplication {
    @RequestMapping(path = &quot;/&quot;)
    public String cowsay(@RequestParam(value = &quot;t&quot;, defaultValue = &quot;Moo&quot;) String text) throws IOException {
        return FileCopyUtils.copyToString(new InputStreamReader(
            // No need to specify absolute path as binary is available on $PATH
            new ProcessBuilder(&quot;cowsay.elf64&quot;, text).start().getInputStream(),
            StandardCharsets.UTF_8));
    }

    public static void main(String[] args) {
        SpringApplication.run(RemoteCowsayApplication.class, args);
    }
}&lt;/pre&gt;

&lt;p&gt;Now it is time to package our jar:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;$ &lt;/span&gt;mvnw package&lt;/pre&gt;

&lt;p&gt;And let CloudCaptain create an image and launch an instance on VirtualBox:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;$ &lt;/span&gt;boxfuse run

Creating remote-cowsay ...
Mapping remotecowsay-dev-axelfontaine.boxfuse.io to 127.0.0.1 ...
&lt;strong class=&quot;success&quot;&gt;Successfully created app remote-cowsay (type: single-instance, db: none, logs: cloudwatch-logs)&lt;/strong&gt;
Fusing Image for remote-cowsay-1.0.jar (Spring Boot) ...
Image fused in 00:03.320s (58621 K) -&gt; axelfontaine/remote-cowsay:1.0
Launching Instance of axelfontaine/remote-cowsay:1.0 on VirtualBox ...
Forwarding http port localhost:8080 -&gt; vb-f3f3a0a4:8080
Instance launched in 00:04.597s -&gt; vb-f3f3a0a4
Waiting for payload to start on vb-f3f3a0a4:8080 (expecting HTTP 200 at / within 300s) ...
&lt;strong class=&quot;success&quot;&gt;Successfully started payload in 00:12.134s -&gt; https://127.0.0.1:8080&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;Last but not least, let&apos;s see it in action!&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;$ &lt;/span&gt;curl https://localhost:8080?t=Moooooohh
/ Moooooohh \
  \ ^__^
    (oo)\_______
    (__)\       )\/\
        ||----w |
        ||     ||&lt;/pre&gt;

&lt;p&gt;And there you have it! Our native Linux x64 binary was automatically added to the &lt;code&gt;PATH&lt;/code&gt; with the correct
execute permissions. And all we needed to do to invoke it was a simple one-liner.&lt;/p&gt;

&lt;h2&gt;Available today&lt;/h2&gt;

&lt;p&gt;The CloudCaptain built-in support for &lt;strong&gt;shipping native Linux x64 binaries with your JVM apps&lt;/strong&gt; is
available today at no charge to all customers. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free), start deploying
    your application effortlessly to AWS today and enjoy the dead easy integration for shipping native binaries.
&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/logback-log4j2-appender</id>
    <link type="text/html" rel="alternate" href="/blog/logback-log4j2-appender"/>
    <title>Logback and Log4J2 appender for AWS CloudWatch Logs</title>
    <published>2016-12-09T00:00:00+00:00</published>
    <updated>2016-12-09T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Logging is one of the major diagnostic tools we have at our disposal for identifying issues with our applications.
    Traditionally logging consistent of writing lines of text to a file on the local filesystem. This creates a bunch of
    issues. Not only does one now have to start hunting through various backend servers to see which one actually
    processed the request we were looking for. Without forgetting of course that multiple requests from the same session
    may land on different backend instances. But much more severe is the fact that in a cloud world any persistent data
    on an instance dies together with the instance. And in the case of auto-scaling we don&apos;t even actively control anymore
    when certain instances are terminated.&lt;/p&gt;

&lt;p&gt;To remedy this we need to look at a new solution: &lt;strong&gt;centralized logging&lt;/strong&gt;. All logs get sent to a central service
    where they are aggregated, stored, and made searchable. AWS offers its own service for this called &lt;strong&gt;CloudWatch Logs&lt;/strong&gt;.&lt;/p&gt;

&lt;img class=&quot;blog-post-image&quot; src=&quot;/assets/img/cloudwatch-logs-appender.png&quot;&gt;

&lt;p&gt;We first &lt;strong&gt;&lt;a href=&quot;/blog/cloudwatch-logs&quot;&gt;added support for it in October&lt;/a&gt;&lt;/strong&gt;, by letting you create applications and indicate that you want your logs
    sent to CloudWatch Logs. Images of those applications &lt;strong&gt;automatically redirect both stdout and stderr&lt;/strong&gt; using the
    &lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-agent&quot;&gt;open-source CloudCaptain CloudWatch Logs agent&lt;/a&gt; to the CloudWatch Logs LogStream of the application within the CloudWatch Logs
    LogGroup for the current environment. So if you haven&apos;t already, pause here and read that article first.&lt;/p&gt;

&lt;p class=&quot;center&quot;&gt;
&lt;img class=&quot;blog-post-image&quot; src=&quot;/assets/img/logback.jpg&quot; style=&quot;padding-right: 30px&quot;&gt;
&lt;img class=&quot;blog-post-image&quot; src=&quot;/assets/img/log4j2.png&quot;&gt;
&lt;/p&gt;

&lt;p&gt;Today we are taking things further for JVM apps by offering you a brand-new &lt;strong&gt;&lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-java-appender&quot;&gt;open-source appender for both Logback and Log4J&lt;/a&gt;&lt;/strong&gt;.
    This gives you much more fined-grained control by &lt;strong&gt;integrating natively into your preferred logging framework&lt;/strong&gt; and letting you
    configure exactly how you want to route your logs.&lt;/p&gt;

&lt;h2&gt;Installation&lt;/h2&gt;

&lt;p&gt;To include the &lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-java-appender&quot;&gt;CloudCaptain Java log appender for AWS CloudWatch Logs&lt;/a&gt;
    in your application all you need to do is include the dependency in your build file.&lt;/p&gt;

&lt;h3&gt;Maven&lt;/h3&gt;

&lt;p&gt;Start by adding the CloudCaptain Maven repository to your list of repositories in your &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;repositories&amp;gt;
    &amp;lt;repository&amp;gt;
        &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;
        &amp;lt;url&amp;gt;https://repo1.maven.org/maven2/&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
    &amp;lt;repository&amp;gt;
        &amp;lt;id&amp;gt;boxfuse-repo&amp;lt;/id&amp;gt;
        &amp;lt;url&amp;gt;https://files.cloudcaptain.sh&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
&amp;lt;/repositories&amp;gt;&lt;/pre&gt;

&lt;p&gt;Then add the dependency:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.boxfuse.cloudwatchlogs&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;cloudwatchlogs-java-appender&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0.2.17&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;

&lt;h3&gt;Gradle&lt;/h3&gt;

&lt;p&gt;Start by adding the CloudCaptain Maven repository to your list of repositories in your &lt;code&gt;build.gradle&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;repositories {
    mavenCentral()
    maven {
        url &quot;https://files.cloudcaptain.sh&quot;
    }
}&lt;/pre&gt;

&lt;p&gt;Then add the dependency:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;dependencies {
    compile &apos;com.boxfuse.cloudwatchlogs:cloudwatchlogs-java-appender:1.0.2.17&apos;
}&lt;/pre&gt;

&lt;h2&gt;Usage&lt;/h2&gt;

&lt;p&gt;To use the appender you must add it to the configuration of your logging system.&lt;/p&gt;

&lt;h3&gt;Logback&lt;/h3&gt;

&lt;p&gt;Add the appender to your &lt;code&gt;logback.xml&lt;/code&gt; file at the root of your classpath. In a Maven or Gradle project you can find it under &lt;code&gt;src/main/resources&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;configuration&amp;gt;
    &amp;lt;appender name=&quot;CloudCaptain-CloudwatchLogs&quot; class=&quot;com.boxfuse.cloudwatchlogs.logback.CloudwatchLogsLogbackAppender&quot;/&amp;gt;

    &amp;lt;root level=&quot;debug&quot;&amp;gt;
        &amp;lt;appender-ref ref=&quot;CloudCaptain-CloudwatchLogs&quot; /&amp;gt;
    &amp;lt;/root&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;

&lt;h3&gt;Log4J2&lt;/h3&gt;

&lt;p&gt;Add the appender to your &lt;code&gt;log4j2.xml&lt;/code&gt; file at the root of your classpath. In a Maven or Gradle project you can find it under &lt;code&gt;src/main/resources&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
    &amp;lt;Configuration packages=&quot;com.boxfuse.cloudwatchlogs.log4j2&quot;&amp;gt;
    &amp;lt;Appenders&amp;gt;
        &amp;lt;CloudCaptain-CloudwatchLogs/&amp;gt;
    &amp;lt;/Appenders&amp;gt;
    &amp;lt;Loggers&amp;gt;
        &amp;lt;Root level=&quot;debug&quot;&amp;gt;
            &amp;lt;AppenderRef ref=&quot;CloudCaptain-CloudwatchLogs&quot;/&amp;gt;
        &amp;lt;/Root&amp;gt;
    &amp;lt;/Loggers&amp;gt;
&amp;lt;/Configuration&amp;gt;&lt;/pre&gt;

&lt;h3&gt;Code&lt;/h3&gt;

&lt;p&gt;And that&apos;s all the setup you need! You can now start using it from code as you normally would using either SLF4J or the api of your choice.&lt;/p&gt;

&lt;p&gt;Logging a message like this:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;private static final Logger LOGGER = LoggerFactory.getLogger(MyClazz.class);
...
LOGGER.info(&quot;My log message ...&quot;);&lt;/pre&gt;

&lt;p&gt;will now automatically sent it to CloudWatch Logs in structured form as a JSON document. The CloudCaptain CloudWatch Logs
    appender automatically adds critical metadata to the document as well so that it looks like this:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;{
    &quot;image&quot;: &quot;myuser/myapp:123&quot;,
    &quot;instance&quot;: &quot;i-607b5ddc&quot;,
    &quot;level&quot;: &quot;INFO&quot;,
    &quot;logger&quot;: &quot;org.mycompany.myapp.MyClazz&quot;,
    &quot;message&quot;: &quot;My log message ...&quot;,
    &quot;thread&quot;: &quot;main&quot;
}&lt;/pre&gt;

&lt;p&gt;This is very useful as this will allow us to query and filter the logs later.&lt;/p&gt;

&lt;p&gt;Note that these are just the attributes sent automatically. You also have the possibility to fill in many other ones
    (such as current user, session id, request id, ...) via the MDC as described in the &lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-java-appender&quot;&gt;docs of the GitHub project&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Displaying the Logs&lt;/h2&gt;

&lt;p&gt;To display the logs simply open a new terminal and show the logs for your app in your desired environment:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs myapp -env=prod&lt;/pre&gt;

&lt;h3&gt;Live tailing&lt;/h3&gt;

&lt;p&gt;And if you want to follow along in real time you can use log tailing:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs myapp -env=prod &lt;strong&gt;-logs.tail&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;And new logs will now automatically be displayed as soon as they are sent from the application to CloudWatch Logs.&lt;/p&gt;

&lt;h3&gt;Log filtering&lt;/h3&gt;

&lt;p&gt;This however can produce a lot of output. To aid finding the needle in the haystack, CloudCaptain also supports powerful
    &lt;strong&gt;&lt;a href=&quot;https://cloudcaptain.sh/docs/commandline/logs#logs.filter&quot;&gt;log filtering&lt;/a&gt;&lt;/strong&gt;, both on existing logs as well as during live tailing of a log stream.&lt;/p&gt;

&lt;p&gt;You can make use of the attributes of the structured logs to filter them exactly the way you like. For example,
    to tail the logs live on the prod environment on AWS and only show the logs for a specific instance all you need to do is:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs myapp -env=prod -logs.tail &lt;strong&gt;-logs.filter.instance=&lt;/strong&gt;i-607b5ddc&lt;/pre&gt;

&lt;p&gt;And if you aren&apos;t quite sure what you are looking for you can also simply filter by time. For example to show all the logs created in the last minute (60 seconds) you could do:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs myapp -env=prod -logs.tail &lt;strong&gt;-logs.filter.start=&lt;/strong&gt;-60&lt;/pre&gt;

&lt;p&gt;This is a very powerful feature and there are &lt;strong&gt;many more filters which can all be combined&lt;/strong&gt;. You can find all the details in the
    &lt;strong&gt;&lt;a href=&quot;https://cloudcaptain.sh/docs/commandline/logs#logs.filter&quot;&gt;documentation&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;Available today&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;&lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-java-appender&quot;&gt;CloudCaptain Logback and Log4J2 Appender for CloudWatch Logs&lt;/a&gt;&lt;/strong&gt; is available today. It is fully open-source (Apache 2.0 license)
    and you can browse the sources as well as read the detailed documentation on the &lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-java-appender&quot;&gt;GitHub project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This feature is available at no charge to all customers.&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free), start deploying
    your application effortlessly to AWS today and enjoy the power of centralized logging, live tailing and filtering.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/linux-x64</id>
    <link type="text/html" rel="alternate" href="/blog/linux-x64"/>
    <title>Deploy any Linux x64 app on AWS with one command</title>
    <published>2016-11-16T00:00:00+00:00</published>
    <updated>2016-11-16T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;CloudCaptain is all about effortlessly deploying your applications so they just work. This is made possible by a combination of intelligent minimal image creating
    using deep integration with popular frameworks and language runtimes as well as seamless orchestration of blue/green deployments on AWS.&lt;/p&gt;

&lt;p&gt;There are however a number of languages and frameworks we don&apos;t specifically support yet. So far this meant that if you weren&apos;t
    using the &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;JVM&lt;/a&gt;, &lt;a href=&quot;/docs/payloads/nodejs&quot;&gt;Node.js&lt;/a&gt; or &lt;a href=&quot;/docs/payloads/elf64&quot;&gt;Go&lt;/a&gt; you were out of luck.&lt;/p&gt;

&lt;p&gt;Today we are introducing &lt;strong&gt;generic Linux x64 apps support&lt;/strong&gt;. You can now deploy any Linux x64 app you like
    and enjoy CloudCaptain&apos;s great AWS integration including &lt;a href=&quot;/blog/amis-in-30-seconds&quot;&gt;ultra-fast AMI creation&lt;/a&gt;,
    blue/green deployment, &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt; and more.&lt;/p&gt;

&lt;img src=&quot;/assets/posts/linux-x64/linux-x64-aws.png&quot;&gt;

&lt;h2&gt;Seeing it in action&lt;/h2&gt;
&lt;p&gt;Let&apos;s dive in and look at how you can deploy any Linux x64 app using CloudCaptain.&lt;/p&gt;

&lt;p&gt;To demonstrate this we are going to run Nginx on AWS. To do so we&apos;ll need two things:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;a tar.gz file containing the app we want to run (in this case Nginx)&lt;/li&gt;
    &lt;li&gt;the command required to start the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this demo we&apos;ll use a Linux x64 build of Nginx available from this &lt;a href=&quot;https://github.com/micw/nginx-static-1.5.x&quot;&gt;page on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To fuse an image and run it on AWS all we need to do is pass the command to start it and which port to open:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 95%&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run nginx-static-1.5.tgz &quot;-cmd=nginx-static/sbin/nginx -g &apos;daemon off; user root;&apos;&quot; -ports.http=80

Creating nginx-static ...
Mapping nginxstatic-dev-myuser.boxfuse.io to 127.0.0.1 ...
Created app nginx-static (type: single-instance, db: none, logs: none)
Fusing Image for nginx-static-1.5.tgz (Linux x64) ...
Image fused in 00:00.707s (10522 K) -&gt; myuser/nginx-static:1.5
Pushing myuser/nginx-static:1.5 ...
Verifying myuser/nginx-static:1.5 ...
Waiting for AWS to create an AMI for myuser/nginx-static:1.5 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:26.849s in eu-central-1 -&gt; ami-d2dc19bd
Creating security group boxsg-myuser-prod-nginx-static ...
Creating Elastic IP ...
Mapping nginxstatic-myuser.boxfuse.io to 35.156.101.145 ...
Creating security group boxsg-myuser-prod-nginx-static-1.5 ...
Launching t2.micro instance of myuser/nginx-static:1.5 (ami-d2dc19bd) in prod (eu-central-1) ...
Instance launched in 00:24.478s -&gt; i-8f39a332
Creating Cloud Watch Alarm for Instance auto-recovery -&gt; i-8f39a332-auto-recovery-alarm
Waiting for AWS to boot Instance i-8f39a332 and Payload to start at https://54.93.62.223/ ...
Payload started in 00:00.003s -&gt; https://54.93.62.223/
Associating Elastic IP 35.156.101.145 to i-8f39a332 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
&lt;strong class=&quot;success&quot;&gt;Successfully deployed myuser/nginx-static:1.5 in prod at https://nginxstatic-myuser.boxfuse.io/&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;And here we go! We created a &lt;strong&gt;10 MB image&lt;/strong&gt; containing a boot loader, the Linux kernel and Nginx in &lt;strong&gt;0.7 seconds&lt;/strong&gt;.
CloudCaptain then &lt;strong&gt;deployed it on AWS by creating all necessary infrastructure&lt;/strong&gt; including a custom domain name,
    an elastic IP, security groups, an AMI, a t2.micro instance and more in &lt;strong&gt;under 60 seconds&lt;/strong&gt; total.&lt;/p&gt;

&lt;p&gt;And here it is up and running:&lt;/p&gt;

&lt;img src=&quot;/assets/img/getstarted/linux-x64-aws.png&quot; class=&quot;screenshot&quot;&gt;

&lt;p&gt;All of this in under one minute from start to finish with just a single command. And best of all, all subsequent
    updates will always be performed using &lt;a href=&quot;/learn/how&quot;&gt;zero downtime blue/green deployments&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;CloudCaptain now let&apos;s you &lt;strong&gt;deploy any Linux x64 app you want&lt;/strong&gt; with the same orchestration features already
    available to JVM, Node.js and Go apps including &lt;a href=&quot;/blog/amis-in-30-seconds&quot;&gt;ultra-fast AMI creation&lt;/a&gt;,
    blue/green deployment, &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt; and more.&lt;/p&gt;

&lt;p&gt;Simply package your app as a tar.gz, pass the command required to start it and CloudCaptain will get you up and running on AWS in no time.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href=&quot;/docs/payloads/linux-x64&quot;&gt;documentation&lt;/a&gt; and if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
    any Linux x64 application effortlessly to AWS today.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/newrelic</id>
    <link type="text/html" rel="alternate" href="/blog/newrelic"/>
    <title>Monitoring with New Relic</title>
    <published>2016-10-24T00:00:00+00:00</published>
    <updated>2016-10-24T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Application and server monitoring provide invaluable insights into the health and availability of your apps. Today
we are introducing &lt;strong&gt;first-class support for &lt;strong&gt;&lt;a href=&quot;https://newrelic.com&quot;&gt;New Relic&lt;/a&gt;&lt;/strong&gt;&lt;/strong&gt;
    with automatic installation and configuration of both the New Relic Servers Linux x64 agent and the New Relic Java agent.&lt;/p&gt;

&lt;h2&gt;Server Monitoring&lt;/h2&gt;
&lt;p&gt;New Relic&apos;s free server monitoring provides you with in-depth monitoring of CPU usage, load average,
    physical memory, disk I/O, network I/O and processes.&lt;/p&gt;

&lt;img src=&quot;/assets/img/newrelic-server.png&quot; class=&quot;screenshot&quot;&gt;

&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;To enable this for your app, simply pass in your New Relic license key when fusing an image:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse fuse &lt;strong&gt;-newrelic.licensekey=&lt;/strong&gt;0123456789abcdef0123456789abcdef01234567&lt;/pre&gt;

&lt;p&gt;CloudCaptain will then automatically install the &lt;strong&gt;New Relic Servers Linux x64 agent&lt;/strong&gt; and configure it to start reporting to your New Relic account.&lt;/p&gt;

&lt;h2&gt;Application Monitoring (JVM apps only)&lt;/h2&gt;

&lt;p&gt;To provide you even deeper insights, New Relic also comes with monitoring at the application level with detailed analysis
    of transactions, throughput, database queries and much more. Additionally you can also define alerts to get notified
of performance degradations and availability issues with your app.&lt;/p&gt;

&lt;img src=&quot;/assets/img/newrelic-app.png&quot; class=&quot;screenshot&quot;&gt;

&lt;h3&gt;Installation&lt;/h3&gt;

&lt;p&gt;For JVM apps, when supplying your New Relic license key as described above, CloudCaptain will also automatically
    install and configure the &lt;strong&gt;New Relic Java agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The application will then begin reporting to New Relic as &lt;code&gt;myapp (myenv)&lt;/code&gt;.
    In case of an application named &lt;code&gt;hello&lt;/code&gt; deployed in the &lt;code&gt;prod&lt;/code&gt; &lt;a href=&quot;/docs/environments&quot;&gt;environment&lt;/a&gt;
    this would then be &lt;code&gt;hello (prod)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Alternatively you can also supply a &lt;code&gt;newrelic.yml&lt;/code&gt; configuration file for the Java agent and CloudCaptain will
    automatically use that instead. CloudCaptain will then install the agent for you, but won&apos;t override any application name you may have configured.
    If you haven&apos;t configured a New Relic license key as described above, CloudCaptain will use
    the license key contained in your &lt;code&gt;newrelic.yml&lt;/code&gt; configuration file instead.&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;CloudCaptain now has &lt;strong&gt;first-class support for New Relic&lt;/strong&gt;. This provides you with a robust and in-depth monitoring
service for both your instances and the apps running on them.&lt;/p&gt;

&lt;p&gt;All you need to do is literally pass your New Relic license key when fusing an image and the necessary New Relic Servers Linux x64
and New Relic Java agents will be automatically installed and configured for you.&lt;/p&gt;

&lt;p&gt;This new feature is available at no charge to all CloudCaptain users.&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
    your applications effortlessly to AWS in minutes and enjoy the great in-depth monitoring with New Relic.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/cloudwatch-logs</id>
    <link type="text/html" rel="alternate" href="/blog/cloudwatch-logs"/>
    <title>Introducing AWS CloudWatch Logs support with Live Tailing</title>
    <published>2016-10-07T00:00:00+00:00</published>
    <updated>2016-10-07T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Logging provides critically important visibility into the inner workings
    of our applications and offers a great way to perform both live and post-mortem analysis of interactions with our
    systems.&lt;/p&gt;

&lt;p&gt;To be able to enjoy those benefits effectively a logging solution must possess a number of important qualities including
    &lt;em&gt;durability&lt;/em&gt;, &lt;em&gt;security&lt;/em&gt;, &lt;em&gt;availability&lt;/em&gt;, &lt;em&gt;searchability&lt;/em&gt; and &lt;em&gt;speed&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We must also distinguish between two important &lt;a href=&quot;/blog/logging-cloudnative&quot;&gt;types of logs&lt;/a&gt;: &lt;em&gt;instance
    boot logs&lt;/em&gt; and &lt;em&gt;application logs&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instance boot logs&lt;/strong&gt; collect information from the earliest stages of instance startup (bootloader and
    kernel boot) all the way to the point where the application is fully configured and ready to start shipping log events
    to the logging service of our choice.
    This makes instance boot logs great for identifying early environment-specific
    network and application configuration issues that may prevent an application from coming up correctly and start logging them in the first place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Application logs&lt;/strong&gt; are all the logs produced by our application from that point on.&lt;/p&gt;

&lt;p&gt;For the latter CloudCaptain provided no out-of-the-box solution until now and you had to rely on external solutions to fill that gap.
    Today we are &lt;strong&gt;introducing first class AWS CloudWatch Logs integration&lt;/strong&gt; to close this gap.&lt;/p&gt;

&lt;img class=&quot;blog-post-image&quot; src=&quot;/assets/img/cloudwatch-logs.png&quot;&gt;

&lt;p&gt;So without further ado, let&apos;s dive in and look at it in more detail!&lt;/p&gt;

&lt;h2&gt;Centralized Logging&lt;/h2&gt;

&lt;p&gt;In a modern microservices and cloud architecture, a single client request can end up traversing multiple services.
    Each of those
    services is then &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaled&lt;/a&gt; across a number of machines to have the appropriate
    capacity to handle the current load at all times.&lt;/p&gt;

&lt;p&gt;This has a number of serious implications:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;If more than one service is triggered by the request, more than one machine will produce logs related to that
        request.
    &lt;/li&gt;
    &lt;li&gt;The exact machine which will handle that specific request for each service is determined in real time by
        the load-balancer and not known in advance.
    &lt;/li&gt;
    &lt;li&gt;A machine which may have handled requests a few minutes ago, may now be terminated due to a change in load of
        the system having triggered a scale-in activity.
    &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Additionally in the world of &lt;a href=&quot;/getstarted/why&quot;&gt;immutable infrastructure&lt;/a&gt; and &lt;a href=&quot;/getstarted/how&quot;&gt;minimal
    images&lt;/a&gt; there
    is a strong focus on security and the principle of least privilege, which also means there is &lt;a
            href=&quot;/blog/no-ssh&quot;&gt;no SSH&lt;/a&gt; on board of the running instances.&lt;/p&gt;

&lt;p&gt;These realities effectively mean that application logs cannot be stored on the instance itself. Instead they must be
    shipped to a
    &lt;strong&gt;centralized logging service&lt;/strong&gt; where they can then be securely stored and made available.&lt;/p&gt;

&lt;p&gt;This is a great solution as it allows us to centrally enforce, enable and control a number of things.&lt;/p&gt;

&lt;h3&gt;Durability&lt;/h3&gt;

&lt;p&gt;Logs must be retained for the time required to perform useful analysis on them. Their value often decreases sharply
    over time. This stands
    in stark contrast to the space they occupy and the cost associated with it. It is therefore crucial to choose an
    appropriate
    &lt;strong&gt;retention period&lt;/strong&gt; to strike the right balance between storage cost and historical usefulness.&lt;/p&gt;

&lt;p&gt;The other important aspect of having a centralized logging service is &lt;strong&gt;enabling logs to outlive the machines
    that produced them&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;Security&lt;/h3&gt;

&lt;p&gt;It is often forgotten that logs usually contain a lot of sensitive information. It crucial that the protection of
    this information be held to
    the same standards as the information present in our other systems. This means there is a shared responsibility
    here.
    On the one hand it is the responsibility of the centralized logging service to provide strong &lt;strong&gt;access
        controls&lt;/strong&gt;.
    On the other hand, it is also your responsibility to carefully evaluate whether certain kinds of information maybe
    shouldn&apos;t be
    &lt;strong&gt;obfuscated or left out&lt;/strong&gt; of the logs in the first place.&lt;/p&gt;

&lt;h3&gt;Availability&lt;/h3&gt;

&lt;p&gt;Since a load-balancer may send a request to any instance of a service and that service may in turn call many other
    services,
    a centralized logging services is a life-saver for actually finding the logs related to that request. No more
    searching for a needle
    in a haystack. Instead all the logs are &lt;strong&gt;available from one central place&lt;/strong&gt;. Equally important here of
    course is the
    fact that due to auto-scaling events some of
    the machines which have produced logs may be long gone by the time someone is ready to analyse them.&lt;/p&gt;

&lt;h3&gt;Searchability&lt;/h3&gt;

&lt;p&gt;A centralized logging service makes it trivial to &lt;strong&gt;search all logs in one go&lt;/strong&gt;. This includes all the
    logs produced by
    all instances
    of all services within an &lt;a href=&quot;/docs/environments&quot;&gt;environment&lt;/a&gt;. This makes it possible to easily obtain all
    the logs
    for things like:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;a single request across services&lt;/li&gt;
    &lt;li&gt;all sessions for a single user across one or more services&lt;/li&gt;
    &lt;li&gt;all instances of an application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And many more!&lt;/p&gt;

&lt;h3&gt;Speed&lt;/h3&gt;
&lt;p&gt;Of course to be usable a centralized logging service must also come with logging agents installed on the clients that
    produce
    as little runtime performance overhead as possible. For this it is essential that the sending of logs events to the
    service be
    &lt;strong&gt;asynchronous&lt;/strong&gt; and &lt;strong&gt;non-blocking&lt;/strong&gt; to the regular request processing flow. In a lot of
    cases today the network
    is actually very reliable and fast. Smart batching in memory virtually eliminates the need for on-disk buffering
    which is often slower than sending the events directly over network as the disks often aren&apos;t local anyway!&lt;/p&gt;

&lt;h2&gt;AWS CloudWatch Logs&lt;/h2&gt;

&lt;p&gt;So far in order to use a centralized logging service with CloudCaptain one had to rely on an external service like Loggly,
Logentries or Papertrail, or set up their own ELK stack. AWS however also has their own service for this called
    &lt;strong&gt;CloudWatch Logs&lt;/strong&gt; and CloudCaptain now has first class support for it!&lt;/p&gt;

&lt;p&gt;At its core CloudWatch Logs is an API for ingesting and querying log events. It revolves around three simple concepts:
&lt;em&gt;Log Groups&lt;/em&gt;, &lt;em&gt;Log Streams&lt;/em&gt; and &lt;em&gt;Log Events&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;Log Events&lt;/h3&gt;

&lt;p&gt;Log events are the actual log messages produced by your application. To be able to send those to CloudWatch Logs you
need some kind of client to talk to the CloudWatch Logs API. By default AWS provides an agent to take care of that. It is
unfortunately written in Python and comes with a long string of dependencies. In other words, it simply isn&apos;t a good
fit for CloudCaptain&apos;s &lt;a href=&quot;/getstarted/how&quot;&gt;minimal images&lt;/a&gt;, so we had to come up with a better solution! More about this in a minute...&lt;/p&gt;

&lt;h3&gt;Log Streams&lt;/h3&gt;

&lt;p&gt;Log streams are the destination where log events get sent to and can be queried from.&lt;/p&gt;

&lt;p&gt;With CloudCaptain, &lt;strong&gt;each application deployment within an environment receives its own log stream&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;Log Groups&lt;/h3&gt;

&lt;p&gt;Log groups contain one or more log streams. Streams physically belong to a log group. Log events can also be queried
across multiple streams at once at the log group level. And log event retention can also be configured for an entire group at once.&lt;/p&gt;

&lt;p&gt;With CloudCaptain, &lt;strong&gt;each environment receives its own log group&lt;/strong&gt;, containing all the logs streams of the applications deployed within that environment.&lt;/p&gt;

&lt;h2&gt;Seeing it in action&lt;/h2&gt;

&lt;p&gt;So let&apos;s see how this works in practice!&lt;/p&gt;

&lt;h3&gt;Creating an app with AWS CloudWatch Logs support&lt;/h3&gt;

&lt;p&gt;The first step is to create a new application configured for CloudWatch Logs:&lt;/p&gt;

&lt;img class=&quot;blog-post-image screenshot&quot; src=&quot;/assets/posts/cloudwatch-logs/create.png&quot;&gt;

&lt;p&gt;We could also have done the same by using the CloudCaptain Client by creating an app with &lt;a href=&quot;/docs/commandline/create#logs.type&quot;&gt;&lt;code&gt;logs.type&lt;/code&gt;&lt;/a&gt; set to &lt;code&gt;cloudwatch-logs&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse create hello &lt;strong&gt;-logs.type=cloudwatch-logs&lt;/strong&gt;&lt;/pre&gt;

&lt;h3&gt;Fusing an image (including automatic agent installation and configuration)&lt;/h3&gt;

&lt;p&gt;As mentioned above, to be able to send events to AWS CloudWatch Logs a client is needed to talk to the API and unfortunately the official AWS agent doesn&apos;t cut it.&lt;/p&gt;

&lt;p&gt;We are therefore today releasing a new &lt;strong&gt;&lt;a href=&quot;https://github.com/boxfuse/cloudwatchlogs-agent&quot;&gt;open-source CloudWatch Logs agent&lt;/a&gt;&lt;/strong&gt; written in Go that is optimized to work within CloudCaptain instances.&lt;/p&gt;

&lt;p&gt;It has a very small footprint (3 MB) and is designed to asynchronously redirect stdout and stderr output of an application to CloudWatch Logs.&lt;/p&gt;

&lt;p&gt;Now let&apos;s fuse an image of our app:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse fuse hello.war&lt;/pre&gt;

&lt;p&gt;This will &lt;strong&gt;automatically install both our application and the CloudWatch Logs agent&lt;/strong&gt;. Two copies of the agent will be running. One to redirect stdout output of the application to CloudWatch logs as &lt;code&gt;INFO&lt;/code&gt;
log events and the other to do the same for stderr output as &lt;code&gt;ERROR&lt;/code&gt; log events.&lt;/p&gt;

&lt;h3&gt;Running an instance on VirtualBox&lt;/h3&gt;

&lt;p&gt;If we now run an instance of our application on VirtualBox using&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run hello:1.0&lt;/pre&gt;

&lt;p&gt;CloudCaptain will also automatically launch a &lt;strong&gt;local CloudWatch Logs mock&lt;/strong&gt; which will be ready to ingest log events as soon as the application starts sending them.&lt;/p&gt;

&lt;h3&gt;Running it on AWS&lt;/h3&gt;

&lt;p&gt;If we launch an instance on AWS with&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run hello:1.0 -env=prod

...
Creating Log Group boxfuse/prod ...
Creating Log Stream boxfuse/prod &gt; myuser/hello ...
...&lt;/pre&gt;

&lt;p&gt;You&apos;ll notice that both a Log Group for the CloudCaptain &lt;code&gt;prod&lt;/code&gt; environment as well as a Log Stream for the &lt;code&gt;myuser/hello&lt;/code&gt; app were created.
    The latter which the CloudCaptain CloudWatch Logs agent installed on your instance will now start sending log events to.
Any stdout and stderr console output produced by our application will now be redirected to that log stream.&lt;/p&gt;

&lt;h3&gt;Retrieving the log events&lt;/h3&gt;

&lt;p&gt;To view the log events produced by our application all we need to do is&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs hello -env=prod&lt;/pre&gt;

&lt;p&gt;And you&apos;ll see the logs appearing in your terminal.&lt;/p&gt;

&lt;h2&gt;Live Tailing&lt;/h2&gt;

&lt;p&gt;But sometimes however it is also immensely useful to be able to follow logs in real time. And we are happy to announce
that you can now do so both on VirtualBox and on AWS by simply appending &lt;code&gt;-logs.tail&lt;/code&gt; to our prevent command:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse logs hello -env=prod &lt;strong&gt;-logs.tail&lt;/strong&gt;&lt;/pre&gt;

&lt;p&gt;Any new logs produced by your application will now immediately be shown on your machine for as long as the CloudCaptain Client
    is running. We have optimized things so that logs are &lt;strong&gt;delivered directly from AWS to your local machine&lt;/strong&gt;,
bypassing all CloudCaptain infrastructure.&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;CloudCaptain now has &lt;strong&gt;first-class support for AWS CloudWatch Logs&lt;/strong&gt;. This gives you access to a centralized logging service which comes with
    durability, security, availability, searchability and speed.&lt;/p&gt;

&lt;p&gt;With apps created to take advantage of this, your images are automatically fused with our brand new &lt;strong&gt;open-source CloudWatch Logs agent&lt;/strong&gt;
    which is fully configured to redirect both stdout and stderr to AWS CloudWatch Logs.&lt;/p&gt;

&lt;p&gt;CloudCaptain also automatically starts a &lt;strong&gt;local CloudWatch Logs mock&lt;/strong&gt; to provide you with the same experience when running on VirtualBox.&lt;/p&gt;

&lt;p&gt;And last but not least you now have easy access to your logs, including &lt;strong&gt;live tailing&lt;/strong&gt; for both VirtualBox and AWS.&lt;/p&gt;

&lt;p&gt;This new feature is available at no charge to all CloudCaptain users.&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
    your applications effortlessly to AWS in minutes and enjoy the great integration with CloudWatch Logs from the start.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/go-aws</id>
    <link type="text/html" rel="alternate" href="/blog/go-aws"/>
    <title>Deploy 7 MB Go VMs effortlessly to AWS</title>
    <published>2016-08-09T00:00:00+00:00</published>
    <updated>2016-08-09T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Go is a highly productive language with a broad ecosystem for developing modern applications and
    microservices. It has the unique advantage of combining a great standard library with garbage collection
    and fast compilation down to a single native binary.
&lt;/p&gt;

&lt;p&gt;Today we&apos;re going to look at &lt;strong&gt;deploying Go applications effortlessly to AWS&lt;/strong&gt;
    using &lt;strong&gt;&lt;a href=&quot;/blog/welcome&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;div class=&quot;blog-post-image center&quot;&gt;
    &lt;img src=&quot;/assets/posts/go-aws/go-aws.png&quot; alt=&quot;Go App deployed to AWS using CloudCaptain&quot; style=&quot;height: 300px&quot;&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt; is based upon 3 core principles:&lt;/p&gt;
&lt;table class=&quot;table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;1.&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;
            &lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;
        &lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;Creating servers and never modifying them again by treating a server as one immutable
            unit that is regenerated after every change and promoted unchanged from environment to environment.
            This eliminates drift and increases reliability by ensuring you run the exact same code in production as
            the code you tested in test.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;2.&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;Analysing your application and generating minimal tailor-made Linux-based images on the fly that
            are 100x smaller than a typical Linux system and take just seconds to produce.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;3.&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Blue/Green deployments&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Deploying a new version of an app in parallel to the existing one and only making the switch at the elastic
            IP
            or elastic load balancer level once the configured health checks of the new version have passed. Deployments
            are fully
            automated and effectively transactional, providing you with zero-downtime updates.
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;h2&gt;The plan&lt;/h2&gt;
&lt;p&gt;To see this in action, our plan is to first &lt;strong&gt;create a new Go web app&lt;/strong&gt; which we&apos;ll &lt;strong&gt;fuse into a minimal CloudCaptain
    image&lt;/strong&gt; that can be deployed unchanged both on VirtualBox and AWS.&lt;/p&gt;

&lt;p&gt;We&apos;ll then &lt;strong&gt;deploy our image to VirtualBox&lt;/strong&gt; (great for rapid feedback and quick local tests),
    push it to the CloudCaptain Vault (our secure online repository) and &lt;strong&gt;run it on AWS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And finally we&apos;ll &lt;strong&gt;update it on AWS with zero-downtime&lt;/strong&gt; blue/green deployments.&lt;/p&gt;

&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before we begin, ensure you have successfully:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;created a &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Account&lt;/a&gt;&lt;/strong&gt; (simply log in with your
        GitHub account, it&apos;s free)
    &lt;/li&gt;
    &lt;li&gt;downloaded and installed the latest &lt;strong&gt;&lt;a href=&quot;/getstarted/download&quot;&gt;CloudCaptain Client&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
    &lt;li&gt;downloaded and installed the latest version of &lt;strong&gt;&lt;a href=&quot;https://golang.org/dl/&quot;&gt;Go&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
    &lt;li&gt;downloaded and installed the latest version of &lt;strong&gt;&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox&lt;/a&gt;&lt;/strong&gt;
    &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Creating the Go application&lt;/h2&gt;

&lt;p&gt;In this tutorial we are going to create and deploy a simple Go application.&lt;/p&gt;

&lt;p&gt;Start by creating a directory for our app:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; mkdir getstarted-go&lt;/pre&gt;

&lt;p&gt;And navigate to it:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; cd getstarted-go&lt;/pre&gt;

&lt;p&gt;Now create a file called &lt;code&gt;main.go&lt;/code&gt; with the following contents:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;package main

import (
    &quot;fmt&quot;
    &quot;net/http&quot;
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, &quot;Hi there, I love CloudCaptain!&quot;)
}

func main() {
    http.HandleFunc(&quot;/&quot;, handler)
    http.ListenAndServe(&quot;:8080&quot;, nil)
}&lt;/pre&gt;

&lt;p&gt;Now let&apos;s make sure we are compiling for Linux x64. If you are on Linux already, you can safely skip this step.&lt;/p&gt;

&lt;p&gt;Windows users should invoke:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; set GOOS=linux&lt;/pre&gt;

&lt;p&gt;And Mac OSX users should invoke:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; export GOOS=linux&lt;/pre&gt;

&lt;p&gt;Now go ahead and compile the app into a single executable:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; go build -ldflags=&quot;-s&quot;&lt;/pre&gt;

&lt;h2&gt;Fusing a CloudCaptain image and running it locally on VirtualBox&lt;/h2&gt;

&lt;p&gt;Now it&apos;s time to fuse your application into a CloudCaptain image and launch an instance of it on VirtualBox:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; boxfuse run -ports.http=8080 -image=getstarted-go:1.0

Creating getstarted-go ...
Mapping getstartedgo-dev-myuser.boxfuse.io to 127.0.0.1 ...
Created App getstarted-go (single-instance / none)
Fusing Image for getstarted-go (ELF64) ...
Image fused in 00:00.517s (7170 K) -&gt; myuser/getstarted-go:1.0
Launching Instance of myuser/getstarted-go:1.0 on VirtualBox ...
Forwarding http port localhost:8080 -&gt; vb-f6dba4e5:8080
Instance launched in 00:03.055s -&gt; vb-f6dba4e5
Waiting for Payload to start on vb-f6dba4e5:8080 (expecting HTTP 200 at / within 300s) ...
Payload started in 00:00.009s -&gt; https://127.0.0.1:8080&lt;/pre&gt;

&lt;p&gt;In just a few seconds CloudCaptain found your application, detected its type,
    generated an image for it and launched an instance of that image on VirtualBox.&lt;/p&gt;

&lt;p&gt;Now open your browser and navigate to this address to see your new application up and running within the VirtualBox
    VM:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/go-virtualbox.png&quot;&gt;

&lt;p&gt;You can also see your newly created image:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 90%&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; boxfuse ls

Images available locally:
+--------------------------+---------------+-------+---------+--------------+--------+---------------------+
| Image                    |    Payload    | Debug | Runtime |    Ports     |  Size  |    Generated at     |
+--------------------------+---------------+-------+---------+--------------+--------+---------------------+
| myuser/getstarted-go:1.0 | getstarted-go | false | ELF64   | http -&gt; 8080 | 7170 K | 2016-08-08 19:38:56 |
+--------------------------+---------------+-------+---------+--------------+--------+---------------------+
Total: 1&lt;/pre&gt;

&lt;p&gt;As well as the instance that is running:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; boxfuse ps

Running Instances on VirtualBox in the dev environment :
+-------------+--------------------------+---------------------+-----------------------+---------------------+
|  Instance   |          Image           |        Type         |          URL          |     Launched at     |
+-------------+--------------------------+---------------------+-----------------------+---------------------+
| vb-f6dba4e5 | myuser/getstarted-go:1.0 | 4 CPU / 1024 MB RAM | https://127.0.0.1:8080 | 2016-08-08 19:38:59 |
+-------------+--------------------------+---------------------+-----------------------+---------------------+
Total: 1&lt;/pre&gt;

&lt;h2&gt;Deploying your application to AWS&lt;/h2&gt;

&lt;p&gt;Now let&apos;s deploy the image to AWS. As CloudCaptain works with your AWS account, it first needs the necessary permissions
    to do so.
    So if you haven&apos;t already done it, go to the CloudCaptain Console and &lt;strong&gt;&lt;a
            href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account&lt;/a&gt;&lt;/strong&gt; now.&lt;/p&gt;

&lt;p&gt;Every new CloudCaptain account comes with 3 environments: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;.
    &lt;code&gt;dev&lt;/code&gt; is your local VirtualBox environment and &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are on AWS.&lt;/p&gt;

&lt;p&gt;So let&apos;s deploy our application to the &lt;code&gt;prod&lt;/code&gt; environment on AWS:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; boxfuse run getstarted-go:1.0 -env=prod

Pushing myuser/getstarted-go:1.0 ...
Verifying myuser/getstarted-go:1.0 ...
Waiting for AWS to create an AMI for myuser/getstarted-go:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:29.835s in eu-central-1 -&gt; ami-9cf006f3
Creating Elastic IP ...
Mapping getstartedgo-myuser.boxfuse.io to 52.28.244.5 ...
Creating security group boxsg-myuser-prod-getstarted-go-1.0 ...
Launching t2.micro instance of myuser/getstarted-go:1.0 (ami-9cf006f3) in prod (eu-central-1) ...
Instance launched in 00:17.580s -&gt; i-921e9a2f
Creating Cloud Watch Alarm for Instance auto-recovery -&gt; i-921e9a2f-auto-recovery-alarm
Waiting for AWS to boot Instance i-921e9a2f and Payload to start at https://54.93.51.85:8080/ ...
Payload started in 00:28.022s -&gt; https://54.93.51.85:8080/
Remapping Elastic IP 52.28.244.5 to i-921e9a2f ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/getstarted-go:1.0 is up and running at https://getstartedgo-myuser.boxfuse.io:8080/&lt;/pre&gt;

&lt;p&gt;Notice that we have now specified an image, as we want to reuse our image unchanged instead fusing a new one.&lt;/p&gt;

&lt;p&gt;With that one command CloudCaptain has automatically pushed your image to the CloudCaptain Vault as well as provisioned,
    configured and secured all necessary AWS resources. There is no manual work necessary on your behalf.&lt;/p&gt;

&lt;p&gt;All you need to do is simply navigate to your new domain to see your Go application in action on AWS:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/go-aws.png&quot;&gt;

&lt;h2&gt;Bonus: update your application using blue/green deployments&lt;/h2&gt;

&lt;p&gt;Now let&apos;s take things one step further and deploy an update of your application with &lt;strong&gt;zero downtime&lt;/strong&gt;.
&lt;/p&gt;

&lt;p&gt;Start by modifying &lt;code&gt;main.go&lt;/code&gt; with a simple change:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;...
&lt;del&gt;fmt.Fprintf(w, &quot;Hi there, I love CloudCaptain!&quot;)&lt;/del&gt;
&lt;strong&gt;fmt.Fprintf(w, &quot;Updated by CloudCaptain with zero downtime!&quot;)&lt;/strong&gt;
...&lt;/pre&gt;

&lt;p&gt;Then rebuild the tgz:&lt;/p&gt;
&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; go build -ldflags=&quot;-s&quot;&lt;/pre&gt;

&lt;p&gt;Finally, deploy the new version of your application to AWS:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-go&amp;gt;&lt;/span&gt; boxfuse run -ports.http=8080 -env=prod -image=getstarted-go:2.0

Fusing Image for getstarted-go (ELF64) ...
Image fused in 00:00.541s (7170 K) -&gt; myuser/getstarted-go:2.0
Pushing myuser/getstarted-go:2.0 ...
Verifying myuser/getstarted-go:2.0 ...
Waiting for AWS to create an AMI for myuser/getstarted-go:2.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:14.649s in eu-central-1 -&gt; ami-ba8b7dd5
Creating security group boxsg-myuser-prod-getstarted-go-2.0 ...
Launching t2.micro instance of myuser/getstarted-go:2.0 (ami-ba8b7dd5) in prod (eu-central-1) ...
Instance launched in 00:19.492s -&gt; i-d91f9b64
Creating Cloud Watch Alarm for Instance auto-recovery -&gt; i-d91f9b64-auto-recovery-alarm
Waiting for AWS to boot Instance i-d91f9b64 and Payload to start at https://52.59.244.104:8080/ ...
Payload started in 00:30.181s -&gt; https://52.59.244.104:8080/
Remapping Elastic IP 52.28.244.5 to i-d91f9b64 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Destroying Cloud Watch Alarm i-921e9a2f-auto-recovery-alarm ...
Terminating instance i-921e9a2f ...
Destroying Security Group sg-dbc040b3 (boxsg-myuser-prod-getstarted-go-1.0) ...
Deployment completed successfully. myuser/getstarted-go:2.0 is up and running at https://getstartedgo-myuser.boxfuse.io:8080/&lt;/pre&gt;

&lt;p&gt;And there it is:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/go-aws-update.png&quot;&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;In this post, we saw how to &lt;strong&gt;deploy and update a Go application to AWS&lt;/strong&gt; using
    &lt;strong&gt;CloudCaptain&lt;/strong&gt; in 3 easy steps.&lt;/p&gt;

&lt;p&gt;First
    we fused our application into a &lt;strong&gt;7 MB CloudCaptain image&lt;/strong&gt; in &lt;strong&gt;under 1 second&lt;/strong&gt; and ran an
    instance of it on VirtualBox. We then
    deployed the same image unchanged to AWS. And finally we updated our application on AWS with zero downtime using
    blue/green deployments.&lt;/p&gt;

&lt;p&gt;To do so we used &lt;strong&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt; and its 3 core principles:
    &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;
        &lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;
    &lt;/strong&gt;&lt;/a&gt;,
    &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt; and
    &lt;strong&gt;Blue/Green deployments&lt;/strong&gt;.
&lt;/p&gt;

&lt;div class=&quot;blog-post-image center&quot;&gt;
    &lt;img src=&quot;/assets/posts/go-aws/go-aws.png&quot; alt=&quot;Go App deployed to AWS using CloudCaptain&quot; style=&quot;height: 300px&quot;&gt;
&lt;/div&gt;

&lt;p&gt;And if you are a &lt;strong&gt;Revel&lt;/strong&gt; fan, CloudCaptain has you covered with first-class support for &lt;a href=&quot;/getstarted/revel&quot;&gt;running Revel applications&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;However this is just the beginning! CloudCaptain also supports dead-easy
&lt;strong&gt;&lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href=&quot;/docs/databases&quot;&gt;database
auto-provisioning&lt;/a&gt;&lt;/strong&gt; and much more. Not only for Go apps, but also for Node.js and JVM ones.&lt;/p&gt;


&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
    your Go applications effortlessly to AWS in minutes.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/worker</id>
    <link type="text/html" rel="alternate" href="/blog/worker"/>
    <title>Worker Apps</title>
    <published>2016-08-04T00:00:00+00:00</published>
    <updated>2016-08-04T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Until now CloudCaptain came with support for two types of applications: &lt;code&gt;single-instance&lt;/code&gt; and &lt;code&gt;load-balanced&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;single-instance&lt;/code&gt; applications sit behind an Elastic IP address and are updated with zero-downtime
    blue/green deployments. Even though they lack runtime redundancy, they are great for non-critical workloads
    typically involving HTTP or HTTPS requests.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;load-balanced&lt;/code&gt; applications on the other hand sit behind an Elastic Load Balancer. Not only are they
also updated with zero-downtime blue/green deployments, but they also come with runtime-redundancy, zero-downtime auto-recovery
and auto-scaling. They are a great choice for robust and demanding HTTP and HTTPS workloads.&lt;/p&gt;

&lt;p&gt;While &lt;code&gt;single-instance&lt;/code&gt; and &lt;code&gt;load-balanced&lt;/code&gt; apps serve quite a lot of needs, there are times when
    you simply don&apos;t need a stable entry point in your application. For those scenarios having an extra Elastic IP or ELB
    simply adds unnecessary complexity and costs.&lt;/p&gt;

&lt;p&gt;To address this, today we are introducing a third kind of application: &lt;code&gt;worker&lt;/code&gt; apps.&lt;/p&gt;

&lt;img src=&quot;/assets/img/apptypes.png&quot;&gt;

&lt;h2&gt;Introducing Worker Apps&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;worker&lt;/code&gt; apps come with the same reliability advantages as &lt;code&gt;load-balanced&lt;/code&gt; apps. They
    are updated with zero-downtime blue/green deployments and they come with runtime-redundancy, zero-downtime auto-recovery
    and auto-scaling. However, they don&apos;t have an Elastic Load Balancer in front of them.&lt;/p&gt;

&lt;p&gt;Let&apos;s look at 3 scenarios where they are particularly useful.&lt;/p&gt;

&lt;h2&gt;Client-side load balancing&lt;/h2&gt;

&lt;p&gt;When Netflix decided to go all-in on AWS, it was still early days for the cloud. At that time ELBs could only be
internet facing, and simply weren&apos;t a great choice for internal communication between services like they are today.&lt;/p&gt;

&lt;p&gt;Those needs sparked the creation of a number of open-source tools to address them including &lt;a href=&quot;https://github.com/Netflix/eureka&quot;&gt;Eureka&lt;/a&gt;
and &lt;a href=&quot;https://github.com/Netflix/ribbon&quot;&gt;Ribbon&lt;/a&gt;. You can think of Eureka as a central place where
    instances services can register themselves with, so they can be discovered by clients. Ribbon is a library that you run
on the client that will then take care of load balancing calls between multiple instances of the same service that were discovered
    via Eureka.&lt;/p&gt;

&lt;img src=&quot;/assets/posts/worker/eureka.png&quot;&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To make it easier to run setups like the one above locally, we have also made changes to the way we handle networking
with VirtualBox. With VirtualBox 5.1 and newer all instances in the dev environment will now receive their own unique IP address
with a dedicated NAT network and will be able to talk directly to each other.&lt;/p&gt;

&lt;h2&gt;Queues&lt;/h2&gt;
&lt;p&gt;Another common scenario for &lt;code&gt;worker&lt;/code&gt; apps is queueing. In this case services communicate asynchronously with
each other via queues. These could be SQS queues or any other async solution. &lt;code&gt;worker&lt;/code&gt; apps can be great
message consumers and their autoscaling capabilities can be a great fit for dealing with varying loads.&lt;/p&gt;
&lt;img src=&quot;/assets/posts/worker/queue.png&quot;&gt;

&lt;h2&gt;Cron jobs&lt;/h2&gt;
&lt;p&gt;Finally we also have periodic tasks, or cron jobs, where the trigger is time based. Even if it is just a single instance
running, the auto-scaling group of a worker app will comes in handy to automatically restart a new one should the old one die.&lt;/p&gt;
&lt;img src=&quot;/assets/posts/worker/cron.png&quot;&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;worker&lt;/code&gt; apps, you now have a third kind of application available. Unlike &lt;code&gt;single-instance&lt;/code&gt;
    and &lt;code&gt;load-balanced&lt;/code&gt; apps they do not have an Elastic IP or ELB as an entry point as this is simply not needed
    for a number of scenarios including client-side load balancing, queue consumers and cron job-driven apps. In those
    cases &lt;code&gt;worker&lt;/code&gt; apps reduce both cost and complexity.&lt;/p&gt;

&lt;p&gt;So go ahead and launch a new &lt;code&gt;worker&lt;/code&gt; app today! And if you haven&apos;t signed up already, simply
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;log in with your GitHub id&lt;/a&gt; (it&apos;s free!) to start deploying
    your JVM and Node.js applications effortlessly on AWS in minutes!&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/spring-boot-devtools-aws</id>
    <link type="text/html" rel="alternate" href="/blog/spring-boot-devtools-aws"/>
    <title>Live Reloading of Spring Boot Apps on AWS with DevTools</title>
    <published>2016-07-22T00:00:00+00:00</published>
    <updated>2016-07-22T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;In this post we&apos;re going to take a look at one of Spring Boot&apos;s best kept secrets: the
    &lt;a href=&quot;https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html&quot;&gt;&lt;strong&gt;Spring Boot DevTools&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As great as it is to test things out on your local machine, there are also clear benefits to being able to both develop and debug your
    application in an environment that is as similar as possible to its production environment. And that&apos;s where the
    Spring Boot DevTools come in. They let you live reload and remote debug your application no matter where it is running.&lt;/p&gt;

&lt;p&gt;So let&apos;s dive in and see in 3 easy steps how you set up the Spring Boot DevTools in minutes to &lt;strong&gt;live reload a Spring Boot app fully automatically on AWS&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;How do the Spring Boot DevTools work?&lt;/h2&gt;

&lt;p&gt;You can think of the SpringBoot DevTools as a set of components focused on boosting developer productivity.&lt;/p&gt;

&lt;p&gt;They consist of 3 major parts:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;The &lt;strong&gt;RemoteApplication&lt;/strong&gt; runner that sends any changed class files and resources from your IDE to the running instance&lt;/li&gt;
    &lt;li&gt;The &lt;strong&gt;DevTools jar&lt;/strong&gt; inside your application that interacts with the RemoteApplication to live reload changes&lt;/li&gt;
    &lt;li&gt;A &lt;strong&gt;LiveReload Server&lt;/strong&gt; in your IDE that triggers the &lt;strong&gt;LiveReload browser plugin&lt;/strong&gt; to automatically reload the current page&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;/assets/posts/spring-boot-devtools-aws/livereload.png&quot; title=&quot;Live Reload&quot; alt=&quot;Live Reload&quot;&gt;&lt;/p&gt;

&lt;p&gt;Together they provide you with super fast way to iteratively develop your application while it is running in a production-like environment.&lt;/p&gt;

&lt;h2&gt;Step 0: Settings things up&lt;/h2&gt;

&lt;p&gt;In order to demonstrate how the DevTools work, we&apos;re going to need an application to work with. Let&apos;s create one in a few easy steps.&lt;/p&gt;

&lt;h3&gt;Generating the skeleton&lt;/h3&gt;

&lt;p&gt;First we&apos;ll need the basic project structure. Head to &lt;a href=&quot;https://start.spring.io&quot;&gt;start.spring.io&lt;/a&gt; and fill in the group and artifact id:&lt;/p&gt;

&lt;img src=&quot;/assets/posts/spring-boot-devtools-aws/spring-initializr.png&quot; title=&quot;Spring Initializr&quot; alt=&quot;Spring Initializr&quot;&gt;

&lt;p&gt;Then select both &lt;strong&gt;Web&lt;/strong&gt; and &lt;strong&gt;DevTools&lt;/strong&gt; dependencies and click &lt;em&gt;Generate Project&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;Adding a controller&lt;/h3&gt;

&lt;p&gt;For our application to do anything useful we&apos;ll need to add a controller.&lt;/p&gt;

&lt;p&gt;Now unpack the downloaded archive and add the Controller method and annotations to the &lt;code&gt;devtools-demo/src/main/java/demo/DevtoolsDemoApplication.java&lt;/code&gt; file:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;package demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@SpringBootApplication
@RestController
public class DevtoolsDemoApplication {
    @RequestMapping(method = RequestMethod.GET, path = &quot;/&quot;)
    @ResponseBody
    public String currentTime() {
        return &quot;The current time is &quot; + new Date();
    }

	public static void main(String[] args) {
		SpringApplication.run(DevtoolsDemoApplication.class, args);
	}
}&lt;/pre&gt;

&lt;p&gt;This is just a very simple controller that will print out the current time when it receives an HTTP GET request at &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Setting the remote secret&lt;/h3&gt;

&lt;p&gt;In order for your application to ensure only authorized users trigger live reloading you must also set the remote secret in &lt;code&gt;devtools-demo/src/main/resources/application.properties&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;spring.devtools.remote.secret=mysecret&lt;/pre&gt;

&lt;h3&gt;Building the application&lt;/h3&gt;

&lt;p&gt;Now that we have a controller and a secret set up, it is time to build the application.&lt;/p&gt;

&lt;p&gt;First set the version to &lt;code&gt;0.0.1&lt;/code&gt; in &lt;code&gt;devtools-demo/pom.xml&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt;&lt;/pre&gt;

&lt;p&gt;And ensure the Spring Boot Dev Tools are enabled in the final artifact by setting the &lt;code&gt;excludeDevtools&lt;/code&gt; flag of the Spring Boot Maven plugin to &lt;code&gt;false&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;excludeDevtools&amp;gt;false&amp;lt;/excludeDevtools&amp;gt;
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

&lt;p&gt;Then open a terminal window and navigate to the
    directory where you extracted the archive. Go inside the newly created &lt;code&gt;devtools-demo&lt;/code&gt; directory and
invoke Maven to create an executable jar:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;devtools-demo&amp;gt;&lt;/span&gt; mvnw package&lt;/pre&gt;

&lt;p&gt;After a few seconds you will then have a &lt;code&gt;devtools-demo-0.0.1.jar&lt;/code&gt; file inside the &lt;code&gt;target&lt;/code&gt; directory.&lt;/p&gt;

&lt;h2&gt;Step 1: Deploying the application to AWS&lt;/h2&gt;
&lt;p&gt;Now that we have things set up, it is time to deploy the application to AWS. Feel free to use the tool of your choice.&lt;/p&gt;

&lt;p&gt;If you choose to use &lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt; all you need to do is literally:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;devtools-demo&amp;gt;&lt;/span&gt; boxfuse run -env=test&lt;/pre&gt;

&lt;p&gt;And everything will be set up, configured and secured automatically for you:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 85%&quot;&gt;Creating devtools-demo ...
Mapping devtoolsdemo-dev-myuser.boxfuse.io to 127.0.0.1 ...
Created App devtools-demo (single-instance / none)
Fusing Image for devtools-demo-0.0.1.jar ...
Image fused in 00:04.168s (56336 K) -&gt; myuser/devtools-demo:0.0.1
Pushing myuser/devtools-demo:0.0.1 ...
Verifying myuser/devtools-demo:0.0.1 ...
Waiting for AWS to create an AMI for myuser/devtools-demo:0.0.1 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:31.724s in eu-central-1 -&gt; ami-ed936782
Creating Elastic IP ...
Mapping devtoolsdemo-myuser.boxfuse.io to 52.59.61.93 ...
Creating security group boxsg-myuser-devtools-demo-0.0.1 ...
Launching t2.micro instance of myuser/devtools-demo:0.0.1 (ami-ed936782) in prod (eu-central-1) ...
Instance launched in 00:24.954s -&gt; i-ed279f50
Creating Cloud Watch Alarm for Instance auto-recovery -&gt; i-ed279f50-auto-recovery-alarm
Waiting for AWS to boot Instance i-ed279f50 and Payload to start at https://52.59.240.195:8080/ ...
Payload started in 00:46.229s -&gt; https://52.59.240.195:8080/
Remapping Elastic IP 52.59.61.93 to i-ed279f50 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/devtools-demo:0.0.1 is up and running at https://devtoolsdemo-myuser.boxfuse.io:8080/&lt;/pre&gt;

&lt;p&gt;Make sure your application is up and running correctly on AWS:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/spring-boot-devtools-aws/running-on-aws.png&quot;&gt;

&lt;h2&gt;Step 2: Live reloading classes and resources&lt;/h2&gt;

&lt;p&gt;Now that everything is up and running, let&apos;s set up live reloading. As described in the diagram above there are two
    types of reloading we must set up for everything to work smoothly:&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;automatic reloading of classes and resources inside our AWS instance&lt;/li&gt;
    &lt;li&gt;automatic reloading of the page in the browser&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let&apos;s focus on reloading of classes and resources first:&lt;/p&gt;

&lt;img src=&quot;/assets/posts/spring-boot-devtools-aws/livereload-classes.png&quot;&gt;

&lt;p&gt;For reloading to be triggered whenever something changes in our IDE, we must start a local process to talk to our AWS instance.
While this sounds complicated, Spring Boot makes this absolutely trivial. Go to your IDE and create a new run configuration
for our &lt;code&gt;devtools-demo&lt;/code&gt; project. And now instead of running our application itself, we&apos;ll simply run
&lt;code&gt;org.springframework.boot.devtools.RemoteSpringApplication&lt;/code&gt; with one argument: the address where our application is deployed.&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/spring-boot-devtools-aws/remoteapplication.png&quot;&gt;

&lt;p&gt;(IntelliJ users can safely ignore the bogus &lt;em&gt;Run Configuration Error&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;You should now see the &lt;code&gt;RemoteApplication&lt;/code&gt; starting up and connecting with your instance:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 85%&quot;&gt;  .   ____          _                                              __ _ _
 /\\ / ___&apos;_ __ _ _(_)_ __  __ _          ___               _      \ \ \ \
( ( )\___ | &apos;_ | &apos;_| | &apos;_ \/ _` |        | _ \___ _ __  ___| |_ ___ \ \ \ \
 \\/  ___)| |_)| | | | | || (_| []::::::[]   / -_) &apos;  \/ _ \  _/ -_) ) ) ) )
  &apos;  |____| .__|_| |_|_| |_\__, |        |_|_\___|_|_|_\___/\__\___|/ / / /
 =========|_|==============|___/===================================/_/_/_/
 :: Spring Boot Remote ::  (v1.4.0.RC1)

2016-07-21 17:35:42.861  INFO 4828 --- [           main] o.s.b.devtools.RemoteSpringApplication   : Starting RemoteSpringApplication v1.4.0.RC1 on axel-silencio with PID 4828
2016-07-21 17:35:42.861  INFO 4828 --- [           main] o.s.b.devtools.RemoteSpringApplication   : No active profile set, falling back to default profiles: default
2016-07-21 17:35:42.893  INFO 4828 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@16ec5519: startup date [Thu Jul 21 17:35:42 CEST 2016]; root of context hierarchy
2016-07-21 17:35:43.209  WARN 4828 --- [           main] o.s.b.d.r.c.RemoteClientConfiguration    : The connection to https://devtoolsdemo-myuser.boxfuse.io:8080 is insecure. You should use a URL starting with &apos;https://&apos;.
2016-07-21 17:35:43.262  INFO 4828 --- [           main] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2016-07-21 17:35:43.278  INFO 4828 --- [           main] o.s.b.devtools.RemoteSpringApplication   : Started RemoteSpringApplication in 0.755 seconds (JVM running for 1.058)&lt;/pre&gt;

&lt;p&gt;Now change the &lt;code&gt;currentTime()&lt;/code&gt; method to:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;@RequestMapping(method = RequestMethod.GET, path = &quot;/&quot;)
@ResponseBody
public String currentTime() {
    return &quot;The current time is &quot; + new Date()
            + &quot; and here is a random number: &quot; + new Random().nextInt();
}&lt;/pre&gt;

&lt;p&gt;After saving and compiling in your IDE you&apos;ll see the following line in the output of the &lt;code&gt;RemoteApplication&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 85%&quot;&gt;2016-07-21 17:36:10.119  INFO 3268 --- [pool-1-thread-1] o.s.b.d.r.c.DelayedLiveReloadTrigger     : Remote server has changed, triggering LiveReload&lt;/pre&gt;

&lt;p&gt;And you&apos;ll see the changes in your browser after refreshing the page:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/spring-boot-devtools-aws/running-on-aws-reloaded.png&quot;&gt;

&lt;h2&gt;Step 3: Automatic reloading of the page in the browser&lt;/h2&gt;

&lt;p&gt;The setup we now have will instantly reload any changes to our application. It does however still require us to
    manually refresh the browser window to see the changes. Let&apos;s fix that!&lt;/p&gt;

&lt;img src=&quot;/assets/posts/spring-boot-devtools-aws/livereload.png&quot; title=&quot;Live Reload&quot; alt=&quot;Live Reload&quot;&gt;

&lt;p&gt;We&apos;re going to do this using &lt;a href=&quot;https://livereload.com/&quot;&gt;LiveReload&lt;/a&gt;. There are two parts to this: a browser
    extension that reloads the current page and a server that notifies it when it should do so.&lt;/p&gt;

&lt;p&gt;As some of you may have noticed from the output when you started the &lt;code&gt;RemoteApplication&lt;/code&gt;, the Spring Boot DevTools actually
automatically start a LiveReload server by default:&lt;/p&gt;

&lt;pre class=&quot;console&quot; style=&quot;font-size: 85%&quot;&gt;2016-07-21 17:35:43.262  INFO 4828 --- [           main] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729&lt;/pre&gt;

&lt;p&gt;This means that all we actually need now is to download and install the &lt;a href=&quot;https://livereload.com/extensions/&quot;&gt;&lt;strong&gt;LiveReload browser extension&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have done that, activate the extension with a click:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/spring-boot-devtools-aws/livereload-extension.png&quot;&gt;

&lt;p&gt;And if you now change the &lt;code&gt;currentTime()&lt;/code&gt; method to:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;@RequestMapping(method = RequestMethod.GET, path = &quot;/&quot;)
@ResponseBody
public String currentTime() {
    return &quot;It&apos;s live reloading time!&quot;;
}&lt;/pre&gt;

&lt;p&gt;After you save and compile, the browser pointed at your Spring Boot app running on AWS will now automatically refresh to show the changes:&lt;/p&gt;

&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/spring-boot-devtools-aws/livereload-auto.png&quot;&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;It is great to be able to iterate quickly in a production-like environment. We saw how easy it is to do so using one of Spring Boot&apos;s best kept secrets: the
    &lt;a href=&quot;https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html&quot;&gt;&lt;strong&gt;Spring Boot DevTools&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;They bring the productivity of local development directly to remote deployments running on AWS or the environment of your choice.
    And if you add the &lt;a href=&quot;https://livereload.com/extensions/&quot;&gt;&lt;strong&gt;LiveReload browser extension&lt;/strong&gt;&lt;/a&gt; you won&apos;t even need to refresh to see the changes!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So go ahead, set the DevTools up, have fun and start Live Reloading your Spring Boot apps on AWS in minutes!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Shameless plug: To &lt;a href=&quot;/getstarted/springboot&quot;&gt;deploy your Spring Boot applications effortlessly to AWS&lt;/a&gt;, simply
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;log in to CloudCaptain&lt;/a&gt;  with your GitHub account and you&apos;ll be up
    and running in no time. With just a single command all required AWS resources will be provisioned, configured and secured for you, and all updates
are performed as zero-downtime blue/green deployments using &lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/live-reloading</id>
    <link type="text/html" rel="alternate" href="/blog/live-reloading"/>
    <title>Live Reloading</title>
    <published>2016-07-05T00:00:00+00:00</published>
    <updated>2016-07-05T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;
    At CloudCaptain we strongly believe in optimizing for developer productivity. This means easy of use, robustness and performance.
    This is the reason we worked tirelessly to bring you &lt;a href=&quot;/blog/nodejs-aws&quot;&gt;2 second image generation for Node.js apps&lt;/a&gt;,
    &lt;a href=&quot;/blog/debug&quot;&gt;dead easy debugging and profiling&lt;/a&gt; and more.
&lt;/p&gt;

&lt;p&gt;Today we are taking things further by introducing support for &lt;strong&gt;Live Reloading&lt;/strong&gt; in the &lt;a href=&quot;/docs/environments&quot;&gt;dev environment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is all about reducing cycle time by enabling super-fast turnarounds. When you are in the middle of developing
    something you want to be able to experiment and see results as fast as possible. To enable this, we are introducing
    a new type of image called &lt;strong&gt;live images&lt;/strong&gt;. They can be fused from a directory instead of an archive.
    This directory will usually be the output directory of your IDE or your general project directory.
    Instances launched from live images automatically keep track of the changes
    you make to that directory and ensure that those &lt;strong&gt;changes are now visible immediately&lt;/strong&gt;, without
    the need to go through a full kill/fuse/run cycle.&lt;/p&gt;

&lt;h2&gt;How do Live Images work?&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/fuse-live.png&quot; title=&quot;fuse -live&quot; alt=&quot;fuse -live&quot;&gt;&lt;/p&gt;

&lt;p&gt;Live images achieve their magic by combining two techniques:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;strong&gt;mounting your application files directory&lt;/strong&gt; as a live directory within your instance&lt;/li&gt;
    &lt;li&gt;adding a &lt;strong&gt;reloading agent&lt;/strong&gt; to your instance to reload your application when needed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For &lt;strong&gt;JVM apps&lt;/strong&gt;, CloudCaptain supports mounting exploded jars, exploded wars and exploded Play zips directly into your instance. Additionally CloudCaptain automatically
    configures your JVM to use the &lt;strong&gt;Spring Loaded&lt;/strong&gt; Java Agent for automatically reloading classes when the underlying class file changes.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Node.js apps&lt;/strong&gt;, CloudCaptain supports mounting your Node.js application directory (the one containing &lt;code&gt;package.json&lt;/code&gt;) directly into your instance.
    Additionally, CloudCaptain automatically starts your Node.js app with &lt;strong&gt;node-supervisor&lt;/strong&gt; to ensure it is properly restarted
    whenever js files change.
&lt;/p&gt;

&lt;h2&gt;Seeing it in Action&lt;/h2&gt;

&lt;p&gt;Let&apos;s have a look at how this works in practice. For this we&apos;re going to use a simple Node.js app using Express.&lt;/p&gt;

&lt;p&gt;Start by installing Express:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; npm install -g express-generator&lt;/pre&gt;

&lt;p&gt;Then create the app:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; express live-reloading-test&lt;/pre&gt;

&lt;p&gt;And navigate to its directory:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; cd live-reloading-test&lt;/pre&gt;

&lt;p&gt;Ensure all dependent modules have been downloaded locally:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; npm install&lt;/pre&gt;

&lt;p&gt;Then &lt;strong&gt;fuse and run a live image&lt;/strong&gt; of the directory by using &lt;code&gt;-live&lt;/code&gt;:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run &lt;strong&gt;-live&lt;/strong&gt;

...
Fusing Image for live-reloading-test ...
Image fused in 00:01.290s (15242 K) -&gt; myuser/live-reloading-test:0.0.0
Launching Instance of myuser/live-reloading-test:0.0.0 on VirtualBox ...
Mounting Live directory C:\Workspaces\live-reloading-test into vb-2656d939 ...
Forwarding http port localhost:80 -&gt; vb-2656d939:80
Instance launched in 00:03.476s -&gt; vb-2656d939
Waiting for Payload to start on Instance vb-2656d939 ...
...
vb-2656d939 =&gt; Launching App ...
vb-2656d939 =&gt; node-supervisor -t -s -k ./bin/www
vb-2656d939 =&gt;
vb-2656d939 =&gt; Running node-supervisor with
vb-2656d939 =&gt;   program &apos;./bin/www&apos;
vb-2656d939 =&gt;   --watch &apos;.&apos;
vb-2656d939 =&gt;   --non-interactive
vb-2656d939 =&gt;   --extensions &apos;node,js,/bin/www&apos;
vb-2656d939 =&gt;   --exec &apos;node&apos;
vb-2656d939 =&gt;
vb-2656d939 =&gt; Starting child process with &apos;node ./bin/www&apos;
vb-2656d939 =&gt; Watching directory &apos;/live&apos; for changes.
Payload started in 00:02.395s -&gt; https://127.0.0.1&lt;/pre&gt;

&lt;p&gt;You can now see your new live instance up and running:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/live-reloading/instance.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;Now go ahead and modify &lt;code&gt;routes/index.js&lt;/code&gt; by changing the title:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;var express = require(&apos;express&apos;);
var router = express.Router();

/* GET home page. */
router.get(&apos;/&apos;, function(req, res, next) {
  &lt;del&gt;res.render(&apos;index&apos;, { title: &apos;Express&apos; });&lt;/del&gt;
  &lt;strong&gt;res.render(&apos;index&apos;, { title: &apos;CloudCaptain Live Reloading&apos; });&lt;/strong&gt;
});

module.exports = router;&lt;/pre&gt;

&lt;p&gt;As soon as you save the file you&apos;ll see this in the instance logs:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;vb-2656d939 =&gt; crashing child with SIGKILL
vb-2656d939 =&gt; Thu Jul 07 2016 07:11:54 GMT+0000 (UTC)
vb-2656d939 =&gt; Starting child process with &apos;node ./bin/www&apos;&lt;/pre&gt;

&lt;p&gt;Finally simply refresh the browser to see the changes &lt;strong&gt;instantly&lt;/strong&gt; without fusing a new image:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/live-reloading/instance-reloaded.png&quot;&gt;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;With &lt;strong&gt;Live Reloading&lt;/strong&gt; you can now have super fast roundtrips by making changes to your project directory and seeing them immediately
within your instance. This is a huge boost for productivity in development and it is available now on Windows, Mac OSX and Linux.&lt;/p&gt;

&lt;p&gt;Existing CloudCaptain users can simply update their client with &lt;strong&gt;boxfuse -u&lt;/strong&gt; and enjoy!&lt;/p&gt;

&lt;p&gt;And if you haven&apos;t signed up already, simply
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;log in with your GitHub id&lt;/a&gt; (it&apos;s free!) to start deploying
    your JVM and Node.js applications effortlessly on AWS in minutes and live reloading them on VirtualBox in seconds!&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/qcon-london-2016</id>
    <link type="text/html" rel="alternate" href="/blog/qcon-london-2016"/>
    <title>Immutable Infrastructure Talk and Interview at QCon London 2016</title>
    <published>2016-06-08T00:00:00+00:00</published>
    <updated>2016-06-08T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Both last year and this year there have been a large number of CloudCaptain &lt;a href=&quot;/events&quot;&gt;events&lt;/a&gt; with many more to come!&lt;/p&gt;

&lt;p&gt;In March, CloudCaptain founder and CEO, &lt;strong&gt;&lt;a href=&quot;https://twitter.com&quot;&gt;Axel Fontaine&lt;/a&gt;&lt;/strong&gt; spoke about
    &lt;a href=&quot;https://qconlondon.com/speakers/axel-fontaine&quot;&gt;Immutable Infrastructure: Rise of the Machine Images&lt;/a&gt; at
    &lt;a href=&quot;https://qconlondon.com/speakers/axel-fontaine&quot;&gt;QCon London 2016&lt;/a&gt;. This talk details the principles
    and the lessons learned CloudCaptain is based upon. And it was a huge success with over 400 attendees in the room who gave it excellent reviews.&lt;/p&gt;

&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;a href=&quot;https://twitter.com/akafred/status/707192927341125633/photo/1&quot;&gt;&lt;img src=&quot;/assets/posts/qcon-london-2016/notes.jpg&quot;&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2 class=&quot;blog-post-section&quot;&gt;What attendees had to say about it&lt;/h2&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Immutable Infrastructure talk by &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt; has been brilliant at &lt;a href=&quot;https://twitter.com/hashtag/qconlondon?src=hash&quot;&gt;#qconlondon&lt;/a&gt;&lt;/p&gt;&amp;mdash; Jamie Kelly (@jk563) &lt;a href=&quot;https://twitter.com/jk563/status/706819929618714624&quot;&gt;March 7, 2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;a href=&quot;https://twitter.com/hashtag/qconlondon?src=hash&quot;&gt;#qconlondon&lt;/a&gt;. Great talk by &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt;. Nice to see a live demo that shows real life technical solutions.&lt;/p&gt;&amp;mdash; Martin Peston (@phuturespace) &lt;a href=&quot;https://twitter.com/phuturespace/status/706818198809739264&quot;&gt;March 7, 2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Rise of the Machines Images: Very nice talk about immutable infrastructure by &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/qconlondon?src=hash&quot;&gt;#qconlondon&lt;/a&gt; &lt;a href=&quot;https://t.co/2Ujc0OcCSr&quot;&gt;pic.twitter.com/2Ujc0OcCSr&lt;/a&gt;&lt;/p&gt;&amp;mdash; Julien Vey (@julienvey) &lt;a href=&quot;https://twitter.com/julienvey/status/706822044198027264&quot;&gt;March 7, 2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;img src=&quot;/assets/posts/qcon-london-2016/axel.jpg&quot;&gt;
&lt;/p&gt;

&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;img src=&quot;/assets/posts/qcon-london-2016/axel2.jpg&quot;&gt;
&lt;/p&gt;


&lt;h2 class=&quot;blog-post-section&quot;&gt;Video and Slides of the talk&lt;/h2&gt;
&lt;p&gt;In case you didn&apos;t have a chance to attend the talk live, you watch a &lt;a href=&quot;https://www.infoq.com/presentations/immutable-infrastructure&quot;&gt;video recording&lt;/a&gt; of it and download the slides on &lt;a href=&quot;https://www.infoq.com/presentations/immutable-infrastructure&quot;&gt;InfoQ&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;a href=&quot;https://www.infoq.com/presentations/immutable-infrastructure&quot;&gt;&lt;img src=&quot;/assets/posts/qcon-london-2016/video.png&quot;&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2 class=&quot;blog-post-section&quot;&gt;Interview (with full transcript)&lt;/h2&gt;
&lt;p&gt;Axel Fontaine also sat down with João Miranda for an &lt;a href=&quot;https://www.infoq.com/interviews/fontaine-immutable-infrastructure&quot;&gt;interview&lt;/a&gt; to discuss the topic in additional detail:&lt;/p&gt;
&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;a href=&quot;https://www.infoq.com/interviews/fontaine-immutable-infrastructure&quot;&gt;&lt;img src=&quot;/assets/posts/qcon-london-2016/interview.png&quot;&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2 class=&quot;blog-post-section&quot;&gt;Report&lt;/h2&gt;
&lt;p&gt;Finally Manuel Pais from InfoQ also wrote a &lt;a href=&quot;https://www.infoq.com/news/2016/03/bootable-apps-immutable-security&quot;&gt;report of the talk&lt;/a&gt; for you to enjoy!&lt;/p&gt;
&lt;p class=&quot;blog-post-image&quot;&gt;
    &lt;a href=&quot;https://www.infoq.com/news/2016/03/bootable-apps-immutable-security&quot;&gt;&lt;img src=&quot;/assets/posts/qcon-london-2016/report.png&quot;&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;Have fun!&lt;/h2&gt;
&lt;p&gt;Have fun watching the talk and the interview as well as reading the report! And don&apos;t forget to come and say hi at one of our future events!&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/oracle-jre</id>
    <link type="text/html" rel="alternate" href="/blog/oracle-jre"/>
    <title>Oracle JRE and Kernel Tuning</title>
    <published>2016-06-02T00:00:00+00:00</published>
    <updated>2016-06-02T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;CloudCaptain&apos;s goal is to make you productive by making deployments of your Node.js and JVM-based applications truly effortless.
    And that&apos;s why we worked tirelessly to make it possible to deploy most applications out-of-the-box by issuing just a single
    &lt;code&gt;boxfuse run&lt;/code&gt; command that uses convention-over-configuration with sensible defaults.&lt;/p&gt;

&lt;p&gt;Some applications however require finer grained control, which is why we introduced
    &lt;a href=&quot;/blog/tmp&quot;&gt;customizing temp space allocation&lt;/a&gt;,
    &lt;a href=&quot;/blog/restricted-ports&quot;&gt;restricting ports&lt;/a&gt;,
    &lt;a href=&quot;/blog/debug&quot;&gt;dead-easy debugging and profiling&lt;/a&gt; and more.
&lt;/p&gt;

&lt;p&gt;Today we are introducing two new features to give you even more control: &lt;strong&gt;custom JREs&lt;/strong&gt; and &lt;strong&gt;kernel tuning&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;Custom JREs&lt;/h2&gt;

&lt;p&gt;By default CloudCaptain uses OpenJDK for JVM-based applications, with the possibility to opt for either the OpenJDK 7 or 8 headless JREs.
This is a great open-source choice for the vast majority of the applications, both from a technical as well as from a legal perspective.&lt;/p&gt;

&lt;p&gt;Some users however require commercial support or features only available with the Oracle JRE. Due to Oracle licensing restrictions
we unfortunately cannot offer it as a component from the CloudCaptain Inventory as the Oracle JRE license explicitly prohibits
    standalone redistribution of the Oracle JRE.&lt;/p&gt;

&lt;p&gt;However, starting today CloudCaptain now supports custom JREs. You can now bundle any &lt;strong&gt;Linux x64 Java Runtime Environment&lt;/strong&gt; of your choice, including the Oracle JRE,
directly with your application. CloudCaptain will then automatically use that JRE instead of the default OpenJDK one.&lt;/p&gt;

&lt;h3&gt;Using the Oracle JRE&lt;/h3&gt;

&lt;p&gt;Here is a small example of how to use the Oracle JRE with a &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;Spring Boot&lt;/a&gt; application:&lt;/p&gt;

&lt;p&gt;1. Download the &lt;strong&gt;Linux x64&lt;/strong&gt; JRE of your choice directly from the &lt;a href=&quot;https://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;Oracle website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;2. Extract the &lt;code&gt;/jre&lt;/code&gt; directory from the tar.gz distribution and add it to the &lt;code&gt;src/main/resources&lt;/code&gt; folder of your application:&lt;/p&gt;
&lt;pre class=&quot;filetree&quot;&gt;&lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; my-spring-boot-app
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; src
    &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; main
      &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; java
      &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; resources
        &lt;span&gt;&lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; jre
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; bin
    &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; java
    &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; ...
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; lib
    &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; amd64
    &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; ...
    &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; rt.jar
    &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; ...
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; COPYRIGHT
  &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; LICENSE
  &lt;i class=&quot;fa fa-file&quot;&gt;&lt;/i&gt; ...&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;3. Package your application:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;my-spring-boot-app&amp;gt;&lt;/span&gt; mvn package&lt;/pre&gt;

&lt;p&gt;4. Fuse a CloudCaptain image:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;my-spring-boot-app&amp;gt;&lt;/span&gt; boxfuse fuse&lt;/pre&gt;

&lt;p&gt;5. Done! Your application now uses the Oracle JRE instead of the OpenJDK one when launched from that image.&lt;/p&gt;

&lt;h2&gt;Kernel Tuning&lt;/h2&gt;

&lt;p&gt;The other feature we are introducing today is kernel tuning. While most users will never need this, this is advanced
    feature can be a life-saver for expert users who require low-level tuning of the Linux kernel.&lt;/p&gt;

&lt;p&gt;All you need for this is simply to ship a &lt;code&gt;sysctl.conf&lt;/code&gt; file like the one below with their application:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;net.ipv4.tcp_fastopen = 1
net.ipv4.tcp_fastopen_key = 00000000-00000000-00000000-00000000
net.ipv4.tcp_fin_timeout = 60
net.ipv4.tcp_frto = 2
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200
net.ipv4.tcp_limit_output_bytes = 131072
&lt;/pre&gt;

&lt;p&gt;CloudCaptain will then automatically apply these settings on instance startup.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;CloudCaptain is all about making you productive by making deployment of your apps truly effortless.
    With custom JREs and kernel tuning CloudCaptain now gives advanced users additional ways to customize their images.&lt;/p&gt;

&lt;p&gt;Custom JREs now also allow you to easily run your applications using the Oracle JRE instead of OpenJDK and kernel
    tuning lets expert users to perform low-level tuning of the Linux kernel inside their images.&lt;/p&gt;

&lt;p&gt;Existing CloudCaptain users can simply update with&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse -u&lt;/pre&gt;

&lt;p&gt;to use these features. Enjoy!&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) to start deploying
    your JVM and Node.js applications effortlessly on AWS in minutes.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/one-year</id>
    <link type="text/html" rel="alternate" href="/blog/one-year"/>
    <title>One Year of CloudCaptain</title>
    <published>2016-05-25T00:00:00+00:00</published>
    <updated>2016-05-25T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;p&gt;Last month marked one year since the &lt;a href=&quot;/blog/welcome&quot;&gt;initial version of CloudCaptain was released&lt;/a&gt;. We are now
    many many features and over 100 CloudCaptain Client releases further. And what a
    ride it&apos;s been!&lt;/p&gt;

&lt;p&gt;CloudCaptain set out to make the deployment of applications to the cloud absolutely effortless by leveraging its three
    core principles:&lt;/p&gt;
&lt;table class=&quot;table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;1.&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;
            &lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;
        &lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;Creating servers and never modifying them again by treating a server as one immutable
            unit that is regenerated after every change and promoted unchanged from environment to environment.
            This eliminates drift and increases reliability by ensuring you run the exact same code in production as
            the code you tested in test.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;2.&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;Analysing your application and generating minimal tailor-made Linux-based images on the fly that
            are 100x smaller than a typical Linux system and take just seconds to produce.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;3.&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Blue/Green deployments&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Deploying a new version of an app in parallel to the existing one and only making the switch at the elastic
            IP
            or elastic load balancer level once the configured health checks of the new version have passed. Deployments
            are fully
            automated and effectively transactional, providing you with zero-downtime updates.
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;h2&gt;The humble beginnings&lt;/h2&gt;
&lt;p&gt;We had to start out somewhere and so we picked one problem and decided to solve it better than anyone else out there:
    &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;deploying Dropwizard applications to AWS&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;blog-post-image&quot;&gt;
    &lt;img style=&quot;height: 250px&quot; src=&quot;/assets/posts/dropwizard-aws/dropwizard-aws.png&quot;&gt;
&lt;/div&gt;

&lt;p&gt;This provided us with a great testbed to both validate our innovative technology
    (&lt;a href=&quot;/learn/how&quot;&gt;generating minimal images on-the-fly in seconds&lt;/a&gt;) as well as to
    pioneer our deep integration features (&lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;extracting port and healthcheck configuration directly
        out of Dropwizard&apos;s native configuration files&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;We launched with support for testing locally on VirtualBox and performing blue/green deployments atomically on AWS with zero downtime updates.
We introduced this both for single instance applications (using an Elastic IP) as well as load balanced applications (using an Elastic Load Balancer).&lt;/p&gt;

&lt;p&gt;We have always been strong proponents of Continuous Deployments and making CloudCaptain a natural fit for this was a no-brainer.
From day one we shipped both a cross-platform CLI (the &lt;a href=&quot;/docs/commandline&quot;&gt;CloudCaptain Command-line Client&lt;/a&gt;) as well
as a build tool plugin (the &lt;a href=&quot;/docs/maven&quot;&gt;CloudCaptain Maven plugin&lt;/a&gt;) to make it trivial to automate
your deployment workflows.&lt;/p&gt;

&lt;h2&gt;Expanding to more JVM frameworks&lt;/h2&gt;
&lt;p&gt;Building upon the foundation laid out with Dropwizard, CloudCaptain successively added deep integration for most common modern JVM
application frameworks. Over the course of this first year, CloudCaptain added support for
    &lt;a href=&quot;/blog/springboot-ec2&quot;&gt;Spring Boot&lt;/a&gt;, &lt;a href=&quot;/blog/playframework-aws&quot;&gt;Play&lt;/a&gt;,
    &lt;a href=&quot;/blog/grails-aws&quot;&gt;Grails&lt;/a&gt;, &lt;a href=&quot;/docs/payloads/jar&quot;&gt;plain executable Jars&lt;/a&gt;,
    &lt;a href=&quot;/docs/payloads/tomcat&quot;&gt;Tomcat&lt;/a&gt; and even &lt;a href=&quot;/blog/javaee-aws&quot;&gt;TomEE&lt;/a&gt; for JavaEE applications.&lt;/p&gt;

&lt;div style=&quot;padding-bottom: 15px&quot;&gt;
    &lt;img style=&quot;height: 60px; margin-right: 20px;&quot; src=&quot;/assets/img/springboot.png&quot;&gt;
    &lt;img style=&quot;height: 60px; margin-right: 20px;&quot; src=&quot;/assets/img/play.png&quot;&gt;
    &lt;img style=&quot;height: 60px; margin-right: 20px;&quot; src=&quot;/assets/img/grails.png&quot;&gt;
    &lt;img style=&quot;height: 60px; margin-right: 20px;&quot; src=&quot;/assets/img/tomcat.png&quot;&gt;
    &lt;img style=&quot;height: 60px; margin-right: 20px;&quot; src=&quot;/assets/img/tomee.png&quot;&gt;
&lt;/div&gt;

&lt;p&gt;We also made sure it is easy for users of those frameworks to discover CloudCaptain by contributing sections to the
official documentation of both Spring Boot and the Play framework.&lt;/p&gt;

&lt;p&gt;And we introduced the &lt;a href=&quot;/blog/gradle-plugin&quot;&gt;CloudCaptain Gradle Plugin&lt;/a&gt; (available directly from
the &lt;a href=&quot;/blog/gradle-plugin-portal&quot;&gt;Gradle Plugin Portal&lt;/a&gt;) to make the integration even nicer.&lt;/p&gt;

&lt;h2&gt;Auto-scaling&lt;/h2&gt;
&lt;p&gt;Auto-scaling is one of those true innovations of the cloud and it fits CloudCaptain&apos;s immutable minimal images like a glove.
So it was only natural that we added first-class support to &lt;a href=&quot;/blog/auto-scaling&quot;&gt;dynamically scale the capacity of your system&lt;/a&gt; based on either
CPU or network usage:&lt;/p&gt;

&lt;div class=&quot;blog-post-image&quot;&gt;&lt;img style=&quot;height: 300px&quot; src=&quot;/assets/img/auto-scaling-console.png&quot;&gt;&lt;/div&gt;

&lt;h2&gt;Database auto-provisioning&lt;/h2&gt;
&lt;p&gt;As many users rely on relational databases to store their data, CloudCaptain stepped in to make sure it became
absolutely trivial to &lt;a href=&quot;/blog/databases&quot;&gt;provision PostgreSQL and MySQL databases&lt;/a&gt; reliably across all &lt;a href=&quot;/docs/environments&quot;&gt;environments&lt;/a&gt; from dev on VirtualBox
to test and prod on AWS.&lt;/p&gt;

&lt;div class=&quot;blog-post-image&quot;&gt;
    &lt;img style=&quot;height: 150px&quot; src=&quot;/assets/img/rds.png&quot;&gt;
&lt;/div&gt;

&lt;p&gt;This also marked the introduction of the CloudCaptain Dev VM on VirtualBox, providing you with fully
configured database instances ready to be used by your application, without the need to install those yourself on your machine.&lt;/p&gt;

&lt;p&gt;Wherever your framework of choices supports it, CloudCaptain also automatically configures it to automatically use
the correct database instance with the correct credentials in each environment.&lt;/p&gt;

&lt;p&gt;And of course to easily and reliably evolve your database schema over time, our database migration tool
    &lt;a href=&quot;https://flywaydb.org&quot;&gt;Flyway&lt;/a&gt; is there to help you too.&lt;/p&gt;

&lt;h2&gt;Debugging and Profiling&lt;/h2&gt;
&lt;p&gt;To make it easier to see what&apos;s going on with your application, CloudCaptain introduced
first class support for &lt;a href=&quot;/blog/debug&quot;&gt;debugging and profiling&lt;/a&gt;, both locally on VirtualBox
    and directly in the cloud for your instances running on AWS.&lt;/p&gt;

&lt;div class=&quot;blog-post-image&quot;&gt;
    &lt;img style=&quot;height: 200px;&quot; src=&quot;/assets/img/jvisualvm.png&quot;&gt;
&lt;/div&gt;

&lt;p&gt;As many of those protocols are insecure, CloudCaptain automatically makes use of its support
for &lt;a href=&quot;/blog/restricted-ports&quot;&gt;restricted ports&lt;/a&gt; to ensure that by default those
interfaces are only accessible from your current IP.&lt;/p&gt;

&lt;h2&gt;Node.js&lt;/h2&gt;
&lt;p&gt;Based on widespread demand from our customers, we added support for our first
    language platform beyond the JVM with first class &lt;a href=&quot;/blog/nodejs-aws&quot;&gt;Node.js support&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;blog-post-image&quot;&gt;
    &lt;img style=&quot;height: 150px;&quot; src=&quot;/assets/posts/nodejs-aws/nodejs-aws.png&quot;&gt;
&lt;/div&gt;

&lt;p&gt;As the Node.js runtime is more compact this resulted in super fast fusing times with images as small as 15 MB!&lt;/p&gt;

&lt;h2&gt;This is just the beginning&lt;/h2&gt;

&lt;p&gt;To mark the beginning of our second year, we are kicking things off with a bang and have released
support for three new features:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;strong&gt;Node.js LTS releases&lt;/strong&gt;: you can now use all current Node.js releases with CloudCaptain in addition to the latest one&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Instance auto-recovery&lt;/strong&gt;: all single instance applications now automatically recover to new hardware with no manual intervention required if the current underlying EC2 hardware becomes impaired&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Subnets restrictions&lt;/strong&gt;: load balanced applications can now restrict exactly which subnets they wish to use within a VPC&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;But remember, this is just the beginning. &lt;strong&gt;We are only getting started!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So if you haven&apos;t already,
    &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) to start deploying
        your JVM and Node.js applications effortlessly on AWS in minutes.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/nodejs-aws</id>
    <link type="text/html" rel="alternate" href="/blog/nodejs-aws"/>
    <title>Deploying 15 MB Node.js VMs effortlessly to AWS</title>
    <published>2016-03-23T00:00:00+00:00</published>
    <updated>2016-03-23T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Node.js is a highly productive platform with a broad ecosystem for developing modern web applications and microservices.
    &lt;/p&gt;

    &lt;p&gt;Today we&apos;re going to look at &lt;strong&gt;deploying Node.js applications effortlessly to AWS&lt;/strong&gt;
        using &lt;strong&gt;&lt;a href=&quot;/blog/welcome&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/nodejs-aws/nodejs-aws.png&quot; alt=&quot;Node.js App deployed to AWS using CloudCaptain&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt; is based upon 3 core principles:&lt;/p&gt;
    &lt;table class=&quot;table&quot;&gt;
        &lt;tr&gt;
            &lt;td&gt;1.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Creating servers and never modifying them again by treating a server as one immutable
                unit that is regenerated after every change and promoted unchanged from environment to environment.
                This eliminates drift and increases reliability by ensuring you run the exact same code in production as
                the code you tested in test.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;2.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Analysing your application and generating minimal tailor-made Linux-based images on the fly that
                are 100x smaller than a typical Linux system and take just seconds to produce.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;3.&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Blue/Green deployments&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Deploying a new version of an app in parallel to the existing one and only making the switch at the elastic IP
                or elastic load balancer level once the configured health checks of the new version have passed. Deployments are fully
                automated and effectively transactional, providing you with zero-downtime updates.&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;

    &lt;h2&gt;The plan&lt;/h2&gt;
    &lt;p&gt;Our plan is to first &lt;strong&gt;create a new Node.js app&lt;/strong&gt; which we&apos;ll &lt;strong&gt;fuse into a minimal CloudCaptain image&lt;/strong&gt; that can be deployed unchanged both on VirtualBox and AWS.&lt;/p&gt;

    &lt;p&gt;We&apos;ll then &lt;strong&gt;deploy our image to VirtualBox&lt;/strong&gt; (great for rapid feedback and quick local tests),
        push it to the CloudCaptain Vault (our secure online repository) and &lt;strong&gt;run it on AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;And finally we&apos;ll &lt;strong&gt;update it on AWS with zero-downtime&lt;/strong&gt; blue/green deployments.&lt;/p&gt;

    &lt;h2&gt;Prerequisites&lt;/h2&gt;
    &lt;p&gt;Before we begin, ensure you have successfully:&lt;/p&gt;
    &lt;ol&gt;
        &lt;li&gt;created a &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Account&lt;/a&gt;&lt;/strong&gt; (simply log in with your GitHub account, it&apos;s free)&lt;/li&gt;
        &lt;li&gt;downloaded and installed the latest &lt;strong&gt;&lt;a href=&quot;/getstarted/download&quot;&gt;CloudCaptain Client&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
        &lt;li&gt;downloaded and installed the latest version of &lt;strong&gt;&lt;a href=&quot;https://nodejs.org/en/&quot;&gt;Node.js&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
        &lt;li&gt;downloaded and installed the latest version of &lt;strong&gt;&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
    &lt;/ol&gt;

    &lt;h2&gt;Creating the Node.js application&lt;/h2&gt;

    &lt;p&gt;In this tutorial we are going to create and deploy a simple Node.js application based on Express.&lt;/p&gt;

    &lt;p&gt;Start by installing the necessary npm packages:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; npm install -g express-generator npm-bundle&lt;/pre&gt;

    &lt;p&gt;Now generate the project:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; express getstarted-nodejs&lt;/pre&gt;

    &lt;p&gt;And navigate to the newly created directory:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; cd getstarted-nodejs&lt;/pre&gt;

    &lt;p&gt;Then simply create the bundle &lt;code&gt;tgz&lt;/code&gt; in the directory based on your &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; npm-bundle&lt;/pre&gt;

    &lt;h2&gt;Fusing a CloudCaptain image and running it locally on VirtualBox&lt;/h2&gt;

    &lt;p&gt;Now it&apos;s time to fuse your application into a CloudCaptain image and launch an instance of it on VirtualBox:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; boxfuse run

Fusing Image for getstarted-nodejs-0.0.0.tgz ...
Image fused in 00:02.481s (15076 K) -&gt; myuser/getstarted-nodejs:0.0.0
Launching Instance of myuser/getstarted-nodejs:0.0.0 on VirtualBox ...
Forwarding http port localhost:80 -&gt; vb-b18d6746:80
Instance launched in 00:03.139s -&gt; vb-b18d6746
Waiting for Payload to start on Instance vb-b18d6746 ...
Payload started in 00:04.688s -&gt; https://127.0.0.1&lt;/pre&gt;

    &lt;p&gt;In just a few seconds CloudCaptain found your application, detected its type,
        generated an image for it and launched an instance of that image on VirtualBox.&lt;/p&gt;

    &lt;p&gt;Now open your browser and navigate to this address to see your new application up and running within the VirtualBox VM:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/nodejs-virtualbox.png&quot;&gt;

    &lt;p&gt;You can also see your newly created image:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 80%&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; boxfuse ls

Images available locally:
+--------------------------------+-----------------------------+-------+---------------+------------+---------+---------------------+
| Image                          |           Payload           | Debug |    Runtime    |   Ports    |  Size   |    Generated at     |
+--------------------------------+-----------------------------+-------+---------------+------------+---------+---------------------+
| myuser/getstarted-nodejs:0.0.0 | getstarted-nodejs-0.0.0.tgz | false | Node.js 5.8.0 | http -&gt; 80 | 15076 K | 2016-03-12 14:57:50 |
+--------------------------------+-----------------------------+-------+---------------+------------+---------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;p&gt;As well as the instance that is running:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 80%&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; boxfuse ps

Running Instances on VirtualBox in the dev environment :
+-------------+--------------------------------+---------------------+------------------+---------------------+
|  Instance   |             Image              |        Type         |        URL       |     Launched at     |
+-------------+--------------------------------+---------------------+------------------+---------------------+
| vb-b18d6746 | myuser/getstarted-nodejs:0.0.0 | 4 CPU / 1024 MB RAM | https://127.0.0.1 | 2016-03-12 14:57:56 |
+-------------+--------------------------------+---------------------+------------------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;h2&gt;Deploying your application to AWS&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s deploy the image to AWS. As CloudCaptain works with your AWS account, it first needs the necessary permissions to do so.
        So if you haven&apos;t already done it, go to the CloudCaptain Console and &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account&lt;/a&gt;&lt;/strong&gt; now.&lt;/p&gt;

    &lt;p&gt;Every new CloudCaptain account comes with 3 environments: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;.
        &lt;code&gt;dev&lt;/code&gt; is your local VirtualBox environment and &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are on AWS.&lt;/p&gt;

    &lt;p&gt;So let&apos;s deploy our application to the &lt;code&gt;prod&lt;/code&gt; environment on AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 80%&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; boxfuse run -env=prod

Creating myuser/getstarted-nodejs ...
Pushing myuser/getstarted-nodejs:0.0.0 ...
Verifying myuser/getstarted-nodejs:0.0.0 ...
Waiting for AWS to create an AMI for myuser/getstarted-nodejs:0.0.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:17.463s in eu-central-1 -&gt; ami-d98364b6
Creating Elastic IP ...
Mapping getstartednodejs-myuser.boxfuse.io to 52.58.12.244 ...
Creating security group boxsg-myuser-prod-getstarted-nodejs-0.0.0 ...
Launching t2.micro instance of myuser/getstarted-nodejs:0.0.0 (ami-d98364b6) in prod (eu-central-1) ...
Instance launched in 00:40.942s -&gt; i-af499712
Waiting for AWS to boot Instance i-af499712 and Payload to start at https://54.93.101.157/ ...
Payload started in 00:10.313s -&gt; https://54.93.101.157/
Remapping Elastic IP 52.58.12.244 to i-af499712 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/getstarted-nodejs:0.0.0 is up and running at https://getstartednodejs-myuser.boxfuse.io/&lt;/pre&gt;

    &lt;p&gt;Notice that we have now specified an image, as we want to reuse our image unchanged instead fusing a new one.&lt;/p&gt;

    &lt;p&gt;With that one command CloudCaptain has automatically pushed your image to the CloudCaptain Vault as well as provisioned,
    configured and secured all necessary AWS resources. There is no manual work necessary on your behalf.&lt;/p&gt;

    &lt;p&gt;All you need to do is simply navigate to your new domain to see your Node.js application in action on AWS:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/nodejs-aws.png&quot;&gt;

    &lt;h2&gt;Bonus: update your application using blue/green deployments&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s take things one step further and deploy an update of your application with &lt;strong&gt;zero downtime&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Start by modifying &lt;code&gt;views/index.jade&lt;/code&gt; with a simple change:&lt;/p&gt;
    &lt;pre class=&quot;prettyprint&quot;&gt;extends layout

block content
  h1= title
  p Updated by CloudCaptain with zero downtime!&lt;/pre&gt;

    &lt;p&gt;then bump the version in &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&quot;version&quot;: &quot;0.0.1&quot;,&lt;/pre&gt;

    &lt;p&gt;clean the old bundle:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; &lt;span class=&quot;os&quot;&gt;del&lt;/span&gt; *.tgz&lt;/pre&gt;

    &lt;p&gt;and rebuild the tgz:&lt;/p&gt;
    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; npm-bundle&lt;/pre&gt;

    &lt;p&gt;Finally, deploy the new version of your application to AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 80%&quot;&gt;&lt;span&gt;getstarted-nodejs&amp;gt;&lt;/span&gt; boxfuse run -env=prod

Fusing Image for getstarted-nodejs-0.0.1.tgz ...
Image fused in 00:02.679s (15077 K) -&gt; myuser/getstarted-nodejs:0.0.1
Pushing myuser/getstarted-nodejs:0.0.1 ...
Verifying myuser/getstarted-nodejs:0.0.1 ...
Waiting for AWS to create an AMI for myuser/getstarted-nodejs:0.0.1 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:28.465s in eu-central-1 -&gt; ami-738b6c1c
Creating security group boxsg-myuser-prod-getstarted-nodejs-0.0.1 ...
Launching t2.micro instance of myuser/getstarted-nodejs:0.0.1 (ami-738b6c1c) in prod (eu-central-1) ...
Instance launched in 00:42.912s -&gt; i-3649978b
Waiting for AWS to boot Instance i-3649978b and Payload to start at https://52.59.244.133/ ...
Payload started in 00:11.316s -&gt; https://52.59.244.133/
Remapping Elastic IP 52.58.12.244 to i-3649978b ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Terminating instance i-af499712 ...
Destroying Security Group sg-1defe174 (boxsg-myuser-prod-getstarted-nodejs-0.0.0) ...
Deployment completed successfully. myuser/getstarted-nodejs:0.0.1 is up and running at https://getstartednodejs-myuser.boxfuse.io/&lt;/pre&gt;

    &lt;p&gt;And there it is:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/nodejs-aws-update.png&quot;&gt;

    &lt;h2&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we saw how to &lt;strong&gt;deploy and update a Node.js application to AWS&lt;/strong&gt; using &lt;strong&gt;CloudCaptain&lt;/strong&gt; in 3 easy steps.&lt;/p&gt;

    &lt;p&gt;First
        we fused our application into a &lt;strong&gt;15 MB CloudCaptain image&lt;/strong&gt; in under &lt;strong&gt;3 seconds&lt;/strong&gt; and ran an instance of it on VirtualBox. We then
        deployed the same image unchanged to AWS. And finally we updated our application on AWS with zero downtime using
        blue/green deployments.&lt;/p&gt;

    &lt;p&gt;To do so we used &lt;strong&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt; and its 3 core principles:
        &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;,
        &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt; and
        &lt;strong&gt;Blue/Green deployments&lt;/strong&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/nodejs-aws/nodejs-aws.png&quot; alt=&quot;Node.js App deployed to AWS using CloudCaptain&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;And that&apos;s not it! CloudCaptain also supports dead-easy &lt;strong&gt;&lt;a href=&quot;/docs/debugging&quot;&gt;debugging&lt;/a&gt;&lt;/strong&gt;,
        &lt;strong&gt;&lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href=&quot;/docs/databases&quot;&gt;database auto-provisioning&lt;/a&gt;&lt;/strong&gt; and much more.&lt;/p&gt;

    &lt;p&gt;So if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) to start deploying
            your Node.js applications effortlessly on AWS in minutes.&lt;/p&gt;
&lt;/div&gt;</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/debug</id>
    <link type="text/html" rel="alternate" href="/blog/debug"/>
    <title>Debugging and Profiling</title>
    <published>2016-02-18T00:00:00+00:00</published>
    <updated>2016-02-18T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;CloudCaptain makes it trivial to &lt;a href=&quot;/blog/welcome&quot;&gt;fuse and run your JVM-based applications&lt;/a&gt; unchanged both
        on VirtualBox and on AWS. This perfect &lt;strong&gt;environment parity&lt;/strong&gt;, where your machine in prod is absolutely identical to the one in dev,
        makes it much easier to discover and correct issues sooner. But sometimes you still
        need to dig deeper into your running application to fully understand what&apos;s going on.
    &lt;/p&gt;

    &lt;p&gt;Today we are introducing support for &lt;strong&gt;dead easy debugging and profiling&lt;/strong&gt;, both locally on VirtualBox and in the cloud on AWS.&lt;/p&gt;

    &lt;h2&gt;Debugging&lt;/h2&gt;

    &lt;p&gt;&lt;span class=&quot;fa-stack fa-5x&quot;&gt;
  &lt;i class=&quot;fa fa-bug fa-stack-1x&quot;&gt;&lt;/i&gt;
  &lt;i class=&quot;fa fa-ban fa-stack-2x text-danger&quot;&gt;&lt;/i&gt;
&lt;/span&gt;&lt;/p&gt;

    &lt;p&gt;When the logs aren&apos;t helping anymore, it is time to roll up your sleeves and pull up your favorite debugger to
        step through the code and truly understand exactly what&apos;s going on.
        CloudCaptain now makes it trivial to remotely debug your apps, regardless of whether they run on VirtualBox or on AWS.&lt;/p&gt;

    &lt;p&gt;Start by launching an instance set up for remote debugging:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run myapp.jar &lt;strong&gt;-debug&lt;/strong&gt;

...

Ready to accept remote debugger connections -&gt; tcp://127.0.0.1:5005&lt;/pre&gt;

    &lt;p&gt;The &lt;code&gt;-debug&lt;/code&gt; flag opens an additional
        port to which your debugger can connect. As the JVM debugging protocol doesn&apos;t have any authentication, by default
        this &lt;strong&gt;&lt;a href=&quot;/blog/restricted-ports&quot;&gt;port is restricted&lt;/a&gt; to only allow connections from your local machine&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Now pull up your favorite IDE and connect its debugger to the address shown above:&lt;/p&gt;

    &lt;img src=&quot;/assets/img/debug.png&quot; class=&quot;screenshot&quot;&gt;

    &lt;p&gt;And that&apos;s it! Simply add breakpoints, step through the code, and evaluate expressions as you normally would, regardless of whether your instance runs on VirtualBox or on AWS.&lt;/p&gt;

    &lt;h2&gt;Profiling&lt;/h2&gt;

    &lt;p&gt;Do you suspect a memory leak, a thread deadlock or unusually high CPU usage? CloudCaptain now makes it trivial to profile your apps, regardless of whether they run locally or in the cloud.&lt;/p&gt;

    &lt;p&gt;Start by launching an instance set up for JMX remote management:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run myapp.jar &lt;strong&gt;-jvm.jmx&lt;/strong&gt;

...

Ready to accept JMX connections -&gt; 127.0.0.1:1099 (user: boxfuse / password: boxfuse)&lt;/pre&gt;

    &lt;p&gt;The &lt;code&gt;-jvm.jmx&lt;/code&gt; flag opens an additional
        port to which your JMX client (like Java VisualVM or Java Mission Control) can connect. By default
        this &lt;strong&gt;&lt;a href=&quot;/blog/restricted-ports&quot;&gt;port is restricted&lt;/a&gt; to only allow connections from
            your local machine&lt;/strong&gt;.&lt;/p&gt;

    &lt;h3&gt;Profiling with Java VisualVM&lt;/h3&gt;

    &lt;p&gt;Simply launch Java VisualVM:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; jvisualvm&lt;/pre&gt;

    &lt;p&gt;And connect to the address above:&lt;/p&gt;

    &lt;img src=&quot;/assets/img/jvisualvm-setup.png&quot; class=&quot;screenshot&quot;&gt;

    &lt;p&gt;And that&apos;s it! Go ahead and profile and analyse CPU, memory and threads as you normally would:&lt;/p&gt;

    &lt;img src=&quot;/assets/img/jvisualvm.png&quot; class=&quot;screenshot&quot;&gt;

    &lt;h3&gt;Profiling and Managing with Java Mission Control&lt;/h3&gt;

    &lt;p&gt;Alternatively you can also use the newer Java Mission Control to profile and manage your app:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; jmc&lt;/pre&gt;

    &lt;p&gt;Simply connect Java Mission Control to the address above by creating a JVM connection:&lt;/p&gt;

    &lt;img src=&quot;/assets/img/jmc-setup.png&quot; class=&quot;screenshot&quot;&gt;

    &lt;p&gt;Finally select &lt;strong&gt;MBean Server&lt;/strong&gt; and profile CPU, memory and threads as well as inspect and invoke actions on MBeans as you normally would:&lt;/p&gt;

    &lt;img src=&quot;/assets/img/jmc.png&quot; class=&quot;screenshot&quot;&gt;

    &lt;p&gt;As you would expect this of course works identically on both VirtualBox and AWS.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we introduced &lt;strong&gt;dead easy debugging and profiling&lt;/strong&gt; for CloudCaptain instances, both locally on VirtualBox and in the cloud on AWS.&lt;/p&gt;

    &lt;p&gt;CloudCaptain now makes it trivial to remotely debug your application directly from your favorite IDE. Additionally you
    can now enable JMX remote management to easily profile and manage your JVMs using tools like Java VisualVM and Java Mission Control.&lt;/p&gt;

    &lt;p&gt;So if you haven&apos;t already, simply log in to the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain Console&lt;/strong&gt;&lt;/a&gt; with your GitHub id
        and download the CloudCaptain Client to run, debug and profile your JVM application on AWS today. Enjoy!
    &lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/mysql</id>
    <link type="text/html" rel="alternate" href="/blog/mysql"/>
    <title>Hello MySQL!</title>
    <published>2016-02-12T00:00:00+00:00</published>
    <updated>2016-02-12T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;In our &lt;a href=&quot;/blog/databases&quot;&gt;previous post&lt;/a&gt; we introduced CloudCaptain&apos;s new support for
        &lt;a href=&quot;/docs/databases&quot;&gt;managing databases&lt;/a&gt;. In addition to being able to quickly fuse VM images and run
        those unchanged locally on VirtualBox and in the Cloud on AWS, CloudCaptain now also makes it trivial to run the
        relational databases that those services need.
    &lt;/p&gt;

    &lt;p&gt;Today we are extending CloudCaptain&apos;s database support beyond PostgreSQL and adding &lt;strong&gt;full support for MySQL&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Additionally we are spicing up our &lt;a href=&quot;/docs/databases&quot;&gt;database management&lt;/a&gt; with two new great features:
        &lt;strong&gt;&lt;a href=&quot;/docs/commandline/info&quot;&gt;boxfuse info&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;/docs/commandline/open&quot;&gt;boxfuse open -db&lt;/a&gt;&lt;/strong&gt;.
    &lt;/p&gt;

    &lt;h2&gt;MySQL&lt;/h2&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/img/mysql.png&quot; alt=&quot;MySQL&quot; title=&quot;MySQL&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;No more management headaches for your MySQL databases. CloudCaptain now takes care of provisioning, starting, stopping
        and deleting them for you (CloudCaptain always creates a snapshot before deleting a database, so you can restore it at any time).&lt;/p&gt;

    &lt;p&gt;What do you need to do to enable this? You can either specify that you want a MySQL database when you create your
        app via your client of choice (&lt;a href=&quot;/docs/commandline&quot;&gt;Command-line tool&lt;/a&gt;, &lt;a href=&quot;/docs/maven&quot;&gt;Maven plugin&lt;/a&gt;
        or &lt;a href=&quot;/docs/gradle&quot;&gt;Gradle plugin&lt;/a&gt;) or simply the CloudCaptain Console:
    &lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/mysql/mysql.png&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;However in most cases you won&apos;t need to even do this. If your application includes the MySQL JDBC driver
        CloudCaptain will &lt;strong&gt;detect it automatically&lt;/strong&gt; for you and configure your application accordingly. If want to manage your
        database yourself, this can of course be disabled by explicitly setting the database type to &lt;code&gt;none&lt;/code&gt;
        when you create your app.
    &lt;/p&gt;

    &lt;p&gt;CloudCaptain then automatically &lt;strong&gt;provisions a MySQL database&lt;/strong&gt; for you. It does this both locally using the &lt;a href=&quot;/docs/databases#dev&quot;&gt;CloudCaptain Dev VM&lt;/a&gt;
        and on AWS using RDS.
    &lt;/p&gt;

    &lt;p&gt;And just like for PostgreSQL, if your
    application is based on &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;Spring Boot&lt;/a&gt;,
    &lt;a href=&quot;/docs/payloads/grails&quot;&gt;Grails&lt;/a&gt;,
    &lt;a href=&quot;/docs/payloads/play&quot;&gt;Play&lt;/a&gt; or
    &lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;Dropwizard&lt;/a&gt;, CloudCaptain will &lt;strong&gt;automatically configure your framework&apos;s
    default datasource&lt;/strong&gt; with the correct database driver class name, URL, user and password. This works identically
        in every environment, both locally and on AWS.&lt;/p&gt;

    &lt;h2&gt;boxfuse info&lt;/h2&gt;

    &lt;p&gt;Sometimes however you also want to access your database from outside the application itself. To make it easy
        to get the database url, user name, password and more we are introducing a new command called &lt;strong&gt;&lt;a href=&quot;/docs/commandline/info&quot;&gt;boxfuse info&lt;/a&gt;&lt;/strong&gt;.
        This command gives you all the information you need:
    &lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse info hello -env=test

Info about myuser/hello in the test environment:

App Type    : Single Instance with Zero Downtime updates
App URL     : https://hello-test-myuser.boxfuse.io/
DB Type     : PostgreSQL database
DB URL      : jdbc:postgresql://boxdb-myuser-test-hello.ca53c5vrhrzn.eu-central-1.rds.amazonaws.com:5432/hello
DB Host     : boxdb-myuser-test-hello.ca53c5vrhrzn.eu-central-1.rds.amazonaws.com
DB Port     : 5432
DB Database : hello
DB User     : qbGh5bYandLAYiXBHXp5L8jQliU9qwAkEFRf1R7JzJJ3azNwWmauKfYJe1TCoUW
DB Password : JDBsCkFuDUCqLwDhbWZcZWmaeFCN7W8aAIzy0MjYA5ICXKCf3zMO7azw9092VFFqsnKayqWefAaklZchfATAbLsvShdsOWjKJBaU
DB Status   : available&lt;/pre&gt;

    &lt;p&gt;You can then easily copy this information to configure the client of your choice.&lt;/p&gt;

    &lt;h2&gt;boxfuse open -db&lt;/h2&gt;

    &lt;p&gt;While being to copy this information is nice, we think not having to copy-paste anything is even better!&lt;/p&gt;

    &lt;p&gt;To be able to quickly access the database (MySQL or PostgreSQL) of your app in any environment using that database&apos;s
    native client (&lt;code&gt;mysql&lt;/code&gt; or &lt;code&gt;psql&lt;/code&gt;) via a secure connection with the character encoring properly
    set, we are introducing a new option to the &lt;a href=&quot;/docs/commandline/open&quot;&gt;open&lt;/a&gt; command: &lt;strong&gt;&lt;a href=&quot;/docs/commandline/open&quot;&gt;boxfuse open -db&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;So now if you run an application on your test environment on AWS and you want to access its database (say PostgreSQL in this case) running on RDS securily via SSL, all you need to do is:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse open hello -env=test -db

Launching psql to access the myuser/hello PostgreSQL database in the test environment ...
psql (9.4.5, Server 9.4.5)
SSL connection (Cipher: ECDHE-RSA-AES256-SHA, Bits: 256)
Type &quot;help&quot; for help.

&lt;span&gt;hello=&gt;&lt;/span&gt;\conninfo
You are connected with the database „hello“ as user „qbGh5bYandLAYiXBHXp5L8jQliU9qwAkEFRf1R7JzJJ3azNwWmauKfYJe1TCoUW“ on host „boxdb-myuser-test-hello.ca53c5vrhrzn.eu-central-1.rds.amazonaws.com“ on port „5432“.
SSL connection (Cipher: ECDHE-RSA-AES256-SHA, Bits: 256)
&lt;span&gt;hello=&gt;&lt;/span&gt;\q&lt;/pre&gt;

    &lt;p&gt;And there you have it! You are now is a secure connection with your database using its native client. All the
        character encoding and RDS root certificate management is done automatically for you.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we introduced &lt;strong&gt;full MySQL support&lt;/strong&gt; for CloudCaptain&apos;s dead-easy database management capabilities.&lt;/p&gt;

    &lt;p&gt;CloudCaptain now &lt;strong&gt;automatically detects the MySQL JDBC driver&lt;/strong&gt; in your application and proceeds to provision MySQL
        databases both locally and on AWS RDS. CloudCaptain exposes
        the database URL, user and password as environment variables within the application instances. And if your
        application is based on Spring Boot, Grails, Play or Dropwizard, CloudCaptain &lt;strong&gt;automatically configures your framework&apos;s
        default datasource&lt;/strong&gt; with those settings.&lt;/p&gt;

    &lt;p&gt;However sometimes you also want to access your database through some external tool, so we introduced
        &lt;strong&gt;&lt;a href=&quot;/docs/commandline/info&quot;&gt;boxfuse info&lt;/a&gt;&lt;/strong&gt; to be able to quickly and conveniently
    get the information you need.&lt;/p&gt;

    &lt;p&gt;But if you want an even easier solution you can now use CloudCaptain&apos;s new &lt;strong&gt;&lt;a href=&quot;/docs/commandline/open&quot;&gt;boxfuse open -db&lt;/a&gt;&lt;/strong&gt;
    switch to drop straight into a secure connection to the database of your application in that environment using your
    database&apos;s native client.&lt;/p&gt;

    &lt;p&gt;So if you haven&apos;t already, start deploying your applications and their databases effortlessly with CloudCaptain today.
        Simply log in to the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain Console&lt;/strong&gt;&lt;/a&gt; with your GitHub id, download the CloudCaptain Client and enjoy!
    &lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/databases</id>
    <link type="text/html" rel="alternate" href="/blog/databases"/>
    <title>Introducing Database support</title>
    <published>2016-01-28T00:00:00+00:00</published>
    <updated>2016-01-28T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;In 2015 CloudCaptain made it dead easy to run &amp;amp &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scale&lt;/a&gt; JVM applications on
        AWS.
        We added special optimizations for
        &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;Dropwizard&lt;/a&gt;,
        &lt;a href=&quot;/blog/spring-boot-ec2&quot;&gt;Spring Boot&lt;/a&gt;,
        &lt;a href=&quot;/blog/playframework-aws&quot;&gt;Play&lt;/a&gt; and
        &lt;a href=&quot;/blog/grails-aws&quot;&gt;Grails&lt;/a&gt; in addition to the support for executable jars, Tomcat and
        &lt;a href=&quot;/blog/javaee-aws&quot;&gt;TomEE&lt;/a&gt; (for Java EE).
    &lt;/p&gt;

    &lt;p&gt;While this provides a great help for tackling the complexity of the compute tier, many of our users who build
        microservices that follow the &lt;a href=&quot;https://microservices.io/patterns/data/database-per-service.html&quot;&gt;database
            per service&lt;/a&gt;
        pattern have been asking for built-in support for relational databases.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/databases/database-per-service.png&quot; alt=&quot;Database per service&quot;
             title=&quot;Database per service&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Today we are introducing &lt;strong&gt;dead-easy PostgreSQL database management&lt;/strong&gt; for all environments, both
        locally using a new dev VM and on AWS using RDS.&lt;/p&gt;

    &lt;h2&gt;What&apos;s included?&lt;/h2&gt;

    &lt;p&gt;So what exactly is included in this feature? &lt;strong&gt;CloudCaptain is now able to provision
        PostgreSQL
        databases both locally and on AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;On your local machine, CloudCaptain will launch a new dev VM alongside with your application that contains
        a &lt;strong&gt;fully configured PostgreSQL database&lt;/strong&gt;. Your applications instances will then automatically
        receive environment
        variables containing the URL, user and password required to connect to that database. And if your application is
        based
        on Spring Boot, Grails, Play or Dropwizard &lt;strong&gt;CloudCaptain will automatically configure your framework to use
            that database for its default datasource&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;On AWS, CloudCaptain will &lt;strong&gt;automatically provision either single- or multi-AZ RDS instances&lt;/strong&gt; for your
        application. You can
        easily scale those to different instance types or with additional storage. Just like on your local machine,
        your applications instances will automatically receive environment
        variables containing the URL, user and password required to connect to that database. And again if your
        application is based
        on Spring Boot, Grails, Play or Dropwizard CloudCaptain will automatically configure your framework to use that
        database for its default datasource.&lt;/p&gt;

    &lt;h2&gt;Let&apos;s explore this&lt;/h2&gt;
    &lt;p&gt;To give you a better impression of this new feature, we&apos;ll walk you through a simple example where we &lt;strong&gt;build
        a
        Spring Boot microservice&lt;/strong&gt; that uses a &lt;strong&gt;geo-replicated highly available PostgreSQL
        database&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started ensure you have &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;created a CloudCaptain account&lt;/a&gt; (it&apos;s
        free, just log in with your GitHub id).
        Also make sure to associate it with your &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS account&lt;/a&gt; in the &lt;a
                href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain console&lt;/a&gt; to be able to deploy on EC2.&lt;/p&gt;
    &lt;p&gt;You will also need a &lt;a href=&quot;https://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;JDK&lt;/a&gt;
        and &lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox&lt;/a&gt; installed on your machine.&lt;/p&gt;

    &lt;h2&gt;Step 0: Creating the Spring Boot microservice&lt;/h2&gt;

    &lt;p&gt;Let&apos;s first create a basic Spring Boot application. Go to &lt;a href=&quot;https://start.spring.io&quot;&gt;start.spring.io&lt;/a&gt;, select the
        PostgreSQL, JDBC and Web dependencies and click Generate Project:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/databases/spring-initializr.png&quot; alt=&quot;Spring Initializr&quot;
             title=&quot;Spring Initializr&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now unpack your project in a new directory and delete the &lt;code&gt;src/test&lt;/code&gt; (we won&apos;t need it in this
        tutorial). You should have the following structure:&lt;/p&gt;

    &lt;pre class=&quot;filetree&quot;&gt;&lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; database-demo
  &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; src
    &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; main
      &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; java
        &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; boxfusedemo
          &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; DatabaseDemoApplication.java
      &lt;i class=&quot;fa fa-folder-open&quot;&gt;&lt;/i&gt; resources
        &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; static
        &lt;i class=&quot;fa fa-folder&quot;&gt;&lt;/i&gt; templates
        &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; application.properties
    &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; mvnw
    &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; mvnw.cmd
    &lt;i class=&quot;fa fa-file-text&quot;&gt;&lt;/i&gt; pom.xml&lt;/pre&gt;

    &lt;p&gt;Change the project version in &lt;code&gt;pom.xml&lt;/code&gt; to &lt;code&gt;1.0&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;ltversion&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;/pre&gt;

    &lt;p&gt;Next, add &lt;a href=&quot;https://flywaydb.org&quot;&gt;Flyway&lt;/a&gt; as a dependency to &lt;code&gt;pom.xml&lt;/code&gt; so we can create the
        database schema we&apos;ll need:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.flywaydb&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;flyway-core&amp;lt;/artifactId&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;

    &lt;p&gt;And create a migration as &lt;code&gt;src/main/resources/db/migration/V1__Messages.sql&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;CREATE TABLE messages (
  id INT NOT NULL PRIMARY KEY,
  msg TEXT NOT NULL
);

INSERT INTO messages (id, msg) VALUES (1, &apos;Greetings from Spring Boot auto-configured by CloudCaptain!&apos;);&lt;/pre&gt;

    &lt;p&gt;Then add a simple controller to &lt;code&gt;boxfusedemo.DatabaseDemoApplication&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;package boxfusedemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@SpringBootApplication
@RestController
public class DatabaseDemoApplication {
    @Autowired
    private DataSource dataSource;

    @RequestMapping(&quot;/&quot;)
    public String hello() {
        return new JdbcTemplate(dataSource).queryForObject(&quot;select msg from messages where id=?&quot;, String.class, 1);
    }

    public static void main(String[] args) {
        SpringApplication.run(DatabaseDemoApplication.class, args);
    }
}&lt;/pre&gt;

    &lt;p&gt;And last but not least, compile it into an executable jar file:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; mvnw package -DskipTests&lt;/pre&gt;

    &lt;p&gt;Great. Your Spring Boot microservice executable jar is now available under
        &lt;code&gt;target/database-demo-1.0.jar&lt;/code&gt;.&lt;/p&gt;

    &lt;h2&gt;Step 1: Fusing a CloudCaptain image and running it on VirtualBox&lt;/h2&gt;

    &lt;p&gt;Now it&apos;s time to fuse your application into a CloudCaptain image and launch an instance of it on VirtualBox:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run

Fusing Image for database-demo-1.0.jar ...
Image fused in 00:07.373s (56827 K) -&gt; myuser/database-demo:1.0
Downloading boxfuse-dev-hdd 20160123 ...
Preparing CloudCaptain Dev VM HDD ...
Creating CloudCaptain Dev VM for myuser/database-demo ...
Exposing Dev VM PostgreSQL port on localhost:5432
Starting CloudCaptain Dev VM for myuser/database-demo ...
Launching Instance of myuser/database-demo:1.0 on VirtualBox ...
Forwarding http port localhost:8080 -&gt; vb-db91551d:8080
Instance launched in 00:03.426s -&gt; vb-db91551d
Waiting for Payload to start on Instance vb-db91551d ...
Payload started in 00:13.157s -&gt; https://127.0.0.1:8080&lt;/pre&gt;

    &lt;h3&gt;What just happened here?&lt;/h3&gt;

    &lt;p&gt;CloudCaptain detected the Maven project structure and automatically found the executable jar. CloudCaptain then determined
        that this is a Spring Boot application that includes the PostgreSQL driver and automatically configured it to
        require a PostgreSQL database. It then fused our application&apos;s executable into a minimal bootable VM image.&lt;/p&gt;

    &lt;p&gt;Before starting an instance of our image, CloudCaptain installed and launched a dev VM that contains a
        fully-configured
        PostgreSQL database. The PostgreSQL service from that VM was then exposed to our app on port 5432.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/databases/dev-vm.png&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;CloudCaptain then launched a VM instance of our application&apos;s image and automatically injected the correct database
        URL, user and password as environment variables. Those environment variables were then picked up by our Spring
        Boot application
        to instantiate and autowire the datasource required by our small rest controller.&lt;/p&gt;

    &lt;h3&gt;Seeing it in action&lt;/h3&gt;

    &lt;p&gt;To see our controller in action, simply point your browser to https://127.0.0.1:8080 or type:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse open&lt;/pre&gt;

    &lt;p&gt;And here our service successfully returning the record from our freshly created and migrated database:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/databases/controller.png&quot;&gt;
    &lt;/div&gt;

    &lt;h2&gt;Step 2: Deploying to AWS&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s deploy our microservice to AWS. As CloudCaptain works with your AWS account, it first needs the necessary
        permissions to do so.
        So if you haven&apos;t already done it, go to the CloudCaptain Console and &lt;strong&gt;&lt;a
                href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account&lt;/a&gt;&lt;/strong&gt; now.&lt;/p&gt;

    &lt;p&gt;Every new CloudCaptain account comes with 3 environments: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;.
        &lt;code&gt;dev&lt;/code&gt; is your local VirtualBox environment and &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are on AWS.
    &lt;/p&gt;

    &lt;p&gt;So let&apos;s deploy our microservice to the &lt;code&gt;prod&lt;/code&gt; environment on AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 86%&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run -env=prod

Creating myuser/database-demo ...
Pushing myuser/database-demo:1.0 ...
Verifying myuser/database-demo:1.0 ...
Creating security group boxsg-db-myuser-prod-database-demo ...
Creating RDS postgresql DB (db.t2.micro / 5 GB) =&gt; boxdb-myuser-prod-database-demo (this one-time action may take up to 10 minutes to complete) ...
Waiting for AWS to create an AMI for myuser/database-demo:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:32.075s in eu-central-1 -&gt; ami-9d1d05f1
Waiting for AWS to make RDS DB boxdb-myuser-prod-database-demo available ...
DB boxdb-myuser-prod-database-demo [creating]
DB boxdb-myuser-prod-database-demo [backing-up]
DB boxdb-myuser-prod-database-demo [available]
Creating Elastic IP ...
Mapping databasedemo-myuser.boxfuse.io to 52.29.173.190 ...
Creating security group boxsg-myuser-prod-database-demo-1.0 ...
Launching t2.micro instance of myuser/database-demo:1.0 (ami-9d1d05f1) in prod (eu-central-1) ...
Instance launched in 00:49.422s -&gt; i-d671f06a
Waiting for AWS to boot Instance i-d671f06a and Payload to start at https://54.93.73.84:8080/ ...
Payload started in 00:55.276s -&gt; https://54.93.73.84:8080/
Remapping Elastic IP 52.29.173.190 to i-d671f06a ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/database-demo:1.0 is up and running at https://databasedemo-myuser.boxfuse.io:8080/&lt;/pre&gt;

    &lt;h3&gt;What just happened here?&lt;/h3&gt;

    &lt;p&gt;CloudCaptain pushed our image to the secure CloudCaptain Vault. CloudCaptain then &lt;strong&gt;automatically provisioned an &lt;a
            href=&quot;https://aws.amazon.com/rds/postgresql/&quot;&gt;RDS PostgreSQL&lt;/a&gt;
        database&lt;/strong&gt; (and its associated security group). It then went on to create an AMI for our image. Once our
        database
        was ready, CloudCaptain then create a new domain name and mapped it to a new elastic ip. It then created a security
        group
        four our app and launch an instance of our AMI.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/databases/rds.png&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;CloudCaptain &lt;strong&gt;automatically injected the correct database
        URL, user and password&lt;/strong&gt; as environment variables. Those environment variables were then picked up by our
        Spring
        Boot application to once again instantiate and autowire the datasource required by our small rest controller.
    &lt;/p&gt;


    &lt;h3&gt;Seeing it in action&lt;/h3&gt;

    &lt;p&gt;Once again, to see our controller in action, simply type:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse open -env=prod&lt;/pre&gt;

    &lt;p&gt;And here our service successfully returning the record from our freshly created and migrated database:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/databases/controller-aws.png&quot;&gt;
    &lt;/div&gt;

    &lt;h2&gt;Step 3: Making our database highly available&lt;/h2&gt;

    &lt;p&gt;Finally let&apos;s make sure our infrastructure can survive in the face of failure. To
        achieve that we&apos;re going to make our database highly available by provisioning a &lt;strong&gt;continuously replicated
            geo-redundant hot standby spare instance&lt;/strong&gt; that&apos;s ready take over in case the primary one fails.&lt;/p&gt;

    &lt;p&gt;To achieve this we&apos;ll simply scale our database in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Console&lt;/a&gt;:
    &lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img class=&quot;screenshot&quot; src=&quot;/assets/posts/databases/multiaz.png&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;And that&apos;s it! Not only is our database now able to automatically fail-over, but we now also get near
        zero-downtime (typically only a few seconds)
        when patching or minor version upgrades are required.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we introduced CloudCaptain&apos;s new &lt;strong&gt;dead-easy database management capabilities&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;CloudCaptain is now able to automatically provision PostgreSQL databases both locally and on AWS RDS. CloudCaptain exposes
        the database URL, user and password as environment variables within the application instances. And if your
        application
        is based on Spring Boot, Grails, Play or Dropwizard, CloudCaptain will automatically configure your frameworks&apos;s
        default
        datasource with those settings.&lt;/p&gt;

    &lt;p&gt;Finally making your database highly available and scaling both the instance type and the allocated storage is now
        a breeze.
        All it takes is a few clicks in the CloudCaptain Console.&lt;/p&gt;

    &lt;p&gt;So if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
        your applications and their PostgreSQL databases effortlessly on AWS today.
    &lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/grails-aws</id>
    <link type="text/html" rel="alternate" href="/blog/grails-aws"/>
    <title>Deploy Grails Apps effortlessly to AWS with Gradle</title>
    <published>2015-12-23T00:00:00+00:00</published>
    <updated>2015-12-23T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Groovy, Grails and Gradle together form an excellent and highly productive platform for developing modern web applications.
    &lt;/p&gt;

    &lt;p&gt;Today we&apos;re going to look at &lt;strong&gt;deploying Grails applications&lt;/strong&gt; written in &lt;strong&gt;Groovy&lt;/strong&gt; effortlessly to &lt;strong&gt;AWS&lt;/strong&gt;
        using &lt;strong&gt;Gradle&lt;/strong&gt; and &lt;a href=&quot;/blog/welcome&quot;&gt;CloudCaptain&lt;/a&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/grails-aws/grails-to-aws.png&quot; alt=&quot;Grails App deployed to AWS using Gradle and CloudCaptain&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;We&apos;ll do so using the 3 core principles behind CloudCaptain:&lt;/p&gt;
    &lt;table class=&quot;table&quot;&gt;
        &lt;tr&gt;
            &lt;td&gt;1.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Creating servers and never modifying them again by treating a server as one immutable
                unit that is regenerated after every change and promoted unchanged from environment to environment.
                This eliminates drift and increases reliability by ensuring you run the exact same code in production as
                the code you tested in test.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;2.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Analysing your application and generating minimal tailor-made Linux-based images on the fly that
                are 100x smaller than a typical Linux system and take just seconds to produce.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;3.&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Blue/Green deployments&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Deploying a new version of an app in parallel to the existing one and only making the switch at the elastic IP
                or elastic load balancer level once the configured health checks of the new version have passed. Deployments are fully
                automated and effectively transactional, providing you with zero-downtime updates.&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;

    &lt;h2&gt;The plan&lt;/h2&gt;
    &lt;p&gt;Our plan is to first &lt;strong&gt;create a new Grails app&lt;/strong&gt; which we&apos;ll &lt;strong&gt;fuse into a minimal CloudCaptain image&lt;/strong&gt; that can be deployed unchanged both on VirtualBox and AWS.&lt;/p&gt;

    &lt;p&gt;We&apos;ll then &lt;strong&gt;deploy our image to VirtualBox&lt;/strong&gt; (great for rapid feedback and quick local tests),
        push it to the CloudCaptain Vault (our secure online repository) and &lt;strong&gt;run it on AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;And finally we&apos;ll &lt;strong&gt;update it on AWS with zero-downtime&lt;/strong&gt; blue/green deployments.&lt;/p&gt;

    &lt;h2&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started ensure you have &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;created a CloudCaptain account&lt;/a&gt; (it&apos;s free, just log in with your GitHub id).
        Also make sure to associate it with your &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS account&lt;/a&gt; in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain console&lt;/a&gt; to be able to deploy on EC2.&lt;/p&gt;
    &lt;p&gt;You will also need a &lt;a href=&quot;https://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;JDK&lt;/a&gt;,
        &lt;a href=&quot;https://grails.org/download.html&quot;&gt;Grails&lt;/a&gt;
        and &lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox&lt;/a&gt; installed on your machine.&lt;/p&gt;

    &lt;h2&gt;Step 0: Creating a Grails application&lt;/h2&gt;

    &lt;p&gt;Start by creating a Grails application:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; grails create-app getstarted-grails&lt;/pre&gt;

    &lt;p&gt;Navigate to the newly created directory:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; cd getstarted-grails&lt;/pre&gt;

    &lt;p&gt;And build an executable jar file:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; grails war&lt;/pre&gt;

    &lt;p&gt;Great. Your Grails application executable jar is now available under &lt;code&gt;build/libs/getstarted-grails-0.1.jar&lt;/code&gt;.&lt;/p&gt;

    &lt;h2&gt;Step 1: Fusing a CloudCaptain image and running it on VirtualBox&lt;/h2&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/grails-aws/minimal-image.png&quot; alt=&quot;Grails App to CloudCaptain Minimal Image&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Before we can begin we first have to add the &lt;a href=&quot;/docs/gradle&quot;&gt;CloudCaptain Gradle plugin&lt;/a&gt; to our &lt;code&gt;build.gradle&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;plugins {
    id &quot;com.boxfuse.client&quot; version &quot;1.37.0.2024&quot;
    ...
}

boxfuse {
    // You can find these in the Downloads tab of the CloudCaptain Console (https://console.cloudcaptain.sh/#/downloads)
    user=&apos;your-boxfuse-client-user&apos;
    secret=&apos;your-boxfuse-client-secret&apos;
}&lt;/pre&gt;

    &lt;p&gt;Now it&apos;s time to fuse your application into a CloudCaptain image and launch an instance of it on VirtualBox:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseRun&lt;/pre&gt;

    &lt;p&gt;This command &lt;strong&gt;analyses your application and generates a minimal Linux-based image&lt;/strong&gt; for it. It does this by combining
        your application itself with a JRE and a Linux kernel from the CloudCaptain Component Inventory. It will then
        launch an instance of your new image on VirtualBox. This entire process should take &lt;strong&gt;around 10 seconds&lt;/strong&gt;.&lt;/p&gt;
    &lt;p&gt;When it completes you simply open a browser pointing to your fresh new VirtualBox VM:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseOpen&lt;/pre&gt;

    &lt;p&gt;And here it is:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/grails-virtualbox.png&quot;&gt;

    &lt;p&gt;The port this instance is running on wasn&apos;t picked by chance. &lt;strong&gt;CloudCaptain analyses your native &lt;code&gt;application.yml&lt;/code&gt; Grails config file&lt;/strong&gt;
    and automatically extracts the correct port and healthcheck configuration.&lt;/p&gt;

    &lt;p&gt;You can also see this information in your list of images:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 78%&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseLs

Images available locally:
+------------------------------+---------------------------+-------+---------+-----------+--------------+---------+---------------------+
| Image                        |          Payload          | Debug |  Java   | AppServer |    Ports     |  Size   |    Generated at     |
+------------------------------+---------------------------+-------+---------+-----------+--------------+---------+---------------------+
| myuser/getstarted-grails:0.1 | getstarted-grails-0.1.jar | false | 8.60.22 | Grails    | http -&gt; 8080 | 97828 K | 2015-12-21 17:47:50 |
+------------------------------+---------------------------+-------+---------+-----------+--------------+---------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;p&gt;As well as in the list of running instances:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 78%&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfusePs

Running Instances on VirtualBox in the dev environment :
+-------------+------------------------------+---------------------+-----------------------+---------------------+
|  Instance   |            Image             |        Type         |          URL          |     Launched at     |
+-------------+------------------------------+---------------------+-----------------------+---------------------+
| vb-9feb5d7c | myuser/getstarted-grails:0.1 | 4 CPU / 1024 MB RAM | https://127.0.0.1:8080 | 2015-12-21 17:47:56 |
+-------------+------------------------------+---------------------+-----------------------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;h2&gt;Step 2: Deploying your application to AWS&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s deploy your image to AWS. As CloudCaptain works with your AWS account, it first needs the necessary permissions to do so.
        So if you haven&apos;t already done it, go to the CloudCaptain Console and &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account&lt;/a&gt;&lt;/strong&gt; now.&lt;/p&gt;

    &lt;p&gt;Every new CloudCaptain account comes with 3 environments: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;.
        &lt;code&gt;dev&lt;/code&gt; is your local VirtualBox environment and &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are on AWS.&lt;/p&gt;

    &lt;p&gt;So let&apos;s deploy our application to the &lt;code&gt;prod&lt;/code&gt; environment on AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 78%&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseRun -Dboxfuse.env=prod -i

...
Pushing myuser/getstarted-grails:0.1 ...
Verifying myuser/getstarted-grails:0.1 ...
Waiting for AWS to create an AMI for myuser/getstarted-grails:0.1 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:19.095s in eu-central-1 -&gt; ami-fd5b4491
Creating Elastic IP ...
Mapping getstartedgrails-myuser.boxfuse.io to 52.29.77.147 ...
Creating security group boxsg-myuser-prod-getstarted-grails-0.1 ...
Launching t2.micro instance of myuser/getstarted-grails:0.1 (ami-fd5b4491) in prod (eu-central-1) ...
Instance launched in 00:50.707s -&gt; i-2c1daf90
Waiting for AWS to boot Instance i-2c1daf90 and Payload to start at https://52.59.247.126:8080/health ...
Payload started in 00:55.567s -&gt; https://52.59.247.126:8080/health
Remapping Elastic IP 52.29.77.147 to i-2c1daf90 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/getstarted-grails:0.1 is up and running at https://getstartedgrails-myuser.boxfuse.io:8080/&lt;/pre&gt;

    &lt;p&gt;With that one command CloudCaptain has automatically pushed your existing image to the CloudCaptain Vault, the CloudCaptain secure only image repository,
        as well as &lt;strong&gt;provisioned,
        configured and secured all necessary AWS resources&lt;/strong&gt; including a domain name, an elastic IP, a security group and
        your instance itself. There is no manual work necessary on your behalf.&lt;/p&gt;

    &lt;p&gt;Once again &lt;strong&gt;CloudCaptain automatically used the port and healthcheck information extracted from your &lt;code&gt;application.yml&lt;/code&gt; Grails configuration&lt;/strong&gt; file.&lt;/p&gt;

    &lt;p&gt;All you need to do now is simply navigate to your new domain to see your Grails application in action on AWS:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/grails-aws.png&quot;&gt;

    &lt;h2&gt;Step 3: Updating your application using blue/green deployments&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s take things one step further and update your application on AWS with &lt;strong&gt;zero downtime&lt;/strong&gt; using blue/green deployments.&lt;/p&gt;

    &lt;p&gt;This fits perfectly with our model of &lt;strong&gt;immutable infrastructure&lt;/strong&gt; where we never update an instance in-place, and instead launch a new one to replace it.
    &lt;strong&gt;The new instance is only put into service once all healthchecks have passed&lt;/strong&gt; and it has proven to be fit for the job. This ensures to you always
    have a working application up and running serving your users.&lt;/p&gt;

    &lt;p&gt;So first let&apos;s update our app by modifying &lt;code&gt;grails-app/views/index.gsp&lt;/code&gt; and change the title:&lt;/p&gt;
    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;h1&amp;gt;Welcome to Grails on CloudCaptain!&amp;lt;/h1&amp;gt;&lt;/pre&gt;

    &lt;p&gt;then bump the version in &lt;code&gt;build.gradle&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;version &quot;0.2&quot;&lt;/pre&gt;

    &lt;p&gt;and rebuild the jar and fuse a new CloudCaptain image:

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 78%&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; grails clean
&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseFuse -Dboxfuse.env=prod&lt;/pre&gt;

         &lt;p&gt;Finally deploy the new version of your application to AWS:&lt;/p&gt;
    &lt;pre class=&quot;console&quot; style=&quot;font-size: 78%&quot;&gt;&lt;span&gt;getstarted-grails&amp;gt;&lt;/span&gt; gradle boxfuseRun -Dboxfuse.env=prod -i

...
Pushing myuser/getstarted-grails:0.2 ...
Verifying myuser/getstarted-grails:0.2 ...
Waiting for AWS to create an AMI for myuser/getstarted-grails:0.2 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:18.013s in eu-central-1 -&gt; ami-7b5a4517
Creating security group boxsg-myuser-prod-getstarted-grails-0.2 ...
Launching t2.micro instance of myuser/getstarted-grails:0.2 (ami-7b5a4517) in prod (eu-central-1) ...
Instance launched in 00:41.174s -&gt; i-b502b009
Waiting for AWS to boot Instance i-b502b009 and Payload to start at https://52.59.254.138:8080/health ...
Payload started in 01:27.645s -&gt; https://52.59.254.138:8080/health
Remapping Elastic IP 52.29.77.147 to i-b502b009 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Terminating instance i-2c1daf90 ...
Destroying Security Group sg-5981cb30 ...
Deployment completed successfully. myuser/getstarted-grails:0.2 is up and running at https://getstartedgrails-myuser.boxfuse.io:8080/&lt;/pre&gt;

    &lt;p&gt;And there it is:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/grails-aws-update.png&quot;&gt;
    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we saw how to &lt;strong&gt;deploy and update a Grails application to AWS&lt;/strong&gt; using &lt;strong&gt;Gradle&lt;/strong&gt; and &lt;strong&gt;CloudCaptain&lt;/strong&gt; in 3 easy steps. First
    we fused our application into a CloudCaptain minimal image and ran an instance of it on VirtualBox. We then
    deployed the same image unchanged to AWS. And finally we updated our application on AWS with zero downtime using
    blue/green deployments.&lt;/p&gt;

    &lt;p&gt;To do so we used &lt;strong&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt; and its 3 core principles:
        &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;,
        &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt; and
        &lt;strong&gt;Blue/Green deployments&lt;/strong&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/grails-aws/grails-to-aws.png&quot; alt=&quot;Grails App deployed to AWS using Gradle and CloudCaptain&quot;&gt;
    &lt;/div&gt;

   &lt;p&gt;So if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
       and &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt; your Groovy and Grails applications effortlessly on AWS today.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/fast-amis-us-west-2</id>
    <link type="text/html" rel="alternate" href="/blog/fast-amis-us-west-2"/>
    <title>Expanding fast AMI creation to us-west-2</title>
    <published>2015-12-17T00:00:00+00:00</published>
    <updated>2015-12-17T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;When we &lt;a href=&quot;/blog/welcome&quot;&gt;first launched CloudCaptain&lt;/a&gt; we immediately introduced support for all AWS regions,
        but only one of them was optimized for &lt;a href=&quot;/blog/amis-in-30-seconds&quot;&gt;AMI creation speed&lt;/a&gt; (&lt;strong&gt;eu-central-1&lt;/strong&gt;).&lt;/p&gt;

    &lt;p&gt;As CloudCaptain usage grew, we &lt;a href=&quot;/blog/fast-amis-us-east-1&quot;&gt;expanded our fast AMI creation capabilities to
    &lt;strong&gt;us-east-1&lt;/strong&gt; and &lt;strong&gt;eu-west-1&lt;/strong&gt;&lt;/a&gt; to meet customer demand.&lt;/p&gt;

    &lt;p&gt;So why is it important to have a region optimized for speed?&lt;/p&gt;

    &lt;p&gt;We&apos;ll let the numbers speak for themselves:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/fast-amis-us-west-2/ami-creation-time-comparison-boxfuse-packer.png&quot; alt=&quot;CloudCaptain vs Packer AMI creation speed&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;As you can see even though even the slowest CloudCaptain regions are already &lt;a href=&quot;/vs/packer&quot;&gt;faster than Packer&lt;/a&gt;,
    moving to a CloudCaptain optimised region gives you a major boost, bringing AMI creation to about 30 seconds,
        which is an order of magnitude faster than most other tools in the industry.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Expanding fast AMI creation to us-west-2&lt;/h2&gt;

    &lt;p&gt;Starting today, you can now also enjoy the same ultra-fast AMI creation performance in the &lt;strong&gt;us-west-2&lt;/strong&gt;
    region. No need to change anything on your end. Simply fire up your CloudCaptain Client
        and start enjoying the ultra-fast performance now:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run hello -env=prod

Creating myuser/hello ...
Pushing myuser/hello:1.0 ...
Verifying myuser/hello:1.0 ...
Waiting for AWS to create an AMI for myuser/hello:1.0 in us-west-2 (this may take up to 50 seconds) ...
&lt;strong&gt;AMI created in 00:32.692s in us-west-2 -&gt; ami-fd213e9c&lt;/strong&gt;
Creating Elastic IP ...
Mapping hello-myuser.boxfuse.io to 52.33.26.21 ...
Creating security group boxsg-myuser-hello-1.0 ...
Launching t2.micro instance of myuser/hello:1.0 (ami-fd213e9c) in prod (us-west-2) ...
Instance launched in 00:27.148s -&gt; i-413c4698
Waiting for AWS to boot Instance i-413c4698 and Payload to start at https://54.201.148.195/ ...
Payload started in 00:33.618s -&gt; https://54.201.148.195/
Remapping Elastic IP 52.33.26.21 to i-413c4698 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/hello:1.0 is up and running at https://hello-myuser.boxfuse.io/&lt;/pre&gt;

    &lt;p&gt;As CloudCaptain expands its footprint, further regions will be optimized for fast deployment. The order will be based on based on customer usage and demand.
        This does not affect the runtime speed of your instance, which is determined by the instance type you selected.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Conclusion&lt;/h2&gt;
    &lt;p&gt;We have taken CloudCaptain&apos;s ultra-fast AMI creation capabilities in the &lt;strong&gt;eu-central-1&lt;/strong&gt;,
        &lt;strong&gt;us-east-1&lt;/strong&gt; and &lt;strong&gt;eu-west-1&lt;/strong&gt; regions and
        expanded them to the &lt;strong&gt;us-west-2&lt;/strong&gt; region. No change is necessary on
        your end. Simply use CloudCaptain to &lt;a href=&quot;/docs/commandline/convert&quot;&gt;create AMIs&lt;/a&gt; and &lt;a href=&quot;/docs/commandline/run&quot;&gt;deploy applications&lt;/a&gt;
        as you always do and automatically start enjoying the absolute fastest way to create AMIs today.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Have fun and keep on deploying JVM applications to AWS with ease and pleasure!&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your JVM application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/tmp</id>
    <link type="text/html" rel="alternate" href="/blog/tmp"/>
    <title>Provisioning temp space</title>
    <published>2015-12-10T00:00:00+00:00</published>
    <updated>2015-12-10T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;CloudCaptain makes it effortless to deploy modern JVM-based applications on VirtualBox and AWS. Most of these applications
        are based on
        &lt;a href=&quot;/blog/spring-boot-ec2&quot;&gt;Spring Boot&lt;/a&gt;,
        &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;Dropwizard&lt;/a&gt;,
        &lt;a href=&quot;/docs/payloads/tomcat&quot;&gt;Tomcat&lt;/a&gt;,
        &lt;a href=&quot;/blog/javaee-aws&quot;&gt;TomEE&lt;/a&gt;
        or the &lt;a href=&quot;/blog/playframework-aws&quot;&gt;Play Framework&lt;/a&gt; and many of them are &lt;strong&gt;completely stateless&lt;/strong&gt; with
        all state stored in some external service like RDS or S3.
    &lt;/p&gt;

    &lt;p&gt;This works great as it perfectly fits the core principles behind CloudCaptain:
        &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;,
        &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt; and &lt;strong&gt;Blue/Green deployments&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;However some applications also need to temporarily store some state locally for a number of reasons including:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;locally caching large objects&lt;/li&gt;
        &lt;li&gt;storing intermediate steps of a larger job&lt;/li&gt;
        &lt;li&gt;staging file uploads&lt;/li&gt;
    &lt;/ul&gt;

    &lt;h2&gt;Introducing easy temp space provisioning&lt;/h2&gt;

    &lt;p&gt;Starting today &lt;strong&gt;CloudCaptain can now easily provision any amount of temp space you need&lt;/strong&gt;. Every instance going forward
        will have 1 GB of temp space on disk. You can increase this all the way to 16384 GB (16 TB) or disable it completely by setting
    it to 0. This storage should be considered &lt;strong&gt;strictly ephemeral&lt;/strong&gt; and will be automatically destroyed once the instance
    it is attached to terminates.&lt;/p&gt;

    &lt;p&gt;So how does this work in practice?&lt;/p&gt;

    &lt;p&gt;Say you have an application that requires 100 GB of temp space. You can now enable that by doing:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse run myapp-1.0.jar &lt;strong&gt;-tmp=100&lt;/strong&gt;&lt;/pre&gt;

    &lt;p&gt;And that&apos;s it. CloudCaptain will fuse an image and launch an instance by provisioning both the root device (where your application code resides) and a new
    temp volume of 100 GB which will be automatically available for you to use under &lt;code&gt;/tmp&lt;/code&gt;. CloudCaptain will also
    automatically configure the JVM to use the &lt;code&gt;/tmp&lt;/code&gt; folder for all temporary files.&lt;/p&gt;

    &lt;p&gt;You are fully flexible and can enable this either at image creation or at instance launch time.&lt;/p&gt;

    &lt;p&gt;Also note that on AWS all temp volumes are encrypted by default and auto-destroy when the instance terminates to ensure the privacy of your data.&lt;/p&gt;


    &lt;h2&gt;Conclusion&lt;/h2&gt;

    &lt;p&gt;While CloudCaptain has always worked great with modern stateless JVM applications, today we introduced support
    for easily provisioning from 0 to 16384 GB (16 TB) of strictly ephemeral instance temp space. This space is automatically ready to use and
        mounted under &lt;code&gt;/tmp&lt;/code&gt;.&lt;/p&gt;

    &lt;p&gt;This feature is available today for all CloudCaptain users on both VirtualBox and AWS instances at no additional cost. (AWS charges may apply)&lt;/p&gt;

    &lt;p&gt;Existing users only need to update their CloudCaptain client with&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; boxfuse -u&lt;/pre&gt;

    &lt;p&gt;to start using this.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Enjoy!&lt;/strong&gt;&lt;/p&gt;

   &lt;p&gt;And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
       and &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt; your JVM applications effortlessly on AWS today.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/playframework-aws</id>
    <link type="text/html" rel="alternate" href="/blog/playframework-aws"/>
    <title>Deploy Play Framework Scala Apps effortlessly to AWS</title>
    <published>2015-11-16T00:00:00+00:00</published>
    <updated>2015-11-16T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;When it comes to creating modern JVM-based applications we have a number of excellent choices including
        &lt;a href=&quot;/blog/spring-boot-ec2&quot;&gt;Spring Boot&lt;/a&gt;,
        &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;Dropwizard&lt;/a&gt;,
        &lt;a href=&quot;/docs/payloads/tomcat&quot;&gt;Tomcat&lt;/a&gt;,
        &lt;a href=&quot;/blog/javaee-aws&quot;&gt;TomEE&lt;/a&gt;
        and the &lt;strong&gt;Play Framework&lt;/strong&gt;.
    &lt;/p&gt;

    &lt;p&gt;Today we&apos;re going to look at &lt;strong&gt;deploying Play applications&lt;/strong&gt; written in &lt;strong&gt;Scala&lt;/strong&gt; effortlessly to &lt;strong&gt;AWS&lt;/strong&gt;
        using &lt;a href=&quot;/blog/welcome&quot;&gt;CloudCaptain&lt;/a&gt;.&lt;/p&gt;


    &lt;p&gt;We&apos;ll do so using the 3 core principles behind CloudCaptain:&lt;/p&gt;
    &lt;table class=&quot;table&quot;&gt;
        &lt;tr&gt;
            &lt;td&gt;1.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Creating servers and never modifying them again by treating a server as one immutable
                unit that is regenerated after every change and promoted unchanged from environment to environment
                to eliminate drift and increase reliability by ensuring you run the exact same code in production as
                the one you tested in test.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;2.&lt;/td&gt;
            &lt;td&gt;&lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;td&gt;Analysing your application and generating minimal tailor-made Linux-based images on the fly that
                are 100x smaller than a typical Linux system and take just seconds to produce.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;3.&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Blue/Green deployments&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Deploying a new version of an app in parallel to the existing one and only making the switch at the elastic IP
                or elastic load balancer level once the configured health checks of the new version have passed. Deployments are fully
                automated and effectively transactional, providing you with zero-downtime updates.&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;

    &lt;h2&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started ensure you have &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;created a CloudCaptain account&lt;/a&gt; (it&apos;s free, just log in with your GitHub id).
        Make sure to associate it with your &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS account&lt;/a&gt; in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain console&lt;/a&gt; to deploy on EC2.&lt;/p&gt;
    &lt;p&gt;You will also need a &lt;a href=&quot;https://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;JDK&lt;/a&gt;,
        the &lt;a href=&quot;https://www.typesafe.com/activator/download&quot;&gt;Typesafe Activator&lt;/a&gt;
        and &lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox&lt;/a&gt; installed on your machine.&lt;/p&gt;

    &lt;h2&gt;Step 0: Creating the Play application&lt;/h2&gt;

    &lt;p&gt;Start by creating a Play Scala application using the Typesafe Activator:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; activator new hello play-scala&lt;/pre&gt;

    &lt;p&gt;And navigate to the newly created directory:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;&amp;gt;&lt;/span&gt; cd hello&lt;/pre&gt;

    &lt;p&gt;Then set the version in &lt;code&gt;build.sbt&lt;/code&gt; to 1.0:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;version := &quot;1.0&quot;&lt;/pre&gt;

    &lt;p&gt;Finally build a distribution zip:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; activator dist&lt;/pre&gt;

    &lt;p&gt;Great. Your Play application distribution zip is now available under &lt;code&gt;target/universal/hello-1.0.zip&lt;/code&gt;.&lt;/p&gt;


    &lt;h2&gt;Step 1: Fusing a CloudCaptain image and running it on VirtualBox&lt;/h2&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/playframework-aws/bootableapp.png&quot; alt=&quot;Play Framework App to CloudCaptain Bootable App&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now it&apos;s time to fuse your application into a CloudCaptain image and launch an instance of it on VirtualBox:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; boxfuse run&lt;/pre&gt;

    &lt;p&gt;This command will analyse your application and generate a minimal Linux-based image for it, which we call a
        Bootable App. It does this by combining
        your application itself with a JRE and a Linux kernel from the CloudCaptain Component Inventory. It will then
        launch an instance of your new image on VirtualBox. When it completes you should see a message like this:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;Payload started in 00:06.688s -&gt; https://127.0.0.1:10080&lt;/pre&gt;

    &lt;p&gt;Now open your browser and navigate to this address to see your new application up and running within the new VirtualBox VM:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/play-virtualbox.png&quot;&gt;

    &lt;p&gt;You can also see your newly created image:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; boxfuse ls

Images available locally:
+------------------+---------------+-------+---------+-----------+------------+---------+---------------------+
| Image            |    Payload    | Debug |  Java   | AppServer |   Ports    |  Size   |    Generated at     |
+------------------+---------------+-------+---------+-----------+------------+---------+---------------------+
| myuser/hello:1.0 | hello-1.0.jar | false | 8.60.22 | Play      | http -&gt; 80 | 75950 K | 2015-11-12 14:57:50 |
+------------------+---------------+-------+---------+-----------+------------+---------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;p&gt;As well as the instance that is running:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; boxfuse ps

Running Instances on VirtualBox in the dev environment :
+-------------+------------------+---------------------+------------------------+---------------------+
|  Instance   |      Image       |        Type         |           URL          |     Launched at     |
+-------------+------------------+---------------------+------------------------+---------------------+
| vb-b18d6746 | myuser/hello:1.0 | 4 CPU / 1024 MB RAM | https://127.0.0.1:10080 | 2015-11-12 14:57:56 |
+-------------+------------------+---------------------+------------------------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;h2&gt;Step 2: Deploying your application to AWS&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s deploy your image to AWS. As CloudCaptain works with your AWS account, it first needs the necessary permissions to do so.
        So if you haven&apos;t already done it, go to the CloudCaptain Console and &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account&lt;/a&gt;&lt;/strong&gt; now.&lt;/p&gt;

    &lt;p&gt;Every new CloudCaptain account comes with 3 environments: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;.
        &lt;code&gt;dev&lt;/code&gt; is your local VirtualBox environment and &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are on AWS.&lt;/p&gt;

    &lt;p&gt;So let&apos;s deploy our application to the &lt;code&gt;prod&lt;/code&gt; environment on AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; boxfuse run -env=prod

Pushing myuser/hello:1.0 ...
Verifying myuser/hello:1.0 ...
Waiting for AWS to create an AMI for myuser/hello:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:34.394s in eu-central-1 -&gt; ami-ed988b81
Creating Elastic IP ...
Mapping hello-myuser.boxfuse.io to 52.28.107.167 ...
Creating security group boxsg-myuser-prod-hello-1.0 ...
Launching t2.micro instance of myuser/hello:1.0 (ami-ed988b81) in prod (eu-central-1) ...
Instance launched in 00:26.922s -&gt; i-5de042e1
Waiting for AWS to boot Instance i-5de042e1 and Payload to start at https://52.28.121.55/ ...
Payload started in 00:51.516s -&gt; https://52.28.121.55/
Remapping Elastic IP 52.28.107.167 to i-5de042e1 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. myuser/hello:1.0 is up and running at https://hello-myuser.boxfuse.io/&lt;/pre&gt;

    &lt;p&gt;Notice that CloudCaptain has reused your image unchanged instead fusing a new one.&lt;/p&gt;

    &lt;p&gt;With that one command CloudCaptain has automatically pushed your image to the CloudCaptain Vault, our secure only image repository,
        as well as &lt;strong&gt;provisioned,
        configured and secured all necessary AWS resources&lt;/strong&gt; including a domain name, an elastic IP, a security group and
        your instance itself. There is no manual work necessary on your behalf.&lt;/p&gt;

    &lt;p&gt;All you need to do is simply navigate to your new domain to see your Play application in action on AWS:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/play-aws.png&quot;&gt;

    &lt;div class=&quot;marketing-testimonial-stripe marketing-testimonial-stripe-docs&quot;&gt;&lt;/div&gt;

    &lt;div class=&quot;marketing-testimonial marketing-testimonial-docs&quot;&gt;
        &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-md-3&quot;&gt;
                &lt;img src=&quot;/assets/photos/konradpeters.jpg&quot; class=&quot;img-circle&quot;&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col-md-9&quot;&gt;
                &lt;div&gt;
                    &lt;blockquote&gt;For our Play Framework backend, we used CloudCaptain to minimize the effort required to
                        deploy updates and hotfixes to AWS. Now we can focus fully on improving the application itself. Further, the support is
                        fantastic - quick, friendly and helpful. More than one would expect for such a low price.
                    &lt;/blockquote&gt;
                    &lt;p&gt;&lt;strong&gt;Konrad Peters&lt;/strong&gt;, Lead Developer, Appguru&lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;h2&gt;Step 3: Updating your application using blue/green deployments&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s take things one step further and deploy an update of your application with &lt;strong&gt;zero downtime&lt;/strong&gt; using blue/green deployments.&lt;/p&gt;

    &lt;p&gt;Start by modifying &lt;code&gt;app/controllers/Application.scala&lt;/code&gt; with a simple change:&lt;/p&gt;
    &lt;pre class=&quot;prettyprint&quot;&gt;package controllers

import play.api._
import play.api.mvc._

class Application extends Controller {
  def index = Action {
    Ok(views.html.index(&quot;Updated by CloudCaptain with zero downtime!&quot;))
  }
}&lt;/pre&gt;

    &lt;p&gt;then bump the version in &lt;code&gt;build.sbt&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;version := &quot;1.1&quot;&lt;/pre&gt;

    &lt;p&gt;and rebuild the dist:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; activator clean dist&lt;/pre&gt;

    &lt;p&gt;Finally, deploy the new version of your application to AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&lt;span&gt;hello&amp;gt;&lt;/span&gt; boxfuse run -env=prod

Fusing Image for hello-1.1.zip ...
Image fused in 00:09.817s (75949 K) -&gt; myuser/hello:1.1
Pushing myuser/hello:1.1 ...
Verifying myuser/hello:1.1 ...
Waiting for AWS to create an AMI for myuser/hello:1.1 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:34.152s in eu-central-1 -&gt; ami-8b988be7
Creating security group boxsg-myuser-prod-hello-1.1 ...
Launching t2.micro instance of myuser/hello:1.1 (ami-8b988be7) in prod (eu-central-1) ...
Instance launched in 00:35.372s -&gt; i-ebea4857
Waiting for AWS to boot Instance i-ebea4857 and Payload to start at https://52.29.129.239/ ...
Payload started in 01:05.316s -&gt; https://52.29.129.239/
Remapping Elastic IP 52.28.107.167 to i-ebea4857 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Terminating instance i-5de042e1 ...
Destroying Security Group sg-48ea9921 ...
Deployment completed successfully. myuser/hello:1.1 is up and running at https://hello-myuser.boxfuse.io/&lt;/pre&gt;

    &lt;p&gt;And there it is:&lt;/p&gt;

    &lt;img class=&quot;screenshot&quot; src=&quot;/assets/img/getstarted/play-aws-update.png&quot;&gt;
    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post, we saw how to &lt;strong&gt;deploy and update a Play Framework Scala application to AWS&lt;/strong&gt; in 3 easy steps. First
    we fused our application into an minimal image called a Bootable App and ran an instance of it on VirtualBox. We then
    deployed the same image unchanged to AWS. And finally we updated our application on AWS with zero downtime using
    blue/green deployments.&lt;/p&gt;

    &lt;p&gt;To do so we used &lt;strong&gt;&lt;a href=&quot;/&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt; and its 3 core principles:
        &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;&lt;nobr&gt;Immutable Infrastructure&lt;/nobr&gt;&lt;/strong&gt;&lt;/a&gt;,
        &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;Minimal Images&lt;/strong&gt;&lt;/a&gt;,
        &lt;strong&gt;Blue/Green deployments&lt;/strong&gt;.&lt;/p&gt;

   &lt;p&gt;So if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now (simply log in with your GitHub id, it&apos;s free) and start deploying
       and &lt;a href=&quot;/blog/auto-scaling&quot;&gt;auto-scaling&lt;/a&gt; your Play applications effortlessly on AWS today.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/auto-scaling</id>
    <link type="text/html" rel="alternate" href="/blog/auto-scaling"/>
    <title>It&apos;s Auto-Scaling time!</title>
    <published>2015-10-26T00:00:00+00:00</published>
    <updated>2015-10-26T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Two of the key design principles of CloudCaptain are &lt;a href=&quot;/blog/no-ssh&quot;&gt;&lt;strong&gt;reliable and fast generation of minimal immutable images&lt;/strong&gt;&lt;/a&gt;
        and &lt;a href=&quot;/blog/amis-30-seconds&quot;&gt;&lt;strong&gt;outstanding integration integration with AWS&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;Today we&apos;re going to leverage both together to take things even further.&lt;/p&gt;

    &lt;p&gt;AWS&apos; native format for images is the AMI, the Amazon Machine Image. It is a central building block of EC2.
        Every single EC2 instance you launch is based on an AMI. And CloudCaptain makes it really easy to &lt;a href=&quot;/blog/amis-30-seconds&quot;&gt;create&lt;/a&gt; them.
    &lt;/p&gt;

    &lt;p&gt;Immutable images such as AMIs also have the great advantage that they really &lt;a href=&quot;/blog/fast-reliable-scaling&quot;&gt;&lt;strong&gt;simplify scaling&lt;/strong&gt;&lt;/a&gt;.
        Whether you have to set up 1, 10, 100 or 1000 instances, all you need to do is launch that number of identical copies
        from the same base image and you&apos;re done. Refreshingly simple.
    &lt;/p&gt;

    &lt;p&gt;In fact CloudCaptain has enabled you to do this for a while. Regardless of whether you want to &lt;strong&gt;scale horizontally, vertically or both&lt;/strong&gt;, CloudCaptain simply lets you do:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse scale myapp -env=prod -capacity=7:t2.large&lt;/pre&gt;

    &lt;p&gt;This will effectively launch 7 new t2.large EC2 instances of your app, and once the healthchecks have passed,
        CloudCaptain will terminate any previous deployments and perform a zero-downtime transition.&lt;/p&gt;

    &lt;p&gt;While this is great for guaranteeing you always have the required amount of processing power available, it forces you to
    &lt;strong&gt;guess your capacity needs in advance&lt;/strong&gt;, which means that at certain times you may be &lt;strong&gt;paying for more capacity than you actually need&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Auto-Scaling&lt;/h2&gt;

    &lt;p&gt;Today we are introducing CloudCaptain support for &lt;strong&gt;AWS Auto-Scaling&lt;/strong&gt;. You can now let AWS automatically
        optimize the scale of your system based on the current load.&lt;/p&gt;

    &lt;p&gt;All you need to do is drag a slider to indicate the minimum and the maximum number of instances you want, and
    specify at which CPU usage thresholds the scaling activities should happen, and click Scale. CloudCaptain and AWS will take care of the rest.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/auto-scaling-console.png&quot; alt=&quot;Auto-Scaling&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;In this example here, CloudCaptain will automatically configure AWS CloudWatch to monitor the CPU usage of your instances.
        CloudCaptain will also automatically configure Auto-Scaling to kick in as soon as the rolling
    average over a period of 300 seconds exceeds 75%. Auto-Scaling will then start provisioning additional EC2 instances up to a maximum of 10. If CPU usage
    instead drops to 25% or below, EC2 instances will be terminated down to a minimum of 2.&lt;/p&gt;

    &lt;p&gt;The same can of course also be specified from the command-line:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse scale myapp -env=prod -capacity=2-10:t2.micro:cpu25-75:300

Successfully configured myapp to auto-scale between 2 and 10 t2.micro instances based on average CPU load over 300 seconds, scaling in at 25% and below, scaling out at 75% and above.&lt;/pre&gt;

    &lt;p&gt;And voila! Done! &lt;strong&gt;Auto-scaling has never been this easy!&lt;/strong&gt;.&lt;/p&gt;

    &lt;p class=&quot;alert alert-info&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt; To best &lt;strong&gt;optimize your budget&lt;/strong&gt; with your actual usage, start with
        auto-scaling the &lt;strong&gt;smallest type of general purpose instances&lt;/strong&gt; like t2.micro and only move to larger or more specialized instances if needed.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;Immutable Infrastructure makes scaling fast and reliable. However having fixed capacity for your system requires you to guess your needs in advance.
        It also means that at times you&apos;ll potentially pay more than you should.&lt;/p&gt;
    &lt;p&gt;Starting today, CloudCaptain can now automatically
    configure AWS to &lt;strong&gt;auto-scale your application&lt;/strong&gt; based on average CPU usage. AWS will add or remove capacity from the system fully automatically
    based on the current load, so that you &lt;strong&gt;never have to worry again about paying for more than you actually need&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;This is available today at no extra cost to all &lt;a href=&quot;/pricing&quot;&gt;paid plans&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Have fun and keep on deploying JVM applications to AWS with ease and pleasure!&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your JVM application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/restricted-ports</id>
    <link type="text/html" rel="alternate" href="/blog/restricted-ports"/>
    <title>Introducing Restricted Ports</title>
    <published>2015-10-20T00:00:00+00:00</published>
    <updated>2015-10-20T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;At its core, CloudCaptain &lt;a href=&quot;/learn/how&quot;&gt;&lt;strong&gt;analyses the payload you pass it&lt;/strong&gt;&lt;/a&gt; (like a .jar or .war file) and generates a minimal immutable
        image for it. This image contains two main parts: a disk image and metadata.&lt;/p&gt;
    &lt;p&gt;The metadata is what interests us here.
        It is built as part of the analysis phase and contains information about your app, such as the ports
        and the healthcheck urls it requires. If you use &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;Spring Boot&lt;/a&gt; or
        &lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;Dropwizard&lt;/a&gt; this info can even be automatically extracted for you from
        these frameworks&apos; native configuration files.
    &lt;/p&gt;
    &lt;p&gt;CloudCaptain then later uses this metadata when running instances of your images to correctly provision infrastructure.
    In the case of &lt;a href=&quot;/docs/aws&quot;&gt;AWS&lt;/a&gt;, CloudCaptain will use the port and healthcheck info to automatically set up and configure Elastic Load Balancers,
    Security Groups and more.&lt;/p&gt;

    &lt;p&gt;However so far, unless you explicitly &lt;a href=&quot;/docs/commandline/cfg&quot;&gt;configured a custom security group&lt;/a&gt;, any port you have opened was always open to the world:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/restricted-ports/unrestricted.png&quot; alt=&quot;Unrestricted ports&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;While this is great for publicly facing parts of the service like http(s) ports it may not always be what you want for other parts of it like the admin interface for example.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Restricted Ports&lt;/h2&gt;

    &lt;p&gt;Today we are introducing a new CloudCaptain feature called &lt;strong&gt;Restricted Ports&lt;/strong&gt;. What this allows you, is
    to further constrain the access rights of a specific port down to a specific range of ip addresses.&lt;/p&gt;
    &lt;p&gt;We have added
    support for &lt;strong&gt;fixed addresses&lt;/strong&gt; like &lt;code&gt;12.34.56.78&lt;/code&gt; as well as
        &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing&quot;&gt;CIDR&lt;/a&gt; blocks&lt;/strong&gt; such as &lt;code&gt;12.34.56.00/24&lt;/code&gt;
        (granting access to all ip addresses between &lt;code&gt;12.34.56.00&lt;/code&gt; and &lt;code&gt;12.34.56.255&lt;/code&gt;).&lt;/p&gt;
    &lt;p&gt;Additionally we have also added support for a special address denoted by &lt;code&gt;@&lt;/code&gt;, which refers to the
        &lt;strong&gt;current public ip of your local workstation&lt;/strong&gt;. This is particularly useful when working with protocols which lack
    authentication such as JVMTI for debugging. You can now open a debug port that is only accessible from your own
    IP address.&lt;/p&gt;
    &lt;p&gt;If your ISP assigns you dynamic addresses you can combine these approaches and grant access to the CIDR block
    of your current IP such as &lt;code&gt;@/22&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;This is how this then works out in practice if you want to for example restrict the access of the admin port of
    your app to the current ip of your workstation:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/restricted-ports/restricted.png&quot; alt=&quot;Ports restricted to your workstation&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;UDP Ports&lt;/h2&gt;

    &lt;p&gt;Another feature we added is support for &lt;strong&gt;UDP&lt;/strong&gt; as not every service needs the additional features
    (and overhead) of TCP. To achieve this you can simply add &lt;code&gt;/udp&lt;/code&gt; to the port definition:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run -ports.myudpsrvc=&lt;strong&gt;6543/udp&lt;/strong&gt;&lt;/pre&gt;

    &lt;p&gt;This will then effectively expose UDP port 6543 to the world. This is of course combinable with the restricted ports described above.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;While certain protocols or interfaces aren&apos;t meant to be publicly available, yet are an important part of
        your application, we have introduced &lt;strong&gt;Restricted Ports&lt;/strong&gt; to make it easy to constrain access
        to a single address or a CIDR block. We have also added support for the convenience value &lt;code&gt;@&lt;/code&gt; to easily
    refer to the current public ip address of your workstation. On top of that it is now possible to also open &lt;strong&gt;UDP&lt;/strong&gt; ports.&lt;/p&gt;

    &lt;p&gt;Here is for reference the complete list of currently supported syntax variants for port definition:&lt;/p&gt;

    &lt;table class=&quot;table&quot;&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80&lt;/code&gt;&lt;/td&gt;&lt;td&gt;TCP port 80, universally accessible&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/tcp&lt;/code&gt;&lt;/td&gt;&lt;td&gt;TCP port 80, universally accessible&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/udp&lt;/code&gt;&lt;/td&gt;&lt;td&gt;UDP port 80, universally accessible&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/tcp:@&lt;/code&gt;&lt;/td&gt;&lt;td&gt;TCP port 80 only accessible from your own IP&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/udp:@/20&lt;/code&gt;&lt;/td&gt;&lt;td&gt;UDP port 80 only accessible from the IPs in the CIDR /20 block of your own IP&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/udp:1.2.3.4&lt;/code&gt;&lt;/td&gt;&lt;td&gt;UDP port 80 only accessible from 1.2.3.4&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&lt;code&gt;80/tcp:1.2.3.4/31&lt;/code&gt;&lt;/td&gt;&lt;td&gt;TCP port 80 only accessible from the IPs in the CIDR /31 block of 1.2.3.4&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;

    &lt;p&gt;&lt;strong&gt;Have fun and keep on deploying JVM applications to AWS with ease and pleasure!&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your JVM application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/fast-amis-us-east-1</id>
    <link type="text/html" rel="alternate" href="/blog/fast-amis-us-east-1"/>
    <title>Expanding fast AMI creation to us-east-1 and eu-west-1</title>
    <published>2015-10-13T00:00:00+00:00</published>
    <updated>2015-10-13T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;The main cornerstone to making the transition to &lt;strong&gt;&lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt;&lt;/strong&gt;
        a success is having the capability to produce machine images quickly and reliably These images can then be deployed
        across environments and ensure perfect &lt;strong&gt;environment parity&lt;/strong&gt; from dev to prod.&lt;/p&gt;

    &lt;p&gt;CloudCaptain has from the get-go been able to &lt;strong&gt;&lt;a href=&quot;/learn/how&quot;&gt;produce minimal machine images tailor-made for your applications&lt;/a&gt;&lt;/strong&gt; on the
    OS of your choice. No matter whether you choose to use Windows, Mac or Linux, CloudCaptain always produces the same consistent
    and reliable images in under 10 seconds.&lt;/p&gt;

    &lt;p&gt;You can then run VirtualBox instances based on those images locally to iterate rapidly.&lt;/p&gt;

    &lt;p&gt;Once you are satisfied with the results, you can then &lt;a href=&quot;/docs/commandline/push&quot;&gt;push these images to the CloudCaptain Vault&lt;/a&gt;
        and &lt;a href=&quot;/docs/commandline/convert&quot;&gt;convert them to AWS AMIs&lt;/a&gt; to be able to launch instances on EC2.&lt;/p&gt;

    &lt;p&gt;CloudCaptain has always been about an &lt;a href=&quot;/blog/amis-in-30-seconds&quot;&gt;&lt;strong&gt;order of magnitude faster than other competing products&lt;/strong&gt;&lt;/a&gt; when performing this
        conversion in the &lt;strong&gt;eu-central-1&lt;/strong&gt; region:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/boxfuse-vs-packer.png&quot; alt=&quot;CloudCaptain vs Packer AMI creation speed&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Expanding fast AMI creation to us-east-1 and eu-west-1&lt;/h2&gt;

    &lt;p&gt;Starting today, you can now also enjoy the same ultra-fast AMI creation performance in the &lt;strong&gt;us-east-1&lt;/strong&gt;
    and &lt;strong&gt;eu-west-1&lt;/strong&gt; regions. No need to change anything on your end. Simply fire up your CloudCaptain Client
        and start enjoying the ultra-fast performance now:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run hello -env=prod

Creating axelfontaine/hello ...
Pushing axelfontaine/hello:1.0 ...
Verifying axelfontaine/hello:1.0 ...
Waiting for AWS to create an AMI for axelfontaine/hello:1.0 in us-east-1 (this may take up to 50 seconds) ...
&lt;strong style=&quot;color: yellow&quot;&gt;AMI created in 00:45.467s in us-east-1 -&gt; ami-c1743ea4&lt;/strong&gt;
Creating Elastic IP ...
Mapping hello-axelfontaine.boxfuse.io to 52.22.39.178 ...
Creating security group boxsg-axelfontaine/hello:1.0 ...
Launching t2.micro instance of axelfontaine/hello:1.0 (ami-c1743ea4) in prod (us-east-1) ...
Instance launched in 00:48.109s -&gt; i-ec71ce53
Waiting for AWS to boot Instance i-ec71ce53 and Payload to start at https://54.165.227.247/ ...
Payload started in 00:43.000s -&gt; https://54.165.227.247/
Remapping Elastic IP 52.22.39.178 to i-ec71ce53 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. axelfontaine/hello:1.0 is up and running at https://hello-axelfontaine.boxfuse.io&lt;/pre&gt;

    &lt;p&gt;These are the current AMI creation times across all regions:&lt;/p&gt;

    &lt;table class=&quot;table table-striped&quot;&gt;
        &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;ap-northeast-1&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;ap-southeast-1&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;ap-southeast-2&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt;eu-central-1&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Less than 60 seconds&lt;/strong&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt;eu-west-1&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Less than 60 seconds&lt;/strong&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;sa-east-1&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt;us-east-1&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Less than 60 seconds&lt;/strong&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;us-west-1&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;us-west-2&lt;/td&gt;
            &lt;td&gt;Less than 5 minutes&lt;/td&gt;
        &lt;/tr&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;
    &lt;p&gt;As CloudCaptain expands its footprint, further regions will be optimized for fast deployment. The order will be based on based on customer usage and demand.
        This does not affect the runtime speed of your instance, which is determined by the instance type you selected.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Conclusion&lt;/h2&gt;
    &lt;p&gt;We have taken CloudCaptain&apos;s ultra-fast AMI creation capabilities in the &lt;strong&gt;eu-central-1&lt;/strong&gt; region and
        expanded them to the &lt;strong&gt;us-east-1&lt;/strong&gt; and &lt;strong&gt;eu-west-1&lt;/strong&gt; regions. No change is necessary on
        your end. Simply use CloudCaptain to &lt;a href=&quot;/docs/commandline/convert&quot;&gt;create AMIs&lt;/a&gt; and &lt;a href=&quot;/docs/commandline/run&quot;&gt;deploy applications&lt;/a&gt;
        as you always do and automatically start enjoying the absolute fastest way to create AMIs today.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Have fun and keep on deploying JVM applications to AWS with ease and pleasure!&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your JVM application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/multi-region</id>
    <link type="text/html" rel="alternate" href="/blog/multi-region"/>
    <title>Custom Environments and Multi-Region Apps</title>
    <published>2015-10-06T00:00:00+00:00</published>
    <updated>2015-10-06T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;At &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt; we are strong believers in &lt;strong&gt;&lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt;&lt;/strong&gt;.
        You generate an image once and you then deploy it across environments. All instances are based on the exact same set of bits and bytes.
        There is &lt;strong&gt;&lt;a href=&quot;/blog/no-ssh&quot;&gt;no SSH&lt;/a&gt;&lt;/strong&gt; to avoid drift and to ensure perfect &lt;strong&gt;environment parity&lt;/strong&gt;
        from dev to prod.&lt;/p&gt;

    &lt;p&gt;By default every new account comes with three environments:&lt;/p&gt;
    &lt;table class=&quot;table&quot;&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;i class=&quot;fa fa-object-group&quot;&gt;&lt;/i&gt; &lt;strong&gt;dev&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Develop with fast turnarounds on your local machine using VirtualBox&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;i class=&quot;fa fa-object-group&quot;&gt;&lt;/i&gt; &lt;strong&gt;test&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Test your applications on AWS in a production-like environment&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;i class=&quot;fa fa-object-group&quot;&gt;&lt;/i&gt; &lt;strong&gt;prod&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;Run your applications in production on AWS&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Introducing Custom Environments&lt;/h2&gt;

    &lt;p&gt;While &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are sufficient for most projects, a number of you have come to us and asked for the ability to define additional environments like &lt;code&gt;staging&lt;/code&gt;
        for example. Today we are please to announce that this is now the case. All users on &lt;a href=&quot;/pricing&quot;&gt;paid plans&lt;/a&gt;
    can start creating &lt;strong&gt;custom environments&lt;/strong&gt; in the CloudCaptain Console with a few clicks:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/multi-region/create.png&quot; alt=&quot;Create Environment&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;The &lt;a href=&quot;/docs/commandline&quot;&gt;CloudCaptain Client&lt;/a&gt; works with them as expected, simply specify the new environment and you&apos;re good to go:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run myapp -env=staging&lt;/pre&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Introducing Multi-Region Apps&lt;/h2&gt;

    &lt;p&gt;While custom environments are great, we decided to take things further. You can now create custom environments in AWS regions
    that differ from your default CloudCaptain AWS region by simply selecting the target region while creating the custom environment:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/env-new.png&quot; alt=&quot;Multi-Region Apps&quot;&gt;
    &lt;/div&gt;
    &lt;p&gt;This effectively lets you easily create &lt;strong&gt;multi-region apps&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Conclusion&lt;/h2&gt;
    &lt;p&gt;While &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt; are sufficient for most projects, CloudCaptain now has
        you covered when you grow beyond that. All users on &lt;a href=&quot;/pricing&quot;&gt;paid plans&lt;/a&gt; can now define
        &lt;strong&gt;custom environments&lt;/strong&gt; and start creating &lt;strong&gt;multi-region apps&lt;/strong&gt; with ease and pleasure.&lt;/p&gt;

    &lt;p&gt;Enjoy and read more in the &lt;a href=&quot;/docs/environments&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your Java application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/gradle-plugin-portal</id>
    <link type="text/html" rel="alternate" href="/blog/gradle-plugin-portal"/>
    <title>Hello Gradle Plugin Portal!</title>
    <published>2015-09-30T00:00:00+00:00</published>
    <updated>2015-09-30T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Build tool integration has always been a priority for us at &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt;. It is
        an essential part of a smooth development and deployment workflow. Back in May we extended our support beyond
        &lt;a href=&quot;/docs/maven&quot;&gt;Maven&lt;/a&gt; and released to the &lt;a href=&quot;/docs/gradle&quot;&gt;CloudCaptain Gradle plugin&lt;/a&gt;,
        both of which have been steadily improved ever since.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Gradle Plugin Portal&lt;/h2&gt;

    &lt;p&gt;Recently Gradle has been making it easier and easier to both find and use plugins. There is now an official Gradle Plugin portal,
        making it easy to discover new plugins and keep track of new releases.&lt;/p&gt;

    &lt;p&gt;We are happy to announce that as of today the &lt;strong&gt;&lt;a href=&quot;https://plugins.gradle.org/plugin/com.boxfuse.client&quot;&gt;CloudCaptain Gradle Plugin&lt;/a&gt;&lt;/strong&gt; is now available there too:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/gradle-plugin-portal/portal.png&quot; alt=&quot;CloudCaptain on the Gradle Plugin portal&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;And that&apos;s is just the beginning. If you are using Gradle 2.1 or newer you can now also use the new and improved plugin syntax:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;plugins {
    id &quot;com.boxfuse.client&quot; version &quot;1.37.0.2024&quot;
}&lt;/pre&gt;

    &lt;p&gt;&lt;strong&gt;Using CloudCaptain with Gradle has never been easier!&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your Java application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/javaee-aws</id>
    <link type="text/html" rel="alternate" href="/blog/javaee-aws"/>
    <title>Deploy Java EE Apps effortlessly on AWS</title>
    <published>2015-09-28T00:00:00+00:00</published>
    <updated>2015-09-28T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;At &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt; we love solutions that just work. And that&apos;s why, when it comes to
        Java EE, we&apos;ve grown very fond of &lt;strong&gt;&lt;a href=&quot;https://tomee.apache.org&quot;&gt;Apache TomEE&lt;/a&gt;&lt;/strong&gt;. Unlike traditional heavy
        and complex application servers, TomEE combines the swiftness of Tomcat with the benefits of standard Java EE.&lt;/p&gt;

    &lt;p&gt;Today we are happy to announce that we have added TomEE to CloudCaptain&apos;s selection of payloads that can be deployed
        effortlessly to VirtualBox and AWS. Just like &lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;Dropwizard&lt;/a&gt;,
        &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;Spring Boot&lt;/a&gt;, &lt;a href=&quot;/docs/payloads/tomcat&quot;&gt;Tomcat&lt;/a&gt; and
        &lt;a href=&quot;/docs/payloads/jar&quot;&gt;(executable) jar files&lt;/a&gt;, you can now fuse &lt;a href=&quot;/docs/payloads/tomee&quot;&gt;TomEE applications&lt;/a&gt; into
        immutable images with a single command. These images can then be deployed unchanged to VirtualBox and AWS
        with zero downtime updates.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/javaee-aws/tomee-ec2.png&quot; alt=&quot;TomEE to EC2&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Why TomEE?&lt;/h2&gt;
    &lt;p&gt;At its core &lt;strong&gt;&lt;a href=&quot;https://tomee.apache.org&quot;&gt;Apache TomEE&lt;/a&gt;&lt;/strong&gt; stands for 3 things:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;Be small&lt;/li&gt;
        &lt;li&gt;Be Java EE certified&lt;/li&gt;
        &lt;li&gt;Be Tomcat&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;TomEE does away with long and tedious deployments typically associated with Java EE. Instead you now get a Tomcat
        that has been tuned to be able to run Java EE applications. It&apos;s still Tomcat, but it is now also fully Java EE
        certified with support for EJB, CDI, JMS and more. It starts quickly and does away with .ear files. Instead you
        can simply use tried and true .war files and define any JNDI resources in &lt;code&gt;WEB-INF/resources.xml&lt;/code&gt;.
        Java EE has never been this simple!&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started ensure you have &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;created a CloudCaptain account&lt;/a&gt; (it&apos;s free, just log in with your GitHub id).
        Make sure to associate it with your &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS account&lt;/a&gt; in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain console&lt;/a&gt; to deploy on EC2.&lt;/p&gt;
    &lt;p&gt;You will also need Git, Java, Maven and VirtualBox installed on your machine.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Creating a TomEE Java EE app&lt;/h2&gt;
    &lt;p&gt;Start by cloning the &lt;a href=&quot;https://github.com/boxfuse/boxfuse-samples&quot;&gt;CloudCaptain Samples&lt;/a&gt; repository:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; git clone https://github.com/boxfuse/boxfuse-samples.git&lt;/pre&gt;

    &lt;p&gt;and build the TomEE sample application:&lt;/p&gt;
    &lt;pre class=&quot;console&quot;&gt;&amp;gt; cd tomee
tomee&amp;gt; mvn package&lt;/pre&gt;

    &lt;p&gt;Great. You should now have a file called &lt;code&gt;target/tomee-1.0.war&lt;/code&gt; as part of the following application:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/javaee-aws/intellij-tomee.png&quot; alt=&quot;TomEE project structure&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;This application uses various Java EE features including EJBs, JSPs, Servlets, JPA and JNDI.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Deploying it to AWS EC2&lt;/h2&gt;

    &lt;p&gt;Now that you have built the application, let&apos;s deploy it to AWS. CloudCaptain will start by &lt;a href=&quot;/learn/how&quot;&gt;analysing it&lt;/a&gt;
    and determining its type. Doing so it will find the &lt;code&gt;WEB-INF/resources.xml&lt;/code&gt; file. This tells it that it is a Java EE that requires TomEE instead of Tomcat.&lt;/p&gt;

    &lt;p&gt;CloudCaptain will then &lt;strong&gt;create a Micro-OS on-the-fly&lt;/strong&gt; designed to do one thing and one thing only: run this version of your application.&lt;/p&gt;

    &lt;p&gt;It does that by combining your application with TomEE, a JVM, the C library, the Linux kernel and a bootloader into an tiny image.
    &lt;strong&gt;Everything is fully configured and ready to run out of the box&lt;/strong&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/javaee-aws/tomee-aws-instance.png&quot; alt=&quot;TomEE War file -&gt; CloudCaptain Image -&gt; AWS Instance&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;To launch your application on AWS as well as &lt;strong&gt;provision and configure all necessary infrastructure&lt;/strong&gt;, all you need to do is:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run target/tomee-1.0.war -env=prod

Fusing Image for tomee-1.0.war ...
Image fused in 00:08.592s (73858 K) -&gt; axelfontaine/tomee:1.0
Creating axelfontaine/tomee ...
Pushing axelfontaine/tomee:1.0 ...
Verifying axelfontaine/tomee:1.0 ...
Waiting for AWS to create an AMI for axelfontaine/tomee:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:18.531s -&gt; ami-806e6c9d
Creating Elastic IP ...
Mapping tomee-axelfontaine.boxfuse.io to 52.29.32.202 ...
Creating security group boxsg-prod-axelfontaine/tomee:1.0 ...
Launching t2.micro instance of axelfontaine/tomee:1.0 (ami-806e6c9d) in prod (eu-central-1) ...
Instance launched in 00:38.394s -&gt; i-dec80062
Waiting for AWS to boot Instance i-dec80062 and Payload to start at https://52.29.28.195/ ...
Payload started in 01:00.050s -&gt; https://52.29.28.195/
Remapping Elastic IP 52.29.32.202 to i-dec80062 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. axelfontaine/tomee:1.0 is up and running at https://tomee-axelfontaine.boxfuse.io&lt;/pre&gt;

    &lt;p&gt;And there you have it, your Java EE application is now fully up and running on AWS:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/javaee-aws/tomee-screenshot.png&quot; alt=&quot;TomEE app running on AWS screenshot&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;You can deploy new versions at any time and CloudCaptain will automatically perform &lt;strong&gt;blue/green zero downtime updates&lt;/strong&gt; for you.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post you saw how &lt;strong&gt;&lt;a href=&quot;https://tomee.apache.org&quot;&gt;Apache TomEE&lt;/a&gt;&lt;/strong&gt; makes Java EE fast and lightweight.
    We took this to the next level by using &lt;strong&gt;&lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt; to deploy a Java EE application
        to AWS using a single command. There was no tedious configuration and the entire process took less than two minutes,
        including automatically provisioning all the necessary infrastructure on EC2.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Running your Java EE applications on AWS has never been this easy&lt;/strong&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/javaee-aws/tomee-ec2.png&quot; alt=&quot;TomEE to EC2&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your TomEE Java EE application to EC2 &lt;strong&gt;completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/fast-reliable-scaling</id>
    <link type="text/html" rel="alternate" href="/blog/fast-reliable-scaling"/>
    <title>Immutable Infrastructure: Fast &amp; Reliable Scaling</title>
    <published>2015-08-26T00:00:00+00:00</published>
    <updated>2015-08-26T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Moving to &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;Immutable Infrastructure&lt;/strong&gt;&lt;/a&gt; brings many advantages. In the
        &lt;a href=&quot;/blog/no-ssh&quot;&gt;&lt;strong&gt;previous article&lt;/strong&gt;&lt;/a&gt; in this series we saw how it &lt;strong&gt;eliminates drift&lt;/strong&gt;
    and the problems associated with deferred provisioning by &lt;strong&gt;capturing your application and all its dependencies at the
        lowest level possible&lt;/strong&gt;: an image of the entire system. We also looked at how to enforce immutability by creating
    images with &lt;strong&gt;no SSH&lt;/strong&gt;. With &lt;a href=&quot;/blog/no-ssh&quot;&gt;this technique&lt;/a&gt; any change requires
        rebuilding a new image through your regular automated build and deployment pipeline. In turn your system
        drastically gains in simplicity and reliability.&lt;/p&gt;

    &lt;p&gt;Another area where Immutable Infrastructure &lt;strong&gt;radically simplifies&lt;/strong&gt; things is &lt;strong&gt;scaling&lt;/strong&gt;. Let&apos;s find out how.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Why scaling?&lt;/h2&gt;

    &lt;p&gt;Scaling is adding or removing capacity from your system. The main driver for scaling has traditionally
        been load. When &lt;strong&gt;load increases&lt;/strong&gt; beyond what can be reliably handled by the current infrastructure,
        &lt;strong&gt;more capacity&lt;/strong&gt; must be provisioned to handle it.&lt;/p&gt;

    &lt;p&gt;However today we have another important force at play: money.
        On the public cloud, cost is an important driver for the way we architect our systems.
        In stark contrast to on premise setups where hardware is almost universally a sunk cost,
        &lt;strong&gt;public clouds&lt;/strong&gt; like AWS offer utility-like pricing. You essentially &lt;strong&gt;pay for what you use&lt;/strong&gt;. It therefore becomes
        essential to not only be able to quickly add, but also to &lt;strong&gt;remove capacity&lt;/strong&gt; from a system! You effectively &lt;strong&gt;optimize your budget
        to optimally handle the current load&lt;/strong&gt; on the system.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Horizontal vs Vertical Scaling&lt;/h2&gt;

    &lt;p&gt;When it comes to scaling, it really boils down to two options. Changing the size or the number of instances. You can either &lt;strong&gt;scale horizontally&lt;/strong&gt; by adding
        &lt;em&gt;(scaling out)&lt;/em&gt; or removing &lt;em&gt;(scaling in)&lt;/em&gt; instances, or you can &lt;strong&gt;scale vertically&lt;/strong&gt; to bigger &lt;em&gt;(scaling up)&lt;/em&gt;
        or smaller &lt;em&gt;(scaling down)&lt;/em&gt; machines.&lt;/p&gt;
    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/simple-scaling/simple-scaling.png&quot; alt=&quot;Horizontal and Vertical scaling&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;&lt;strong&gt;Regardless of the scaling direction and technique you choose, you need to be able to do this quickly and reliably&lt;/strong&gt;.
        While this sounds easy, its has traditionally come with a number of challenges, the most common ones being
        state, provisioning times and robustness. However as you&apos;ll see these aren&apos;t intrinsic problems to scaling.
    They come from the way we have traditionally handled state and provisioned machines.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;The challenges with traditional provisioning&lt;/h2&gt;

    &lt;p&gt;As we already saw in the &lt;a href=&quot;/blog/no-ssh&quot;&gt;previous article&lt;/a&gt; traditional provisioning with shell
    scripts or configuration management tools is very prone to drift as it flies in the face of the proven mantra:
        &lt;strong&gt;build your artifact only once&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;The reason for this, is that instead of building an image with all software fully configured, secured and ready to boot,
    this provisioning process happens on every instance you launch. This puts you at risk for all issues related to
        &lt;a href=&quot;/blog/no-ssh&quot;&gt;deferred provisioning&lt;/a&gt; as well as all potential reliability problems of having to fetch
    everything again and again from remote repositories which may have changed or temporarily gone offline.&lt;/p&gt;

    &lt;p&gt;The other big issue with this is that it takes a very long time. Whereas with Immutable Infrastructure and
        fully-provisioned images all you need to do is make a copy of the volume and start up the instance,
        with traditional provisioning you first have to go through a tedious installation process before your application
        can even begin to start up.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Dealing with state&lt;/h2&gt;

    &lt;p&gt;When it comes to dealing with state, Immutable Infrastructure forces you to do the right thing:
    &lt;strong&gt;keep all persistent state off the instance&lt;/strong&gt;. This doesn&apos;t mean you can&apos;t have a local copy
    as a a cache to speed things up (beware of stale data though!), but the master should be in a central highly-available
        and replicated data store.&lt;/p&gt;

    &lt;p&gt;This applies first and foremost to &lt;strong&gt;application data&lt;/strong&gt; which should reside in data stores,
        in-memory caches or object storage. But also to other things like &lt;a href=&quot;/blog/logging-cloudnative&quot;&gt;&lt;strong&gt;log files&lt;/strong&gt;&lt;/a&gt;
        which in 2015 should not be spread across multiple instances, but instead aggregated in a &lt;a href=&quot;/blog/logging-cloudnative&quot;&gt;central log server&lt;/a&gt;
        where they can be archived, indexed, and made searchable. And last, but not least, also &lt;strong&gt;sessions&lt;/strong&gt; should be moved
        to either a cookie, a data store or a central in-memory cache. We&apos;ll talk more in detail about this in a future post.
    &lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Conclusion&lt;/h2&gt;

    &lt;p&gt;In a public cloud world you need to be able to quickly and reliably add capacity to a system in response to load, but also
    remove capacity to optimize your budget. You can do this by scaling horizontally (in &amp;amp; out) and adjust the number
    of instances. Or you can do it by scaling vertically (up &amp;amp; down) to change the size of your instances.&lt;/p&gt;

    &lt;p&gt;Traditional provisioning poses a number of challenges related to drift, deferred provisioning, reliability and performance.
    &lt;strong&gt;Immutable Infrastructure solves these problems through fast and reliable launching of instances based on fully provisioned images.&lt;/strong&gt;
        It also forces you to do the right thing and &lt;strong&gt;keep all persistent state off instance&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Stay tuned for future blog blog posts where we&apos;ll explore more aspects of Immutable Infrastructure including sessions and service discovery.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Try it for yourself&lt;/h2&gt;

    &lt;p&gt;&lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain&lt;/strong&gt;&lt;/a&gt; lets you do all this and more. CloudCaptain intelligently analyses your application and
        &lt;strong&gt;generates minimal images in seconds&lt;/strong&gt;.
        There is no general purpose operating system and no tedious provisioning. CloudCaptain images are lean, secure and efficient. You
        can run them on VirtualBox for development and deploy them unchanged and with &lt;strong&gt;zero downtime on AWS&lt;/strong&gt; for test and
        production.&lt;/p&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy your application to EC2 completely free. And when it comes
        to scaling both horizontally and vertically, all you need is a &lt;a href=&quot;/docs/commandline/scale&quot;&gt;single command&lt;/a&gt;.&lt;/p&gt;

&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/amis-in-30-seconds</id>
    <link type="text/html" rel="alternate" href="/blog/amis-in-30-seconds"/>
    <title>CloudCaptain Convert: fully-provisioned AMIs in 30 seconds</title>
    <published>2015-08-19T00:00:00+00:00</published>
    <updated>2015-08-19T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;One of the key elements of &lt;a href=&quot;/learn/why&quot;&gt;&lt;strong&gt;Immutable Infrastructure&lt;/strong&gt;&lt;/a&gt; is the capability to efficiently
        create fully-provisioned images. These images must have all required software already on board. In fact, with everything
    fully configured and ready to run on boot, these images &lt;a href=&quot;/blog/no-ssh&quot;&gt;&lt;strong&gt;don&apos;t even need SSH&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;On AWS, the typical process to achieve that can be described as follows:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/create-ami-launch-instances.png&quot; alt=&quot;Create AMI, Launch Instances&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;You first create an AMI, based on which you can then launch any number of identical instances.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Integrating with Existing Workflows&lt;/h2&gt;

    &lt;p&gt;&lt;a href=&quot;/learn/how&quot;&gt;CloudCaptain&lt;/a&gt; lets accomplish all this a single command, &lt;a href=&quot;/docs/commandline/run&quot;&gt;&lt;strong&gt;boxfuse run&lt;/strong&gt;&lt;/a&gt;, that will
    effectively fuse your application artifact into an image, convert CloudCaptain image to an AWS AMI and launch the number of instances you desire based on the newly created AMI.
    &lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Some of you however have already been practicing this for a long time&lt;/strong&gt; with various combinations of open-source
    and in-house tools. You have asked us to provide you with a &lt;strong&gt;gradual migration process&lt;/strong&gt; to adopt CloudCaptain one piece at a time.&lt;/p&gt;

    &lt;p&gt;And that&apos;s why today we are introducing &lt;a href=&quot;/docs/commandline/convert&quot;&gt;&lt;strong&gt;boxfuse convert&lt;/strong&gt;&lt;/a&gt; to allow
    you to benefit from CloudCaptain&apos;s incredibly fast AMI creation, while still relying on your current instance provisioning technology:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/boxfuse-convert.png&quot; alt=&quot;CloudCaptain Convert&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;With &lt;strong&gt;boxfuse convert&lt;/strong&gt; you can finally say goodbye to your old, slow and flaky AMI creation workflows.
        This is all you need to do to go from a JVM-based application (using &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;Dropwizard&lt;/a&gt; in this example) to a fully-provisioned, secure, production-ready AMI:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 90%&quot;&gt;&amp;gt; boxfuse convert dwunikernel-1.0.jar

Fusing Image for dwunikernel-1.0.jar ...
Image fused in 00:06.525s (55362 K) -&gt; axelfontaine/dwunikernel:1.0
Pushing axelfontaine/dwunikernel:1.0 ...
Verifying axelfontaine/dwunikernel:1.0 ...
Waiting for AWS to create an AMI for axelfontaine/dwunikernel:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:19.777s -&gt; ami-e66264fb&lt;/pre&gt;

    &lt;p&gt;And there you have it:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/aws-console.png&quot; alt=&quot;AMI in AWS Console&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Your brand new &lt;strong&gt;fully-provisioned AMI&lt;/strong&gt; has been &lt;strong&gt;created from scratch in less than 30 seconds&lt;/strong&gt;!
        It is tagged consistently with &lt;code&gt;boxfuse:app&lt;/code&gt; and &lt;code&gt;boxfuse:image&lt;/code&gt; tags so you can retrieve it quickly and reliably.
        You can immediately start launching instances based upon it from the AWS console or your orchestration tool of choice.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Comparing to Packer&lt;/h2&gt;

    &lt;p&gt;&lt;a href=&quot;https://packer.io/&quot;&gt;Packer&lt;/a&gt; is a great tool for building images for many platforms. It is not without its problems
        though. Besides the fact that Packer effectively builds an image per platform (instead of using the same image on all platforms),
        it is also incredibly slow when it comes to building AMIs. For comparison, try building the same type of AMI (HVM+EBS in this case)
        using Packer and Ubuntu 14.04 LTS. And don&apos;t forget to go and grab a coffee, as it will take a while. Compared to Packer&apos;s
    &lt;a href=&quot;https://packer.io/docs/builders/amazon-ebs.html&quot;&gt;EBS backed AMI builder&lt;/a&gt;, &lt;strong&gt;CloudCaptain is more than 10 times faster:&lt;/strong&gt;&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/boxfuse-vs-packer.png&quot; alt=&quot;CloudCaptain vs Packer: time&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;And that&apos;s not all. &lt;strong&gt;CloudCaptain&apos;s AMIs are also more than 10 times smaller&lt;/strong&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/amis-in-30-seconds/boxfuse-vs-packer-size.png&quot; alt=&quot;CloudCaptain vs Packer: size&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;(In fact CloudCaptain AMIs are even much smaller than that, but AWS&apos;s smallest EBS snapshot size is a full 1 GB)&lt;/p&gt;

    &lt;p&gt;And finally consider the &lt;strong&gt;effort required&lt;/strong&gt; to write and maintain your Packer .json descriptors
        (don&apos;t forget to pin the version of every single package to avoid the issues of
    &lt;a href=&quot;/blog/no-ssh&quot;&gt;deferred provisioning&lt;/a&gt;) to create fully-provisioned hardened images that are ready
        to boot without manual tuning and with &lt;a href=&quot;/blog/no-ssh&quot;&gt;no SSH&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;Now look at &lt;strong&gt;CloudCaptain Convert&apos;s one-liner&lt;/strong&gt; again and see for yourself just how easy things can be.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;How does CloudCaptain do it?&lt;/h2&gt;

    &lt;p&gt;&lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain&lt;/strong&gt;&lt;/a&gt; intelligently analyses your application and
        &lt;strong&gt;generates minimal images in seconds&lt;/strong&gt;. There is &lt;a href=&quot;/learn/how&quot;&gt;no general purpose operating system and
        no tedious provisioning&lt;/a&gt;. CloudCaptain images are lean, secure and efficient. You
        can run them on VirtualBox for development and deploy them unchanged and with &lt;strong&gt;zero downtime on
            AWS&lt;/strong&gt; for test and production.&lt;/p&gt;

    &lt;p&gt;So if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub account
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; gives you
        100 AMI builds per month. And if you wish to take things further it also aligns
        perfectly with the AWS free tier, so you can &lt;strong&gt;deploy your application to EC2 completely free&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/devnexus-2015</id>
    <link type="text/html" rel="alternate" href="/blog/devnexus-2015"/>
    <title>Immutable Infrastructure Talk at DevNexus 2015</title>
    <published>2015-08-11T00:00:00+00:00</published>
    <updated>2015-08-11T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;This year has seen plenty of CloudCaptain &lt;a href=&quot;/events&quot;&gt;events&lt;/a&gt; and we have plenty more coming up!&lt;/p&gt;

    &lt;p&gt;Today we are happy to share with you the recording of the highly acclaimed &lt;a href=&quot;https://devnexus.com/s/devnexus2015/presentations#id-4759&quot;&gt;DevNexus 2015&lt;/a&gt;
        talk about &lt;strong&gt;&lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;/learn/how&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/strong&gt;
    by &lt;strong&gt;Axel Fontaine&lt;/strong&gt;, founder and CEO of CloudCaptain.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;What attendees had to say about it&lt;/h2&gt;
    &lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt; was phenomenal presenting the mind blowing idea of &amp;quot;Immutable Infrastructure&amp;quot; - &lt;a href=&quot;https://twitter.com/hashtag/devnexus?src=hash&quot;&gt;#devnexus&lt;/a&gt;&lt;/p&gt;&amp;mdash; Ali Faisal (@alifais) &lt;a href=&quot;https://twitter.com/alifais/status/575793240487649280&quot;&gt;March 11, 2015&lt;/a&gt;&lt;/blockquote&gt;
    &lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;At a really fun presentation by &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt; on immutable app/server architecture &lt;a href=&quot;https://twitter.com/hashtag/devnexus?src=hash&quot;&gt;#devnexus&lt;/a&gt;&lt;/p&gt;&amp;mdash; Kevin (@anjunatl) &lt;a href=&quot;https://twitter.com/anjunatl/status/575757939190841344&quot;&gt;March 11, 2015&lt;/a&gt;&lt;/blockquote&gt;
    &lt;p&gt;So if you weren&apos;t there, regardless of whether you are new to Immutable Infrastructure and CloudCaptain or if you
    are already on board and what to check out some best practices, follow this attendee&apos;s advice:&lt;/p&gt;
    &lt;blockquote class=&quot;twitter-tweet&quot; data-partner=&quot;tweetdeck&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Y&amp;#39;all are missing &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;@axelfontaine&lt;/a&gt;&amp;#39;s session &amp;quot;Immutable Infrastructure: the new App Deployment&amp;quot;... Catch the recording later! &lt;a href=&quot;https://twitter.com/hashtag/devnexus?src=hash&quot;&gt;#devnexus&lt;/a&gt;&lt;/p&gt;&amp;mdash; Adam DeJardine (@adamdejardine) &lt;a href=&quot;https://twitter.com/adamdejardine/status/575754576806027264&quot;&gt;March 11, 2015&lt;/a&gt;&lt;/blockquote&gt;
    &lt;script async src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
    &lt;h2 class=&quot;blog-post-section&quot;&gt;Video recording of the talk&lt;/h2&gt;

    &lt;div class=&quot;aspect-ratio&quot;&gt;
        &lt;iframe src=&quot;https://www.youtube.com/embed/wTT9DuyIeHo&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Slides&lt;/h2&gt;
    &lt;script async class=&quot;speakerdeck-embed&quot; data-id=&quot;58a39a45b30d4d1f9c0a0737035cb928&quot; data-ratio=&quot;1.77777777777778&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt;


    &lt;h2 class=&quot;blog-post-section&quot;&gt;Try it now&lt;/h2&gt;
    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain&lt;/strong&gt;&lt;/a&gt; intelligently
        analyses your application and
        &lt;strong&gt;generates minimal images in seconds&lt;/strong&gt;.
        There is no general purpose operating system and no tedious provisioning. CloudCaptain images are lean, secure and
        efficient. You
        can run them on VirtualBox for development and deploy them unchanged and with &lt;strong&gt;zero downtime on
            AWS&lt;/strong&gt; for test and
        production. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy your application to EC2 completely free.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/events-2015-q3</id>
    <link type="text/html" rel="alternate" href="/blog/events-2015-q3"/>
    <title>CloudCaptain Events in Q3 2015</title>
    <published>2015-07-21T00:00:00+00:00</published>
    <updated>2015-07-21T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Always wanted to learn more about &lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt; and the &lt;a
            href=&quot;/blog/no-ssh&quot;&gt;No SSH movement&lt;/a&gt;?
        Want to see CloudCaptain in action and talk to like-minded forward thinking people? Look no further. We have a number
        of exciting
        &lt;a href=&quot;/events&quot;&gt;events&lt;/a&gt; lined up in Q3 across North America and Europe.&lt;/p&gt;

    &lt;div id=&quot;events&quot;&gt;
        &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-md-4&quot;&gt;&lt;a href=&quot;https://walnutstlabs.com/event/night-owls-at-walnut-st-labs-9/&quot;&gt;&lt;img src=&quot;/assets/events/iSchool.png&quot;&gt;&lt;/a&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col-md-8&quot;&gt;
                &lt;h2&gt;&lt;a href=&quot;https://walnutstlabs.com/event/night-owls-at-walnut-st-labs-9/&quot;&gt;Intro to CloudCaptain&lt;/a&gt;&lt;/h2&gt;

                &lt;p&gt;&lt;strong&gt;12th August 2015&lt;/strong&gt; in &lt;strong&gt;West Chester, Pennsylvania, USA&lt;/strong&gt;&lt;/p&gt;

                &lt;p&gt;Learn to ship your products with Shippable and CloudCaptain. Join the DevOps 2.0 revolution with
                    continuous delivery and manage deployments of multi-tier applications without code, scripts, or IT
                    automation tools.&lt;/p&gt;

                &lt;p&gt;Presented by &lt;a href=&quot;https://twitter.com/aschwabe&quot;&gt;&lt;strong&gt;Andrew Schwabe&lt;/strong&gt;&lt;/a&gt;, Founder and
                    CEO of &lt;a href=&quot;https://formatic.ly/&quot;&gt;Formatic.ly&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-md-4&quot;&gt;&lt;a href=&quot;https://www.meetup.com/KasselCodeMeetup/events/223304645/&quot;&gt;&lt;img
                    src=&quot;/assets/events/kassel-code-meetup.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
            &lt;div class=&quot;col-md-8&quot;&gt;
                &lt;h2&gt;&lt;a href=&quot;https://www.meetup.com/KasselCodeMeetup/events/223304645/&quot;&gt;Spring Boot mit AWS und
                    CloudCaptain&lt;/a&gt;&lt;/h2&gt;

                &lt;p&gt;&lt;strong&gt;2nd September 2015&lt;/strong&gt; in &lt;strong&gt;Kassel, Germany&lt;/strong&gt;&lt;/p&gt;

                &lt;p&gt;Presented by &lt;a href=&quot;https://github.com/waldemarschneider&quot;&gt;&lt;strong&gt;Waldemar Schneider&lt;/strong&gt;&lt;/a&gt;,
                    Senior Developer at &lt;a href=&quot;https://www.flavia-it.de/&quot;&gt;Flavia&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-md-4&quot;&gt;&lt;a
                    href=&quot;https://2015.javazone.no/details.html?talk=9d8b67334c65cd7cd21dee8fe8de3f9128f70a923107ee365427747e341a9c54&quot;&gt;&lt;img
                    src=&quot;/assets/events/javazone.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
            &lt;div class=&quot;col-md-8&quot;&gt;
                &lt;h2&gt;
                    &lt;a href=&quot;https://2015.javazone.no/details.html?talk=9d8b67334c65cd7cd21dee8fe8de3f9128f70a923107ee365427747e341a9c54&quot;&gt;Up
                        in the sky: Architecture and Deployment of Microservices for the Cloud&lt;/a&gt;&lt;/h2&gt;

                &lt;p&gt;&lt;strong&gt;10th September 2015&lt;/strong&gt; in &lt;strong&gt;Oslo, Norway&lt;/strong&gt;&lt;/p&gt;

                &lt;p&gt;The case for running an own datacenter is vanishing rapidly. The cloud seduces with a low barrier of
                    entry and full flexibility. Infrastructure can be spun up almost instantly in a fully automated way
                    through an API. All this with no upfront costs and the ability to decommission it just as fast. But
                    what does this mean for our applications and their architecture? Can we just lift and shift them to
                    the cloud? Everything comes at a price. To be able to fully leverage the potential of the cloud, new
                    challenges must be mastered: from data privacy and security to cost-based architectures, dynamic
                    provisioning, service discovery and efficient deployment models. This talk provides architects and
                    developers clear answers and battle-tested solutions for a successful journey to infrastructure
                    heaven.&lt;/p&gt;

                &lt;p&gt;Presented by &lt;a href=&quot;https://twitter.com/axelfontaine&quot;&gt;&lt;strong&gt;Axel Fontaine&lt;/strong&gt;&lt;/a&gt;, Founder
                    and CEO of &lt;a href=&quot;https://cloudcaptain.sh/&quot;&gt;CloudCaptain&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;p&gt;If you want to learn more, we also put together a brand new page with &lt;strong&gt;&lt;a href=&quot;/events&quot;&gt;all past and future CloudCaptain events&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
            CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain&lt;/strong&gt;&lt;/a&gt; intelligently
        analyses your application and
        &lt;strong&gt;generates minimal images in seconds&lt;/strong&gt;.
        There is no general purpose operating system and no tedious provisioning. CloudCaptain images are lean, secure and
        efficient. You
        can run them on VirtualBox for development and deploy them unchanged and with &lt;strong&gt;zero downtime on
            AWS&lt;/strong&gt; for test and
        production. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy your application to EC2 completely free.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/no-ssh</id>
    <link type="text/html" rel="alternate" href="/blog/no-ssh"/>
    <title>Immutable Infrastructure: No SSH</title>
    <published>2015-07-13T00:00:00+00:00</published>
    <updated>2015-07-13T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;One of the things that is really exciting about &lt;a href=&quot;/learn/why&quot;&gt;Immutable Infrastructure&lt;/a&gt; is that it
        opens up a vast number of opportunities to revisit old ways and change them for the better. One of those is
        &lt;strong&gt;drift&lt;/strong&gt;, the slow natural divergence of machines from each other and their intended setup. There are two main
    causes for this: deferred provisioning and updates. Both are exacerbated by time. &lt;strong&gt;The longer apart machines
    are set up and the longer they exists, the higher the likely hood to run into drift problems.&lt;/strong&gt; Let&apos;s look at each of
        these in turn.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Why is drift a problem?&lt;/h2&gt;
    &lt;p&gt;The first question to ask is really: why is drift itself a problem? Or to put it differently: why is having identical
        machines important?&lt;/p&gt;

    &lt;p&gt;One of the primary ways to reduce risk in a software system is testing. Both manual and automated testing rely
    on the same three step workflow:&lt;/p&gt;
    &lt;ol&gt;
        &lt;li&gt;Put the system in a known state&lt;/li&gt;
        &lt;li&gt;Perform an action&lt;/li&gt;
        &lt;li&gt;Compare the results against your expectations&lt;/li&gt;
    &lt;/ol&gt;
    &lt;p&gt;Putting the system in a known state does not only apply to data, it also applies to the versions of all the
    software components installed. Once your system is correctly set up, your tests will then validate version X
        of your code running on version Y of your platform
    while having version Z of a library on board. All other combinations are unknown and must be validated separately.
        In other words, &lt;strong&gt;there is no guarantee that the exact version of your code
    will work identically when combined with older or newer versions of the platform and libraries&lt;/strong&gt; as older versions may still
    contain bugs and newer versions could have regressions or subtle changes.&lt;/p&gt;
    &lt;p&gt;For the investment you have made with your tests to have any value, you must therefore ensure the known state of the system
    and the versions of all components can be easily and safely replicated across machines and environments.&lt;/p&gt;

    &lt;p&gt;Or to put it more simply: to have any guarantee that things will work, &lt;strong&gt;you need to run in production what you tested in test&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;The same thing of course also applies within a single environment. If you have multiple machines serving clients
        behind a load balancer and want to keep your sanity, you also want these to be absolutely identical.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;The problems with deferred provisioning&lt;/h2&gt;

    &lt;p&gt;Now you may think this is easily solved by using some solid automated provisioning mechanism. Regardless of whether you favor shell scripts or
        configuration management tools, this is not as easy as it seems. The problem lies in the common usage patterns
        of package managers and update timings in central repositories. Trouble starts the minute you start relying on
        commands like this:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; sudo apt-get install mypkg&lt;/pre&gt;

    &lt;p&gt;To better illustrate why this is a problem, look at this simple example of three machines being set up based on
        the exact same provisioning script at different points in time:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/no-ssh/classic.png&quot; alt=&quot;Drift using classic provisioning&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;As you can see, even though all machines install Package A and Package B, the difference in provisioning time
        causes the same script to pull different versions of the same packages onto the various machines. &lt;strong&gt;You effectively
        couple the stability of your system to the update schedule of individual packages in the central repository!&lt;/strong&gt;&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Images to the rescue&lt;/h2&gt;

    &lt;p&gt;One way to fix this is to pin all packages and all their transitive dependencies to specific versions. While this
        lets your regain control of the update schedule of your system, this comes with a high maintenance overhead.&lt;/p&gt;

    &lt;p&gt;A simpler and more reliable alternative is to stick to the proven mantra: &lt;strong&gt;build your artifact only once&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;To eliminate differences (and thus potential causes of failure) between environment, &lt;strong&gt;your build should produce an artifact that captures your application and all
        its dependencies at the lowest level possible&lt;/strong&gt;. When working with virtual infrastructure, the lowest level possible
    is simply an &lt;strong&gt;image of the entire machine&lt;/strong&gt;. From then on identical instances can be created when you want as often as you want:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/no-ssh/image.png&quot; alt=&quot;Reliable image-based provisioning&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;While images make it easy to create identical machines, this doesn&apos;t solve all problems.
        &lt;strong&gt;As soon as you have the possibility to log in you
        lose guarantee that those machines will not diverge over time&lt;/strong&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/no-ssh/update.png&quot; alt=&quot;Image drift&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;The longer those machines those machines exists, the more likely someone will have modified something and
    the harder they become to recreate exactly. This effectively largely removes a lot of the benefits.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Enforcing immutability&lt;/h2&gt;

    &lt;p&gt;So what can be done to remedy this? You need to &lt;strong&gt;prevent log in&lt;/strong&gt;. This not only removes the drift problem. It also
        has very compelling security implications by &lt;strong&gt;reducing your attack surface&lt;/strong&gt;. &lt;del&gt;Vulnerabilities like ShellShock
        simply vanish.*&lt;/del&gt; And on top of that it forces you to stick to a clean image-based workflow, without hacks or
        back-doors. In light of all these advantages we&apos;d like to invite you to &lt;strong&gt;join us on the no SSH movement&lt;/strong&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/no-ssh/no-ssh.png&quot; alt=&quot;No SSH&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Your infrastructure now effectively becomes immutable. &lt;strong&gt;Any change requires rebuilding of a new image through
    your regular automated build and deployment pipeline&lt;/strong&gt;. In turn your system drastically gains in simplicity and
    reliability. A pretty good deal if you ask us.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/no-ssh/image-no-ssh.png&quot; alt=&quot;Immutable Images&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Conclusion&lt;/h2&gt;

    &lt;p&gt;Drift reduces the reliability of your system by effectively undermining the guarantees you gained while testing
    it. Yet it very easily occurs when relying on traditional provisioning.&lt;/p&gt;

    &lt;p&gt;By moving to a build and deployment pipeline that captures your application and all of its dependencies at the
        lowest possible level, you can regain a lot of confidence. When dealing with virtual hardware, the best way
        to achieve this is to produce images of an entire system. To ensure the process stays reliable and to keep you honest
        you should eliminate SSH and the ability to log in. &lt;strong&gt;Your images and your infrastructure effectively becomes immutable.
    Any change triggers the creation of a new image, which is built only once for all environments.&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;* Update:&lt;/strong&gt; As correctly pointed out by a few people, the ShellShock vulnerability doesn&apos;t fully
        vanish with this in a general-purpose operating system. This is a CloudCaptain-specific point as CloudCaptain doesn&apos;t include
    bash either.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Take it to 11&lt;/h2&gt;

    &lt;p&gt;&lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;&lt;strong&gt;CloudCaptain&lt;/strong&gt;&lt;/a&gt; lets you do all this and more. CloudCaptain intelligently analyses your application and
        &lt;strong&gt;generates minimal images in seconds&lt;/strong&gt;.
    There is no general purpose operating system and no tedious provisioning. CloudCaptain images are lean, secure and efficient. You
    can run them on VirtualBox for development and deploy them unchanged and with &lt;strong&gt;zero downtime on AWS&lt;/strong&gt; for test and
    production.&lt;/p&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy your application to EC2 completely free.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/spring-boot-ec2</id>
    <link type="text/html" rel="alternate" href="/blog/spring-boot-ec2"/>
    <title>Deploying Spring Boot Apps on EC2</title>
    <published>2015-06-10T00:00:00+00:00</published>
    <updated>2015-06-10T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Lately the JVM-world has finally started embracing solutions that just work.
        Gone are the days where you had to manually wire together many components and write large amounts of XML configuration
        just to make things work. Today it is all about being productive from the get go. And to us this is really music to our ears.
        Our products (&lt;a href=&quot;https://flywaydb.org&quot;&gt;Flyway&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt;) have always adhered to this exact design principle from the start.
        And so regardless of whether
    you easily want to migrate your
        relational databases or fuse your applications into bootable apps, &lt;a href=&quot;https://flywaydb.org&quot;&gt;Flyway&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt;
        work very had to make you successful. Rapidly and reliably.&lt;/p&gt;

    &lt;p&gt;Pivotal has now gone the same way and tied their entire portfolio of Spring frameworks and libraries
    into a fantastic framework called &lt;a href=&quot;https://projects.spring.io/spring-boot/&quot;&gt;Spring Boot&lt;/a&gt;. It is a turn-key solution to the Spring ecosystem.&lt;/p&gt;

    &lt;p&gt;At its core, &lt;a href=&quot;https://projects.spring.io/spring-boot/&quot;&gt;Spring Boot&lt;/a&gt; combines your
    application with an embedded container and all its other libraries into a single executable jar that can easily
    be deployed onto any system. It adds lots of auto-configuration and integration options to make your
        application production-ready from day one. In fact Spring Boot even offers
        &lt;a href=&quot;https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup&quot;&gt;out of the box integration for
        Flyway&lt;/a&gt; so adopting industry best practices like database migrations has never been easier.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/springboot-ec2.png&quot; alt=&quot;Spring Boot to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;In this post we&apos;ll &lt;strong&gt;take Spring Boot&apos;s idea of executable jars to its natural conclusion&lt;/strong&gt;:
        fusing your Spring Boot application together with a JVM and a kernel into a immutable bootable app that can be run unchanged on both VirtualBox and EC2.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started ensure you have &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;created a CloudCaptain account&lt;/a&gt; (it&apos;s free, just log in with your GitHub id).
        Make sure to associate it with your &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;AWS account&lt;/a&gt; in the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain console&lt;/a&gt; to deploy on EC2.&lt;/p&gt;
    &lt;p&gt;You will also need Java, Maven and VirtualBox installed on your machine.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Creating a Spring Boot app&lt;/h2&gt;

    &lt;p&gt;Creating a new Spring Boot app is incredibly easy. The Spring Boot website provides a simple service at
        &lt;a href=&quot;https://start.spring.io&quot;&gt;start.spring.io&lt;/a&gt; to create
    application skeletons directly via http. To create the application for this post, you can
        either &lt;a href=&quot;https://start.spring.io/starter.zip?baseDir=springbootec2&amp;groupId=boxfusedemo&amp;artifactId=springbootec2&amp;version=1.0&amp;name=springbootec2&amp;description=Demo+project+for+Spring+Boot+on+EC2+blog+post+at+https%3A%2F%2Fcloudcaptain.sh%2Fblog%2Fspring-boot-ec2.html&amp;packageName=springbootec2&amp;type=maven-project&amp;packaging=jar&amp;javaVersion=1.8&amp;language=java&amp;bootVersion=1.2.4.RELEASE&amp;style=web&amp;style=actuator&amp;generate-project=&quot;&gt;click to generate the application&lt;/a&gt; and extract it or type this one-liner:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; curl &quot;https://start.spring.io/starter.zip?baseDir=springbootec2&amp;groupId=boxfusedemo&amp;artifactId=springbootec2&amp;version=1.0&amp;name=springbootec2&amp;description=Demo+project+for+Spring+Boot+on+EC2+blog+post+at+https%3A%2F%2Fcloudcaptain.sh%2Fblog%2Fspring-boot-ec2.html&amp;packageName=springbootec2&amp;type=maven-project&amp;packaging=jar&amp;javaVersion=1.8&amp;language=java&amp;bootVersion=1.2.4.RELEASE&amp;style=web&amp;style=actuator&amp;generate-project=&quot; &gt; springbootec2.zip &amp;amp;&amp;amp; unzip springbootec2.zip&lt;/pre&gt;

    &lt;p&gt;Now change to the newly created directory and you&apos;ll find the following structure:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/structure.png&quot; alt=&quot;Spring Boot project structure&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;To be able to interact with the application you&apos;ll need a controller, so go ahead and create one as &lt;code&gt;springbootec2.HelloController&lt;/code&gt; with the following contents:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;package springbootec2;
    
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HelloController {
    @RequestMapping(value = &quot;/hello&quot;, method = RequestMethod.GET)
    public Map&amp;lt;String, Object&amp;gt; hello(@RequestParam(value = &quot;name&quot;, defaultValue = &quot;CloudCaptain&quot;) String name) {
        Map&amp;lt;String, Object&amp;gt; result = new HashMap&amp;lt;&amp;gt;();
        result.put(&quot;greeting&quot;, &quot;Hello &quot; + name + &quot;!&quot;);
        return result;
    }
}&lt;/pre&gt;

    &lt;p&gt;Your application is now fully set up. As your skeleton also includes Spring Boot&apos;s actuator (their turn-key production readiness features), you now have two urls available:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;code&gt;/hello&lt;/code&gt; : your controller&lt;/li&gt;
        &lt;li&gt;&lt;code&gt;/health&lt;/code&gt; : Spring Boot&apos;s health check page&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Go ahead and try it by executing&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn package&lt;/pre&gt;

    &lt;p&gt;followed by&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; java -jar target/springbootec2-1.0.jar&lt;/pre&gt;

    &lt;p&gt;You should now be able to see it in action at &lt;a href=&quot;https://localhost:8080/hello?name=world&quot; target=&quot;_blank&quot;&gt;https://localhost:8080/hello?name=world&lt;/a&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/helloworld.png&quot; alt=&quot;Hello World&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Fusing it into a CloudCaptain Bootable App&lt;/h2&gt;

    &lt;p&gt;&lt;strong&gt;To ensure an application runs reliably on another environment, always strive to package and transport it at the lowest level possible.&lt;/strong&gt;
    Spring Boot already helps you part of the way by embedding the application server and all other other libraries
    directly into the executable jar. This is great as it avoids the need to separately install and update an application on each individual instance.
    However you are still responsible for ensuring the base operating system, its libraries and the JVM are properly installed, updated and configured.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/war-springboot-boxfuse.png&quot; alt=&quot;War file -&gt; Spring Boot -&gt; CloudCaptain&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain starts where Spring Boot leaves off.&lt;/strong&gt; It takes your Spring Boot executable jar and fuses it with a JVM and a Linux kernel
        into a single immutable unit called a Bootable App. This Bootable App is created in seconds and takes just 1% of the size of a regular system.
        It only contains your app and its direct dependencies. Nothing else. CloudCaptain does away with the operating system and the provisioning as you know it.
        Instead it analyses your application and &lt;strong&gt;generates a very efficient tailor-made image on the fly&lt;/strong&gt;. This image can then be launched
        unchanged on VirtualBox and AWS. No intermediate OS, runtime daemon or other installation is required. It &lt;strong&gt;runs directly on your virtualization layer&lt;/strong&gt;.
    &lt;/p&gt;

    &lt;p&gt;To fuse your Spring Boot executable jar into a CloudCaptain Bootble simply issue this command:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse fuse target/springbootec2-1.0.jar

Fusing Image for springbootec2-1.0.jar ...
Image fused in 00:06.423s (53253 K) -&gt; axelfontaine/springbootec2:1.0&lt;/pre&gt;

    &lt;p&gt;In just a few seconds CloudCaptain took your Spring Boot executable jar (12 MB) and fused it into a 53 MB image containing a Java 8 JVM and a kernel:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse ls

Images available locally:
+--------------------------------+-----------------------+-------+---------+-------------+------------+---------+
| Image                          |        Payload        | Debug |  Java   |  AppServer  |   Ports    |  Size   |
+--------------------------------+-----------------------+-------+---------+-------------+------------+---------+
| axelfontaine/springbootec2:1.0 | springbootec2-1.0.jar | false | 8.45.14 | Spring Boot | http -&gt; 80 | 53253 K |
+--------------------------------+-----------------------+-------+---------+-------------+------------+---------+
Total: 1&lt;/pre&gt;

    &lt;p&gt;CloudCaptain has &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;built-in deep integration for Spring Boot applications&lt;/a&gt;.
        It automatically detects the Spring Boot actuator health check urls as well as the port configuration.&lt;/p&gt;

    &lt;p&gt;To ensure your application can configure itself correctly, CloudCaptain automatically activates a Spring profile called &lt;code&gt;boxfuse&lt;/code&gt; on startup.&lt;/p&gt;

    &lt;p&gt;Time to see it in action. Launch your shiny new bootable app on VirtualBox with one command:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run springbootec2:1.0

Launching Instance of axelfontaine/springbootec2:1.0 on VirtualBox ...
Forwarding http port localhost:8888 -&gt; vb-9b5be89b:80
Instance launched in 00:06.005s -&gt; vb-9b5be89b
Waiting for Payload to start on Instance vb-9b5be89b ...
vb-9b5be89b =&gt; &lt;em&gt;instance boot messages omitted&lt;/em&gt;
vb-9b5be89b =&gt; &lt;em&gt;...&lt;/em&gt;
vb-9b5be89b =&gt; &lt;em&gt;...&lt;/em&gt;
Payload started in 00:07.490s -&gt; https://127.0.0.1:8888&lt;/pre&gt;

    &lt;p&gt;Your VirtualBox instance is now up and running as you can see in your browser:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/helloboxfuse.png&quot; alt=&quot;Hello CloudCaptain!&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Running it unchanged on EC2&lt;/h2&gt;

    &lt;p&gt;Now that you&apos;ve successfully fused your Spring Boot executable jar into an image and booted it on VirtualBox,
    it is time to launch an instance of it on EC2. By default CloudCaptain &lt;a href=&quot;/docs/#environments&quot;&gt;supports 3 environments&lt;/a&gt;: &lt;code&gt;dev&lt;/code&gt; (default, VirtualBox),
    &lt;code&gt;test&lt;/code&gt; (AWS) and &lt;code&gt;prod&lt;/code&gt; (AWS).&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/environments.png&quot; alt=&quot;Environments&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;So in this case, all you need to do is switch the environment to &lt;code&gt;prod&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run springbootec2:1.0 -env=prod

Creating axelfontaine/springbootec2 ...
Pushing axelfontaine/springbootec2:1.0 ...
Verifying axelfontaine/springbootec2:1.0 ...
Creating Elastic IP ...
Mapping springbootec2-axelfontaine.boxfuse.io to 52.28.128.122 ...
Waiting for AWS to create an AMI for axelfontaine/springbootec2:1.0 in eu-central-1 ...
AMI created in 00:31.553s -&gt; ami-f88ab3e5
Creating security group boxfuse-sg_axelfontaine/springbootec2:1.0 ...
Launching t2.micro instance of axelfontaine/springbootec2:1.0 (ami-f88ab3e5) in eu-central-1 ...
Instance launched in 00:21.765s -&gt; i-0ae46fcb
Waiting for Payload to start on Instance i-0ae46fcb at https://52.28.132.192/health ...
Remapping Elastic IP 52.28.128.122 to i-0ae46fcb ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. axelfontaine/springbootec2:1.0 is up and running at https://springbootec2-axelfontaine.boxfuse.io&lt;/pre&gt;

    &lt;p&gt;And there you have it:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/helloec2.png&quot; alt=&quot;Hello EC2&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;So what just happened here? Quite a few things! In about &lt;strong&gt;60 seconds&lt;/strong&gt; CloudCaptain&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;encrypted and signed your image (springbootec2:1.0)&lt;/li&gt;
        &lt;li&gt;uploaded it to the CloudCaptain Vault &amp; verified the signature&lt;/li&gt;
        &lt;li&gt;created a new AWS elastic IP (52.28.128.122)&lt;/li&gt;
        &lt;li&gt;created a new domain name (springbootec2-axelfontaine.boxfuse.io)&lt;/li&gt;
        &lt;li&gt;mapped the domain name to the elastic ip&lt;/li&gt;
        &lt;li&gt;converted your image to an AMI (Amazon Machine Image)&lt;/li&gt;
        &lt;li&gt;created an AWS security group based on the port information it detected when fusing the image&lt;/li&gt;
        &lt;li&gt;launched a t2.micro instance based on the newly created AMI&lt;/li&gt;
        &lt;li&gt;checked the health of your app at &lt;code&gt;/health&lt;/code&gt; based on the Spring Boot actuactor configuration&lt;/li&gt;
        &lt;li&gt;remapped the AWS elastic IP to your new instance&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;All of this with a &lt;strong&gt;single command&lt;/strong&gt; and no additional configuration required.&lt;/p&gt;

    &lt;p&gt;You can also &lt;strong&gt;integrate CloudCaptain directly into your build&lt;/strong&gt; by using either the &lt;a href=&quot;/docs/maven&quot;&gt;CloudCaptain Maven Plugin&lt;/a&gt;
    or the &lt;a href=&quot;/docs/gradle&quot;&gt;CloudCaptain Gradle Plugin&lt;/a&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post you saw why &lt;a href=&quot;https://projects.spring.io/spring-boot/&quot;&gt;Spring Boot&lt;/a&gt; is a great way to be productive from the get go with Spring. We saw that by embedding
    the application server and all other libraries directly into an executable jar, you gain greater consistency between environments.
    We then took this idea to its natural conclusion and used &lt;a href=&quot;https://cloudcaptain.sh&quot;&gt;CloudCaptain&lt;/a&gt; to fuse the Spring Boot executable in a Bootable App that
    bundles all direct dependencies of the application all the way down to the OS kernel. The image was created in seconds and measured just a few MBs.
        We ran it on VirtualBox and deployed it unchanged in under 60 seconds on AWS with a single command. What you have here is the
        &lt;strong&gt;simplest and most reliable way to run your Spring Boot applications on EC2&lt;/strong&gt;.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/spring-boot-ec2/springboot-ec2.png&quot; alt=&quot;Spring Boot to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;You can read more about CloudCaptain&apos;s &lt;a href=&quot;/docs/payloads/springboot&quot;&gt;first class support for Spring Boot&lt;/a&gt; as well as how to integrate it directly into
    your build with the CloudCaptain &lt;a href=&quot;/docs/maven&quot;&gt;Maven&lt;/a&gt; &amp;amp; &lt;a href=&quot;/docs/gradle&quot;&gt;Gradle&lt;/a&gt; plugins. Find out more about
        &lt;a href=&quot;/docs/aws&quot;&gt;AWS support&lt;/a&gt;, deploying Elastic Load Balancers and multiple instances and more in the &lt;a href=&quot;/docs&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; now. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your Spring Boot application to EC2 completely free.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/gradle-plugin</id>
    <link type="text/html" rel="alternate" href="/blog/gradle-plugin"/>
    <title>Hello Gradle!</title>
    <published>2015-05-26T00:00:00+00:00</published>
    <updated>2015-05-26T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;Here are CloudCaptain we pride ourselves for providing you with the &lt;a href=&quot;/blog/welcome&quot;&gt;easiest solution
        to produce minimal and secure images for your JVM-apps&lt;/a&gt; that can then be
        deployed unchanged on VirtualBox and AWS.&lt;/p&gt;

    &lt;p&gt;As shown in our three part article on &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;creating a Continuous Deployment
    pipeline for Dropwizard-based unikernels from GitHub to AWS&lt;/a&gt;, we relied
    on Travis CI and the CloudCaptain Maven plugin to fuse and run the images.&lt;/p&gt;

    &lt;p&gt;We always strongly believed in direct build tool integration. That&apos;s
        also the reason why we&apos;ve had Maven support from the get go. However
        these days a large number of you favor &lt;a href=&quot;https://gradle.org&quot;&gt;Gradle&lt;/a&gt; and its small and
        readable build files to build your projects. Today we are happy to
        announce the &lt;strong&gt;release of the CloudCaptain Gradle plugin&lt;/strong&gt;. You can now
        use all CloudCaptain commands directly from within your Gradle build.
    &lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/gradle-plugin/boxfuse-gradle.png&quot; alt=&quot;Gradle plugin&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;How does it work?&lt;/h2&gt;

    &lt;p&gt;You can use the &lt;a href=&quot;/docs/gradle&quot;&gt;CloudCaptain Gradle plugin&lt;/a&gt; in a number of ways.
    The easiest is to simply include the CloudCaptain plugin in &lt;code&gt;build.gradle&lt;/code&gt; and
    add some basic configuration to the CloudCaptain extension:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;buildscript {
    repositories {
        // https is disabled until https://issues.gradle.org/browse/GRADLE-3250 is fixed
        maven { url &apos;https://files.cloudcaptain.sh&apos; }
    }
    dependencies {
        classpath &quot;com.boxfuse.client:boxfuse-gradle-plugin:1.37.0.2024&quot;
    }
}

apply plugin: &apos;boxfuse&apos;

boxfuse {
    &lt;strong&gt;user=&apos;&lt;em&gt;your-boxfuse-client-user&lt;/em&gt;&apos;&lt;/strong&gt;
    &lt;strong&gt;secret=&apos;&lt;em&gt;your-boxfuse-client-secret&lt;/em&gt;&apos;&lt;/strong&gt;
}&lt;/pre&gt;

    &lt;p&gt;You can now execute all CloudCaptain commands as Gradle tasks directly from the command-line:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; gradle build boxfuseRun -info&lt;/pre&gt;

    &lt;p&gt;As you can see there is no need to manually specify the payload
        as CloudCaptain will automatically default to use the project artifact.
    It also automatically uses the project name and version for the image.&lt;/p&gt;

    &lt;p class=&quot;alert alert-info&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt; If you do not want to store your CloudCaptain credentials directly
    in your build file, you can also simply store them in the
    &lt;code&gt;BOXFUSE_USER&lt;/code&gt; and &lt;code&gt;BOXFUSE_SECRET&lt;/code&gt;
    environment variables and they will be picked up automatically.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Build integration&lt;/h2&gt;

    &lt;p&gt;Where CloudCaptain really shines, is when you integrate it directly into
    your build. You can then:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;fuse your artifact into a new image&lt;/li&gt;
    &lt;li&gt;launch an instance of that image on VirtualBox or your CloudCaptain test
    environment on EC2&lt;/li&gt;
        &lt;li&gt;execute your integration tests against it&lt;/li&gt;
    &lt;li&gt;shut it down&lt;/li&gt;
        &lt;li&gt;and if successful deploy the same image unchanged to
    your production environment on AWS&lt;/li&gt;
        &lt;/ul&gt;

    &lt;p&gt;How can you achieve all this
    with CloudCaptain and Gradle? All you need is this simple configuration:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;buildscript {
    repositories {
        // https is disabled until https://issues.gradle.org/browse/GRADLE-3250 is fixed
        maven { url &apos;https://files.cloudcaptain.sh&apos; }
    }
    dependencies {
        classpath &quot;com.boxfuse.client:boxfuse-gradle-plugin:1.37.0.2024&quot;
    }
}

apply plugin: &apos;boxfuse&apos;
apply plugin: &apos;java&apos;

//Omitted dependencies, repositories, ...

//Run deploy &amp;amp; run integration tests in test environment
boxfuse {
    env=&apos;test&apos;
}
task boxfuseRunTest( type: com.boxfuse.client.gradle.task.RunTask )
task boxfuseKillTest( type: com.boxfuse.client.gradle.task.KillTask )
//Pass the url of the newly launched instance to the tests
task testConfig (dependsOn: boxfuseRunTest) &lt;&lt; {
    project.tasks.test.systemProperty &apos;instanceUrl&apos;, boxfuse.instancesResult[0].url
}
test.dependsOn(testConfig)
//Always kill the test instance, even if the tests fail
test.finalizedBy(boxfuseKillTest)

//Deploy with zero-downtime on prod environment
extensions.create(&apos;boxfuseProd&apos;, com.boxfuse.client.gradle.CloudCaptainExtension)
boxfuseProd {
    env=&apos;prod&apos;
}
//Ensure we deploy the same image to prod as the one we just tested
task boxfuseProdConfig (dependsOn: boxfuseKillTest) &lt;&lt; {
    project.tasks.boxfuseRunProd.extension = boxfuseProd
    boxfuseProd.image=boxfuse.image
}
task boxfuseRunProd( type: com.boxfuse.client.gradle.task.RunTask, dependsOn: boxfuseProdConfig )
check.dependsOn(boxfuseRunProd)&lt;/pre&gt;

    &lt;p&gt;And now all you need to do is issue&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; gradle build -info&lt;/pre&gt;

    &lt;p&gt;And there you have it! CloudCaptain will fuse an image,
        run and kill instances in multiple environments
        and more, all while integrated directly in your Gradle build.
    &lt;/p&gt;

    &lt;p&gt;As you can see, you can pass &lt;code&gt;boxfuse.instancesResult[0].url&lt;/code&gt;
    as a system property to your tests, so they know where the instance under test is running.
    &lt;a href=&quot;/docs/gradle/run#dynamic-properties&quot;&gt;CloudCaptain dynamically sets this and others properties&lt;/a&gt; after it launches an instance to
    make it easy for you to interact with your new instance.&lt;/p&gt;

    &lt;p class=&quot;alert alert-info&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt; We extended our
        &lt;a href=&quot;https://github.com/dropwizard/dwunikernel&quot;&gt;Dropwizard sample project&lt;/a&gt; with
        a &lt;code&gt;build.gradle&lt;/code&gt; file so you can see it
        all in action and easily play with it for yourself.
    &lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;In this post we looked at the &lt;a href=&quot;/docs/gradle&quot;&gt;CloudCaptain Gradle plugin&lt;/a&gt; and how
    it makes it a breeze to fuse images and run instances directly from
    your Gradle build.&lt;/p&gt;

    &lt;p&gt;You can find more information in the &lt;a href=&quot;/docs/gradle&quot;&gt;docs for the CloudCaptain Gradle plugin&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;Have fun! And if you haven&apos;t already,
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;&lt;strong&gt;sign up for your
        CloudCaptain account&lt;/strong&gt;&lt;/a&gt; today. All you need is a GitHub user
        and you&apos;ll be up and running in no time. The &lt;a href=&quot;/pricing&quot;&gt;CloudCaptain free plan&lt;/a&gt; aligns
        perfectly with the AWS free tier, so you can deploy
        your application to the cloud completely free.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/logging-cloudnative</id>
    <link type="text/html" rel="alternate" href="/blog/logging-cloudnative"/>
    <title>Logging for Cloud Native Apps</title>
    <published>2015-05-18T00:00:00+00:00</published>
    <updated>2015-05-18T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;When it comes to building and running applications that are native to the cloud a number of old habits need to die
        and make way for modern alternatives. One of these is traditional file-based logging.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;The days of using &lt;em&gt;tail -f&lt;/em&gt; to watch logs scroll by in 5 different terminals are over.&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;This becomes even clearer as you move away from traditional operating systems and classic provisioning towards
        modern &lt;strong&gt;secure minimal images&lt;/strong&gt; like those &lt;a href=&quot;/blog/welcome&quot;&gt;generated by CloudCaptain&lt;/a&gt;. These machines are tailor-made
        for running your application and don&apos;t contain any legacy cruft. In fact, they don&apos;t even let you log in as
        there is &lt;strong&gt;no ssh on board&lt;/strong&gt;. All that is left, is the most efficient structure to run your application on
        VirtualBox and in the cloud.
    &lt;/p&gt;

    &lt;p&gt;So how do traditional instances compare to modern cloud native instances?&lt;/p&gt;

    &lt;table class=&quot;table table-bordered table-striped&quot;&gt;
        &lt;thead&gt;
        &lt;tr&gt;
            &lt;th&gt;Traditional Instances&lt;/th&gt;
            &lt;th&gt;Cloud Native Instances&lt;/th&gt;
        &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;Long lived&lt;/td&gt;
            &lt;td&gt;Disposable&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Reconfigured on change&lt;/td&gt;
            &lt;td&gt;Regenerated on change&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Persistent storage&lt;/td&gt;
            &lt;td&gt;Ephemeral storage&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Multiple GBs&lt;/td&gt;
            &lt;td&gt;Few MBs&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Ability to log in via SSH&lt;/td&gt;
            &lt;td&gt;No SSH&lt;/td&gt;
        &lt;/tr&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;

    &lt;p&gt;Quite a different world indeed.&lt;/p&gt;

    &lt;p&gt;As you can see traditional file-based log rotation is not only outdated and risky (what if the instance&apos;s disk dies?),
    but also simply doesn&apos;t make sense anymore without the ability to log in.&lt;/p&gt;

    &lt;p&gt;However logging as such is still a very important tool. It is invaluable for system behavior and error root cause analysis.
    So how can it be done in this new cloud native world?&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Logging needs&lt;/h2&gt;

    &lt;p&gt;Here at CloudCaptain we view logs as great forensic tool in case of trouble. We do not see logging as a general purpose data sink. If you
    need structured access to large amounts of data in your logs, you should probably consider other data stores instead.&lt;/p&gt;

    &lt;p&gt;So what are the needs a logging solution must fulfill?&lt;/p&gt;

    &lt;ul&gt;
        &lt;li&gt;It must be &lt;strong&gt;durable&lt;/strong&gt; for a certain duration (log value decreases exponentially with time)&lt;/li&gt;
        &lt;li&gt;It must be &lt;strong&gt;searchable&lt;/strong&gt; (to quickly find related needless in the haystack)&lt;/li&gt;
        &lt;li&gt;It must be &lt;strong&gt;centralized&lt;/strong&gt; (all instances of an application send their logs to the same place)&lt;/li&gt;
        &lt;li&gt;It must be &lt;strong&gt;integrated&lt;/strong&gt; with the application (no mandatory clunky detours via disk or syslog)&lt;/li&gt;
        &lt;li&gt;It must be &lt;strong&gt;fast&lt;/strong&gt; with little overhead (no substantial performance degradation)&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Additionally we also want to be able to capture early system logs in case our application fails to start or can&apos;t
    connect to the centralized logging facility.&lt;/p&gt;

    &lt;p&gt;We therefore want to &lt;strong&gt;distinguish between instance boot logs&lt;/strong&gt; (low volume, instance-specific, for diagnosing startup issues)
    &lt;strong&gt;and application logs&lt;/strong&gt; (high volume, application-level, for diagnosing application behavior issues).&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/logging-cloudnative/logs.png&quot; alt=&quot;Logs&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Instance Boot logs&lt;/h2&gt;

    &lt;p&gt;The instance boot logs collect information from the earliest stages of instance startup (kernel boot) all the way
    to the point where the application is fully up and running. They are great for identifying environment-specific
        network and application configuration issues.&lt;/p&gt;

    &lt;p&gt;Luckily all virtualization and cloud platforms make this information available and if you are using CloudCaptain you have a
        &lt;a href=&quot;/docs/commands/logs&quot;&gt;unified and convenient way to access it&lt;/a&gt;. All you
    need to do is&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse logs &lt;em&gt;instance-id&lt;/em&gt;&lt;/pre&gt;

    &lt;p&gt;and you immediately see the boot log for that instance including DHCP lease acquiry and application startup details.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Application logs&lt;/h2&gt;

    &lt;p&gt;On the application side of things there are number of excellent logging solutions available that fulfill all criteria
    described above. For JVM-based applications &lt;strong&gt;&lt;a href=&quot;https://www.loggly.com/&quot;&gt;Loggly&lt;/a&gt;&lt;/strong&gt;,
        &lt;strong&gt;&lt;a href=&quot;https://logentries.com/&quot;&gt;Logentries&lt;/a&gt;&lt;/strong&gt; and
        &lt;strong&gt;&lt;a href=&quot;https://papertrailapp.com/&quot;&gt;Papertrail&lt;/a&gt;&lt;/strong&gt; make it a breeze as they all support direct
        &lt;strong&gt;Logback&lt;/strong&gt; and &lt;strong&gt;Log4J&lt;/strong&gt; integration.
    &lt;/p&gt;

    &lt;p&gt;Messages are sent directly by a log appender from memory via HTTPS to their backend connectors where they are ingested, aggregated,
    indexed and made available via nice web-based dashboards.&lt;/p&gt;

    &lt;p&gt;Let&apos;s look at one example in detail.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Integrating Logback with Loggly&lt;/h2&gt;

    &lt;p&gt;Let&apos;s look at how simple it is to integrate two popular solutions: Logback (successor to Log4J) and Loggly
        (we could have just as easily picked Logentries or Papertrail).&lt;/p&gt;

    &lt;p&gt;Start by &lt;a href=&quot;https://www.loggly.com/&quot;&gt;creating a free Loggly account&lt;/a&gt; and add a Java Logback source:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/logging-cloudnative/source.png&quot; alt=&quot;Add Loggly source&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now all you need to do is add the Loggly appender dependency to your build (it is available on Maven Central):&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.logback-extensions&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;logback-ext-loggly&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;0.1.2&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;

    &lt;p&gt;and configure the appender in your &lt;code&gt;logback.xml&lt;/code&gt; (don&apos;t forget to make it async to avoid a performance hit):&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;configuration&amp;gt;
    &amp;lt;appender name=&quot;loggly&quot; class=&quot;ch.qos.logback.ext.loggly.LogglyAppender&quot;&amp;gt;
        &amp;lt;endpointUrl&amp;gt;https://logs-01.loggly.com/inputs/&lt;em&gt;your-loggly-input-id&lt;/em&gt;&amp;lt;/endpointUrl&amp;gt;
        &amp;lt;pattern&amp;gt;%d{ISO8601} %p %t %c{0}.%M - %m%n&amp;lt;/pattern&amp;gt;
    &amp;lt;/appender&amp;gt;
    &amp;lt;appender name=&quot;loggly-async&quot; class=&quot;ch.qos.logback.classic.AsyncAppender&quot;&amp;gt;
        &amp;lt;appender-ref ref=&quot;loggly&quot; /&amp;gt;
    &amp;lt;/appender&amp;gt;
    &amp;lt;root level=&quot;info&quot;&amp;gt;
        &amp;lt;appender-ref ref=&quot;loggly-async&quot; /&amp;gt;
    &amp;lt;/root&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;

    &lt;p&gt;That&apos;s it! Almost immediately you will see the logs appearing in the Loggly UI:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/logging-cloudnative/loggly.png&quot; alt=&quot;Loggly UI&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;You can now start search them, generate graphs and alerts, create custom dashboards and more!&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;Logging for cloud native applications is a breeze. Simply combine CloudCaptain for instance boot logs with modern
    hosted solutions like &lt;strong&gt;&lt;a href=&quot;https://www.loggly.com/&quot;&gt;Loggly&lt;/a&gt;&lt;/strong&gt;,
        &lt;strong&gt;&lt;a href=&quot;https://logentries.com/&quot;&gt;Logentries&lt;/a&gt;&lt;/strong&gt; or
        &lt;strong&gt;&lt;a href=&quot;https://papertrailapp.com/&quot;&gt;Papertrail&lt;/a&gt;&lt;/strong&gt; and their &lt;strong&gt;Logback or Log4J integrations&lt;/strong&gt;
        for your application logs and you will have a comprehensive, robust and highly available solutions up and running in no time.&lt;/p&gt;

    &lt;p&gt;Tired of snowflake servers? &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;Create your CloudCaptain account now&lt;/a&gt;&lt;/strong&gt;,
        start generating minimal and secure images in seconds and run them identically on VirtualBox and EC2.&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/dropwizard-aws-travisci</id>
    <link type="text/html" rel="alternate" href="/blog/dropwizard-aws-travisci"/>
    <title>Deploy a Dropwizard Unikernel to AWS - Part 3: Continuous Deployment with GitHub and Travis CI</title>
    <published>2015-05-08T00:00:00+00:00</published>
    <updated>2015-05-08T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/dropwizard-aws-travisci.png&quot; alt=&quot;Dropwizard continuous deployment to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;In &lt;strong&gt;&lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;part 1 of this series&lt;/a&gt;&lt;/strong&gt; we looked at how to fuse a
        &lt;strong&gt;&lt;a href=&quot;https://www.dropwizard.io/&quot;&gt;Dropwizard&lt;/a&gt;&lt;/strong&gt; application into a &lt;strong&gt;secure unikernel image&lt;/strong&gt;.
        We then &lt;strong&gt;tested it locally on VirtualBox&lt;/strong&gt; and finally we &lt;strong&gt;deployed it unchanged to AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;In &lt;strong&gt;&lt;a href=&quot;/blog/dropwizard-aws-maven&quot;&gt;part 2&lt;/a&gt;&lt;/strong&gt; we &lt;strong&gt;automated the workflow using Maven&lt;/strong&gt;.
        With every automated build, we fused an image, ran integration tests against it on VirtualBox and deployed it unchanged to EC2.&lt;/p&gt;

    &lt;p&gt;Today in the final part of this series, we take this to its natural conclusion and create a full &lt;strong&gt;Continuous Deployment pipeline
        for our unikernel&lt;/strong&gt;. Every commit flows smoothly and automatically all the way &lt;strong&gt;from GitHub to AWS, using Travis CI, Maven and CloudCaptain&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;This post assumes you have everything set up as described in &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;part 1&lt;/a&gt;
        and &lt;a href=&quot;/blog/dropwizard-aws-maven&quot;&gt;part 2&lt;/a&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 1: Setting up GitHub and Travis CI&lt;/h2&gt;

    &lt;p&gt;Here at CloudCaptain we are big fans of both &lt;strong&gt;&lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;&lt;/strong&gt; and
        &lt;strong&gt;&lt;a href=&quot;https://travis-ci.org&quot;&gt;Travis CI&lt;/a&gt;&lt;/strong&gt;. Together they form a powerful combo of source
        control and continuous integration. We especially like the fact that Travis CI integrates really well with GitHub
        and lets you &lt;strong&gt;check the whole CI build job definition straight into source control&lt;/strong&gt;. And best of all, they are both
        completely free for public repositories, so that is what we&apos;ll use.&lt;/p&gt;

    &lt;p&gt;So without further ado, let&apos;s get started!&lt;/p&gt;

    &lt;p&gt;Log in to your &lt;strong&gt;GitHub&lt;/strong&gt; account and &lt;strong&gt;&lt;a href=&quot;https://github.com/new&quot;&gt;create a new repository&lt;/a&gt;&lt;/strong&gt; called &lt;code&gt;dwunikernel&lt;/code&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/create-repo.png&quot; alt=&quot;Create a new GitHub repository&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now head over to &lt;strong&gt;Travis CI&lt;/strong&gt; and &lt;a href=&quot;https://travis-ci.org/&quot;&gt;sign in with your GitHub credentials&lt;/a&gt;.
    It&apos;s easy and there is no extra registration required.&lt;/p&gt;

    &lt;p&gt;Then go to your &lt;a href=&quot;https://travis-ci.org/profile&quot;&gt;profile&lt;/a&gt;, &lt;strong&gt;sync your repositories&lt;/strong&gt;
        and &lt;strong&gt;activate Travis CI&lt;/strong&gt; for &lt;code&gt;dwunikernel&lt;/code&gt;:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/travisci-sync.png&quot; alt=&quot;Travis CI sync&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Finally, go to your Travis CI repository settings and define two &lt;strong&gt;secure environment variables&lt;/strong&gt;
        for your &lt;strong&gt;CloudCaptain credentials&lt;/strong&gt; called
        &lt;code&gt;BOXFUSE_USER&lt;/code&gt; and &lt;code&gt;BOXFUSE_SECRET&lt;/code&gt;. Their values are the same as the ones you enterred in
        your &lt;code&gt;pom.xml&lt;/code&gt; in &lt;a href=&quot;/blog/dropwizard-aws-maven&quot;&gt;part 2&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;The big advantage is that they&apos;ll be securely stored at Travis CI and will not appear in neither your public
    GitHub repository nor your Travis CI build logs, yet the CloudCaptain Maven plugin will be able to use them.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/envvars.png&quot; alt=&quot;Secure environment variables&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Great! That&apos;s all we need to do on this end. &lt;strong&gt;Do not check in anything yet&lt;/strong&gt;. We first need to make some changes to our app.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 2: Tuning the build definition&lt;/h2&gt;

    &lt;p&gt;Before we can check in, some important changes must be made. This is both due to the nature of public repositories
    and the build environment for Travis CI.&lt;/p&gt;

    &lt;p&gt;The first and most important thing you must do is &lt;strong&gt;delete your CloudCaptain credentials from the &lt;code&gt;pom.xml&lt;/code&gt;&lt;/strong&gt;.
        This is essential, because checking them in basically means giving the entire world access to your CloudCaptain account!
    &lt;/p&gt;

    &lt;p&gt;The next thing we need to take into account is that Travis CI does not support VirtualBox. This is important
        for running our integration test. We will therefore
    adjust the CloudCaptain Maven plugin configuration to use a &lt;strong&gt;&lt;a href=&quot;/docs#environments&quot;&gt;test environment on AWS&lt;/a&gt;&lt;/strong&gt;
        instead.&lt;/p&gt;

    &lt;p&gt;This is what the end result in the &lt;code&gt;pom.xml&lt;/code&gt; looks like:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.boxfuse.client&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;boxfuse-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.37.0.2024&amp;lt;/version&amp;gt;
    &amp;lt;!-- No more CloudCaptain credentials in the POM. --&amp;gt;
    &amp;lt;!-- Instead the BOXFUSE_USER and BOXFUSE_SECRET secure environment variables will be used. --&amp;gt;
    &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;fuse-image&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;fuse&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
        &amp;lt;/execution&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;run-on-test&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;phase&amp;gt;pre-integration-test&amp;lt;/phase&amp;gt;
            &amp;lt;configuration&amp;gt;
                &lt;strong&gt;&amp;lt;env&amp;gt;test&amp;lt;/env&amp;gt;&lt;/strong&gt;
            &amp;lt;/configuration&amp;gt;
        &amp;lt;/execution&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;kill-on-test&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;kill&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;phase&amp;gt;post-integration-test&amp;lt;/phase&amp;gt;
            &amp;lt;configuration&amp;gt;
                &lt;strong&gt;&amp;lt;env&amp;gt;test&amp;lt;/env&amp;gt;&lt;/strong&gt;
            &amp;lt;/configuration&amp;gt;
        &amp;lt;/execution&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;run-on-prod&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;phase&amp;gt;deploy&amp;lt;/phase&amp;gt;
            &amp;lt;configuration&amp;gt;
                &amp;lt;env&amp;gt;prod&amp;lt;/env&amp;gt;
            &amp;lt;/configuration&amp;gt;
        &amp;lt;/execution&amp;gt;
    &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

    &lt;p&gt;We also want to give each unikernel we build a &lt;strong&gt;unique version&lt;/strong&gt;. For this Travis CI makes a
        number of interesting &lt;a href=&quot;https://docs.travis-ci.com/user/ci-environment/#Environment-variables&quot;&gt;environment variables&lt;/a&gt;
        available to every build. In this case we will use the &lt;code&gt;TRAVIS_BUILD_NUMBER&lt;/code&gt; environment variable
        so the version of each unikernel
    image can be nicely traced back to the build that created it. On your project, you will probably want to use the
    full &lt;a href=&quot;https://axelfontaine.com/blog/final-nail.html&quot;&gt;Maven Releases on Steroids&lt;/a&gt; process to also tag the source control repository.&lt;/p&gt;

    &lt;p&gt;To make this possible we will give our project a generic version (0-SNAPSHOT) and replace it dynamically at the
    start of every build with the Travis CI build number using the &lt;code&gt;set&lt;/code&gt; goal of the
        &lt;a href=&quot;https://mojo.codehaus.org/versions-maven-plugin/set-mojo.html&quot;&gt;Maven Versions plugin&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;So let&apos;s first put a generic version in our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;project ...

    &amp;lt;groupId&amp;gt;dwunikernel&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;dwunikernel&amp;lt;/artifactId&amp;gt;
    &lt;strong&gt;&amp;lt;version&amp;gt;0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;/strong&gt;
    ...
&amp;lt;/project&amp;gt;        
&lt;/pre&gt;

    &lt;p&gt;Then add the Versions plugin with the new version set to &lt;code&gt;TRAVIS_BUILD_NUMBER&lt;/code&gt; environment variable:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;versions-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;
    &amp;lt;configuration&amp;gt;
        &lt;strong&gt;&amp;lt;newVersion&amp;gt;${env.TRAVIS_BUILD_NUMBER}&amp;lt;/newVersion&amp;gt;&lt;/strong&gt;
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

    &lt;p&gt;Finally, we must add a small YAML descriptor called &lt;code&gt;.travis.yml&lt;/code&gt; to the root of our project to tell
        Travis CI how to build it:&lt;/p&gt;
    
    &lt;pre class=&quot;prettyprint&quot;&gt;language: java
jdk: oraclejdk8
install: mvn versions:set
script: mvn deploy&lt;/pre&gt;

    &lt;p&gt;This tells Travis CI to use Java 8 and first set the version, then build, test and deploy the project.&lt;/p&gt;

    &lt;p&gt;And that&apos;s all! We are all set to fire this thing up!&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 3: Commit, push, sit back and enjoy the show!&lt;/h2&gt;

    &lt;p&gt;We are now ready. Clone your new &lt;code&gt;dwunikernel&lt;/code&gt; GitHub repository, add all the code we created, commit and push.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;All the gears will now kick into motion:&lt;/strong&gt;&lt;/p&gt;

    &lt;ul&gt;
        &lt;li&gt;GitHub will &lt;strong&gt;notify&lt;/strong&gt; Travis CI of the push&lt;/li&gt;
        &lt;li&gt;Travis CI will create a &lt;strong&gt;fresh build worker&lt;/strong&gt;, check out the sources and start Maven&lt;/li&gt;
        &lt;li&gt;Maven will run once to &lt;strong&gt;set the version&lt;/strong&gt; to match the build number&lt;/li&gt;
        &lt;li&gt;Maven will then run again to &lt;strong&gt;compile and package&lt;/strong&gt; the code as an executable Jar&lt;/li&gt;
        &lt;li&gt;CloudCaptain will fuse that Jar into a &lt;strong&gt;unikernel image&lt;/strong&gt;&lt;/li&gt;
        &lt;li&gt;CloudCaptain will then launch an instance of that image in a &lt;strong&gt;test environment&lt;/strong&gt; on AWS&lt;/li&gt;
        &lt;li&gt;Maven will execute &lt;strong&gt;integration tests&lt;/strong&gt; against that instance&lt;/li&gt;
        &lt;li&gt;CloudCaptain will terminate the instance&lt;/li&gt;
        &lt;li&gt;Maven will verify the test results&lt;/li&gt;
        &lt;li&gt;And finally if everything went well, CloudCaptain will &lt;strong&gt;update our production environment&lt;/strong&gt; on AWS with &lt;strong&gt;zero downtime&lt;/strong&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/travisci-build.png&quot; alt=&quot;Travis CI build&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;And you now get all of this &lt;strong&gt;fully automatically after every commit&lt;/strong&gt;!&lt;/p&gt;

    &lt;p&gt;That includes spinning up
        a new Travis CI worker, Maven downloading the internet,
        CloudCaptain fusing the unikernel image, creating an AMI, launching 2 new instance on AWS, successfully
        running integration tests against one of them AND performing a clean blue/green zero downtime update with the other.&lt;/p&gt;

    &lt;p&gt;As you can see the entire process takes just &lt;strong&gt;5 minutes from GitHub commit to being live on AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Summary&lt;/h2&gt;

    &lt;p&gt;Congratulations! You now have a &lt;strong&gt;fully automated Continuous Deployment pipeline for Dropwizard unikernels.&lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;It races &lt;strong&gt;from GitHub to AWS in 5 minutes&lt;/strong&gt;, including the automated image build, deployment and the integration tests against the exact same image you run in production.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-travisci/dropwizard-aws-travisci.png&quot; alt=&quot;Dropwizard continuous deployment to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;It is &lt;strong&gt;fully automated&lt;/strong&gt;. It is &lt;strong&gt;reliable&lt;/strong&gt;. It is &lt;strong&gt;secure&lt;/strong&gt;. And it&apos;s &lt;strong&gt;fast&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;And best of all, it&apos;s &lt;strong&gt;completely free&lt;/strong&gt;!&lt;/p&gt;

    &lt;p&gt;So say goodbye to snowflake servers and unreliable infrastructure.&lt;br&gt;Create your
        &lt;strong&gt;&lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain account&lt;/a&gt;&lt;/strong&gt; now to get started with fast and reliable
        dropwizard unikernels on AWS.&lt;/p&gt;

    &lt;p&gt;You can find the &lt;strong&gt;&lt;a href=&quot;https://github.com/boxfuse/dwunikernel&quot;&gt;repository we used&lt;/a&gt;&lt;/strong&gt; on &lt;strong&gt;GitHub&lt;/strong&gt;
        and the &lt;strong&gt;&lt;a href=&quot;https://travis-ci.org/boxfuse/dwunikernel&quot;&gt;build jobs for this article&lt;/a&gt;&lt;/strong&gt; on &lt;strong&gt;Travis CI&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Learn more:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;/docs&quot;&gt;CloudCaptain documentation&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;CloudCaptain Dropwizard support&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;/docs/aws&quot;&gt;CloudCaptain AWS support&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Stay tuned for much more exciting news, &lt;strong&gt;subscribe to this blog&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&quot;https://twitter.com/boxfuse&quot;&gt;follow CloudCaptain on Twitter&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/dropwizard-aws-maven</id>
    <link type="text/html" rel="alternate" href="/blog/dropwizard-aws-maven"/>
    <title>Deploy a Dropwizard Unikernel to AWS - Part 2: Automated Maven build</title>
    <published>2015-04-30T00:00:00+00:00</published>
    <updated>2015-04-30T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-maven/dropwizard-aws-maven.png&quot; alt=&quot;Dropwizard to AWS using Maven&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;In &lt;strong&gt;&lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;part 1 of this series&lt;/a&gt;&lt;/strong&gt; we looked at how to fuse a
        &lt;strong&gt;&lt;a href=&quot;https://www.dropwizard.io/&quot;&gt;Dropwizard&lt;/a&gt;&lt;/strong&gt; application into a &lt;strong&gt;secure unikernel image&lt;/strong&gt;.
        We then &lt;strong&gt;tested it locally on VirtualBox&lt;/strong&gt;
        and finally we &lt;strong&gt;deployed it unchanged to AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Today we are going to continue where we left off and &lt;strong&gt;automate the steps from part 1&lt;/strong&gt; directly
        from our &lt;strong&gt;Maven build&lt;/strong&gt;. In addition, we are going to automatically execute an integration
    test against a test instance deployed on VirtualBox before pusing the image out to AWS.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-maven/maven-phases.png&quot; alt=&quot;Maven phases&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;This post assumes you have everything set up as described in &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;part 1&lt;/a&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 1: Automatically fusing the unikernel image&lt;/h2&gt;

    &lt;p&gt;Instead of manually having to type some commands, we now &lt;strong&gt;automatically fuse our Dropwizard app into a
    unikernel image using the CloudCaptain Maven plugin as part every build&lt;/strong&gt;. The image effectively supplants the jar
        file as the final product of our build.&lt;/p&gt;

    &lt;p&gt;It however shares all the essential qualities of the jar file:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;one immutable artifact&lt;/li&gt;
        &lt;li&gt;regenerated after every changed&lt;/li&gt;
        &lt;li&gt;promoted unchanged from environment to environment&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;And it &lt;strong&gt;avoids the classic mistake of building a separate artifact per environment&lt;/strong&gt;, where the artifact you run in
        production is different from the one you tested in test. In other words it avoids the very mistake that happens with classic provisioning of systems.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-maven/maven-phases-step1.png&quot; alt=&quot;Maven phases - step 1&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;For this we first need to add the &lt;strong&gt;CloudCaptain Maven repository&lt;/strong&gt; to our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;pluginRepositories&amp;gt;
    &amp;lt;pluginRepository&amp;gt;
        &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;
        &amp;lt;url&amp;gt;https://repo1.maven.org/maven2&amp;lt;/url&amp;gt;
    &amp;lt;/pluginRepository&amp;gt;
    &amp;lt;pluginRepository&amp;gt;
        &amp;lt;id&amp;gt;boxfuse-repo&amp;lt;/id&amp;gt;
        &amp;lt;url&amp;gt;https://files.cloudcaptain.sh&amp;lt;/url&amp;gt;
    &amp;lt;/pluginRepository&amp;gt;
&amp;lt;/pluginRepositories&amp;gt;&lt;/pre&gt;

    &lt;p&gt;We now add the &lt;a href=&quot;/docs/maven&quot;&gt;&lt;strong&gt;CloudCaptain Maven plugin&lt;/strong&gt;&lt;/a&gt; after the shade plugin and define
        one execution in the &lt;em&gt;package&lt;/em&gt; phase to fuse the image:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;!-- must be placed after the shade plugin to guarantee the correct execution order --&amp;gt;
&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.boxfuse.client&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;boxfuse-maven-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.37.0.2024&amp;lt;/version&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;user&amp;gt;&lt;em&gt;your-boxfuse-client-user&lt;/em&gt;&amp;lt;/user&amp;gt;
        &amp;lt;secret&amp;gt;&lt;em&gt;your-boxfuse-client-secret&lt;/em&gt;&amp;lt;/secret&amp;gt;
    &amp;lt;/configuration&amp;gt;
    &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;fuse-image&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;fuse&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
        &amp;lt;/execution&amp;gt;
    &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

    &lt;p&gt;Don&apos;t forget to replace the CloudCaptain user and secret with the ones specified on your &lt;a href=&quot;https://console.cloudcaptain.sh/#/downloads&quot;&gt;download page&lt;/a&gt; of the CloudCaptain Console.&lt;/p&gt;

    &lt;p&gt;Executing the build now gives us this:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn clean package
...
[INFO] --- boxfuse-maven-plugin:1.37.0.2024:fuse (fuse-image) @ dwunikernel ---
[INFO] Fusing Image for dwunikernel-1.0.jar ...
[INFO] Image fused in 00:07.273s (54017 K) -&gt; axelfontaine/dwunikernel:1.0&lt;/pre&gt;

    &lt;p&gt;And there we have it! A new image generated as part of every build.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 2: Adding an integration test against VirtualBox&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s automatically&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;strong&gt;run an instance&lt;/strong&gt; of our new image on VirtualBox in the &lt;em&gt;pre-integration-test&lt;/em&gt; phase&lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;execute an integration test&lt;/strong&gt; against it in the &lt;em&gt;integration-test&lt;/em&gt; phase&lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;kill the instance&lt;/strong&gt; in the &lt;em&gt;post-integration-test&lt;/em&gt; phase&lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;verify the results&lt;/strong&gt; in the &lt;em&gt;verify&lt;/em&gt; phase&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws-maven/maven-phases-step2.png&quot; alt=&quot;Maven phases - step 2&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Let&apos;s start by creating our integration test. For that we&apos;ll need to add &lt;code&gt;junit&lt;/code&gt; and
        &lt;code&gt;fluent-hc&lt;/code&gt; (the fluent interface for the Apache HTTP client) to the test scope of the &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;4.12&amp;lt;/version&amp;gt;
    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.apache.httpcomponents&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;fluent-hc&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;4.3.6&amp;lt;/version&amp;gt;
    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;

    &lt;p&gt;Now let&apos;s add an integration test called &lt;code&gt;dwunikernel.resources.HelloWorldResourceTest&lt;/code&gt; to &lt;code&gt;src/test/java&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;package dwunikernel.resources;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.client.fluent.Request;
import org.junit.Test;
import java.util.Map;

import static org.junit.Assert.assertEquals;

public class HelloWorldResourceTest {
    @Test
    public void hello() throws Exception {
        String url = System.getProperty(&quot;instanceUrl&quot;) + &quot;?name=IntegrationTest&quot;;
        String json = Request.Get(url).execute().returnContent().asString();
        Map&amp;lt;String, Object&amp;gt; result = new ObjectMapper().readValue(json, new TypeReference&amp;lt;Map&amp;lt;String, Object&amp;gt;&amp;gt;(){});
        assertEquals(&quot;Hello, IntegrationTest!&quot;, result.get(&quot;hello&quot;));
    }
}&lt;/pre&gt;

    &lt;p&gt;As the &lt;strong&gt;url of the instance may change based on port availability&lt;/strong&gt;, you can see it is being
        &lt;strong&gt;passed in dynamically using the system property&lt;/strong&gt; &lt;em&gt;instanceUrl&lt;/em&gt;.
        It is then being used to connect to the running instance, where the response
    of the request is then converted from a json string into a map object and compared against our expectations.&lt;/p&gt;

    &lt;p&gt;Next add additional executions of the CloudCaptain Maven plugin to the &lt;code&gt;pom.xml&lt;/code&gt; to automatically run and kill the instance:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;execution&amp;gt;
    &amp;lt;id&amp;gt;run-on-virtualbox&amp;lt;/id&amp;gt;
    &amp;lt;goals&amp;gt;
        &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;
    &amp;lt;/goals&amp;gt;
    &amp;lt;phase&amp;gt;pre-integration-test&amp;lt;/phase&amp;gt;
&amp;lt;/execution&amp;gt;
&amp;lt;execution&amp;gt;
    &amp;lt;id&amp;gt;kill-on-virtualbox&amp;lt;/id&amp;gt;
    &amp;lt;goals&amp;gt;
        &amp;lt;goal&amp;gt;kill&amp;lt;/goal&amp;gt;
    &amp;lt;/goals&amp;gt;
    &amp;lt;phase&amp;gt;post-integration-test&amp;lt;/phase&amp;gt;
&amp;lt;/execution&amp;gt;&lt;/pre&gt;

    &lt;p&gt;And finally configure the Surefire and Failsafe plugins to run our test and verify the results:&lt;/p&gt;
    
    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.18.1&amp;lt;/version&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;excludes&amp;gt;
            &amp;lt;exclude&amp;gt;**/*ResourceTest.java&amp;lt;/exclude&amp;gt;
        &amp;lt;/excludes&amp;gt;
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;
&amp;lt;plugin&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-failsafe-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.18.1&amp;lt;/version&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;includes&amp;gt;
            &amp;lt;include&amp;gt;**/*ResourceTest.java&amp;lt;/include&amp;gt;
        &amp;lt;/includes&amp;gt;
        &amp;lt;systemPropertyVariables&amp;gt;
            &amp;lt;instanceUrl&amp;gt;${boxfuse.instances.0.url}&amp;lt;/instanceUrl&amp;gt;
        &amp;lt;/systemPropertyVariables&amp;gt;
    &amp;lt;/configuration&amp;gt;
    &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;integration-test&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;integration-test&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
        &amp;lt;/execution&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;verify&amp;lt;/id&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;verify&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
        &amp;lt;/execution&amp;gt;
    &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

    &lt;p&gt;As you can see we pass in the variable &lt;code&gt;${boxfuse.instances.0.url}&lt;/code&gt; as the value of the &lt;code&gt;instanceUrl&lt;/code&gt;
    System property we referred to in out test. After executing &lt;em&gt;run&lt;/em&gt;, &lt;strong&gt;CloudCaptain will automatically set the
        &lt;code&gt;${boxfuse.instances.0.url}&lt;/code&gt; to the correct url of the instance&lt;/strong&gt; that was just started. We then use
    that url in our test to connect to the Dropwizard application.&lt;/p&gt;

    &lt;p&gt;Time to fire up Maven and see the results:&lt;/p&gt;

&lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn clean verify
...
[INFO] --- boxfuse-maven-plugin:1.3.2.576:run (run-on-virtualbox) @ dwunikernel ---
[INFO] Launching Instance of axelfontaine/dwunikernel:1.0 on VirtualBox ...
[INFO] Forwarding admin-http port localhost:50001 -&gt; vb-fc55a898:8081
[INFO] Forwarding http port localhost:8888 -&gt; vb-fc55a898:80
[INFO] Instance launched in 00:03.851s -&gt; vb-fc55a898
[INFO] Waiting for Payload to start on Instance vb-fc55a898 ...
[INFO] Payload started in 00:07.025s -&gt; https://127.0.0.1:8888
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:integration-test (integration-test) @ dwunikernel ---
[INFO] Failsafe report directory: C:\Workspaces\dwunikernel\target\failsafe-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running dwunikernel.resources.HelloWorldResourceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.557 sec - in dwunikernel.resources.HelloWorldResourceTest

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- boxfuse-maven-plugin:1.3.2.576:kill (kill-on-virtualbox) @ dwunikernel ---
[INFO] Killing Instance vb-fc55a898 on VirtualBox ...
[INFO] Instance killed in 00:02.349s
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (verify) @ dwunikernel ---
[INFO] Failsafe report directory: C:\Workspaces\dwunikernel\target\failsafe-reports&lt;/pre&gt;


    &lt;p&gt;Success! Our test has verified our HelloWorldResource is behaving as we expect and we have now
        &lt;strong&gt;automatically tested the exact same image we&apos;ll later run on AWS&lt;/strong&gt;. This
        provides us with very strong guarantees that it will work there too.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 3: Deploying the tested image to AWS&lt;/h2&gt;

    &lt;p&gt;After we have successfully tested our image, we are now sufficiently confident to &lt;strong&gt;automatically push it out
    to our production environment on AWS&lt;/strong&gt;. For that we need one final addition to the list of executions of the CloudCaptain Maven plugin
    in the &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;execution&amp;gt;
    &amp;lt;id&amp;gt;run-on-aws&amp;lt;/id&amp;gt;
    &amp;lt;goals&amp;gt;
        &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;
    &amp;lt;/goals&amp;gt;
    &amp;lt;phase&amp;gt;deploy&amp;lt;/phase&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;env&amp;gt;prod&amp;lt;/env&amp;gt;
    &amp;lt;/configuration&amp;gt;
&amp;lt;/execution&amp;gt;&lt;/pre&gt;

    &lt;p&gt;And also disable the deploy plugin as we have not configured a remote repository (and our images land in the &lt;strong&gt;CloudCaptain Vault&lt;/strong&gt;):&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-deploy-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.8.2&amp;lt;/version&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;skip&amp;gt;true&amp;lt;/skip&amp;gt;
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;

    &lt;p&gt;Finally put it all together:&lt;/p&gt;

&lt;div class=&quot;blog-post-image center&quot;&gt;
    &lt;img src=&quot;/assets/posts/dropwizard-aws-maven/maven-phases.png&quot; alt=&quot;Maven phases&quot;&gt;
&lt;/div&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn clean deploy
...
[INFO] Pushing axelfontaine/dwunikernel:1.0 ...
[INFO] Verifying axelfontaine/dwunikernel:1.0 ...
[INFO] Waiting for AWS to create an AMI for axelfontaine/dwunikernel:1.0 in eu-central-1 (this may take up to 50 seconds) ...
[INFO] AMI created in 00:31.703s -&gt; ami-842d1299
[INFO] Creating security group boxfuse-sg_axelfontaine/dwunikernel:1.0 ...
[INFO] Launching t2.micro instance of axelfontaine/dwunikernel:1.0 (ami-842d1299) in eu-central-1 ...
[INFO] Instance launched in 00:22.192s -&gt; i-0cd66acd
[INFO] Waiting for Payload to start on Instance i-0cd66acd at https://52.28.79.74:8081/healthcheck ...
[INFO] Remapping Elastic IP 52.28.20.51 to i-0cd66acd ...
[INFO] Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
[INFO] Terminating instance i-2ed66aef ...
[INFO] Destroying Security Group sg-fc548d95 ...
[INFO] Deployment completed successfully. axelfontaine/dwunikernel:1.0 is up and running at https://dwunikernel-axelfontaine.boxfuse.io:8081&lt;/pre&gt;

    &lt;p&gt;And there we have it. We have successfully &lt;strong&gt;pushed the image to the CloudCaptain Vault&lt;/strong&gt;,
        started a &lt;strong&gt;new instance on AWS&lt;/strong&gt; and remapped the
    Elastic IP for a smooth &lt;strong&gt;Zero Downtime transition&lt;/strong&gt;.
        No additional work is required. We now have this as part of every single build.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Done&lt;/h2&gt;

    &lt;p&gt;Congratulations! We have taken our &lt;a href=&quot;/blog/dropwizard-aws&quot;&gt;unikernel from part 1&lt;/a&gt; and with just
        a few additions to the &lt;code&gt;pom.xml&lt;/code&gt; you now have a &lt;strong&gt;fully automated deployment process&lt;/strong&gt;.
        That includes both the dev environment, including &lt;strong&gt;automated testing against VirtualBox&lt;/strong&gt;, and the production
        environment with &lt;strong&gt;Blue/Green deployments with zero downtime on AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Now go ahead, dive deeper and read the &lt;a href=&quot;/docs/maven&quot;&gt;Maven plugin documentation&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;/blog/dropwizard-aws-travisci&quot;&gt;Continue to part 3&lt;/a&gt;&lt;/strong&gt;, where we take this to 11 by creating a
        &lt;strong&gt;fully automated Continuous Deployment pipeline using GitHub and TravisCI.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/dropwizard-aws</id>
    <link type="text/html" rel="alternate" href="/blog/dropwizard-aws"/>
    <title>Deploy a Dropwizard Unikernel to AWS - Part 1: Up and running</title>
    <published>2015-04-25T00:00:00+00:00</published>
    <updated>2015-04-25T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws/dropwizard-aws-sm.png&quot; alt=&quot;Dropwizard to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Here at CloudCaptain &lt;a href=&quot;/blog/welcome&quot;&gt;we strongly believe in keeping things simple&lt;/a&gt;. We love
        &lt;strong&gt;lightweight solutions&lt;/strong&gt; that &lt;strong&gt;do away with cargo cult&lt;/strong&gt; and &lt;strong&gt;just work.&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;It turns out that when creating REST microservices &lt;strong&gt;&lt;a href=&quot;https://www.dropwizard.io/&quot;&gt;Dropwizard&lt;/a&gt;&lt;/strong&gt; is a perfect match for this.&lt;/p&gt;

    &lt;p&gt;In this post we are going to look at how to fuse a Dropwizard application into a &lt;strong&gt;secure unikernel image&lt;/strong&gt;.
        We will then &lt;strong&gt;test it locally on VirtualBox&lt;/strong&gt;
        and finally we&apos;ll &lt;strong&gt;deploy it unchanged to AWS&lt;/strong&gt;. All this in 3 easy steps.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws/dropwizard-aws.png&quot; alt=&quot;Dropwizard to AWS&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Prerequisites&lt;/h2&gt;

    &lt;p&gt;Before we get started, you will need a couple of things.&lt;/p&gt;

    &lt;p&gt;First of all you will need an &lt;strong&gt;AWS Account&lt;/strong&gt;.
        Go ahead and &lt;a href=&quot;https://aws.amazon.com/&quot;&gt;register for a free AWS account&lt;/a&gt; now if you haven&apos;t got one already.
        Their free tier is great and will give you a free t2.micro (1 vCPU, 1 GB RAM) instance, a few GBs of S3 storage and much more for a whole year.
    &lt;/p&gt;

    &lt;p&gt;You will also need a &lt;strong&gt;CloudCaptain Account&lt;/strong&gt;. If you haven&apos;t got one already, create a free CloudCaptain
        account now by &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;logging in the CloudCaptain Console using your GitHub account&lt;/a&gt;.
        Once logged in, &lt;a href=&quot;https://console.cloudcaptain.sh/#/awsAccount&quot;&gt;connect your AWS account with your CloudCaptain account&lt;/a&gt;.
    &lt;/p&gt;

    &lt;p&gt;Finally, ensure you have the CloudCaptain Client, Java, Maven and VirtualBox installed on your machine.&lt;/p&gt;

    &lt;p&gt;This tutorial works with Windows, Mac OSX and Linux and should take about 10 minutes to complete.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 0: Create a Dropwizard app&lt;/h2&gt;

    &lt;p&gt;Let&apos;s begin by creating a small Dropwizard application based on the latest Dropwizard Maven archetype:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn archetype:generate -DgroupId=dwunikernel -DartifactId=dwunikernel -Dversion=1.0 -Dname=DwUnikernel -Dpackage=dwunikernel -DarchetypeGroupId=io.dropwizard.archetypes -DarchetypeArtifactId=java-simple -DinteractiveMode=false&lt;/pre&gt;

    &lt;p&gt;This generated the basic skeleton for Dropwizard:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws/archetype.png&quot; alt=&quot;Dropwizard Archetype Basic Skeleton&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now let&apos;s add a resource and a healthcheck.&lt;/p&gt;

    &lt;p&gt;For the resource create a class named &lt;code&gt;dwunikernel.resources.HelloWorldResource&lt;/code&gt; with the following code:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;package dwunikernel.resources;

import com.google.common.base.Optional;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import java.util.HashMap;
import java.util.Map;

@Path(&quot;/&quot;)
@Produces(MediaType.APPLICATION_JSON)
public class HelloWorldResource {
    private final String template;

    public HelloWorldResource(String template) {
        this.template = template;
    }

    @GET
    public Map&amp;lt;String, Object&amp;gt; sayHello(@QueryParam(&quot;name&quot;) Optional&amp;lt;String&amp;gt; name) {
        Map&amp;lt;String, Object&amp;gt; result = new HashMap&amp;lt;&amp;gt;();
        result.put(&quot;hello&quot;, String.format(template, name.or(&quot;stranger&quot;)));
        return result;
    }
}&lt;/pre&gt;

    &lt;p&gt;For the healthcheck, create a class named &lt;code&gt;dwunikernel.health.TemplateHealthCheck&lt;/code&gt;:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;package dwunikernel.health;

import com.codahale.metrics.health.HealthCheck;

public class TemplateHealthCheck extends HealthCheck {
    private final String template;

    public TemplateHealthCheck(String template) {
        this.template = template;
    }

    @Override
    protected Result check() throws Exception {
        final String greeting = String.format(template, &quot;TEST&quot;);
        if (!greeting.contains(&quot;TEST&quot;)) {
            return Result.unhealthy(&quot;template doesn&apos;t include a name&quot;);
        }
        return Result.healthy();
    }
}&lt;/pre&gt;

    &lt;p&gt;Finally register both the resource and the healthcheck in the &lt;code&gt;dwunikernel.DwUnikernelApplication.run()&lt;/code&gt; method:&lt;/p&gt;

    &lt;pre class=&quot;prettyprint&quot;&gt;@Override
public void run(final DwUnikernelConfiguration configuration, final Environment environment) {
    String template = &quot;Hello, %s!&quot;;
    environment.jersey().register(new HelloWorldResource(template));
    environment.healthChecks().register(&quot;template&quot;, new TemplateHealthCheck(template));
}&lt;/pre&gt;

    &lt;p&gt;And that&apos;s it. We now have a basic Dropwizard application we can use!&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 1: Fuse the Dropwizard app into a secure unikernel image&lt;/h2&gt;

    &lt;p&gt;Log in to the &lt;a href=&quot;https://console.cloudcaptain.sh&quot;&gt;CloudCaptain Console&lt;/a&gt; and create a new application called
        &lt;code&gt;dwunikernel&lt;/code&gt;. Select the defaults of &lt;em&gt;Single Instance with Zero Downtime updates&lt;/em&gt; (elastic IP) and the AWS eu-central-1 region:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws/new-app.png&quot; alt=&quot;New application&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;Now build our Dropwizard app using Maven:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; mvn package&lt;/pre&gt;

    &lt;p&gt;With that done you can now turn into it a secure unikernel using the CloudCaptain Client:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse fuse target/dwunikernel-1.0.jar

Fusing Image for dwunikernel-1.0.jar ...
Image fused in 00:07.073s (54017 K) -&gt; axelfontaine/dwunikernel:1.0&lt;/pre&gt;

    &lt;p&gt;In just over 7 seconds, CloudCaptain &lt;strong&gt;analysed the application&lt;/strong&gt;, determined it was a Dropwizard application running on the JVM
        and automatically &lt;strong&gt;created the smallest possible image&lt;/strong&gt; to run it. It also automatically set
        the ports and the healthcheck &lt;strong&gt;configuration
        to match that of Dropwizard&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Let&apos;s check our available images:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 10px&quot;&gt;&amp;gt; boxfuse ls

Images available locally:
+------------------------------+---------------------+-------+---------+------------+--------------------------------+---------+---------------------+
| Image                        |       Payload       | Debug |  Java   | AppServer  |             Ports              |  Size   |    Generated at     |
+------------------------------+---------------------+-------+---------+------------+--------------------------------+---------+---------------------+
| axelfontaine/dwunikernel:1.0 | dwunikernel-1.0.jar | false | 8.45.14 | Dropwizard | admin-http -&gt; 8081, http -&gt; 80 | 54017 K | 2015-04-25 23:32:54 |
+------------------------------+---------------------+-------+---------+------------+--------------------------------+---------+---------------------+
Total: 1&lt;/pre&gt;
    &lt;p&gt;Congratulations! You now a have a &lt;strong&gt;brand new 54 MB secure unikernel image&lt;/strong&gt; including only our application, Java 8 and the Linux kernel!&lt;/p&gt;

    &lt;p&gt;For reference, if you would have create a minimal Ubuntu Server 15.04 VM with nothing, except SSH,
        openjdk-8-jre-headless and our application, this is how large the image would have been:&lt;/p&gt;

    &lt;div class=&quot;blog-post-image&quot;&gt;
        &lt;img src=&quot;/assets/posts/dropwizard-aws/ubuntu.png&quot; alt=&quot;Ubuntu vs CloudCaptain&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;&lt;strong&gt;The CloudCaptain unikernel image is just 4% of the equivalent Ubuntu one.&lt;/strong&gt;
        And that&apos;s just the size. When you factor
        in creation time, security attack surface and reproducibility we are in two different leagues.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 2: Test it locally on VirtualBox&lt;/h2&gt;

    &lt;p&gt;Now let&apos;s launch it on VirtualBox:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse run dwunikernel:1.0

Launching Instance of axelfontaine/dwunikernel:1.0 on VirtualBox ...
Forwarding admin-http port localhost:50001 -&gt; vb-033da2a4:8081
Forwarding http port localhost:8888 -&gt; vb-033da2a4:80
Instance launched in 00:04.176s -&gt; vb-033da2a4
Waiting for Payload to start on Instance vb-033da2a4 ...
Payload started in 00:08.525s -&gt; https://127.0.0.1:8888&lt;/pre&gt;

    &lt;p&gt;Now let&apos;s check everything is up:&lt;/p&gt;

&lt;div class=&quot;row&quot;&gt;
    &lt;div class=&quot;col-md-9&quot;&gt;
    &lt;pre class=&quot;console&quot;&gt;&amp;gt; curl https://localhost:8888?name=CloudCaptain
{&quot;hello&quot;:&quot;Hello, CloudCaptain!&quot;}&lt;/pre&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; curl https://localhost:50001/healthcheck
{&quot;deadlocks&quot;:{&quot;healthy&quot;:true},&quot;template&quot;:{&quot;healthy&quot;:true}}&lt;/pre&gt;
    &lt;/div&gt;
    &lt;div class=&quot;col-md-3&quot;&gt;
        &lt;div class=&quot;blog-post-image&quot;&gt;
            &lt;img src=&quot;/assets/img/virtualbox.png&quot; alt=&quot;VirtualBox&quot;&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

    &lt;p&gt;And indeed it shows up in our list of instances as well:&lt;/p&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; boxfuse ps

Running Instances on VirtualBox :
+-------------+------------------------------+---------------------+-----------------------+---------------------+
|  Instance   |             Image            |        Type         |          URL          |     Launched at     |
+-------------+------------------------------+---------------------+-----------------------+---------------------+
| vb-033da2a4 | axelfontaine/dwunikernel:1.0 | 4 CPU / 1024 MB RAM | https://127.0.0.1:8888 | 2015-04-25 23:42:20 |
+-------------+------------------------------+---------------------+-----------------------+---------------------+
Total: 1&lt;/pre&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Step 3: Deploy it unchanged to AWS&lt;/h2&gt;

    &lt;p&gt;Finally deploy the image unchanged to AWS:&lt;/p&gt;

    &lt;pre class=&quot;console&quot; style=&quot;font-size: 11px&quot;&gt;&amp;gt; boxfuse run dwunikernel:1.0 -env=prod

Pushing axelfontaine/dwunikernel:1.0 ...
Verifying axelfontaine/dwunikernel:1.0 ...
Creating Elastic IP ...
Mapping dwunikernel-axelfontaine.boxfuse.io to 52.28.23.63 ...
Waiting for AWS to create an AMI for axelfontaine/dwunikernel:1.0 in eu-central-1 (this may take up to 50 seconds) ...
AMI created in 00:31.067s -&gt; ami-da744bc7
Creating security group boxfuse-sg_axelfontaine/dwunikernel:1.0 ...
Launching t2.micro instance of axelfontaine/dwunikernel:1.0 (ami-da744bc7) in eu-central-1 ...
Instance launched in 00:28.320s -&gt; i-53be0c92
Waiting for Payload to start on Instance i-53be0c92 at https://52.28.14.76:8081/healthcheck ...
Remapping Elastic IP 52.28.23.63 to i-53be0c92 ...
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
Deployment completed successfully. axelfontaine/dwunikernel:1.0 is up and running at https://dwunikernel-axelfontaine.boxfuse.io:8081&lt;/pre&gt;

    &lt;p&gt;CloudCaptain automatically created a &lt;strong&gt;new Elastic IP address&lt;/strong&gt; and a &lt;strong&gt;new domain&lt;/strong&gt;.
        It pushed the image to the secure CloudCaptain vault, registered an AMI, created a security group and launched an instance.
    Then finally it mapped the Elastic IP onto the instance.&lt;/p&gt;

    &lt;p&gt;Let&apos;s check if the instance came up:&lt;/p&gt;
    &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;col-md-9&quot;&gt;
    &lt;pre class=&quot;console&quot;&gt;&amp;gt; curl https://dwunikernel-axelfontaine.boxfuse.io?name=CloudCaptainAndAWS
{&quot;hello&quot;:&quot;Hello, CloudCaptainAndAWS!&quot;}&lt;/pre&gt;

    &lt;pre class=&quot;console&quot;&gt;&amp;gt; curl https://dwunikernel-axelfontaine.boxfuse.io:8081/healthcheck
{&quot;deadlocks&quot;:{&quot;healthy&quot;:true},&quot;template&quot;:{&quot;healthy&quot;:true}}&lt;/pre&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-md-3&quot;&gt;
            &lt;div class=&quot;blog-post-image&quot;&gt;
                &lt;img src=&quot;/assets/img/aws.png&quot; alt=&quot;AWS&quot; style=&quot;max-width: 100%&quot;&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;p&gt;And it did. Our Dropwizard unikernel is successfully up and running on AWS.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Done.&lt;/h2&gt;

    &lt;p&gt;Congratulations! In just a few minutes and 3 easy steps you created a &lt;strong&gt;brand new unikernel image of the example Dropwizard application&lt;/strong&gt;.
    This image is minimal, secure and portable. You ran it unchanged on both VirtualBox and AWS.&lt;/p&gt;

    &lt;p&gt;And best of all, all of this is completely free by &lt;strong&gt;combining the AWS and the CloudCaptain free tiers&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;Now go ahead, dive deeper and read the &lt;a href=&quot;/docs/payloads/dropwizard&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;/blog/dropwizard-aws-maven&quot;&gt;&lt;strong&gt;Continue to part 2&lt;/strong&gt;&lt;/a&gt;, where we will &lt;a href=&quot;/blog/dropwizard-aws-maven&quot;&gt;&lt;strong&gt;integrate CloudCaptain directly into the Maven build.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  
  <entry>
    <id>https://cloudcaptain.sh/blog/welcome</id>
    <link type="text/html" rel="alternate" href="/blog/welcome"/>
    <title>Welcome to CloudCaptain</title>
    <published>2015-04-15T00:00:00+00:00</published>
    <updated>2015-04-15T00:00:00+00:00</updated>
    <author>
      <name>Axel Fontaine</name>
    </author>
    <content type="html">&lt;div&gt;
    &lt;p&gt;After a lot of hard work, we are excited to announce CloudCaptain!&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain redefines the Operating System, Provisioning and Application Deployment&lt;/strong&gt; by adopting a fresh approach
    designed from the ground up for a modern cloud-based world &lt;strong&gt;without lock-in&lt;/strong&gt;. Images are measured in MBs and generated in seconds.
    Deployment are blue/green and transactional with zero downtime. Welcome to the future.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/logo/cloudcaptain.svg&quot; alt=&quot;CloudCaptain&quot; style=&quot;height: 200px&quot;&gt;
    &lt;/div&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;The End of the general-purpose Operating System&lt;/h2&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain eliminates the general-purpose operating system&lt;/strong&gt; and replaces it with a Linux-kernel
        based system that is just a few MBs in size. No more bloat and unnecessary baggage. No more cargo cult. These images are as lean as they get.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/learn/microos.png&quot; alt=&quot;MicroOS&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;A CloudCaptain image is &lt;strong&gt;just 1% of the size&lt;/strong&gt; of a legacy general-purpose operating system.
        It is &lt;strong&gt;faster&lt;/strong&gt; to transfer, &lt;strong&gt;cheaper&lt;/strong&gt; to archive and, by drastically reducing the attach surface, much more &lt;strong&gt;secure&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;The End of Traditional Provisioning&lt;/h2&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain eliminates traditional provisioning&lt;/strong&gt; by generating bootable images for your applications in seconds.
        No more Chef and Puppet. Instead CloudCaptain analyses your app and &lt;strong&gt;generates the perfect immutable image&lt;/strong&gt; for it, &lt;strong&gt;in seconds&lt;/strong&gt;, every single time.
    &lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/learn/fuse.png&quot; alt=&quot;Fuse&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;CloudCaptain image generation is on average &lt;strong&gt;100x faster&lt;/strong&gt; than traditional provisioning. Instead of taking
    hours or minutes, generating an image takes just &lt;strong&gt;5 seconds&lt;/strong&gt;. You don&apos;t need sysadmin knowledge
    and you don&apos;t have to write complex recipes. All it takes is &lt;strong&gt;one command&lt;/strong&gt;. And yes, it runs on Windows, Mac &amp;amp; Linux.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Application Deployment Reinvented&lt;/h2&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain redefines application deployment&lt;/strong&gt; and replaces it by a clean bootable Image-based model,
        where every Image is rolled out using a highly reliable transactional blue/green deployment with a Zero Downtime transition.&lt;/p&gt;

    &lt;div class=&quot;blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/learn/deploy.png&quot; alt=&quot;Deploy&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;CloudCaptain deploys Images to ensure &lt;strong&gt;all systems are identical in all environments&lt;/strong&gt;, down to the last bit.
    This is eliminates a common source of errors. Once generated you can now run the exact same Image locally in development on VirtualBox
    as you you will run in production on AWS.&lt;/p&gt;

    &lt;p&gt;Deployment on VirtualBox takes just a few seconds, and a &lt;strong&gt;Zero-Downtime update on AWS&lt;/strong&gt; usually completes in &lt;strong&gt;under 90 seconds&lt;/strong&gt;.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;No more Lock-in&lt;/h2&gt;

    &lt;p&gt;&lt;strong&gt;CloudCaptain eliminates lock in&lt;/strong&gt; by working with your applications in their native formats and your AWS account. Say goodbye to walled gardens and proprietary formats.&lt;/p&gt;

    &lt;div class=&quot;standards blog-post-image center&quot;&gt;
        &lt;img src=&quot;/assets/img/virtualbox.png&quot;&gt;
        &lt;img src=&quot;/assets/img/aws.png&quot;&gt;
        &lt;img src=&quot;/assets/img/java.png&quot;&gt;
        &lt;img src=&quot;/assets/img/tomcat.png&quot;&gt;
        &lt;img src=&quot;/assets/img/linux.png&quot;&gt;
    &lt;/div&gt;

    &lt;p&gt;At CloudCaptain we strongly believe you should be able to pick the &lt;strong&gt;best tool for the job&lt;/strong&gt; without
    needing to rewrite your application or having to constrain yourself to a walled garden. We built CloudCaptain to help you solve
    the &lt;strong&gt;heavy lifting of deployment&lt;/strong&gt; using the &lt;strong&gt;open technologies and platforms&lt;/strong&gt; you love.&lt;/p&gt;

    &lt;p&gt;There is &lt;strong&gt;no lock-in&lt;/strong&gt; and there are &lt;strong&gt;no long term commitments&lt;/strong&gt;. You can leave anytime you like, but you won&apos;t want to.&lt;/p&gt;

    &lt;h2 class=&quot;blog-post-section&quot;&gt;Get Started&lt;/h2&gt;

    &lt;p&gt;CloudCaptain is available now.&lt;/p&gt;

    &lt;p&gt;We are launching with support for &lt;strong&gt;JVM&lt;/strong&gt; apps packaged as either &lt;strong&gt;war files on Tomcat&lt;/strong&gt; or &lt;strong&gt;executable jar&lt;/strong&gt; files.
        You can &lt;strong&gt;generate CloudCaptain micro Images on Windows, Mac or Linux&lt;/strong&gt;.
        And you can run them unchanged on &lt;strong&gt;VirtualBox and AWS&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;We created a &lt;strong&gt;free tier that maps perfectly onto AWS&apos; free tier&lt;/strong&gt;, so you can get started at no cost.&lt;/p&gt;

    &lt;p&gt;
        &lt;a href=&quot;https://console.cloudcaptain.sh&quot; class=&quot;btn btn-primary btn-large btn-jumbo&quot;&gt;Sign up for free&lt;/a&gt;
    &lt;/p&gt;

    &lt;p&gt;Stay tuned, &lt;strong&gt;subscribe to this blog&lt;/strong&gt; by email or RSS, and follow &lt;strong&gt;&lt;a href=&quot;https://twitter.com/boxfuse&quot;&gt;@boxfuse&lt;/a&gt;&lt;/strong&gt;.
        We have many exciting announcements to come. This is just the beginning!&lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  

</feed>