Administration
Services
Commands to enable Opencelium services (already done on installation).
ln -s /opt/scripts/oc_service.sh /usr/bin/oc
ln -s /opt/opencelium/conf/opencelium.service /etc/systemd/system/opencelium.service
systemctl daemon-reload
Available services:
Frontend:
systemctl start nginx
systemctl stop nginx
systemctl start nginx
systemctl restart nginx
systemctl enable nginx
systemctl disable nginx
Backend:
systemctl start opencelium
systemctl stop opencelium
systemctl start opencelium
systemctl restart opencelium
systemctl enable opencelium
systemctl disable opencelium
Routing of the backend through an endpoint
To change this routing you need to follow the next steps.
1. Change routing in frontend:
Create a settings.json file inside of frontend directory (usually underneath /opt/opencelium/src/frontend/) and change the settings to this.
{
"PORT": {
"APPLICATION": "",
"API": ""
},
"SERVER_ENDPOINT": "/api/"
}
2. Add proxy in the webserver config:
Open the settings of your webserver (usually it is nginx) and add the follow config:
# Activate Proxy
location /api/ {
# Routing of all requests to /api to the backend server. pls replace {localhost}
proxy_pass http://localhost:9090/;
#Set proxy header
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto http;
# Optional: CORS headers
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "Content-Type, Authorization";
# Handle preflight requests
if ($request_method = OPTIONS) {
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
}
Note
3. Restart your webserver:
systemctl restart nginx
Check health
Check status of opencelium service
systemctl status nginx
systemctl status opencelium
Autostart
Start opencelium services automatically on system start
systemctl enable nginx
systemctl enable opencelium
Logging
1journalctl -xe -u opencelium -o cat -f
Backup
To create a local backup of your OpenCelium installation, please execute the following command as root. Old backups will be removed after 14 days.
Note
Please change the password (secret1234) in the following command line!
oc backup -d /var/backups/opencelium -u opencelium -p secret1234
Restore
We decided not to provide an automatic functionallity for the restore process, because it’s mostly not needed to restore everything at once.
Extract the backup:
mkdir /var/backups/opencelium/restore
ls -l /var/backups/opencelium
Note
Please change the <backup filename> in the following command line!
tar xf /var/backups/opencelium/<backup filename>.tar.gz -C /var/backups/opencelium/restore/ --strip-components=4
Restore MySQL database: (Connectors, Connections and Schedules)
Note
Please change the password (secret1234) in the following command line!
mysql -uopencelium -psecret1234 opencelium < /var/backups/opencelium/restore/oc_data.sql
Restore MongoDB database (Connection details)
mongorestore --drop --db opencelium /var/backups/opencelium/restore/opencelium/
Restore files and folders: (all programm files, invokers and templates)
In case you have to replace single files and folders, you will find all backuped files within the extracted backup in /var/backups/opencelium/restore/opt-backup .