Project

General

Profile

Builder-CI Installation » History » Revision 4

Revision 3 (Olivier Bitsch, 07/06/2021 11:38 AM) → Revision 4/5 (Olivier Bitsch, 04/23/2025 02:23 PM)

# Builder CI 

 Builder CI is an automated build Builder-CI should work on any GNU/Linux based system designed to support Continuous Integration (CI) across various types of development projects. It however it was created developed on Debian Buster with the goal of simplifying limited testing on other distributions. Please let us know if you run it on another distribution with issues and automating build pipelines in a more efficient way than traditional tools like Jenkins. off course if you have problems. 

 It’s designed The following server specification is known to optionally integrate with [Redmine](https://www.redmine.org/) via a [dedicated plugin](https://github.com/iabsis/redmine-builder-ci), allowing better visibility into builds directly within project management workflows. 

 [Screenshot](https://raw.githubusercontent.com/iabsis/builder-ci/master/doc/builder-ci.png) 

 --- 

 ## Features 

 - Create any script be able to create your package (e.g., `.deb`, `.rpm`) 
 - Exposes a REST API to trigger builds 
 - Modular and extensible — build your own flow 
 - Lightweight: built all packages tested as of today, but Builder-CI itself can run on much lower specification hardware with Python and minimal dependencies 
 - Easy limitations due to install and update with a single command on Debian Bookworm performance. 

 * 4 vCPU 
 - Uses PostGreSQL, Django and Podman. * 4Gb of RAM 
 - Commands are run in container for more safety. 
 - "Build as Code": configure builds using * 50Gb hard drive space 

 The rest of this guide is done on a `builder.yml` file 
 - Trigger multiple flow in one commit 
 - Automatic podman container build, based on advance rules terminal with root access (sudo su). 

 --- 

 ## Installation Guide (Takes ~2 Minutes) Installing Mongo 

 > Note: All commands should Builder-CI uses the Listener feature of Mongo replicaset. Mongo can be run as `root`. installed on the same server or deployed on another server/cluster. Deployment on the same server is the simplest option. 

 --- 

 ### ~~~ bash 
 ## Install Builder CI (Debian Bookworm) 

 ```bash Mongo Repository 
 curl -s https://www.mongodb.org/static/pgp/server-${VERSION}.asc | apt-key add - 
 echo "deb [trusted=yes] https://projects.iabsis.com/repository/builder-ci/debian bookworm http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" \ 
     > /etc/apt/sources.list.d/iabsis.list /etc/apt/sources.list.d/mongo.list 

 ## Install Mongo Package 
 apt update && apt install builder-ci postgresql redis nginx mongodb-server 

 ## Enable the replicaset feature 
 ``` echo -e "replication:\n     replSetName: \"rs0\"" >> /etc/mongod.conf 

 This will return error since database is not yet configured, ignore for now ## Start Mongo and go to next step 

 --- 

 ### Configure database 

 ```bash enable the service 
 su - postgres 
 createuser --pwprompt builder 
 createdb -O builder builder 
 ``` systemctl enable --now mongod 

 ### Configure Builder CI 

 Now edit `/etc/builder-ci/builder-ci.conf` ## Enter into Mongo console and change the following lines. 

 ``` add this host to replicaset. 
 DATABASE_NAME=builder mongo 
 DATABASE_USER=builder 
 DATABASE_PASSWORD=builder 
 ALLOWED_HOSTS=mybuilder.com 
 ``` 

 Now fix the previous error with `apt -f install` 

 ### Configure Nginx 

 Create a simple nginx configuration that will be used also serve static files. 

 ``` 
 server rs.initiate({ 
    _id: "rs0", 
    members:[ 
       { 
     listen 80; 
     server_name mybuilder.com; 

     location /static/ { 
         alias /usr/share/builder-ci/statics/; 
     
          _id: 0, 
          host: "localhost:27017" 
       } 

     location / { 
         proxy_set_header Host $host; 
         proxy_pass http://127.0.0.1:8000; 
         proxy_http_version 1.1; 
         proxy_set_header Upgrade $http_upgrade; 
         proxy_set_header Connection "upgrade"; 
     } 
    ] 
 } }) 
 ``` ~~~ 

 If ## Installing Docker 

 Docker is not mandatory if you need only want to setup letsencrypt certificate, build Debian Package, but most build processes will require that you install `python3-certbot-nginx` and run `certbot --nginx`. Docker to provide clean build environments. 

 ### Create first django user 

 ``` ~~~ bash 
 set -a ; . /etc/builder-ci/builder-ci.conf curl -s https://download.docker.com/linux/debian/gpg | apt-key add - 
 cd /usr/share/builder-ci/ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable" \ 
     > /etc/apt/sources.list.d/docker.list 
 . ./venv/bin/activate # Dont forgot the first dot apt update && apt install docker-ce 
 python3 manage.py createsuperuser 
 ``` ~~~ 

 ### Now open 

 > https://mybuilder.com 

 And login with your super user. 

 ## Frequently Asked Questions 

 ### Is Builder CI stable for production use? 

 Yes. It's used in production with frameworks like Laravel, Symfony, Ionic, Flutter, NestJS, Angular, and React across platforms such as Android, Debian, Ubuntu, Red Hat, and CentOS. 

 ## I'm using redmine, can I have Builder-CI will automatically build status inside? all the required docker images during the installation phase. 

 Yes, we did a [Redmine plugin](https://github.com/iabsis/redmine-builder-ci). Once installed, create API key and configure 

 ``` 
 REDMINE_URL=https://<your redmine host> 
 REDMINE_KEY=<your redmine key> 
 ``` 

 ## Does Builder support SSO 

 Yes, you can configure SSO like Keycloak by configuring OpenID in configuration. 

 ``` Installing Builder-CI 
 OPENID_ID=sso 
 OPENID_NAME="<display name on login page>" 
 OPENID_CLIENT_ID=<your keycloak client ID> 
 OPENID_SECRET=<your keycloak secret> 
 OPENID_CONFIGURATION_URL="https://<your keycloak url>/realms/<your keycloak realm>/.well-known/openid-configuration" 
 ``` 


 ## Contributing 

 We welcome contributions The installation of all kinds — including code, documentation, bug reports, Builder-CI includes the installation of the Builder-ci process and feature suggestions. 

 While formal contributing guidelines are coming soon, you can: 

 - Fork the repository 
 - Create a new branch for building of various base Docker images used during the build processes. This step will take several minutes depending on your changes internet speed and server performance. 

 ~~~ bash 
 - Open a pull request echo "deb [trusted=yes] https://projects.iabsis.com/repository/builder-ci/debian buster main" \ 
     > /etc/apt/sources.list.d/iabsis.list 
 - Share feedback via comments or discussions apt update && apt install builder-ci 
 ~~~ 

 --- 

 ## License 

 Builder CI The next step is licensed under the [GPL-3.0 License](LICENSE). to check your server sanity before doing your first build [[Server-sanity-checks]]