r/AskProgramming • u/SurveyElectronic3845 • Oct 08 '26
How do you work when code and pipeline execution are on two different PCs?
For seniors/devs/data engineers: what is the usual workflow when you have to modify the code on one PC but run the pipelines on another PC?
For example, PC A is used for development (Git, IDE, code), while PC B has the environment where the pipelines run (Airflow/Docker).
How do you normally synchronize the code between the two? Git pull/push, deployment, shared folder, SSH, CI/CD, or something else?
What would be considered the clean/professional way to set this up?
0
Upvotes
2
u/CorpT Oct 08 '26
Why would anyone run pipelines on a PC?
15
u/smarterthanyoda Oct 08 '26
The standard way is to push it to your git repository.
2
u/pixel293 Oct 08 '26
Ssh usually with identify files so I don't have to keep entering the password. Bash script(s) to build, upload, and run. I'm lazy I like one command that causes everything to happen so I can just kick it and wait to see if it runs correctly.
2
u/KingofGamesYami Oct 08 '26
Our standard workflow goes something like this:
Open a merge request on GitLab
Merge MR to main
In this case, the server hosting airflow would be your prod environment.
1
u/SocksOnHands Oct 08 '26 edited Oct 08 '26
You would likely have a ci/cd script that is triggered on dev branches merged to main, or on the creation of a tag, that builds a docker image, pushes it to your container repository, then the new image is deployed in your production (or staging) environment.
This might vary depending on your requirements. The ci/cd pipeline might also be made to run tests. I was just throwing out a general overview of the process.
1
u/enozero Oct 08 '26
This greatly depends on what you are trying to build and deploy and where you are trying to deploy along with the resources available. There is no silver bullet.
Given what you might be describing with a developer machine and an executor (Airflow, Docker), one may have a centralized source repo (i.e.: GitHub) and a centralized CI/CD orchestrator and runner (i.e.: GitHub Actions). The CI/CD orchestrator has access to the source repo and executor. The orchestrator receives push notifications from the source repo when code has been committed (i.e.: pushed to a specific branch, like `main`) and orchestrates and runs specified scripts (i.e.: build, test, and deploy scripts). Part of those scripts would deploy the built code to the executors (i.e.: updating Airflow config, pushing new Docker images).
1
u/rupertavery64 Oct 08 '26
Git and some orchestrator like Jenkins (if you really must) or Github Actions, or some other orchestrator. Either way, an agent will be installed on the pipline machine. Pushing to a watched branch will trigger the agent, which will pull the repo and trigger the pipelne.
1
u/BoBoBearDev Oct 09 '26
I just use Jenkins with Jenkinsfile. Jenkins has plugin to listen Github/Bitbucket signals when you push. And it triggers the pipeline. Jenkinsfile is parsed on the main Jenkins server and send the commands to the remote agent (computerB).
1
u/kilkil Oct 09 '26
I think git push is the simplest thing no?
1
u/juniperico Oct 09 '26 edited Oct 09 '26
Dead simple solution for CICD without any additional tooling:
(and killing this automated job)
r cronjob