Note: Draft document, needs review.
Ec2 instance | Username and password to connect to AWS console:
PW: boomboom
Ec2 instance type : m4.large instance with 2 vCPU and 8GiB memory.
Availability Zone: Oregon
Elastic IP : a.b.c.d
Public DNS : ec2-a-b-c-d.us-west-2.compute.amazonaws.com
Instance name : alpha-z
Instance ID is : i-1884a1c0)
Private IP is : k.n.m.z
EC2 instance image : Amazon Linux AMI 2016.03.0 x86_64 HVM GP2
Opened port: Port # 22 (ssh) and 3000 (nodeJS)
| |
---|---|---|
Users | Root - root (Super user creds are unknown.Need to check in the image document)
Main user : ec2-user
| |
MongoDB | Version - MongoDB 3.2
MongoDB is running on port 27017
MongoDB can be connected via browser using url - http://a.b.c.d:27017/ (Currently port 27017 is blocked for any incoming call from external IP. Only app server running on localhost can access it)
MongoDB service starts automatically when instance is booted
MongoDB instance stores its data files in /var/lib/mongo and its log files in /var/log/mongodb by default.
Config file of mongoDB “mongod.config” lies on /etc.
All mongo executable in /usr/bin folder.
stop mongoDB service using command - “sudo service mongod stop”
start mongoDB service using command “sudo service mongod start”
| |
Conect to Mongo | Mongo port 27017 is blocked for all external access. Change /etc/mongod.conf bind_id and inboudn/outbound of aws console security group.
But one can connect to mongo shell after login to the ec2 instance.
Strange: localhost, a.b.c.d and ec2-.... public DNS does not work. Only thing that works is :
sudo mongo 127.0.0.1:27017/mydb -u my-admin -p admin-pwd
Incase of error 'BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly'
Run the command > export LC_ALL=C
| |
Node JS installation | version v6.0.0-pre
Installation directory : /home/ec2-user/node
NodeJS service does not start when instance is started. Need to work on that.
| |
Node JS Application server | Webserver location - /opt/myserver
NodeJS app server port : 3000
URL to connect the server: http://a.b.c.d:3000/
| |
Ec2 instance connection with putty (Windows)
|
| |
Ec2 instance connection ssh client ( Mac or Linux ) |
| |
Setup Git repo | Commands below :
|
No comments:
Post a Comment