In this series of articles, we will create a rails application from scratch (you can also apply the same steps for an existing rails application) Before I begin this series, I would like to give credit to Raphael Jambalos who wrote this amazing series of articles in More than “Hello
This series will help you with setting up Dockerized WordPress website on you local machine and fully automate the deployment process to Amazon Web Services. The website will be ready for heavy traffic. To achieve this, I have created the following topics: WordPress on AWS, the challenges Dockerize WordPress with
This article assumes that you want to have separate AWS console accounts such as Staging, UAT and Production at one place. The best way to achieve this kind of separation is by using AWS Organizations and AWS Single Sign-On (SSO) AWS Organizations provides all the necessary options to achieve this
I have been writing ruby gems for sometime now and always wish that there could be a command that can generate the gem structure/boilerplate and all the things I love pre-configured for me. This is where Thor comes in handy. I am going to introduce you to Thor a.k.a the
If you have recently migrated your rails application and tried the rails db:setup or rails db:schema:load commands, you might have noticed an error like this: Column aaa_id on table bbb does not match column id on aaaa, which has type bigint(20). To resolve this issue, change the type of the
Create buildspec files AWS CodeDeploy requires a buildspec file for your project. which has all the commands required to build our project and action items required to successfully build and push it to the Deploy stage. We will create two buildspec files for Rails and Sidekiq services. Let’s get our
Concept Our CI/CD process should be driven by any change in our Github repository branch. Codepipeline will be listening for a change in our code on github and initiate the CI/CD process. Create CodePipeline One more steps and our sweet CI/CD is done and dusted. Go to CodePipeline from AWS
Create RDS Database Find and select the RDS service under the service tab. Click on create database. Follow the instructions below: Before we begin, please change things such as database size, names and other identifiers as per your requirements we will be choosing your database name, username and password, Please
As mentioned before, Bastian instance will allow us to connect to our Rails instance, RDS (MYSQL) and Redis cache for sidekiq from our local machine. It can be very handy when it comes to test services or troubleshoot issues. Create Bastian instance In the EC2 console, Click on Key pairs
We have successfully created our rails application with Docker and Docker Compose along with MYSQL and Sidekiq (using redis) for our development environment. Now we plan to put our website on AWS using (ECR, ECS, RDS, Elastic Cache and Load Balancer etc). Disclaimer: We will do a lot of configuration
Create the rails application rails new ecs-rails-application –api -d mysql You can replace ecs-rails-application with whatever name you want for your application You can also download the my repository from github. here is link Docker time Our application is created. Let’s create some other files and folders. cd ecs-rails-application #
In this article, our website will go live with Load Balancer and Autoscalling groups (having multiple Rails instances on demand). This means that AWS can increase the number of Rails instances on demand and it can scale it down too. We will do the following in this article: Create ECS
AWS ECS Task Definition AWS ECS task is a bit similar to Docker compose. task definition has the ECR Docker image and container along with Environment variables. Ultimately, the task will be deployed inside ECS Cluster which we will create later. We will create two task definitions (Rails and Sidekiq)