Hydra: Difference between revisions
imported>Makefu add note about evaluation |
imported>Makefu add declarative building |
||
| Line 6: | Line 6: | ||
The [https://nixos.org/hydra/manual/ Hydra manual] provides an overview of the functionality and features of hydra, as well as an up-to-date installation guide. | The [https://nixos.org/hydra/manual/ Hydra manual] provides an overview of the functionality and features of hydra, as well as an up-to-date installation guide. | ||
== Installation == | |||
Since 2017, hydra is available as a NixOS module and therefore a full deployment can be enabled as easy as | Since 2017, hydra is available as a NixOS module and therefore a full deployment can be enabled as easy as | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
| Line 25: | Line 23: | ||
* See nixos-option or the [https://nixos.org/nixos/options.html#services.hydra Nixos Options page] for all options | * See nixos-option or the [https://nixos.org/nixos/options.html#services.hydra Nixos Options page] for all options | ||
=== Web | === 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> | ||
| Line 32: | Line 30: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Build a single Package from nixpkgs == | |||
Right now it is not possible to build a single package from nixpkgs with just that input. You will need to provide a supplementary repository which defines what to build. For examples you can check the [https://github.com/makefu/hydra-example hydra-example by makefu] and in the [https://nixos.org/hydra/manual/#idm140737315920320 Hydra Manual]. | Right now it is not possible to build a single package from nixpkgs with just that input. You will need to provide a supplementary repository which defines what to build. For examples you can check the [https://github.com/makefu/hydra-example hydra-example by makefu] and in the [https://nixos.org/hydra/manual/#idm140737315920320 Hydra Manual]. | ||
=== 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> | ||
| Line 57: | Line 56: | ||
After creation, the jobset should be in the '''evaluation phase''' where inputs will be fetched. This phase may take some time as the complete <code>nixpkgs</code> repository needs to be downloaded before continuing. The result of the evaluation should be a single job which will get built. | After creation, the jobset should be in the '''evaluation phase''' where inputs will be fetched. This phase may take some time as the complete <code>nixpkgs</code> repository needs to be downloaded before continuing. The result of the evaluation should be a single job which will get built. | ||
=== 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]. | |||
== Hydra Internals == | |||
=== Definitions === | === Definitions === | ||
This subsection provides an overview of the Hydra-specific definitions and how to configure them. | This subsection provides an overview of the Hydra-specific definitions and how to configure them. | ||