3caba14b0ec7c7b26db1c601057b664b5d437ac1
configuration/imageupgrade_functions.sh
| ... | ... | @@ -70,7 +70,8 @@ clean_servers_dir() { |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | update_root_crontab() { |
| 73 | - # The following assumes that /root/crontab is a symbolic link to /home/sailing/code/configuration/crontab |
|
| 73 | + # The following assumes that /root/crontab is a symbolic link to /home/sailing/code/configuration/crontabs/<the crontab appropriate |
|
| 74 | + # to the environment> |
|
| 74 | 75 | # which has previously been updated by a git pull: |
| 75 | 76 | cd /root |
| 76 | 77 | crontab crontab |
wiki/info/landscape/creating-ec2-image-for-webserver-from-scratch.md
| ... | ... | @@ -123,13 +123,13 @@ lrwxrwxrwx 1 root root 75 Oct 20 09:00 notify-operators -> /home/wiki/git |
| 123 | 123 | lrwxrwxrwx 1 root root 78 Feb 8 2021 update_authorized_keys_for_landscape_managers -> /home/wiki/gitwiki/configuration/update_authorized_keys_for_landscape_managers |
| 124 | 124 | lrwxrwxrwx 1 root root 89 Feb 8 2021 update_authorized_keys_for_landscape_managers_if_changed -> /home/wiki/gitwiki/configuration/update_authorized_keys_for_landscape_managers_if_changed |
| 125 | 125 | ``` |
| 126 | -* set up ``crontab`` for ``root`` user (remove the symbolic link to ``/home/sailing/code/configuration/crontab`` if that had been created earlier). Note that ``configuration/crontabs`` contains a selection of crontab files for different use cases, including the ``crontab-reverse-proxy`` and ``crontab-wiki`` (see below). |
|
| 126 | +* set up ``crontab`` for ``root`` user (remove the symbolic link to ``/home/sailing/code/configuration/crontab`` if that had been created earlier). Note that ``configuration/crontabs`` contains a selection of crontab files for different use cases, including the ``crontab-reverse-proxy-instance``, which should be pointed to by a symbolic link in /root. |
|
| 127 | 127 | ``` |
| 128 | 128 | 0 10 1 * * export PATH=/bin:/usr/bin:/usr/local/bin; mail-events-on-my >/dev/null 2>/dev/null |
| 129 | 129 | * * * * * export PATH=/bin:/usr/bin:/usr/local/bin; sleep $(( $RANDOM * 60 / 32768 )); update_authorized_keys_for_landscape_managers_if_changed $( cat /root/ssh-key-reader.token ) https://security-service.sapsailing.com /root 2>&1 >>/var/log/sailing.err |
| 130 | 130 | 0 7 2 * * export PATH=/bin:/usr/bin:/usr/local/bin; docker exec -it registry-registry-1 registry garbage-collect /etc/docker/registry/config.yml |
| 131 | 131 | ``` |
| 132 | -* set up crontab for user `wiki` as `*/10 * * * * /home/wiki/syncgit` and make sure the script is in place |
|
| 132 | +* set up crontab for user `wiki` as a symbolic link to /configuration/crontabs/crontab-wiki-user. |
|
| 133 | 133 | * ensure that ``/var/log/old/cache/docker`` makes it across from any previous installation to the new one; it contains the docker registry contents. See in particular ``/var/log/old/cache/docker/registry/docker/registry/v2/repositories``. |
| 134 | 134 | * [install docker registry](https://wiki.sapsailing.com/wiki/info/landscape/docker-registry) so that the following containers are up and running: |
| 135 | 135 | ``` |
| ... | ... | @@ -192,7 +192,7 @@ write and quit, to install the cronjob. |
| 192 | 192 | |
| 193 | 193 | If you want to quickly run this script, consider installing it in /usr/local/bin, via `ln -s TARGET_PATH LINK_NAME`. |
| 194 | 194 | |
| 195 | -## Basic setup for reverse proxy instance |
|
| 195 | +## Basic setup for disposable reverse proxy instance |
|
| 196 | 196 | |
| 197 | 197 | From a fresh amazon linux 2023 instance (HVM) install perl, httpd, mod_proxy_html, tmux, nfs-utils, git, whois and jq. Then type `amazon-linux-extras install epel`, which adds the epel repo so you can then run install apachetop. |
| 198 | 198 | Then you need to remove the automatic ec2 code which disabled root access; reconfigure the sshd_config; setup the keys update script; and initialise the crontab. Store a bearer token in the home dir. |
| ... | ... | @@ -211,7 +211,7 @@ Postmail is useful. The script for this procedure is in configuration and is tit |
| 211 | 211 | |
| 212 | 212 | Setup the logrotate target. |
| 213 | 213 | |
| 214 | -Setup the fstab (not automated). |
|
| 215 | 214 | Update amazon cli (because pricing list requires it) |
| 216 | 215 | |
| 217 | 216 | |
| 217 | + |