754df54e5705563c4c225ffb7d047085524a5e6d
wiki/images/amazon/ApplicationLoadBalancer_1.png
| ... | ... | Binary files /dev/null and b/wiki/images/amazon/ApplicationLoadBalancer_1.png differ |
wiki/images/amazon/ApplicationLoadBalancer_2.png
| ... | ... | Binary files /dev/null and b/wiki/images/amazon/ApplicationLoadBalancer_2.png differ |
wiki/images/amazon/TargetGroup_1.png
| ... | ... | Binary files /dev/null and b/wiki/images/amazon/TargetGroup_1.png differ |
wiki/images/amazon/TargetGroup_2.png
| ... | ... | Binary files /dev/null and b/wiki/images/amazon/TargetGroup_2.png differ |
wiki/images/amazon/TargetGroup_3.png
| ... | ... | Binary files /dev/null and b/wiki/images/amazon/TargetGroup_3.png differ |
wiki/info/landscape/amazon-ec2.md
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | #### Starting an instance |
| 14 | 14 | |
| 15 | + |
|
| 15 | 16 | - Which instance type to choose: |
| 16 | 17 | - Archive: m2.2xlarge |
| 17 | 18 | - Live: c1.xlarge |
| ... | ... | @@ -82,6 +83,165 @@ EVENT_ID=<some-uuid-of-an-event-you-want-to-feature> |
| 82 | 83 | SERVER_STARTUP_NOTIFY=you@email.com |
| 83 | 84 | </pre> |
| 84 | 85 | |
| 86 | + |
|
| 87 | + |
|
| 88 | +#### Setting up a Multi Instance |
|
| 89 | +To set up a multi instance for a server with name "SSV", subdomain "ssv.sapsailing.com" and description "Schwartauer Segler-Verein, [www.ssv-net.de](http://www.ssv-net.de), Alexander Probst, [webmaster@alexprobst.de](mailto:webmaster@alexprobst.de)" perform the following steps: |
|
| 90 | + |
|
| 91 | + |
|
| 92 | + |
|
| 93 | +##### Instance configuration |
|
| 94 | + |
|
| 95 | +1. Connect to the EC2 instance where your multi instance should be deployed. For example: Connect to the instance "SL Multi-Instance Sailing Server" with dns name "ec2-34-250-136-229.eu-west-1.compute.amazonaws.com" in region Ireland via SSH. |
|
| 96 | + |
|
| 97 | + <pre> |
|
| 98 | + ssh -i .ssh/Administrator.pem root@ec2-34-250-136-229.eu-west-1.compute.amazonaws.com |
|
| 99 | + </pre> |
|
| 100 | + |
|
| 101 | +2. Navigate to the directory /home/sailing/servers. |
|
| 102 | + |
|
| 103 | + <pre> |
|
| 104 | + cd /home/sailing/servers |
|
| 105 | + </pre> |
|
| 106 | + |
|
| 107 | +3. Create a new directory with name "ssv". |
|
| 108 | + |
|
| 109 | + <pre> |
|
| 110 | + mkdir ssv |
|
| 111 | + </pre> |
|
| 112 | + |
|
| 113 | +4. Copy the file /home/sailing/code/java/target/refreshInstance.sh to your new directory. |
|
| 114 | + |
|
| 115 | + <pre> |
|
| 116 | + cp /home/sailing/code/java/target/refreshInstance.sh ssv |
|
| 117 | + </pre> |
|
| 118 | + |
|
| 119 | +5. Initialize a new environment variable "DEPLOY_TO" with the name of the directory. |
|
| 120 | + |
|
| 121 | + <pre> |
|
| 122 | + export DEPLOY_TO=ssv |
|
| 123 | + </pre> |
|
| 124 | + |
|
| 125 | +6. Execute the refreshInstance.sh script with your desired release build version from releases.sapsailing.com. |
|
| 126 | + |
|
| 127 | + <pre> |
|
| 128 | + ./refreshInstance.sh install-release build-201712270844 |
|
| 129 | + </pre> |
|
| 130 | + |
|
| 131 | +7. Once the script finished, uncomment the following lines in your env.sh file. |
|
| 132 | + |
|
| 133 | + <pre> |
|
| 134 | + # Uncomment for use with SAP JVM only: |
|
| 135 | + |
|
| 136 | + ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS-XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf" |
|
| 137 | + </pre> |
|
| 138 | + |
|
| 139 | + Afterwards comment out the line where it says "JAVA_HOME=/opt/jdk1.8.0_20" |
|
| 140 | + |
|
| 141 | + <pre> |
|
| 142 | + # JAVA_HOME=/opt/jdk1.8.0_20 |
|
| 143 | + </pre> |
|
| 144 | + |
|
| 145 | +8. Find the next unused ports for the variables SERVER_PORT, TELNET_PORT and EXPEDITION_PORT. You can do this by extracting all existing variable assignments from all env.sh files within the /home/sailing/servers directory. |
|
| 146 | + |
|
| 147 | + <pre> |
|
| 148 | + grep -Roh --include=env.sh "SERVER_PORT=.*" /home/sailing/servers | tr -d "SERVER_PORT=" | sort | uniq |
|
| 149 | + </pre> |
|
| 150 | + |
|
| 151 | + Do this for TELNET_PORT and EXPEDITION_PORT likewise. |
|
| 152 | + |
|
| 153 | + If this is the first multi instance on the server, use the values SERVER_PORT=8888, TELNET_PORT=14900, EXPEDITION_PORT=2000. |
|
| 154 | + |
|
| 155 | +9. Append the following variable assignments to your env.sh file. |
|
| 156 | + <pre> |
|
| 157 | + SERVER_NAME=SSV |
|
| 158 | + TELNET_PORT=14900 |
|
| 159 | + SERVER_PORT=8888 |
|
| 160 | + MONGODB_NAME=SSV |
|
| 161 | + EXPEDITION_PORT=2000 |
|
| 162 | + MONGODB_HOST=dbserver.internal.sapsailing.com |
|
| 163 | + MONGODB_PORT=10202 |
|
| 164 | + DEPLOY_TO=ssv |
|
| 165 | + </pre> |
|
| 166 | + |
|
| 167 | +10. Append the following description to the /home/sailing/servers/README file. |
|
| 168 | + |
|
| 169 | + <pre> |
|
| 170 | + # ssv (Schwartauer Segler-Verein, www.ssv-net.de, Alexander Probst, webmaster@alexprobst.de) |
|
| 171 | + SERVER_NAME=SSV |
|
| 172 | + TELNET_PORT=14900 |
|
| 173 | + SERVER_PORT=8888 |
|
| 174 | + MONGODB_NAME=SSV |
|
| 175 | + EXPEDITION_PORT=2000 |
|
| 176 | + </pre> |
|
| 177 | + |
|
| 178 | +11. Start the multi instance. |
|
| 179 | + <pre> |
|
| 180 | + cd /home/sailing/servers/ssv |
|
| 181 | + ./start |
|
| 182 | + </pre> |
|
| 183 | + |
|
| 184 | +12. Change the admin password now and create a new user with admin role. |
|
| 185 | + |
|
| 186 | +13. Your multi instance is now configured and started. It can be reached over ec2-34-250-136-229.eu-west-1.compute.amazonaws.com:8888. |
|
| 187 | + |
|
| 188 | + |
|
| 189 | + |
|
| 190 | + |
|
| 191 | +##### Reachability |
|
| 192 | + |
|
| 193 | +To reach your multi instance via "ssv.sapsailing.com", perform the following steps within the AWS Web Console inside region Ireland. |
|
| 194 | + |
|
| 195 | +1. Create a new target group with the following details. |
|
| 196 | + |
|
| 197 | + <img src="/wiki/images/amazon/TargetGroup_1.png"/> |
|
| 198 | + <img src="/wiki/images/amazon/TargetGroup_2.png"/> |
|
| 199 | + |
|
| 200 | + Notice the overwritten health check port that is now pointing directly to the instance. |
|
| 201 | + |
|
| 202 | +2. Add the "SL Multi-Instance Sailing Server" instance to the target group. |
|
| 203 | + |
|
| 204 | + <img src="/wiki/images/amazon/TargetGroup_3.png"/> |
|
| 205 | + |
|
| 206 | +3. Create a rule within the application load balancer that is forwarding ssv.sapsailing.com to your created target group. Choose "Load Balancers" from the sidebar an select the load balancer with the name "Sailing-eu-west-1". Click on the tab "Listeners" and then on "View/edit rules" inside the row of the HTTPS Listener. |
|
| 207 | + |
|
| 208 | + <img src="/wiki/images/amazon/ApplicationLoadBalancer_1.png"/> |
|
| 209 | + |
|
| 210 | + Click on the plus sign and insert the new rule at the very top. Enter "ssv.sapsailing.com" into the host-header field and select the target group "S-shared-ssv" under "forward". Then click on "Save". |
|
| 211 | + |
|
| 212 | + <img src="/wiki/images/amazon/ApplicationLoadBalancer_2.png"/> |
|
| 213 | + |
|
| 214 | + Your application load balancer is now configured to redirect all requests with host-header "ssv.sapsailing.com" to the target group "S-shared-ssv". That means all requests will now be routed to the "SL Multi-Instance Sailing Server" instance inside this target group using HTTPS and port 443 as specified in the configuration of the target group. To establish a connection on port 8888, where our multi instance is listening, we have to modify the apache configuration on the "SL Multi-Instance Sailing Server" instance. |
|
| 215 | + |
|
| 216 | +4. Connect to the "SL Multi-Instance Sailing Server" instance via SSH. Navigate to the directory /etc/httpd/conf.d. Open up the file "001-events.conf" and append the following line. |
|
| 217 | + |
|
| 218 | + <pre> |
|
| 219 | + Use Plain-SSL ssv.sapsailing.com 127.0.0.1 8888 |
|
| 220 | + </pre> |
|
| 221 | + |
|
| 222 | +5. Save the file and run a configuration file syntax check. |
|
| 223 | + |
|
| 224 | + <pre> |
|
| 225 | + apachectl configtest |
|
| 226 | + </pre> |
|
| 227 | + |
|
| 228 | + If it reports "Syntax OK", continue with reloading the httpd configuration. |
|
| 229 | + |
|
| 230 | +6. Reload the httpd configuration. |
|
| 231 | + |
|
| 232 | + <pre> |
|
| 233 | + /etc/init.d/httpd reload |
|
| 234 | + </pre> |
|
| 235 | + |
|
| 236 | + |
|
| 237 | +You should now be able to reach your multi instance with the dns name "ssv.sapsailing.com". |
|
| 238 | + |
|
| 239 | + |
|
| 240 | + |
|
| 241 | +#### Setting up a Dedicated Instance |
|
| 242 | +[...] |
|
| 243 | + |
|
| 244 | + |
|
| 85 | 245 | ## Costs per month |
| 86 | 246 | |
| 87 | 247 | To give you a feeling about the costs you can refer to the following table. To get all details go to http://www.awsnow.info/ |
| ... | ... | @@ -457,5 +617,6 @@ Should you want to compare servers of which you know they have different sets of |
| 457 | 617 | <tr><td>Security Group</td><td>Firewall configuration that can be associated to an instance. There is no need of configuring iptables or such. One can associate many instances the the same Security Group.</td></tr> |
| 458 | 618 | <tr><td>Elastic Load Balancer (ELB)</td><td>Service that makes it possible to balance over services running on different instances.</td></tr> |
| 459 | 619 | <tr><td>Network Interfaces</td><td>Virtual network interfaces that are mapped to physical network interfaces on instances. </td></tr> |
| 460 | -<tr><td>Placement Groups</td><td>Enables applications to get the full-bisection bandwidth and low-latency network performance required for tightly coupled, node-to-node communication. Placement Groups can only contain HVM instance and have other limitations described here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html</td></tr> |
|
| 620 | + |
|
| 621 | +<tr><td>Multi instance</td><td>App instance that runs along with other app instances on the same EC2 instance</td></tr><tr><td>Placement Groups</td><td>Enables applications to get the full-bisection bandwidth and low-latency network performance required for tightly coupled, node-to-node communication. Placement Groups can only contain HVM instance and have other limitations described here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html</td></tr> |
|
| 461 | 622 | </table> |
| ... | ... | \ No newline at end of file |