Admin/cronjob/README
author wenzelm
Wed, 14 Sep 2022 17:35:38 +0200
changeset 76153 bf9f2f4069b9
parent 73534 e7fb17bca374
child 79537 9c2adb18fb36
permissions -rw-r--r--
obsolete;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
67766
603334230303 consolidated main cronjob server on virtual machine together with build_log database;
wenzelm
parents: 67748
diff changeset
     1
Administrative Isabelle cronjob
603334230303 consolidated main cronjob server on virtual machine together with build_log database;
wenzelm
parents: 67748
diff changeset
     2
===============================
603334230303 consolidated main cronjob server on virtual machine together with build_log database;
wenzelm
parents: 67748
diff changeset
     3
603334230303 consolidated main cronjob server on virtual machine together with build_log database;
wenzelm
parents: 67748
diff changeset
     4
- main server: virtual machine with cronjob and build_log database
72394
9302fd538ae4 updated user + host;
wenzelm
parents: 68996
diff changeset
     5
- backup file-system (for cumulative log files): i21isatest@lxbroy10:cronjob
9302fd538ae4 updated user + host;
wenzelm
parents: 68996
diff changeset
     6
- backup identify job: i21isatest@lxcisa0
64148
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
     7
66995
9cb263dbb2f7 plain identify job for Isabelle + AFP, independent of any Isabelle technology;
wenzelm
parents: 64148
diff changeset
     8
- jobs: manual installation on target directory:
9cb263dbb2f7 plain identify job for Isabelle + AFP, independent of any Isabelle technology;
wenzelm
parents: 64148
diff changeset
     9
    cp "$ISABELLE_HOME/Admin/cronjob/self_update "$HOME/cronjob/self_update"
9cb263dbb2f7 plain identify job for Isabelle + AFP, independent of any Isabelle technology;
wenzelm
parents: 64148
diff changeset
    10
    cp "$ISABELLE_HOME/Admin/cronjob/plain_identify "$HOME/cronjob/plain_identify"
9cb263dbb2f7 plain identify job for Isabelle + AFP, independent of any Isabelle technology;
wenzelm
parents: 64148
diff changeset
    11
64148
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    12
- crontab: manual update on target machine
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    13
    crontab -l
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    14
    crontab -e
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    15
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    16
- $HOME/cronjob/run/ -- run-time state
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    17
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents:
diff changeset
    18
- $HOME/cronjob/log/ -- cumulative log area
67748
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    19
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    20
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    21
Build Log Database Server
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    22
=========================
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    23
73534
e7fb17bca374 discontinue old Ubuntu 18.04 LTS, e.g. it cannot build documentation "prog-prove";
wenzelm
parents: 72394
diff changeset
    24
- Ubuntu 20.04 LTS Linux Server standard installation
67748
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    25
  https://help.ubuntu.com/lts/serverguide
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    26
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    27
- apt install unattended-upgrades
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    28
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    29
- special user account:
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    30
  useradd -m -s /bin/bash isatest
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    31
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    32
- PostgreSQL:
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    33
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    34
  $ apt install postgresql
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    35
  $ apt install postgresql-client
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    36
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    37
  $ sudo -u postgres psql template1
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    38
  ALTER USER postgres with encrypted password '***';
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    39
68996
5f333f88d2c1 updated to Ubuntu 18.04;
wenzelm
parents: 67766
diff changeset
    40
  $ edit /etc/postgresql/10/main/pg_hba.conf
67748
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    41
  local all postgres md5
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    42
  local all all md5
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    43
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    44
  $ systemctl restart postgresql.service
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    45
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    46
  $ createuser -U postgres --interactive isatest
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    47
  ALTER USER isatest with encrypted password '***';
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    48
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    49
  $ createdb -E UTF8 -T template0 --locale=en_US.utf8 -U postgres -O isatest isatest
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    50
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    51
- Database backup or migration:
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    52
  https://www.postgresql.org/docs/9.5/static/backup-dump.html
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    53
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    54
     pg_dump -U postgres -Fc -v -d isatest > db.dump
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    55
  pg_restore -U postgres -Fc -v -d isatest < db.dump