Struggling with a problem that i just can’t seem to figure out.
When starting from scratch self hosting both the SCM and CI/CD server.
Given that you can’t use an existing setup to deploy/manage it, what is the best practice for deploying said services?
I am not sure if it is best practice, but this is what I do and it might provide some inspiration:
- Bootstrap from a private gitlab.com repository with a base ansible setup. Executed from a laptop.
- The bootstrap setups up k8s and installs a bare bones git repository docker container based on https://codeberg.org/al13nsc13nc3/gitsrv.
- Flux CD is installed into the bare bones git repository and k8s.
- Flux CD is used to install Forgejo and Woodpecker CI using the bare bones git repository as the gitops source of truth.
This has the advantage that Gitops and normal git repositories are separate. I think that a similar principle would work with docker compose instead of k8s.
I have also done this previously but i’ll not be using third party hosted SCM or CI for this one so it kinda rules this approach out. (I’ll edit the main post to reflect this)
Looks like manual/locally-scripted is the way, just wondered if there was something more.
Isn’t this what bootstrapping is for? Manually set up the system to the point it can be taken over by ci/cd
Isn’t this what bootstrapping is for? Manually set up the system to the point it can be taken over by ci/cd
Indeed, was just wondering if there was some industry standard i was missing that was a bit more managed.
No worries if not.
Struggling with a problem that i just can’t seem to figure out.
What problems are you struggling with specifically?
You basically just pick a system, for example Forgejo - that’s comparable to a self-hosted github. Which also comes with github-like actions for CI/CD/Building
If those actions are not good enough for building, you could also self host something like Jenkins or TeamCity
What problems are you struggling with specifically?
You basically just pick a system, for example Forgejo - that’s comparable to a self-hosted github. Which also comes with github-like actions for CI/CD/Building
I can deploy these by hand sure, but is that the only way ?
Let’s assume forgejo and woodpecker.
I’d need to spin up each service + the db (postgres probably) for each.
Given i’d not have an SCM system or build pipelines until after they were deployed, am i just doing it by hand and hoping for the best or working with something like ansible, saving the scripts to a folder somewhere and manually running them myself?
How about future maintenance or reproducibility?
I’m fully capable of doing it by hand and not against it, just wasn’t sure if there was a commonly used bootstrapping mechanism i wasn’t aware of.
Ansible files stored locally to bootstrap, then the same set of ansible files gets put in a repo once the repo is up.
IMO
my 2 cents here, though I don’t understand all the context, you might take a look at sparky - which is lightweight task runner with web console, so you may throw a bunch of jobs into it to do all the “bootstrapping” so that you may later repeat the same if required on any fresh environment …