Posts

How to setup ROR project with nginx + passenger.

Image
This blog is about how you can setup Exiting Ruby on rails Application with Nginx and Passenger. This setup is done on ubuntu 18.04. So below ubuntu 18.04 you may find some dependency issue. In this blog I have setup first Nginx and Passenger. Then after Installed Ruby using RVM.   then installed rails. Also I have installed Postgres. In the end, I have added setups to setup Nginx config file for pointing ruby on rails application. Step :- 1 Installation of Nginx #install nginx for passenger sudo apt-get update sudo apt install nginx-extras sudo service nginx start Step :- 2 Install nginx and passenger module # install our PGP key and add HTTPS support for APT sudo apt-get install -y dirmngr gnupg sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 sudo apt-get install -y apt-transport-https ca-certificates #Add our APT repository sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bionic main > /etc/apt/sourc...

HOW TO SCHEDULE AN EC2 INSTANCE ?

Image
When we talk about cloud service, There is not doubt that AWS is best cloud service provider and AWS providing one the best service to its customer. So there is possibility that some of the customer might complain about cost of AWS instance. But here is the thing that AWS is also giving you many ways that you can save dollars ( $ ) . Only thing is here is that you need to find way to save cost for your AWS cost means AWS give you food but they not gonna serve you, you need to eat by yourself at right time.    So here I came up the way to save instance cost by scheduling an EC2 Instance. If you are instance in some particular time period or Let say I need instance for 8 hours a day because I am using this instance in development. So we can schedule an EC2 instance in this case and save instance cost. It is very simple way to save cost.  Follow below Steps and schedule an Instance : -  Step 1 :-     Login to AWS and open cloud formation console, Start new sta...

Most useful Linux commands for DevOps

Image
  To use and get comfortable with Linux, you need to learn Linux commands. Most of things in Linux is done by terminal. So you need to know some commands of Linux to work Linux terminal. Here in this blog I have find some commands that is very useful in DevOps area as per my perspective.  So here, In this blog I have figured out some Linux commands. This commands are very useful when you interact with Linux terminal to get your work done. In DevOps job, We need to deal with configuration, solving errors, maintenance etc.. .Therefor we have to know this useful Linux commands to automate process and get our work easier. ➤      Widely use Linux commands To find the description of each Linux commands in terminal                man command-name To add-user / add-group in system               sudo adduser user-name To change ownership of file       ...

Different Ways to change .Pem file of AWS instance Part : - 2 ( Using Reset-Access Document )

Image
In part one we have seen how to change .Pem file using session manager, Now in this part we are going to use Automation document to change the key-pair and get access to your AWS instance. This will replace the old key with new key-pair and you can connect to your instance. This is automation technique. So we don't need to do much things, all the things is done by AWS by automation document called Reset-Access . This is useful when your instance is ebs backed . This automation technique is also in the System Manager so you need to attach role to instance, So we can run Automation document on the instance whose key-pair is lost. If you haven't attach the System Manager role to AWS instance then this can be done using   how to connect AWS instance when you lost .Pem file. After attaching the IAM role to instance follow below steps and regain key-pair.Now follow below step to reset .Pem file. Step : - 1    Open System Manager and select the Automation under the Actio...

Different Ways to change .Pem file of AWS instance Part : - 1 (Using Session manager)

Image
Pem file is a private key file that you download when you first time generate key from key pair section or when you create an instance. It is use to securely connect your instance using terminal. So AWS stores public key and they let us download .Pem one time only. In that case, Someone may loose .Pem file by mistake and you are not able to ssh in your instance without .Pem file. So the question is  How to change your .Pem file of your instance in this scenario.  There are  3 ways that i know, how to change .Pem file.  Using Session Manager Using AWS-Support Reset Access automation document in System Manager Using new instance I will guide you through the step wise. In this blog i will explain how to change .Pem file using Session Manager. This use full when your instance is running or it is instance store backed, so in that case this is very useful method. If you haven't attach the System Manager role to AWS instance then this can be done using   how to co...

Contact Me

Name

Email *

Message *