FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 80c21679 authored by L. Bower's avatar L. Bower
Browse files

updating docs

parent a3279c0d
No related branches found
No related tags found
No related merge requests found
......@@ -626,4 +626,77 @@ can run as demons with the -D flag
connect to the webserver http://<server_ip>:8090
**set up airflow as a service**
Once you have got airflow running from the command line, you will need to set it up as a service (which will run at startup and in the background)
1: create a service file for airflow scheduler and webserver:
sudo touch /etc/systemd/system/airflow-scheduler.service
sudo touch /etc/systemd/system/airflow-webserver.service
edit the contents of both files to be:
.. code-block:: bash
[Unit]
Description=Airflow scheduler daemon
After=network.target mysql.service
Wants=mysql.service
[Service]
EnvironmentFile=/storage/airflow/airflow.cfg
User=ewsmanager
Group=ewsmanager
Type=simple
ExecStart=/usr/bin/bash -c 'export AIRFLOW_HOME=/storage/airflow ; source /storage/airflow/airflow-env/bin/activate ; airflow webserver'
Restart=no
RestartSec=5s
PrivateTmp=true
[Install]
WantedBy=multi-user.target
.. code-block:: bash
[Unit]
Description=Airflow scheduler daemon
After=network.target mysql.service
Wants=mysql.service
[Service]
EnvironmentFile=/storage/airflow/airflow.cfg
User=ewsmanager
Group=ewsmanager
Type=simple
ExecStart=/usr/bin/bash -c 'export AIRFLOW_HOME=/storage/airflow ; source /storage/airflow/airflow-env/bin/activate ; airflow scheduler'
Restart=no
RestartSec=5s
PrivateTmp=true
[Install]
WantedBy=multi-user.target
2: reload the service daemon, enable and start the services
sudo systemctl daemon-reload
sudo systemctl enable airflow-scheduler.service
sudo systemctl enable airflow-webserver.service
sudo systemctl start airflow-scheduler.service
sudo systemctl start airflow-webserver.service
sudo systemctl restart airflow-scheduler.service
sudo systemctl restart airflow-webserver.service
sudo systemctl stop airflow-scheduler.service
sudo systemctl stop airflow-webserver.service
3: check the status of the services
sudo systemctl status airflow-scheduler.service
sudo systemctl status airflow-webserver.service
4: check the logs
sudo journalctl -r -u airflow-scheduler.service
sudo journalctl -r -u airflow-webserver.service
......@@ -6,7 +6,7 @@ API
:template: custom-module-template.rst
:recursive:
coordinator
.. coordinator
plotting
ews_postprocessing
met_processing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment