wiki/info/landscape/archive-server-upgrade.md
... ...
@@ -119,7 +119,7 @@ Following the mandatory automated content comparison you should do a few spot ch
119 119
120 120
### Switching in Reverse Proxy
121 121
122
-Once you are content with the quality of the new archive server candidate's contents it's time to switch. Technically, switching archive servers is done by adjusting the corresponding configuration in the central Apache reverse proxy server. You find this in ``root@sapsailing.com:/etc/httpd/conf.d/000-macros.conf`` at the top. There should be a couple of statements at the top:
122
+Once you are content with the quality of the new archive server candidate's contents it's time to switch. Technically, switching archive servers is done by adjusting the corresponding configuration in the central Apache reverse proxy server. You find this in ``root@sapsailing.com:/etc/httpd/conf.d/000-macros.conf`` at the top. In the past we changed the macro directly and didn't have a failover setup to easily switch:
123 123
124 124
```
125 125
Define ARCHIVE_IP xxx.xx.xx.xxx
... ...
@@ -129,23 +129,23 @@ Define ARCHIVE_FAILOVER_IP xxx.xx.xx.xxx
129 129
Use Rewrite ${ARCHIVE_IP} 8888
130 130
</Macro>
131 131
```
132
-In the past we changed this directly within the ArchiveRewrite macro, but this was slow if we needed to switchover. As an improvement, which happened to also be neater, we added variables -- defined at the top -- including a variable for an up-and-running failover. In the case of an outage, we could comment the current archive and rename the failover (and then reload). This way we could also switch back if the primary returns to healthy. However, we have worked on an automation script, which now changes the PRODUCTION value to point to the variables ARCHIVE_IP or ARCHIVE_FAILOVER_IP. Upon switching, it calls notify-operators which can be found in /usr/local/bin as a symbollic link pointing to configuration/on-site-scripts/paris2024/notify-operators.
132
+
133
+This was slow if we needed to switchover. As an improvement, which happened to also be neater, we added variables -- defined at the top -- including a variable for an up-and-running failover. In the case of an outage, we could comment the current archive and rename the failover (and then reload). This way we could also switch back if the primary returns to healthy. However, we have worked on an automation script, which now changes the PRODUCTION_ARCHIVE value (see below) to point to the variables ARCHIVE_IP or ARCHIVE_FAILOVER_IP. Upon switching, it calls notify-operators, which can be found in /usr/local/bin: it's a symbollic link pointing to configuration/on-site-scripts/paris2024/notify-operators. The current macros file is as follows:
133 134
```
134 135
Define ARCHIVE_IP xxx.xx.xx.xxx
135 136
Define ARCHIVE_FAILOVER_IP xxx.xx.xx.xxx
136
-Define PRODUCTION ${ARCHIVE_IP}
137
+Define PRODUCTION_ARCHIVE ${ARCHIVE_IP}
137 138
138 139
<Macro ArchiveRewrite>
139
- Use Rewrite ${PRODUCTION} 8888
140
+ Use Rewrite ${PRODUCTION_ARCHIVE} 8888
140 141
</Macro>
141 142
```
142
-The script can be found in the git at **switchoverArchive.sh**. This script has 1 parameter which is the path to the macros file, containing the above macros (currently in /etc/httpd/conf.d/000-macros.conf). Run ```crontab -e``` to edit the cronjobs and add
143
+When a new failover is setup, its IP must replace the ARCHIVE_FAILOVER_IP (a manual operation).
144
+The update script can be found in the git at **switchoverArchive.sh**. This script has 1 parameter which is the path to the macros file, which contains the above macros (currently in /etc/httpd/conf.d/000-macros.conf). Run ```crontab -e``` to edit the cronjobs and add
143 145
```
144
-* * * * * switchoverArchive "/etc/httpd/conf.d/000-macros.conf"
146
+* * * * * /home/wiki/gitwiki/configuration/switchoverArchive.sh "/etc/httpd/conf.d/000-macros.conf"
145 147
```
146
-Then exit the editor.
147
-To setup switchoverArchive as a command for easy usage run ``` ln -s /home/wiki/gitwiki/configuration/switchoverArchive.sh switchoverArchive```. This creates a symbolic link and makes the command accessible anywhere.
148
-
148
+Then save and exit the editor.
149 149
Check that the new archive service is now active, e.g., by looking at [sapsailing.com/gwt/status](https://sapsailing.com/gwt/status). It should reflect the new release in its ``release`` field.
150 150
151 151
## Tests