DevOps.md 2.13 KiB
Installation Wiki.js
- Follow the wiki.js instructions from https://docs.requarks.io/install/linux
- Currently, we run the wiki service in screen.
- Add 3000 port number in
config.yml
port: 3000 db: type: sqlite
- Add a port number of 3000 in the firewall
sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent sudo firewall-cmd --reload
- Run
node server
Backup
Daily Backups should be enabled, and the backup data are located in /local/wiki/backup
for Development
To develop REST API accessed to wiki.js, use the graphql playground.
Installation mmonit/monit for monitoring the server
-
Install monit(agent) and mmonit(web server) from https://mmonit.com/monit/ and https://mmonit.com/download/ respectively
-
Edit monit/conf/monitrc and copy ~/.monitrc to configure the communication with mmonit
## Check the apache server process
check process apache with pidfile /var/run/httpd/httpd.pid
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if totalmem > 200.0 MB for 5 cycles then alert
if children > 250 then alert
if disk read > 500 kb/s for 10 cycles then alert
if disk write > 500 kb/s for 10 cycles then alert
if 3 restarts within 5 cycles then unmonitor
group server
## Check the shiny server process
check process shiny with pidfile /var/run/shiny-server/shiny-server.pid
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if totalmem > 2000.0 MB for 5 cycles then alert
if children > 250 then alert
if disk read > 500 kb/s for 10 cycles then alert
if disk write > 500 kb/s for 10 cycles then alert
if 3 restarts within 5 cycles then unmonitor
group server
- Edit mmonit/conf/server.xml to communicate with in the localhost
<Connector address="localhost" port="8080" processors="10" /> # For only local communication
<Connector address="*" port="8080" processors="10" /> # For all users in public
- Run mmonit and monit
mmonit start
monit start