Hydra: Difference between revisions

Marked this version for translation
Fedora (talk | contribs)
m Capitalise Hydra and UNIX
Tags: Mobile edit Mobile web edit
Line 8: Line 8:


<!--T:3-->
<!--T:3-->
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.  


<!--T:4-->
<!--T:4-->
== Installation ==
== 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>
   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 24: Line 24:
   };
   };
</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.
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


<!--T:5-->
<!--T:5-->
=== 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 111: Line 111:
=== 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 135: Line 135:
<!--T:21-->
<!--T:21-->
=== 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].


<!--T:22-->
<!--T:22-->