Getting Started With Aptible to Deploy Your First Secure Containerized Application

Written by emmanuelohaba | Published 2023/11/14
Tech Story Tags: devops | cloud-security | containerized-applications | aptible | applicatin-deployment | devops-and-aptible | deploying-your-app-to-aptible

TLDRStart deploying secure containerized applications with Aptible by following a straightforward guide. Aptible streamlines the process, providing a secure environment for your applications. Ideal for those new to container deployment, it ensures a smooth and secure entry into the world of containerized developmentvia the TL;DR App

With data breaches on the rise, security needs to be top of mind before deploying any new application. But balancing app security with rapid innovation can be a major DevOps bottleneck. How can developers quickly ship secure code without compromising agility?

The answer lies in Aptible - a container orchestration platform purpose-built to shepherd applications from code to cloud while automating security, compliance, and best practices every step of the way.

In this hands-on guide, we’ll walk through using Aptible to launch your first containerized web application in a fully managed, end-to-end secure environment.

Features and Benefits of Aptible

With Aptible, software teams do not have to worry about configuring servers, setting up databases, maintaining security policies, monitoring systems, and other DevOps/infrastructure responsibilities.

This streamlines the development workflow, making it faster and easier for engineers to ship code from their local environments directly to production deployment. Aptible manages provisioning infrastructure on demand to support deployments while handling monitoring, logging, and auto-scaling based on load.

Here are some of the benefits Aptible offers:

Git-based Deployment

Aptible integrates with Git version control, allowing code changes to be easily pushed from any branch to their robust PaaS for rapid deployment. This automates the build, test, and release processes.

The PaaS completely handles provisioning underlying servers, configuring networks, managing databases, applying security policies, monitoring health, and scaling capacity - all with no-ops work required by the development teams.

Convenience and Scalability

Aptible’s deployment process is not at all complicated. If you have all the requirements (identified below), you can get your app live and running in less than a minute.

Plus, it offers on-demand scaling as well as vertical auto-scaling to ensure that your deployment needs are met even as the app grows. You can seamlessly integrate Aptible with your CI/CD tools to ensure a smooth process.

Also, it offers flexibility: you can choose different interfaces (Aptible CLI, dashboard, Terraform provider) based on your preferences and needs.

Reliability

Aptible is poised to reduce downtime to a minimum. With Aptible, you get zero-downtime app deployments, while database downtimes typically don’t last more than a minute and are infrequent.

It runs its platform across multiple public cloud regions. Customers can provision stack resources in any supported region for geographic redundancy. If an entire region goes down, traffic can be filed over to apps and databases running in alternate regions.

By combining these techniques, resources are redundantly distributed to avoid single points of failure. This keeps applications running smoothly for customers with minimal disruptions to the end-user experience.

Compliance and Security

Aptible offers users a fully managed cloud application security platform. This includes encryption, DDoS protection, intrusion detection, vulnerability scanning, VPNs, and role-based access controls. Authentication methods such as MFA and SSO are also supported.

In addition, with Aptible, you don’t have to worry about compliance because it automatically implements requirements from various security regulation frameworks including HIPAA, HITRUST, and SOC 2.

By automating these tasks and streamlining processes into a unified PaaS, Aptible saves developers time and mental energy. They are freed up to focus on writing code and building products rather than Ops activities. This drives faster iteration, innovation, and release velocity.

Deploying Your First Application on Aptible

You can deploy your app using a custom code or a starter template from Aptible. In this section, we’ll focus on deploying your custom code. The explanation for working with a template comes later, but the steps are essentially the same.

The requirements:

  • A Git repository with your application code.

  • You need to provide a Dockerfile, which will be used to build the app’s container image and then to run it on Aptible’s infrastructure.

  • Your apps will only be able to receive traffic via HTTP or TCP, not UDP. However, connections to UDP services such as DNS and SNMP are still allowed.

  • Aptible does not store app data with persistence. If you must, you need a third-party solution or a database.

Once you have the requirements, the following are the steps to deploy your app.

  1. Open Aptible in your browser and log in to your account. To start the process, select ‘Deploy with Git Push.’

  2. Aptible uses Public Key Authentication. So, on the next screen, you’ll be prompted to add an SSH key. This is tied to the user, and Aptible uses this to authenticate you when you push your code. The following key types are supported: ssh-rsa, ssh-ed25519, ssh-dss. If you don’t have an existing key, check out the documentation for how to generate one using the code below:

ssh-keygen -t ed25519 -C "[email protected]"

  1. The next step requires that you set up the environment by selecting the deployment stack, with regional availability covering the Americas, Europe, and Asia/Pacific. Aptible provides both shared and dedicated stacks. The latter is available at higher pricing tiers.

  2. When you push your code to Aptible, select the ‘Custom Code’ option, and follow the instructions to add Aptible’s Git Server. It will typically be in the following format:

git remote add aptible [email protected]: test1234/test1234.git

  1. After that, you need to provision the database and configure the app. This includes selecting the database handle and environment variables.

  2. In the final steps, you’ll deploy your code, which will enable you to view logs in real-time, and then make your app live on the internet.

Alternatively, you can deploy your code using a starter template. Aptible has templates based on Ruby on Rails, NodeJS, Django, and Laravel available. Each requires similar steps to how you deploy your custom code.

You still have to have Git installed, add an SSH key, and set up your environment by selecting your stack. After going through those steps, upon reaching the point where you have to push your code to Aptible, simply select the template you want instead of ‘Custom Code.’

From then on, Aptible takes over filling in the information on the required databases, services, and configurations based on the template you have selected. Once you have gone through those processes, simply save and deploy the code, then launch your app.

Conclusion

Aptible is a powerful and convenient platform that can help you host your applications in the cloud without worrying about infrastructure, compliance, or security.

In this article, you have learned how to deploy your first secure containerized application using Aptible.

You have seen how to create an app, deploy it from a Docker image or a Git repository, expose it to the internet using endpoints, and scale and manage it using the dashboard or the CLI tool.

To learn more about Aptible and its features, check out the website, and read the documentation. And you can always contact our support team if you have any questions or issues.


Feature image source: Unsplash


Written by emmanuelohaba | Professional writer and marketer who specializes in SEO, PR, and Scrum Master expertise.
Published by HackerNoon on 2023/11/14