Skip to content

Google Cloud Info

Rahul Khanna edited this page Oct 2, 2016 · 4 revisions

We have two servers, back-end and front-end

 Our back-end server contains the mongo instance  
 Our front-end server contains the node infra  


 The Back-end server's public ip is 104.196.189.229, and the mongod service usually  
 is listening on port 80  


 The Front-end server's public ip is 104.196.190.104, and node is usually listening  
 on port 8080  

 Our two serves can talk internally, so on the VM instances page you can connect  
 from one to another using the internal ip addresses  

To be able to ssh into a server follow these instructions

 1. cd  
 2. cd .ssh  
 3. ssh-keygen -t rsa -f googleCloudKey -C dev  
    a) set up a passcode please  
 4. chmod 400 google*  
 5. cat googleCloudKey.pub  
 6. Copy whats outputted and paste it here:  
    a) Open up Google Cloud Platform  
    b) Go to Compute Engine  
    c) Metadata  
    d) hit edit and paste  
 7. now run your regular ssh command like so: ssh -i ~/.ssh/googleCloudKey dev@serverIP  
    a) ensure that the instance is up on running, you check this on the cloud console


 The dev user is for testing purposes you so can push code to it whenever  

 Later on we will create a prod user for production purposes  

 If you are successful you should see a file called hiJack in the home directory  

Mongo In The Cloud

 To start up the mongo instance, on the back-end server, on port 80, run ./startMongo.sh  

 To kill all mongo instances run ./killMongo.sh  

 To access the mongo console run mongo --port 80  
Clone this wiki locally