Admin/cronjob/README
author wenzelm
Sat, 28 Nov 2020 16:25:29 +0100
changeset 72759 bd5ee3148132
parent 72394 9302fd538ae4
child 73534 e7fb17bca374
permissions -rw-r--r--
more antiquotations (reverting 4df341249348);
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
68996
5f333f88d2c1 updated to Ubuntu 18.04;
wenzelm
parents: 67766
diff changeset
    24
- Ubuntu 18.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
- SSH access for jsch (on each client):
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    33
  LOCALHOST$ ssh-keyscan -t rsa DBSERVER
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    34
  >> ~/.ssh/known_hosts
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    35
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    36
- PostgreSQL:
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    37
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    38
  $ apt install postgresql
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    39
  $ apt install postgresql-client
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    40
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    41
  $ sudo -u postgres psql template1
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    42
  ALTER USER postgres with encrypted password '***';
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    43
68996
5f333f88d2c1 updated to Ubuntu 18.04;
wenzelm
parents: 67766
diff changeset
    44
  $ edit /etc/postgresql/10/main/pg_hba.conf
67748
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    45
  local all postgres md5
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    46
  local all all md5
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    47
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    48
  $ systemctl restart postgresql.service
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    49
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    50
  $ createuser -U postgres --interactive isatest
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    51
  ALTER USER isatest with encrypted password '***';
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    52
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    53
  $ createdb -E UTF8 -T template0 --locale=en_US.utf8 -U postgres -O isatest isatest
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    54
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    55
- Database backup or migration:
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    56
  https://www.postgresql.org/docs/9.5/static/backup-dump.html
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    57
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    58
     pg_dump -U postgres -Fc -v -d isatest > db.dump
94a8fddc1e7c clarified README;
wenzelm
parents: 66995
diff changeset
    59
  pg_restore -U postgres -Fc -v -d isatest < db.dump