6661f2d1a825d1178054891136783238177d21b1
wiki/amazon-ec2.md
| ... | ... | @@ -287,12 +287,13 @@ Follow these steps to upgrade the AMI: |
| 287 | 287 | * Log in as user `root` |
| 288 | 288 | * Run `yum update` to update the operating system |
| 289 | 289 | * Remove any obsolete logs from `/home/sailing/servers/server/logs` |
| 290 | -* 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> |
|
| 290 | +* 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> |
|
| 291 | 291 | su - sailing |
| 292 | 292 | cd code |
| 293 | 293 | mvn clean |
| 294 | 294 | git fetch |
| 295 | 295 | git merge origin/master</pre> |
| 296 | +* 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. |
|
| 296 | 297 | * 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 |
| 297 | 298 | * Update any keys in `/root/.ssh/authorized_keys` and `/home/sailing/.ssh/authorized_keys` |
| 298 | 299 | * 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. |