Creating a 3-tier Application With Totalcloud’s Code-Free Workflows

Totalcloud.io
4 min readJun 2, 2020

So you’re planning to set up your own 3-tier application on your AWS cloud infrastructure. This is where your operations are going to be running. With the options you have now, you’d either manually code it or provision it using the AWS CLI, or you’d write out a CloudFormation or Terraform script.

Needless to say, the manual method is not only tedious but chaotic, time-consuming & prone to errors. You’re not just programmatically scripting the requirements and configuring multiple services independently, but spending time testing them, fixing bugs and then deploying it. Some of these issues are solved by tools like Terraform & CloudFormation, that allow you to write code that’s more readable — but the catch here is that your DevOps engineers need a considerable amount of Terraform & CF knowledge and skill to be able to write the code.

This complex process can be made a whole lot simpler, and 40% faster by deploying the application through simple workflows.

How It Came To Be

The use case was requested to us by a customer and the first thing we did was create a working template for it. Anyone can build this out on our automation builder by simply putting together the building blocks in a logical manner — without a single line of code. Imagine explaining the concept to a colleague on a whiteboard? That’s exactly how it works. Your DevOps engineers can express the use case in the form of a workflow in no more than a few minutes, end to end — and with complete customization. If you feel the absolute need to write custom code somewhere — you can do that too.

This specific customer use case required a 3-tier Application — divided into 3 separate layers — one public layer and two private layers. The public layer acts as a shield for the private layer. The public layer is easily accessible to outside sources but the private layers are strictly designated only to those inside the network. We created 3 workflows — one to provision each layer — that ran sequentially to deploy this application.

Process

The goal of these three workflows to create the individual layers that mimic the three layers of a 3-tier application. Our outer layer being the network layer, following up with the traffic layer and then the database layer. We’ll configure a fixed set of AWS services to get this done. No coding, no navigating between different pages or any other hassle. Everything will be available in the workflow setup, we just need to connect the nodes and create a flow of events.

We shall be making use of the following AWS services to design and build a three-tier cloud infrastructure

  • Elastic Compute Cloud (EC2)
  • Auto Scaling Group
  • Virtual Private Cloud(VPC)
  • Elastic Load Balancer (ELB)
  • Security Groups
  • The Internet Gateway.

We use Totalcloud Workflows to create a trigger, action, and some custom code nodes that configures the earlier mentioned services to create the application.

What a 3 Tier Application offers

  • Scalability
  • High Availability
  • Fault Tolerance
  • Security

Network Layer

Here, we set up all the network resources to establish a connection and manage the other resources.

The first few nodes are set up to establish the VPC. 4 subnets are created with designated IPs that will be attached to the internet gateway. This way, we establish a connection between our services to the internet.

Normally, with AWS, you will need to configure each of these services separately. With these action nodes, however, you can configure several different services consecutively without any coding or navigating between pages.

Traffic Layer

The traffic layer manages the traffic with the below services, it also responds and reacts to changing demands in traffic.

The second workflow is entirely focused on managing moving data. This is achieved by setting up route tables and associate route tables connected to the previously established internet gateway.

A load balancer is also configured to manage the data across the EC2 instances. In case, you need to adjust the EC2 scale to match your incoming load, we’re also configuring an auto-scaling group.

Database Layer

Here, we created the DB Instances that will help store and manage the data.

An RDS db instance to act as our database. The cloudFront content distribution will allow the user to distribute the data to desired locations.

Your Use Case With Our Workflows

This was but one example of many use cases that we translate to our workflows. It’s a matter of combining the resources accurately. The building blocks that we’ve laid out with our platform can be used in any number of ways with zero coding.

If you have a resource you wish to simplify, you can try building your own workflows at Totalcloud.

--

--

Totalcloud.io

TotalCloud helps cloud engineers indulge in no-code AWS automation. We enable engineers to go script-less, saving more than 95% of engineering time.