Giter VIP home page Giter VIP logo

enku / gentoo-build-publisher Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 2.0 1.66 MB

Gentoo Build Publisher is a way to build gentoo updates in CI/CD and have those builds published (rsync for the portage tree; http for binpkgs) to individual machines.

License: Other

Python 96.29% Makefile 0.32% HTML 2.36% CSS 0.11% JavaScript 0.92%
gentoo portage-tree django ebuild linux python gentoo-binhost

gentoo-build-publisher's Introduction

Gentoo Build Publisher dashboard

Gentoo Build Publisher

Introduction

Gentoo Build Publisher (GBP) is a Gentoo build server, binary package host (binhost), ebuild repo server, and configuration manager in one which uses continuous integration and other tools to deliver successful, consistent "builds" for a single machine or multiple heterogeneous Gentoo machines.

In case you didn't know, Gentoo Linux is a source-based rolling-release meta-distribution that you can twist and mold into pretty much anything you like. That's just a verbose way of saying Gentoo is awesome.

If you run a Gentoo system, say a laptop, you may be updating your system using the standard emerge --sync followed by a world update. This pulls in the latest ebuilds from the Gentoo repo and if there are any updates applicable to your system then they get built on your system.

Except sometimes they don't.

Sometimes builds fail. Sometimes USE flags need to be changed. Sometimes there's an update to a piece of software that is buggy and you want to revert. Sometimes a build takes a long time and you don't want to wait.

Well since Gentoo is the distribution you build yourself, CI/CD seems like a natural fit. Enter Gentoo Build Publisher.

Gentoo Build Publisher combines a repo/overlay server, basic configuration management, and binary package server (binhost) for complete and atomic builds. Successful builds performed by Jenkins are served by GBP where client machines sync from.

Procedure

  • Build a Gentoo Build Publisher instance. Refer to the Install Guide.
  • Create "machines" and "repos" jobs in Jenkins. For example gbp addrepo gentoo https://anongit.gentoo.org/git/repo/gentoo.git; gbp addmachine base https://github.com/enku/gbp-machines.git Use the gbp-machines repo as a starting point. This can also be done manually within the Jenkins UI.
  • Once a Jenkins job has been pulled by Gentoo Build Publisher it can be published so that actual machines can use it (e.g. rsync for repos, http for binpkgs). Use the CLI (gbp publish) to publish a pulled build.
  • If the job fails, it will not be pulled.
  • Your real machine, for example, base, syncs from, rsync://gbp/repos/base/gentoo. You can dynamically acquire the repos.conf file from https://gbp/machines/base/repos.conf and the binrepos.conf from https://gbp/machines/base/binrepos.conf.

Jenkins build

CLI

The command-line interface can inspect, publish, pull, schedule builds and more.

gbpcli screenshot

Articles

Below are some articles that explain some aspects of Build Publisher in detail.

gentoo-build-publisher's People

Contributors

arkamar avatar enku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

erglabs davyee

gentoo-build-publisher's Issues

DB Engine error

I followed the install guide for GBP on a clean gentoo machine, when I get to the step where I have to create a api key, I get an error when I run gbp apikey create gbp

Traceback (most recent call last):
  File "/usr/local/bin/gbp", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/gbpcli/__init__.py", line 322, in main
    return cast(int, args.func(args, GBP(args.url, auth=user_config.auth), console))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/gentoo-build-publisher/src/gentoo_build_publisher/cli/apikey.py", line 27, in handler
    return create_action(args, console)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/gentoo-build-publisher/src/gentoo_build_publisher/cli/apikey.py", line 45, in create_action
    if name in [key.name for key in publisher.repo.api_keys.list()]:
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/gentoo-build-publisher/src/gentoo_build_publisher/records/django_orm.py", line 225, in list
    return [
           ^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/query.py", line 400, in __iter__
    self._fetch_all()
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/query.py", line 1928, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/query.py", line 91, in __iter__
    results = compiler.execute_sql(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1549, in execute_sql
    sql, params = self.as_sql()
                  ^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 736, in as_sql
    extra_select, order_by, group_by = self.pre_sql_setup(
                                       ^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 84, in pre_sql_setup
    self.setup_query(with_col_aliases=with_col_aliases)
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 73, in setup_query
    self.select, self.klass_info, self.annotation_col_map = self.get_select(
                                                            ^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 296, in get_select
    sql, params = self.compile(col)
                  ^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 546, in compile
    sql, params = node.as_sql(self, self.connection)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/expressions.py", line 1180, in as_sql
    sql = ".".join(map(compiler.quote_name_unless_alias, identifiers))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 537, in quote_name_unless_alias
    r = self.connection.ops.quote_name(name)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gbp/lib/python3.12/site-packages/django/db/backends/dummy/base.py", line 20, in complain
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

How to launch local gbp instance?

I'm interested in trying out and contributing to this project but I'm having trouble figuring out how to launch it.

Could you provide me some notes on how to get started? If you want to provide some terse notes here I'm happy to extend them and add them to the README via pull request after I get this working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.