From 381b96a81221f3da0d798f99bd83d722b007b220 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 30 Mar 2023 16:24:24 +0200 Subject: [PATCH 1/5] removed obsolete yarn cron docu --- deployment/bare_metal/setup.md | 36 ---------------------------------- 1 file changed, 36 deletions(-) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index 627aa4a2d..b1204b1b3 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -196,42 +196,6 @@ Use it as pattern to do all steps manually in your terminal shell. Follow the commands in `./install.sh` as installation pattern. -## Define Cronjob To Compensate Yarn Output In `/tmp` - -`yarn` creates output in `/tmp` directory, which must be deleted regularly and will be done per Cron-Job. - -### On `stage1` - -An hourly job is necessary on `stage1` by setting the following job in the `crontab` for the `gradido` user. - -Run: - -```bash -crontab -e -``` - -This opens the crontab in edit-mode and insert the following entry: - -```bash -0 * * * * find /tmp -name "yarn--*" -cmin +60 -exec rm -r {} \; > /dev/null -``` - -### On `stage2` - -A daily job is necessary on `stage2` by setting the following job in the `crontab` for the `gradido` user. - -Run: - -```bash -crontab -e -``` - -This opens the `crontab` in edit-mode and insert the following entry: - -```bash -0 4 * * * find /tmp -name "yarn--*" -ctime +1 -exec rm -r {} \; > /dev/null -``` - ## Define Cronjob To start backup script automatically At least at production stage we need a daily backup of our database. This can be done by adding a cronjob From 51900af67d26dbde0464877491d3017a12580f04 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 2 May 2023 11:39:37 +0200 Subject: [PATCH 2/5] updated docu based on new findings regarding yarn output to tmp folder --- deployment/bare_metal/setup.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index b1204b1b3..da3688eed 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -196,6 +196,27 @@ Use it as pattern to do all steps manually in your terminal shell. Follow the commands in `./install.sh` as installation pattern. +## Define Cronjob To Compensate Yarn Output In `/tmp` + +`yarn` creates output in `/tmp` directory. This output is generated whenever `yarn start` is called. THis is especially problematic on staging systems where instable versions are automatically deployed which can lead to a ever resatrting service, hence generating alot of yarn output. + +To solve this you can install the following hourly cron using `crontab` as `gradido` user.he `gradido` user. + +Run: + +```bash +crontab -e +``` + +This opens the crontab in edit-mode and insert the following entry: + +```bash +0 * * * * find /tmp -name "yarn--*" -exec rm -r {} \; > /dev/null + +``` + +For production systems this is not need by default since the yarn output is deleted when `start.sh` is executed. If the service runs stable and does not restart frequently the yarn output to the tmp folder scales with the amount of services running. + ## Define Cronjob To start backup script automatically At least at production stage we need a daily backup of our database. This can be done by adding a cronjob From 1241f00ede40de1949b6dc10fbe890ef88e57b55 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 3 May 2023 10:16:37 +0200 Subject: [PATCH 3/5] fixed typos --- deployment/bare_metal/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index da3688eed..325082e80 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -198,7 +198,7 @@ Follow the commands in `./install.sh` as installation pattern. ## Define Cronjob To Compensate Yarn Output In `/tmp` -`yarn` creates output in `/tmp` directory. This output is generated whenever `yarn start` is called. THis is especially problematic on staging systems where instable versions are automatically deployed which can lead to a ever resatrting service, hence generating alot of yarn output. +`yarn` creates output in `/tmp` directory. This output is generated whenever `yarn start` is called. This is especially problematic on staging systems where instable versions are automatically deployed which can lead to an ever restarting, hence generating a lot of yarn output. To solve this you can install the following hourly cron using `crontab` as `gradido` user.he `gradido` user. From 7cb11af5993febefeba7764c4eacdb0a24b94cf3 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 3 May 2023 10:17:25 +0200 Subject: [PATCH 4/5] fix typo --- deployment/bare_metal/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index 325082e80..881c79bec 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -200,7 +200,7 @@ Follow the commands in `./install.sh` as installation pattern. `yarn` creates output in `/tmp` directory. This output is generated whenever `yarn start` is called. This is especially problematic on staging systems where instable versions are automatically deployed which can lead to an ever restarting, hence generating a lot of yarn output. -To solve this you can install the following hourly cron using `crontab` as `gradido` user.he `gradido` user. +To solve this you can install the following hourly cron using `crontab` as `gradido` user. Run: From bf3cbfa87587d2946df1702cefce6ff585f3053c Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 3 May 2023 10:19:01 +0200 Subject: [PATCH 5/5] typo --- deployment/bare_metal/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index 881c79bec..9cbc4e2e3 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -215,7 +215,7 @@ This opens the crontab in edit-mode and insert the following entry: ``` -For production systems this is not need by default since the yarn output is deleted when `start.sh` is executed. If the service runs stable and does not restart frequently the yarn output to the tmp folder scales with the amount of services running. +For production systems this is not needed by default since the yarn output is deleted when `start.sh` is executed. If the service runs stable and does not restart frequently, the yarn output to the tmp folder scales with the amount of services running. ## Define Cronjob To start backup script automatically