wiki/amazon-ec2.md
... ...
@@ -332,15 +332,18 @@ Follow these steps to upgrade the AMI:
332 332
* Log in as user `root`
333 333
* Run `yum update` to update the operating system
334 334
* Remove any obsolete logs from `/home/sailing/servers/server/logs`
335
-* Update the git contents (essential for up-to-date versions of `/etc/init.d/sailing` which links to the git, and the `refreshInstance.sh` script used during automatic instance launch), and clean any build artifacts by doing <pre>
336
- su - sailing
337
- cd code
338
- mvn clean
339
- git fetch
340
- git merge origin/master</pre>
335
+* Update the git contents (essential for up-to-date versions of `/etc/init.d/sailing` which links to the git, and the `refreshInstance.sh` script used during automatic instance launch), and clean any build artifacts by doing
336
+```
337
+ > su - sailing
338
+ > cd code
339
+ > mvn clean
340
+ > git fetch
341
+ > git merge origin/master
342
+```
341 343
* Then, still as user `sailing`, edit `~sailing/servers/server/env.sh` and remove everything after the line `# **** Overwritten environment variables ****` as this will then be the place where any downloaded environment and the EC2 user data variables will be appended later during automatic installation upon reboot.
342 344
* Check the sizes of the mounted partitions by doing `df; swapon -s`. These will come in handy after creating the new AMI in order to tag the new volume snapshots accordingly
343 345
* Update any keys in `/root/.ssh/authorized_keys` and `/home/sailing/.ssh/authorized_keys`
346
+* Remove created http rewrite entries in `/etc/httpd/conf.d/001-events.conf`
344 347
* In the EC2 administration console go to the "Instances" tab, select your running instance and from the "Actions" drop-down select "Create Image". Give the image the name "SAP Sailing Analytics App x.y" where "x.y" is the updated version number of the image. Just make sure it's greater than the previous one. If you feel like it, you may provide a short description telling the most important features of the image.
345 348
* Once the image creation has completed, go to the Snapshots list in the "Elastic Block Store" category and name the new snapshots appropriately. Now the information about the device sizes obtained earlier from the `df` and `swapon` commands will help you to identify which snapshot is which. Usually, the three snapshots would be something like AMI Analytics Home x.y, AMI Analytics System x.y and AMI Analytics Swap x.y with "x.y" being the version number matching that of your image.
346 349
* Now you can remove any earlier Sailing Server AMI version and the corresponding snapshots.