How do you keep the controller stateless enough to recreate quickly?
AdvancedConceptBackups, HA, upgrades & performance
Answer
- Controller image with pinned core and plugins
- JCasC for all system config; Job DSL for folders and multibranch jobs
- Credentials in an external secret store via a credentials provider
- Artifacts in Nexus/Artifactory or S3 (Artifact Manager on S3), not in
JENKINS_HOME - Logs shipped externally
- Short build retention
Then recovery means "deploy a new controller and scan repositories"; only build history is lost if the volume is gone, which many teams accept.
More on Backups, HA, upgrades & performance
What do you back up in Jenkins and what do you exclude?IntermediateHow do you back up Jenkins running on Kubernetes?IntermediateDoes Jenkins support active-active high availability?AdvancedHow do you plan a Jenkins LTS upgrade?IntermediateWhat does "Manage Old Data" mean after an upgrade?BeginnerHow do you size and tune the controller JVM?Advanced