e6ede6a282dd1d444f1194c42deb4e3c40e1d3a3
wiki/amazon-ec2-create-new-app-instance.md
| ... | ... | @@ -3,22 +3,18 @@ |
| 3 | 3 | The following screenshots will help you creating a new Amazon application instance. An application instance is the container for exactly one Java application server. Each instance is configured using so called "user data". This configuration will then be read by the java server. |
| 4 | 4 | |
| 5 | 5 | ## AMI Selection |
| 6 | -In the "Classic Wizard" select "My AMIs" |
|
| 6 | +In the "Classic Wizard" select "My AMIs" and then select "Sailing Analytics Java Server" |
|
| 7 | 7 | |
| 8 | 8 | <img src="/wiki/images/amazon/StartInstance1.JPG" width="70%" height="70%"/> |
| 9 | 9 | |
| 10 | -Make sure to select the AMI with the name "App" |
|
| 10 | +Then select an instance type that matches what you want - be aware of the fact that t1.micro is not suitable for build process. |
|
| 11 | 11 | |
| 12 | 12 | <img src="/wiki/images/amazon/StartInstance2.JPG" width="70%" height="70%"/> |
| 13 | 13 | |
| 14 | -Select a subnet that matches the one of the database server |
|
| 14 | +Select a subnet that matches the one of the database server (in most cases this will be eu-west-1c). Leave other options untouched but scroll down to get to the "Advanced Options". There fill the user data field. |
|
| 15 | 15 | |
| 16 | 16 | <img src="/wiki/images/amazon/StartInstance3.JPG" width="70%" height="70%"/> |
| 17 | 17 | |
| 18 | -Select the correct instance type. Micro also works if you don't want to put that much load on your server. |
|
| 19 | - |
|
| 20 | -<img src="/wiki/images/amazon/StartInstance4.JPG" width="70%" height="70%"/> |
|
| 21 | - |
|
| 22 | 18 | Leave Kernel and RAM disk to Default. Then put the configuration for this server into the text area labeled "User Data". This configuration should at least contain `MONGODB_*` and `REPLICATION_*` parameters. Here one example: |
| 23 | 19 | |
| 24 | 20 | <pre> |
| ... | ... | @@ -43,34 +39,20 @@ REPLICATE_MASTER_QUEUE_PORT= |
| 43 | 39 | SERVER_STARTUP_NOTIFY= |
| 44 | 40 | </pre> |
| 45 | 41 | |
| 46 | -It does not really matter which SERVER_PORT you use because there is only one app per instance. But this makes it easier to configure instances for Apache, a Load Balancer or other uses. If you want to create a cluster that is self-replicating and has a load balancer in front of it then make sure that all your instances are running on the same port. |
|
| 42 | +It does not really matter which SERVER_PORT you use because there is only one app per instance. But this makes it easier to configure instances for Apache, a Load Balancer or other uses. If you want to create a cluster that is self-replicating and has a load balancer in front of it then make sure that all your instances are running on the same port! |
|
| 43 | + |
|
| 44 | +Provide your instance with an useful name. |
|
| 47 | 45 | |
| 48 | 46 | <img src="/wiki/images/amazon/StartInstance5.JPG" width="70%" height="70%"/> |
| 49 | 47 | |
| 50 | -Use a new interface for your Network. Do not change any other field. |
|
| 48 | +Make absolutely sure to select the right Security Group. If you do not select the group "Sailing Analytics App" your server won't be able to access any database. |
|
| 51 | 49 | |
| 52 | 50 | <img src="/wiki/images/amazon/StartInstance6.JPG" width="70%" height="70%"/> |
| 53 | 51 | |
| 54 | -Now make sure to click on the "Edit" button |
|
| 52 | +Configure the key. Make sure to always use the "Administrator" key. |
|
| 55 | 53 | |
| 56 | 54 | <img src="/wiki/images/amazon/StartInstance7.JPG" width="70%" height="70%"/> |
| 57 | 55 | |
| 58 | -In order to select "Delete on Termination" for your root volume |
|
| 59 | - |
|
| 60 | -<img src="/wiki/images/amazon/StartInstance8.JPG" width="70%" height="70%"/> |
|
| 61 | - |
|
| 62 | -Then give your instance a meaningful name by inserting a value for the tag "Name" |
|
| 63 | - |
|
| 64 | -<img src="/wiki/images/amazon/StartInstance9.JPG" width="70%" height="70%"/> |
|
| 65 | - |
|
| 66 | -Use the existing "Administrator" Key. Do NOT generate your own key - this won't work. In order to access instances you should've got two private keys. If not then contact one of the administrators. |
|
| 67 | - |
|
| 68 | -<img src="/wiki/images/amazon/StartInstance10.JPG" width="70%" height="70%"/> |
|
| 69 | - |
|
| 70 | -Then select the preconfigured security group "Sailing Analytics App". Do NOT select anything other than that or create your own. |
|
| 71 | - |
|
| 72 | -<img src="/wiki/images/amazon/StartInstance11.JPG" width="70%" height="70%"/> |
|
| 73 | - |
|
| 74 | 56 | Your instance is now launching. You can create alarms if you want to monitor the state of the application. Be aware that monitoring is costy. |
| 75 | 57 | |
| 76 | 58 | <img src="/wiki/images/amazon/StartInstance12.JPG" width="70%" height="70%"/> |