Goal: deploy kestra to the cloud and use gitsync plugin to sync together
IDs:
- service account: zoomcamp-serviceacc
- bucket: zoomcamp_ag_bucket_2025
Installation guide to set up storage, compute engine to run kestra, set up postgres db to store data related to kestra
Goal: set up instance of kestra running in prod
Create a VM instance where we’ll run kestra
- create VM instance and open SSH-in-browser
-
install docker in VM for Ubuntu (also install docker compose)
- https://docs.docker.com/engine/install/ubuntu/
-
install kestra using the kestra repo
-
find the docker-compose.yml
- https://github.com/kestra-io/kestra/blob/develop/docker-compose.yml
- use curl command to create docker-compose file. make sure you grab the raw file (not html)
curl -o docker-compose.yml \\
<https://raw.githubusercontent.com/kestra-io/kestra/refs/heads/develop/docker-compose.yml>
-
open it with vim to configure it
- authentication
kestra:
server:
basicAuth:
enabled: true
username: "a.guan610@gmail.com" # it must be a valid email address
password: kestra
-
go back to your VM instance on console
- view network details > firewall > create firewall rule
- name it (e.g. kestra-ui-port)
- change target to “all instances in the network”
- set Source IPv4 range to “0.0.0.0/0” which means anything on the machine will available
- set Port > TCP to 8080
- create
-
now we can go back to terminal and spin up $ sudo docker compose up (don’t detach yet so we can see logs in case of error)
-
we can now access it via the external IP of our VM with port 8080 (login with prev set up auth)
- xx.xxx.xxx.xxx:8080
Postgres DB is by default running in the VM and we don’t have enough storage. We’re going to separate postgres and use cloud sql.
- Cloud > create postgres instance
- change the connection to “private IP” so ONLY our VM can talk to the db
- create user
- change kestra config - delete the postgres service so it won’t create a postgres db
- also delete the depends-on at the bottom of the yml file
