Amazon server steps

From Origami_Wiki
Revision as of 10:06, 22 June 2017 by imported>Kishor
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We have many amazon ec2 instances hosting various applications either in production or development stage.
This doc describes the purchase, creation and initial setup of such an instance.
NOTE: This doc doesn't contain internal setup of the server such as LAMP installation or application configurations.

1. Go to hostdime cPanel for origamitachnologies.com and create a new mail id. (to be used for creating amazon account)
2. Login to the webmail (roundcube) of this mail id and add a filter to forward all incoming mails to hosting@origamitechnologies.com
(So that we don't miss any updates from amazon regarding our new server)
3. Go to http://aws.amazon.com/
4. Register as a new user by following the onscreen setup wizard.
5. We need to add a credit card during this setup, then only you can start using amazon services.
6. Obtain the card details from Mr Anoop Francis and finish the registration.

Now we need to proceed to using amazon to create an ec2 instance.

Creating Ec2 instance and launching it :-


1. To configure an Ec2 instance go to ec2 dashboard and click on launch instance

2. Here you will see two radio buttons named classic wizard(selected default) and Quick launch wizard.

3. We need to create a customized instance as per our need so we will use classic wizard .

4. Next you need to click on continue button which opens up “Request Instance Wizard” window.

5. Select the appropriate combination of OS/Applications and click select , you will get an option to chose the instance type(small/medium etc) and geographical region(Us/asia/europe) where you would like your instance to run ..

6. Here you will see two radio buttons named classic wizard(selected default) and Quick launch wizard.

We need to create a customized instance as per our need so we will use classic wizard .

7. Next you need to click on continue button which opens up “Request Instance Wizard” window.

8. Select the appropriate combination of OS/Applications and click select , you will get an option to chose the instance type(small/medium etc) and geographical region(Us/asia/europe) where you would like your instance to run ..

You can leave it as it is and click on continue button this will ask you to provide a tag as a combination of Key/value pair that will help you manage your Ec2 instances like search , organize etc.

9. Provide a key and value as you wish and click continue button.

10. Click continue button that will opens up public/private key pair generation window.

11. It will ask you to enter name of your key pair file and click on click on “Create and download key pair" button .

12. Allow download and save of this key pair file , this is very important file that let you securely connect to your Ec2 instance once your launch is completed.

13. After you have done downloading and saving the file , click to continue button that will ask you to chose the security group under which you would like to run your instance .

14. This is final step here you can review the settings and other things with which your instance is going to be launched , to modify any settings you can click on back link at bottom left side and go back to previous steps .

15. Finally click the launch button and you are done with your Ec2 instance !

16. To connect to server from terminal,
Go to the folder where the key file is stored and enter
Eg: ssh -i "filename.pem" ec2-user@ec2-52-xx-xx-xx.us-west-2.compute.amazonaws.com

where filename.pem is the key file, ec2-user is the user and the rest is the hostname of the server(can be obtained from the ec2 section inside the corresponding aws account).

Add an elastic IP for the instance before configuring the application in the server, so that the IP will not change when the server is rebooted

   To associate an Elastic IP address with an instance using the console
   Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
   In the navigation pane, choose Elastic IPs.
   Select an Elastic IP address and choose Actions, Associate address.
   Select the instance from Instance and then choose Associate.
   
   (ref: https://www.youtube.com/watch?v=A3F2vIQYlu8)


More details: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html#create-a-key-pair