Maintenance

From time to time, some steps are needed to be taken to take care of your Bizzflow instance and keep it clean.

Services

Services are docker containers running in your Airflow VM.

List of services

Service nameDescriptionRequired
flow-uiFlow UI frontend
flow-ui-backendFlow UI backend API
airflow-webserverAirflow webserver
airflow-schedulerAirflow scheduler
celery-workerBackground worker for Flow UI backend API
redisredis in-memory cache for Flow UI backend API
bizzflow-initInitialize Airflow metadata database and configuration, clone project from git, running repeatedly may cause problems with encrypted credentials

Restart services

When the Airflow UI is not responding, scheduler is not queuing tasks correctly or your consoles seem to be quirky, your best bet is restarting the service that is misbehaving.

1. SSH into the Airflow machine

Login using SSH key from the installation artifacts. The user name is always bizzflow.

2. Restart required services

docker-compose restart -p bizzflow

Restart deployment

If restarting specific service(s) doesn’t help, you may try deploying all services again.

1. SSH into the Airflow machine

See above.

2. Destroy current deployment

docker-compose -p bizzflow down

3. Run deployment again

docker-compose -p bizzflow --env-file project.env up -d flow-ui airflow-webserver

Get service’s logs

Sometimes you need to know what is going wrong. In that case, your best bet is to look at the service’s logs.

1. SSH into the Airflow machine

See above.

2. Attach to logs live

docker logs <service-name>_1

For service names see above - list of services.

Press Ctrl+C (or Cmd+C on Mac) to exit the logs.

Disk cleanup

Sometimes you will run out of space on your Airflow VM. Following are some places you may look to clean up some space.

Logs Cleanup

Airflow generates lots of logs. All of them are stored and not all of them are needed to kept.

1. SSH into the Airflow machine

See above.

2. Cleanup the logs

year=`date +'%Y'`
cmonth=`date +'%m'`
let lmonth=$cmonth-1
rm -rf ~/airflow/logs/scheduler/{2020..$year}-{01..`printf "%02d" $lmonth`}*

This will delete all logs since January 2020 until last month.

If you do not understand the curly braces, see here for more information.