a111a5a0467b63b7eda0aad80f5c1c81ba16188b
wiki/amazon-ec2-create-new-app-instance.md
| ... | ... | @@ -1,3 +1,79 @@ |
| 1 | 1 | # Create a new Amazon app instance |
| 2 | 2 | |
| 3 | -<img src="/wiki/images/amazon/StartInstance1.JPG"/> |
|
| ... | ... | \ No newline at end of file |
| 0 | +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. |
|
| 1 | + |
|
| 2 | +## AMI Selection |
|
| 3 | +In the "Classic Wizard" select "My AMIs" |
|
| 4 | + |
|
| 5 | +<img src="/wiki/images/amazon/StartInstance1.JPG" width="70%" height="70%"/> |
|
| 6 | + |
|
| 7 | +Make sure to select the AMI with the name "App" |
|
| 8 | + |
|
| 9 | +<img src="/wiki/images/amazon/StartInstance2.JPG" width="70%" height="70%"/> |
|
| 10 | + |
|
| 11 | +Select a subnet that matches the one of the database server |
|
| 12 | + |
|
| 13 | +<img src="/wiki/images/amazon/StartInstance3.JPG" width="70%" height="70%"/> |
|
| 14 | + |
|
| 15 | +Select the correct instance type. Micro also works if you don't want to put that much load on your server. |
|
| 16 | + |
|
| 17 | +<img src="/wiki/images/amazon/StartInstance4.JPG" width="70%" height="70%"/> |
|
| 18 | + |
|
| 19 | +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: |
|
| 20 | + |
|
| 21 | +<pre> |
|
| 22 | +SERVER_NAME=LIVE1 |
|
| 23 | +MEMORY=1024m |
|
| 24 | +REPLICATION_HOST=172.31.25.253 |
|
| 25 | +REPLICATION_CHANNEL=sapsailinganalytics-live |
|
| 26 | +TELNET_PORT=14888 |
|
| 27 | +SERVER_PORT=8888 |
|
| 28 | +MONGODB_HOST=172.31.25.253 |
|
| 29 | +MONGODB_PORT=10202 |
|
| 30 | +EXPEDITION_PORT=2010 |
|
| 31 | +REPLICATE_ON_START=False |
|
| 32 | +REPLICATE_MASTER_SERVLET_HOST= |
|
| 33 | +REPLICATE_MASTER_SERVLET_PORT= |
|
| 34 | +REPLICATE_MASTER_QUEUE_HOST= |
|
| 35 | +REPLICATE_MASTER_QUEUE_PORT= |
|
| 36 | +</pre> |
|
| 37 | + |
|
| 38 | +It does not really matter which SERVER_PORTS 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. |
|
| 39 | + |
|
| 40 | +<img src="/wiki/images/amazon/StartInstance5.JPG" width="70%" height="70%"/> |
|
| 41 | + |
|
| 42 | +Use a new interface for your Network. Do not change any other field. |
|
| 43 | + |
|
| 44 | +<img src="/wiki/images/amazon/StartInstance6.JPG" width="70%" height="70%"/> |
|
| 45 | + |
|
| 46 | +Now make sure to click on the "Edit" button |
|
| 47 | + |
|
| 48 | +<img src="/wiki/images/amazon/StartInstance7.JPG" width="70%" height="70%"/> |
|
| 49 | + |
|
| 50 | +In order to select "Delete on Termination" for your root volume |
|
| 51 | + |
|
| 52 | +<img src="/wiki/images/amazon/StartInstance8.JPG" width="70%" height="70%"/> |
|
| 53 | + |
|
| 54 | +Then give your instance a meaningful name by inserting a value for the tag "Name" |
|
| 55 | + |
|
| 56 | +<img src="/wiki/images/amazon/StartInstance9.JPG" width="70%" height="70%"/> |
|
| 57 | + |
|
| 58 | +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. |
|
| 59 | + |
|
| 60 | +<img src="/wiki/images/amazon/StartInstance10.JPG" width="70%" height="70%"/> |
|
| 61 | + |
|
| 62 | +Then select the preconfigured security group "Sailing Analytics App". Do NOT select anything other than that or create your own. |
|
| 63 | + |
|
| 64 | +<img src="/wiki/images/amazon/StartInstance11.JPG" width="70%" height="70%"/> |
|
| 65 | + |
|
| 66 | +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. |
|
| 67 | + |
|
| 68 | +<img src="/wiki/images/amazon/StartInstance12.JPG" width="70%" height="70%"/> |
|
| 69 | + |
|
| 70 | +Your application is now ready. Check that everything is green. |
|
| 71 | + |
|
| 72 | +<img src="/wiki/images/amazon/StartInstance13.JPG" width="70%" height="70%"/> |
|
| 73 | + |
|
| 74 | +You can access the application server by using the DNS and the port you've configured. |
|
| 75 | + |
|
| 76 | +<img src="/wiki/images/amazon/StartInstance14.JPG" width="70%" height="70%"/> |
|
| ... | ... | \ No newline at end of file |