We have a regular LAMP project and we recently to moved to Gitlab (instead of Github).
Previously we have been using Jenkins for deployment, now I am planning to migrate it to Gitlab CI/CD.
We have servers A and B (with Loadbalancer) for development version and servers C and D (likewise, with LB) for production environment.
Since it's a LAMP project, the deploy is as simple as that: - latest changes are pulled from repo; - all changed files are rsynced into public web folder; - some utilities like composer and npm are run.
Basically I need to deploy changes to two development VPS and two production ones.
Do I have to install and start runner on each of them? Or is there a more efficient approach?
There are many approaches possible (I'm assuming your are running on unix) :
config.toml
advanced configuration with the --image
flag. This will trigger a container based on your image for every build.--kubernetes-image
For the deployment, just copy the files on your target servers after the build using tools like scp
or rsync
. Better (if your LAMP project is dockerized) : build a docker image, push it on a registry and pull it on your server. Even better : deploy all the containers in a orchestrator like Kubernetes.