<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Byron Quezada on Medium]]></title>
        <description><![CDATA[Stories by Byron Quezada on Medium]]></description>
        <link>https://medium.com/@byque?source=rss-cb98139759a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*eIbJHwvNF__1w_4T</url>
            <title>Stories by Byron Quezada on Medium</title>
            <link>https://medium.com/@byque?source=rss-cb98139759a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 00:37:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@byque/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting up a Development Environment for Arm Applications]]></title>
            <link>https://medium.com/globant/setting-up-a-development-environment-for-arm-applications-3c00876584ac?source=rss-cb98139759a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c00876584ac</guid>
            <category><![CDATA[arm]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Byron Quezada]]></dc:creator>
            <pubDate>Mon, 07 Aug 2023 15:18:59 GMT</pubDate>
            <atom:updated>2023-08-07T15:18:59.248Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting Up a Development Environment for Arm Applications</h3><h4>Local configuration and deployment to Arm Servers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/0*P9Ecy3IECp_O1IE5" /><figcaption>Arm processor, Image free for commercial use (<a href="https://www.pxfuel.com/en/free-photo-odnnq">source</a>)</figcaption></figure><p>We don’t want to be late to join the party, so we must grab the opportunity to test the new cloud servers (even for free) that run on Arm processors. Among the benefits of running an application on Arm-based servers are: lower costs of running the application, better performance, and a greener carbon footprint. Most cloud providers have their Arm servers offerings, so it’s better to be prepared and aware of what are the challenges and opportunities with this alternative approach.</p><p>This article will guide you through the setup of a local development environment for Arm applications and their deployment on Arm cloud servers using Docker containers to keep a common ground with other CPU architectures. A Raspberry Pi 3 running Ubuntu 22.04 LTS will be used to demonstrate the proof of concept (PoC), and the deployment of the application will be done in AWS. Other cloud providers&#39; offerings will be referenced using hyperlinks but will not be covered in detail.</p><h3>Set-Up</h3><p>We will start by describing the setup to build a simple containerized application that will run on Arm processors. The application will be written in C, and it only outputs a message in the console. We will review the installation of all the tools needed so that the application can be run as a container. Building applications for different languages is out of the scope of this article, and it’s not relevant to the PoC.</p><h4>Arm-based computer</h4><p>Choosing cheap or expensive as the budget allows, but it’s important that the computer processor has a 64-bit <a href="https://www.arm.com/architecture/cpu">Arm architecture</a>. Examples can be a Raspberry Pi 3 or 4 on the lower end or a MacBook Pro with the latest M chips on the higher end.</p><p>Specifications of the <a href="https://www.raspberrypi.com/products/raspberry-pi-3-model-b/">Raspberry Pi 3</a> (starting at $35) used for this PoC:</p><pre>Architecture:            aarch64<br>  CPU op-mode(s):        32-bit, 64-bit<br>  Byte Order:            Little Endian<br>CPU(s):                  4<br>  On-line CPU(s) list:   0-3<br>Vendor ID:               Arm<br>Model name:              Cortex-A53</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*jWiSOZdDUda8TMUK" /><figcaption>Raspberry Pi 3, Creative Commons image (<a href="https://commons.wikimedia.org/wiki/File:Raspberry_Pi_3_B%2B_%2826931245278%29.png">source</a>)</figcaption></figure><h4>Operating System</h4><p>Most single-board computers can run a Linux variant capable of running Docker (without the GUI), which does not require a paid subscription, thus decreasing the development cost. Windows on Arm is not going to be covered in this article, given that its usage is not widespread at the moment of this writing.</p><p>Since the <a href="https://apps.apple.com/id/app/macos-big-sur/id1526878132?mt=12">Big Sur</a> release, MacOS is compatible with Arm processors; in order to build the container, we need to install <a href="https://www.docker.com/products/docker-desktop/">Docker Desktop</a>. This tool requires a <a href="https://www.docker.com/pricing/">paid subscription</a> on business laptops, increasing the upfront cost of development. In MacOS, there are open-source alternatives such as <a href="https://rancherdesktop.io/">Rancher Desktop</a>, <a href="https://lima-vm.io/">Lima</a>, or <a href="https://podman.io/">Podman</a>, but this is out of the scope of this article.</p><h4>Docker</h4><p>Follow these instructions to install and configure Docker on Linux:</p><ul><li><a href="https://docs.docker.com/engine/install/ubuntu/">Install Docker Engine on Ubuntu</a></li><li><a href="https://docs.docker.com/engine/install/linux-postinstall/">Linux post-installation steps for Docker Engine</a></li></ul><h4>AWS-CLI</h4><p>Follow these instructions to install and configure the AWS Command Line Interface:</p><ul><li><a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#cliv2-linux-install">Installing or updating the latest version of the AWS CLI</a></li></ul><h3>Building the Containerized Application</h3><p>Popular applications may offer a Docker image for Arm processors, but not all Docker base images available for x86–64 processors have also been built for Arm processors. If the application image is not available for this architecture, we need to build the image ourselves from the source code in an Arm computer (or using cross-compiling), so that the Arm server we intend to deploy the application can run it.</p><p>The following C application will be used to show the process of building a container:</p><p>main.c</p><pre>#include &lt;sys/syscall.h&gt;<br>#include &lt;unistd.h&gt;<br>const char mensaje[] =<br>  &quot;\n&quot;<br>  &quot;My awesome app executed correctly\n&quot;<br>  &quot;\n&quot;;<br><br>int main() {<br>  syscall(SYS_write, STDOUT_FILENO, mensaje, sizeof(mensaje) - 1);<br>  return 0;<br>}</pre><p>Compile our program:</p><pre>gcc main.c -o awesomeapp</pre><p>This is the Dockerfile:</p><pre>FROM scratch<br>COPY awesomeapp /<br>CMD [&quot;/awesomeapp&quot;]</pre><p>Build a container image of our application using the previous Dockerfile:</p><pre>docker build -t awesomeapp:latest .</pre><p>Test our containerized application:</p><pre>docker run --rm awesomeapp:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*sfL9XJ2M0wbLQRSS" /><figcaption>Output from the docker container execution in the Raspberry Pi 3 (screenshot)</figcaption></figure><h4>Upload our container to a registry</h4><p>Ideally, the deployment of a containerized application will rely on a container registry, like the following:</p><ul><li><a href="https://hub.docker.com/">Docker Hub</a>: is used by default with the docker CLI, but an <a href="https://www.docker.com/pricing/">enterprise license</a> is required to have more than one private repository and have Advanced Image Management.</li><li><a href="https://aws.amazon.com/ecr/">AWS ECR</a>: Amazon’s container registry, a great option to use with <a href="https://aws.amazon.com/codedeploy/">CodeDeploy</a>, and the chosen registry for this article.</li></ul><p>Additional cloud offerings include:</p><ul><li><a href="https://cloud.google.com/artifact-registry">GCP Artifact Registry</a></li><li><a href="https://azure.microsoft.com/en-us/products/container-registry">Azure Container Registry</a></li><li><a href="https://container-registry.oracle.com/">Oracle Container Registry</a></li></ul><p>A production CI/CD pipeline should include a stage that builds the container and pushes the resulting image to the container registry.</p><h4>Create the container registry</h4><p>After having selected the container registry to use, the next step is to create a private repository where we will push our images. To create the private repository, please follow the instructions that you can find <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-create.html">here</a>, this topic will not be covered in this article.</p><h4>Push the container image to the registry</h4><p>AWS ECR has a specific workflow to upload a container. This section will show how to create the required resources in AWS to be able to push the created image to AWS.</p><ul><li>Create an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html">IAM user</a> with the following policy.</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;ecr:CompleteLayerUpload&quot;,<br>                &quot;ecr:GetAuthorizationToken&quot;,<br>                &quot;ecr:UploadLayerPart&quot;,<br>                &quot;ecr:InitiateLayerUpload&quot;,<br>                &quot;ecr:BatchCheckLayerAvailability&quot;,<br>                &quot;ecr:PutImage&quot;,<br>                &quot;ecr:BatchGetImage&quot;,<br>                &quot;ecr:GetDownloadUrlForLayer&quot;,<br>                &quot;ecr:DescribeImages&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        }<br>    ]<br>}</pre><ul><li>Create an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">access key</a> for this user.</li><li>Configure the AWS-CLI to use this user and the generated access key with:</li></ul><pre>aws configure --profile myprofilename</pre><ul><li>Authenticate docker-cli, following the steps found in <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html">Private registry authentication</a>.</li><li>Upload the image to the registry, following the steps found in <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html">Pushing a Docker image</a>.</li></ul><p>After pushing the Docker image, the registry should show the image as in the screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/0*uszNh0AQac5aTB1e" /><figcaption>AWS Web Console showing the ECR repository for the awesomeapp (screenshoot)</figcaption></figure><h3>Launch the cloud server</h3><p>In this article, the AWS <a href="https://aws.amazon.com/ec2/instance-types/t4/"><em>T4g instance type</em></a> will be used because AWS offers a free trial. Other cloud providers offer Arm servers as well, and additional information can be found in the references section.</p><h4>Arm server options</h4><p>When creating the server instance, choose the following configuration:</p><ul><li>Choose the Architecture 64-bit (Arm).</li><li>The suggested OS is Ubuntu Server 22.04.</li><li>The instance type can be chosen depending on your application needs. For this PoC, a <em>t4g.small</em> (free trial) or <em>t4g.micro</em> (cheapest) can be used.</li><li>Add your preferred <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html">SSH key</a> to be able to log in to the server.</li><li>The other options can be left at the default values of the launch wizard.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/0*Udzy0sEHkqeu7l6t" /><figcaption>AWS Web Console showing the wizard to create an EC2 Arm instance (screenshot)</figcaption></figure><p>After launching the cloud server, validate that it is running the correct instance type that uses Arm processors (check the ‘Instance type’ column in the AWS web console):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RXychIE1eWpC2_Om" /><figcaption>AWS Web Console showing the created Arm server in EC2 (screenshot)</figcaption></figure><p>Then validate that the server AMI is running Arm Ubuntu 22.04 (check the AMI name in the AWS web console):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*tiML97UhzcN4XL_e" /><figcaption>AWS Web Console showing the AMI (screenshot)</figcaption></figure><h4>Log into the server</h4><p>Use SSH to access the server via the assigned public IP found in the AWS web console, the <a href="https://help.ubuntu.com/community/EC2StartersGuide">default user</a> should be <em>ubuntu</em>. Once you log into the server, check the processor architecture by running the following command:</p><pre>lspcu</pre><p>Specifications of the EC2 T4g instance used for this PoC:</p><pre>Architecture:            aarch64<br>  CPU op-mode(s):        32-bit, 64-bit<br>  Byte Order:            Little Endian<br>CPU(s):                  2<br>  On-line CPU(s) list:   0,1<br>Vendor ID:               Arm<br>Model name:              Neoverse-A53</pre><h3>Deploy the application</h3><p>As this is a PoC, we need to install Docker and the AWS-CLI on the Arm server to speed up the process of pulling the Docker image from ECR to our development environment. There are other approaches for production environments, but we are not going to cover them.</p><p>We will start by verifying that the server can authenticate correctly with the registry:</p><pre>aws ecr describe-images --repository-name &lt;myrepositoryname&gt; --profile &lt;myprofilename&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/0*S3WQ7K1SiKNGpdzH" /><figcaption>AWS CLI output describing the registry for awesomeapp (screenshot)</figcaption></figure><p>You have authenticated correctly if you can see the “repositoryName” that you have previously configured. In case of error, use the AWS CLI output to look for the step of this article that is related to it and double check that you have followed them correctly.</p><p>Then we need to pull the image from ECR:</p><pre>docker pull &lt;awsaccountnumber&gt;.dkr.ecr.us-east-1.amazonaws.com/awesomeapp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/0*oJfHVihakeQCRQzo" /><figcaption>AWS CLI output showing the docker image pull (screenshot)</figcaption></figure><p>Finally, run the Docker container on your Arm server:</p><pre>docker run --rm &lt;awsaccountnumber&gt;.dkr.ecr.us-east-1.amazonaws.com/awezomeapp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/0*YYvzJ0QpIpBmCiyp" /><figcaption>Output from the docker container execution in AWS EC2 T4g instance (screenshot)</figcaption></figure><p>At this point, we have validated that our Arm containerized application that was built on a Raspberry Pi 3 can also be run on an AWS T4g server.</p><h3>Conclusion</h3><p>In this article, we learned how to build an application container for Arm processors using a Raspberry Pi 3 and how to deploy it on an Arm server in AWS from an ECR private registry. We also did a Proof of Concept (PoC) deployment to showcase this.</p><p>To summarize the findings of the PoC, it was clearly demonstrated that adopting Arm-based application development leads to cost reduction, because we only spent $35 for the Raspberry Pi 3, we used a free AWS Arm server, and Docker is available without cost for Linux. The versatility of using a Raspberry Pi as a development platform for creating Arm-based binaries turned out to be highly advantageous by providing access to newer Arm cloud servers that can be used for free. Developers can leverage the Docker CLI, which is readily available for Arm Linux Servers, enabling seamless containerization of Arm binaries. Subsequently, the resulting Docker image can be effortlessly deployed on Arm servers, which are widely offered by various cloud providers. To expedite deployment processes, employing a container registry proves invaluable, as it facilitates efficient storage and retrieval of Arm-based Docker images, thereby significantly enhancing deployment speed.</p><h3>References</h3><ul><li><a href="https://aws.amazon.com/ec2/instance-types/t4/">AWS EC2 T4g Instances</a></li><li><a href="https://aws.amazon.com/ec2/instance-types/a1/">AWS EC2 A1 Instances</a></li><li><a href="https://cloud.google.com/compute/docs/instances/arm-on-compute">GCP Arm VMs on Compute</a></li><li><a href="https://azure.microsoft.com/en-us/blog/azure-virtual-machines-with-ampere-altra-arm-based-processors-generally-available/">Azure Virtual Machines with Arm</a></li><li><a href="https://www.oracle.com/cloud/compute/arm/">Oracle Arm Compute</a></li><li><a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-multi-architecture-image.html">Pushing a multi-architecture image</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c00876584ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/globant/setting-up-a-development-environment-for-arm-applications-3c00876584ac">Setting up a Development Environment for Arm Applications</a> was originally published in <a href="https://medium.com/globant">Globant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>