Posts

Docker - Preventing IP overlapping

Image
  What is IP address overlapping? When the container IP address overlaps with another IP external, then the application running on the container is not accessible from outside due to the IP address overlapping.  NOTE: This IP address overlapping can happen on the bridge interface IP or docker container IP. Let's see how to address this IP overlapping issue on the bridge interface. I already have a running container.  root@demo:~# docker run -d --name web --network mynet1 nginx:alpine 268647e11011d513d2357ce1c81e0f48787038a83d01d028d31a5b29dbdb885b root@demo:~# docker container ls CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS         PORTS     NAMES 268647e11011   nginx:alpine   "/docker-entrypoint.…"   4 seconds ago   Up 3 seconds   80/tcp  ...

AWS - Taking backup of an EC2 instance

Image
  In this post, we will see how to take a backup of a running EC2 instance as an AMI and how to clean up the AMI. I have an instance configured with root volume + data volume (1GB). Let's start taking backups by "Create Image". During AMI creation, EC2 creates snapshots for each volume. Now, we have AMI created. When I try to create an instance from the AMI, it automatically configures storage with 2 volumes and you cannot edit them. Now, Let's delete the AMI by "Deregister AMI".  NOTE: This will not impact running EC2s. But, no new EC2 can be created. 

AWS Code Pipeline - CI/CD Series Part 6

Image
  In this post, We will see how to add a manual approval for the code pipeline. The agenda is to get a mail notification and manual approval to trigger the code pipeline (Deployment) - CONTINOUS DELIVERY. We will use the SNS notification from the previous post. Open the pipeline and add a new stage where you want to implement the "Manual Approval". I am going to add a stage between CODE DEPLOY and CODE BUILD CODE BUILD -> MANUAL APPROVAL -> CODE DEPLOY. Click on "Add Stage". Name the stage and add "Action Group". There are lot of actions available. "Manual Approval" is one of the actions. Save the pipeline and "Release change". Once the code build is completed, it will trigger a mail notification with pipeline URL. Click on "Review" and "Approve" the pipeline. Now, we can see the pipeline completed.

AWS Code Pipeline - CI/CD Series Part 5

Image
 In this post, We will see how to add notifications to the pipeline. This would create an email alert on the selected event. This is nothing but adding SNS with AWS Code Pipeline. Click on the "PipeLine" and select "Notify". Give the notification name and select the type of notification you want. Select the events that need notifications. Select target as "SNS Topic" and topic name. Now, navigate to SNS topic and create a subscription.  Enter the mail ID and confirm the subscription. We are set with enabling notification. Let's go back to the pipeline and click on "Release Change" to rerun the pipeline. I got the notification on the pipeline is completed.

AWS Code Pipeline - CI/CD Series Part 4

Image
  AWS CodePipeline is a continuous delivery service provided by Amazon Web Services (AWS) that helps you automate the software release process for your applications. With AWS CodePipeline, you can model, visualize, and automate the different stages of your software delivery process, from building and testing to deploying and monitoring. It enables you to rapidly and reliably deliver features and updates to your customers while reducing the risk of errors and downtime. Code Pipeline = Code Commit + Code Build + Code Deploy  Start with creating a pipeline. Pipeline settings. I am selecting the version as "v1" and creating a new service role. Updating the pipeline with AWS Code Commit. Updating with AWS Code Build. Updating with AWS Code Deploy. Now, the code pipeline will automatically start the process of continuous deployment. Whenever you make changes to the code under "AWS Code Commit", the AWS Code Pipeline will detect the change the run the deployment process au...