Skip to content

Commit

Permalink
some fixes on services
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Mar 26, 2019
1 parent 7597f36 commit 22b7699
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The Airflow service runs under systemd, so logs are available through journalctl
- [x] Provide a way to pass a custom requirements.txt files on provision step
- [ ] Provide a way to pass a custom packages.txt files on provision step
- [ ] RBAC
- [ ] Flower
- [ ] Provide a way inject envinronment variables to airflow
- [ ] Auto Scalling for workers
- [ ] Use SPOT instances for workers
Expand Down
10 changes: 6 additions & 4 deletions files/airflow.service
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[Unit]
Description=Airflow Webserver Service
Description=Airflow daemon
After=network.target

[Service]
EnvironmentFile=/etc/sysconfig/airflow
User=ubuntu
Group=ubuntu
ExecStart=/usr/bin/terraform-aws-airflow
Type=simple
Restart=always
ExecStart=/usr/bin/terraform-aws-airflow
RestartSec=5s
KillMode=mixed
TimeoutStopSec=24h
PrivateTmp=true

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion files/cloud-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function setup_airflow() {
sudo tee -a /usr/bin/terraform-aws-airflow <<EOL
#!/usr/bin/env bash
if [ "\$AIRFLOW_ROLE" == "SCHEDULER" ]
then exec airflow scheduler
then exec airflow scheduler -n 10
elif [ "\$AIRFLOW_ROLE" == "WEBSERVER" ]
then exec airflow webserver
elif [ "\$AIRFLOW_ROLE" == "WORKER" ]
Expand Down

0 comments on commit 22b7699

Please sign in to comment.