Blog Archives

Connect with MongoDB on separate EC2 Instance

You need to open mongoDB port to world so that you can listen inbound traffic. To do so: In instance security group -> Inboud Open 27017 port or whatever port on which your mongoDB is currently running. Type Protocol Port

Tagged with: , , ,
Posted in amazon, EC2, mongodb, mongoid

Create and integrate SSL certificate in Rails app Using [ Godaddy + Nginx(1.8) + Puma + Ubuntu Server(14.04 LTS) ]

Login to your server by ssh and then: Create file YOUR_RAILS_APP_DIRECTORY/config/puma.rb Below is puma.rb file content: #!/usr/bin/env puma directory ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/public/’ rackup ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/’ environment ‘production’ daemonize true pidfile ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/pids/’ state_path ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/pids/puma.state’ stdout_redirect ‘/home/ubuntu/YOUR_RAILS_APP_DIRECTORY/log/puma.log’ threads 2, 5 bind ‘unix:///home/ubuntu/YOUR_RAILS_APP_DIRECTORY/tmp/sockets/puma.sock’ workers 2 Generate

Tagged with: , , ,
Posted in amazon, DNS, Godaddy, Nginx, production, Puma, Ruby on Rails, Ubuntu

Attach EBS volume as root to EC2 instance Amazon

Amazon EBS Device Naming Conventiona Attach the volume to the existing instance by following these steps: Stop Your Instance. Create a snapshot of the root volume. Create a new volume using the snapshot. [In case of ubuntu name it /dev/sda1]

Tagged with: , , ,
Posted in amazon, EBS (Elastic Block Storage)

Downloading Objects from Amazon S3 using the AWS SDK [API V2] for Ruby

Set bellow variables in your project or as environment variables or whatever way you wanted. AWS_ACCESS_KEY_ID = ‘S3 bucket access key id’ AWS_SECRET_ACCESS_KEY= ‘S3 bucket secret access key’ AWS_REGION = ‘s3 bucket region’ AWS_BUCKET= ‘bucket name’ Follow any of two

Posted in amazon, S3

Amazon AutoScalling ubuntu

A. Setup Auto Scaling command line: Download the tool from Unzip it and follow the process below Set the following environment variables: 1. Open “/etc/bash.bashrc” file to set environment variables $ sudo nano /etc/bash.bashrc 2. Add this line to

Tagged with:
Posted in amazon

Connecting rails app with remote mongodb server [mongodb ubuntu]

Problems faced: P1. My DB server is running but ping not working correctly: To ping an EC2 instance, you need to allow ICMP traffic in the instance’s security group. See Why can’t I ping my instance in the EC2 FAQ.

Tagged with: , , ,
Posted in amazon, mongodb, mongoid

SSH error: Too many authentic authentication failures

This error occurs, when there are multiple known hosts and ssh command is unable to capture private key for specific host. Solution: You have to specify host and private ssh key in ~/.ssh/config file as shown below: You can tell

Tagged with:
Posted in amazon, bitbucket, Github, ssh

Connect Amazon Instance and Terminate

To access your instance: Open an SSH client. (find out how to connect using PuTTY) Locate your private key file (you_key_pair_name.pem). The wizard automatically detects the key you used to launch the instance. Your key must not be publicly viewable for

Tagged with:
Posted in amazon, Cloud computing and Big data