Posts

Showing posts from 2018

Infrastructure As Code - Terraform and AWS.

Build AWS infrastructure using Terraform Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Here i use "AWS" provider to build the infrastructure using terraform but Terraform can manage many providers, including multiple providers in a single configuration, check here for list of providers  https://www.terraform.io/docs/providers/index.html  . If you don't have an AWS account, create one now. For the getting started guide, we'll only be using resources which qualify under the AWS free-tier, meaning it will be free.Make sure to select the free tier ami before building the infrastructure, which will be discussed later in this document. Terraform uses text files to describe infrastructure and to set variables. These text files are called Terraform configurations and end in .tf . Refer For more information about con

Continuous Deployment - Jenkins , Capistrano And Docker.

How to integrate Capistrano with Docker for deployment? Lets start with small introduction about 'Capistrano' . Capistrano is a framework for building automated deployment scripts on remote node.Its an open source tool which is written in Ruby, but it can easily be used to deploy any language. Basically capistrano installed to and runs from your working computer. When you command Capistrano to do something on a server, it connects to the server via SSH and works there using shell commands. Lets see how the directory structure of capistrano looks like.If you are running capistrano first time ,you run below commands to initialise it,Which will create directory structure for you. $ mkdir capistrano/ $ cd capistrano/ $ cap install - mkdir -p config/deploy - create config/deploy.rb - create config/deploy/staging.rb - create config/deploy/production.rb - mkdir -p lib/capistrano/tasks - create Capfile - Capified To understand m

Docker ,MakeFile and Jenkins pipeline

How to create a re-usable MakeFile for build, push and deploy docker containers? and automate build using Jenkins pipeline.? Typing a long docker commands is always a pain.We can create a script to help us out. Bash can be used here, but using a Makefile for more convenient than script, as the syntax is easy to get started with. Clone below repo [ MakeFile_repo ] and go to the directory.  git clone git@github.com:Prashanth-Pullaikodi/Makefile_Docker_Build.git Repo contains below files and folders. 1. MakeFile: Contains make configuration to build, push and deploy containers. Inorder to run the make command you needs to have docker installed and docker hub account . 2. Nginx: Contains Dockerfile to build NGINX . 3. Jenkinsfile: Contains CD pipile line defintion of automating this build ,push deploy task. Inorder have to use this file you needs to have Jenkins installed and configured with pipeline ,Git plugins. You can use Makefile without Jenkins as well . Makefile