Hydra/de: Difference between revisions

Created page with "Das [https://nixos.org/hydra/manual/ Hydra Handbuch] bietet eine Übersicht der Funktionalität und Funktionen von Hydra sowohl als auch eine aktuelle Installationsanleitung."
Tags: Mobile edit Mobile web edit
FuzzyBot (talk | contribs)
Updating to match new version of source page
Line 4: Line 4:
Die offiziellen Hydra-Server bieten vorgefertigte Binärpakete an, um die Aktualisierungszeit für Nixpgs zu verkürzen: Die Benutzer müssen sie nicht auf ihren eigenen Computern kompilieren.
Die offiziellen Hydra-Server bieten vorgefertigte Binärpakete an, um die Aktualisierungszeit für Nixpgs zu verkürzen: Die Benutzer müssen sie nicht auf ihren eigenen Computern kompilieren.


Das [https://nixos.org/hydra/manual/ Hydra Handbuch] bietet eine Übersicht der Funktionalität und Funktionen von Hydra sowohl als auch eine aktuelle Installationsanleitung.  
<div class="mw-translate-fuzzy">
Das [https://nixos.org/hydra/manual/ Hydra Handbuch] bietet eine Übersicht der Funktionalität und Funktionen von Hydra sowohl als auch eine aktuelle Installationsanleitung.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Installation ==
== Installation ==
Since 2017, hydra is available as a NixOS module and therefore a full deployment can be enabled as easy as
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
A full deployment can be enabled as easy as:
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
   services.hydra = {
   services.hydra = {
     enable = true;
     enable = true;
     hydraURL = "http://localhost:3000"; # externally visible URL
     hydraURL = "http://localhost:3000"; # externally visible URL
     notificationSender = "hydra@localhost"; # e-mail of hydra service
     notificationSender = "hydra@localhost"; # e-mail of Hydra service
     # a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
     # a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
     buildMachinesFiles = [];
     buildMachinesFiles = [];
     # you will probably also want, otherwise *everything* will be built from scratch
     # you will probably also want, otherwise *everything* will be built from scratch
Line 20: Line 28:
   };
   };
</syntaxHighlight>
</syntaxHighlight>
The module will automatically enable postgresql if you do not change the <code>services.hydra.dbi</code> option. Database layout will be created automatically by the hydra service, however keep in mind that some state will be stored in the database and a complete stateless configuration is currently not possible - do your backups.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
The module will automatically enable postgresql if you do not change the <code>services.hydra.dbi</code> option. Database layout will be created automatically by the Hydra service, however keep in mind that some state will be stored in the database and a complete stateless configuration is currently not possible - do your backups.
* See nixos-option or the [https://search.nixos.org/options?query=services.hydra Nixos Options page] for all options
* See nixos-option or the [https://search.nixos.org/options?query=services.hydra Nixos Options page] for all options
</div>
</div>
Line 26: Line 37:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Web Configuration ===
=== Web Configuration ===
Hydra will provide the web interface [http://localhost:3000/ at localhost] port 3000. However you need to create a new admin user (as unix user <code>hydra</code>) before being able to perform any changes:
Hydra will provide the web interface [http://localhost:3000/ at localhost] port 3000. However you need to create a new admin user (as UNIX user <code>hydra</code>) before being able to perform any changes:
<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
# su - hydra
# su - hydra
Line 51: Line 62:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
This option leads to the file /etc/nix/machines being created. If the hydra service config is still set to buildMachinesFiles = [], then it will be ignored, so remove this option again or add /etc/nix/machines to it.
This option leads to the file /etc/nix/machines being created. If the hydra service config is still set to buildMachinesFiles = [], then it will be ignored, so remove this option again or add <code>/etc/nix/machines</code> to it.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 60: Line 70:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Configure jobset the following:
Configure jobset to the following:
</div>
</div>


Line 124: Line 134:
=== Imperative Building ===
=== Imperative Building ===
These steps are required to build the <code>hello</code> package.
These steps are required to build the <code>hello</code> package.
# log into hydra after creating a user with <code>hydra-create-user</code>
# log into Hydra after creating a user with <code>hydra-create-user</code>
# create new project
# create new project
* identifier: example-hello
* identifier: example-hello
Line 150: Line 160:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Declarative Building ===
=== Declarative Building ===
Since 2016, hydra supports declarative creation of jobsets. Check out the [https://github.com/shlevy/declarative-hydra-example example repository and description by Shea Levy].
Since 2016, Hydra supports declarative creation of jobsets. Check out the [https://github.com/shlevy/declarative-hydra-example example repository and description by Shea Levy].
</div>
</div>


Line 161: Line 171:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Project ====  
==== Project ====  
A cluster of Jobs which are all coming from a single input (like a git checkout), the first thing you will need to create. Every Job should be able to be built independently from another. Most of the time the project maps to a single repository like <code>nixpkgs</code>. It is comparable to the project definition in Jenkins
A cluster of Jobs which are all coming from a single input (like a git checkout), the first thing you will need to create. Every Job should be able to be built independently from another. Most of the time the project maps to a single repository like <code>nixpkgs</code>. It is comparable to the project definition in Jenkins.
</div>
</div>


<div class="mw-translate-fuzzy">
==== Jobset ====
==== Jobset ====
Eine Liste von Jobs, die ausgeführt werden sollen. Oft passt ein Jobset zu einem bestimmten Branch (master, staging, stable). Ein Jobset wird durch seine Eingaben definiert und wird ausgelöst, wenn sich diese Eingaben ändern, z.B. wenn ein neuer Commit zu einem Branch hinzugefügt wird. Jobsets können voneinander abhängen
Eine Liste von Jobs, die ausgeführt werden sollen. Oft passt ein Jobset zu einem bestimmten Branch (master, staging, stable). Ein Jobset wird durch seine Eingaben definiert und wird ausgelöst, wenn sich diese Eingaben ändern, z.B. wenn ein neuer Commit zu einem Branch hinzugefügt wird. Jobsets können voneinander abhängen
</div>


<div class="mw-translate-fuzzy">
==== Job ====
==== Job ====
Ein Closure, welches als Teil eines Jobsatzes erstellt wird (wie ein einzelnes Paket, ISO-Image oder Tarball)
Ein Closure, welches als Teil eines Jobsatzes erstellt wird (wie ein einzelnes Paket, ISO-Image oder Tarball)
</div>


==== Release Set ====
==== Release Set ====
Line 175: Line 189:
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Evaluation ====
==== Evaluation ====
The process of interpreting nix code into a list of <code>.drv files</code>. These files are the build recipes for all related outputs. You can introspect these files by running <code>nix show-derivation nixpkgs.hello</code>
The process of interpreting nix code into a list of <code>.drv files</code>. These files are the build recipes for all related outputs. You can introspect these files by running <code>nix show-derivation nixpkgs.hello</code>.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Build ====
==== Build ====
Instantiation of a Job which is being triggered by being part of the release set
Instantiation of a Job which is being triggered by being part of the release set.
</div>
</div>