github.com/alloyci/alloy-runner@v1.0.1-0.20180222164613-925503ccafd6/docs/register/README.md (about)

     1  # Registering Runners
     2  
     3  Registering a Runner is the process that binds the Runner with a AlloyCI instance.
     4  
     5  ## Prerequisites
     6  
     7  Before registering a Runner, you need to first:
     8  
     9  - [Install it](../install/README.md) on a server separate than where AlloyCI
    10    is installed on
    11  - [Obtain a token](https://docs.alloy.com/ce/ci/runners/) for a shared or
    12    specific Runner via AlloyCI's interface
    13  
    14  ## GNU/Linux
    15  
    16  To register a Runner under GNU/Linux:
    17  
    18  1. Run the following command:
    19  
    20      ```sh
    21      sudo alloy-runner register
    22      ```
    23  
    24  1. Enter your AlloyCI instance URL:
    25  
    26      ```
    27      Please enter the coordinator URL (e.g. https://alloy-ci.com )
    28      https://alloy-ci.com
    29      ```
    30  
    31  1. Enter the token you obtained to register the Runner:
    32  
    33      ```
    34      Please enter the token for this runner
    35      xxx
    36      ```
    37  
    38  1. Enter a description for the Runner:
    39  
    40      ```
    41      Please enter the description for this runner
    42      [hostame] my-runner
    43      ```
    44  
    45  1. Enter the [tags associated with the Runner][tags], you can change this later in AlloyCI's UI:
    46  
    47      ```
    48      Please enter the tags for this runner (comma separated):
    49      my-tag,another-tag
    50      ```
    51  
    52  1. Choose whether the Runner should pick up jobs that do not [have tags][tags],
    53     you can change this later in AlloyCI's UI (defaults to false):
    54  
    55      ```
    56      Whether to run untagged jobs [true/false]:
    57      [false]: true
    58      ```
    59  
    60  1. Choose whether to lock the Runner to the current project, you can change
    61     this later in AlloyCI's UI. Useful when the Runner is specific (defaults to
    62     true):
    63  
    64      ```
    65      Whether to lock Runner to current project [true/false]:
    66      [true]: true
    67      ```
    68  
    69  1. Enter the [Runner executor](../executors/README.md):
    70  
    71      ```
    72      Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
    73      docker
    74      ```
    75  
    76  1. If you chose Docker as your executor, you'll be asked for the default
    77     image to be used for projects that do not define one in `.alloy-ci.json`:
    78  
    79      ```
    80      Please enter the Docker image (eg. ruby:2.1):
    81      alpine:latest
    82      ```
    83  
    84  ## macOS
    85  
    86  To register a Runner under macOS:
    87  
    88  1. Run the following command:
    89  
    90      ```sh
    91      sudo alloy-runner register
    92      ```
    93  
    94  1. Enter your AlloyCI instance URL:
    95  
    96      ```
    97      Please enter the coordinator URL (e.g. https://alloy-ci.com )
    98      https://alloy-ci.com
    99      ```
   100  
   101  1. Enter the token you obtained to register the Runner:
   102  
   103      ```
   104      Please enter the token for this runner
   105      xxx
   106      ```
   107  
   108  1. Enter a description for the Runner:
   109  
   110      ```
   111      Please enter the description for this runner
   112      [hostame] my-runner
   113      ```
   114  
   115  1. Enter the [tags associated with the Runner][tags], you can change this later in AlloyCI's UI:
   116  
   117      ```
   118      Please enter the tags for this runner (comma separated):
   119      my-tag,another-tag
   120      ```
   121  
   122  1. Choose whether the Runner should pick up jobs that do not [have tags][tags],
   123     you can change this later in AlloyCI's UI (defaults to false):
   124  
   125      ```
   126      Whether to run untagged jobs [true/false]:
   127      [false]: true
   128      ```
   129  
   130  1. Choose whether to lock the Runner to the current project, you can change
   131     this later in AlloyCI's UI. Useful when the Runner is specific (defaults to
   132     true):
   133  
   134      ```
   135      Whether to lock Runner to current project [true/false]:
   136      [true]: true
   137      ```
   138  
   139  1. Enter the [Runner executor](../executors/README.md):
   140  
   141      ```
   142      Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
   143      docker
   144      ```
   145  
   146  1. If you chose Docker as your executor, you'll be asked for the default
   147     image to be used for projects that do not define one in `.alloy-ci.json`:
   148  
   149      ```
   150      Please enter the Docker image (eg. ruby:2.1):
   151      alpine:latest
   152      ```
   153      **Note** _[be sure Docker.app is installed on your mac](https://docs.docker.com/docker-for-mac/install/)_
   154  
   155  ## Windows
   156  
   157  To register a Runner under Windows:
   158  
   159  1. Run the following command:
   160  
   161      ```sh
   162      sudo alloy-runner register
   163      ```
   164  
   165  1. Enter your AlloyCI instance URL:
   166  
   167      ```
   168      Please enter the coordinator URL (e.g. https://alloy-ci.com )
   169      https://alloy-ci.com
   170      ```
   171  
   172  1. Enter the token you obtained to register the Runner:
   173  
   174      ```
   175      Please enter the token for this runner
   176      xxx
   177      ```
   178  
   179  1. Enter a description for the Runner:
   180  
   181      ```
   182      Please enter the description for this runner
   183      [hostame] my-runner
   184      ```
   185  
   186  1. Enter the [tags associated with the Runner][tags], you can change this later in AlloyCI's UI:
   187  
   188      ```
   189      Please enter the tags for this runner (comma separated):
   190      my-tag,another-tag
   191      ```
   192  
   193  1. Choose whether the Runner should pick up jobs that do not [have tags][tags],
   194     you can change this later in AlloyCI's UI (defaults to false):
   195  
   196      ```
   197      Whether to run untagged jobs [true/false]:
   198      [false]: true
   199      ```
   200  
   201  1. Choose whether to lock the Runner to the current project, you can change
   202     this later in AlloyCI's UI. Useful when the Runner is specific (defaults to
   203     true):
   204  
   205      ```
   206      Whether to lock Runner to current project [true/false]:
   207      [true]: true
   208      ```
   209  
   210  1. Enter the [Runner executor](../executors/README.md):
   211  
   212      ```
   213      Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
   214      docker
   215      ```
   216  
   217  1. If you chose Docker as your executor, you'll be asked for the default
   218     image to be used for projects that do not define one in `.alloy-ci.json`:
   219  
   220      ```
   221      Please enter the Docker image (eg. ruby:2.1):
   222      alpine:latest
   223      ```
   224  
   225  If you'd like to register multiple Runners on the same machine with different
   226  configurations repeat the `./alloy-runner.exe register` command.
   227  
   228  ## FreeBSD
   229  
   230  To register a Runner under FreeBSD:
   231  
   232  1. Run the following command:
   233  
   234      ```sh
   235      sudo -u alloy-runner -H /usr/local/bin/alloy-runner register
   236      ```
   237  
   238  1. Enter your AlloyCI instance URL:
   239  
   240      ```
   241      Please enter the coordinator URL (e.g. https://alloy-ci.com )
   242      https://alloy-ci.com
   243      ```
   244  
   245  1. Enter the token you obtained to register the Runner:
   246  
   247      ```
   248      Please enter the token for this runner
   249      xxx
   250      ```
   251  
   252  1. Enter a description for the Runner:
   253  
   254      ```
   255      Please enter the description for this runner
   256      [hostame] my-runner
   257      ```
   258  
   259  1. Enter the [tags associated with the Runner][tags], you can change this later in AlloyCI's UI:
   260  
   261      ```
   262      Please enter the tags for this runner (comma separated):
   263      my-tag,another-tag
   264      ```
   265  
   266  1. Choose whether the Runner should pick up jobs that do not [have tags][tags],
   267     you can change this later in AlloyCI's UI (defaults to false):
   268  
   269      ```
   270      Whether to run untagged jobs [true/false]:
   271      [false]: true
   272      ```
   273  
   274  1. Choose whether to lock the Runner to the current project, you can change
   275     this later in AlloyCI's UI. Useful when the Runner is specific (defaults to
   276     true):
   277  
   278      ```
   279      Whether to lock Runner to current project [true/false]:
   280      [true]: true
   281      ```
   282  
   283  1. Enter the [Runner executor](../executors/README.md):
   284  
   285      ```
   286      Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
   287      docker
   288      ```
   289  
   290  1. If you chose Docker as your executor, you'll be asked for the default
   291     image to be used for projects that do not define one in `.alloy-ci.json`:
   292  
   293      ```
   294      Please enter the Docker image (eg. ruby:2.1):
   295      alpine:latest
   296      ```
   297  
   298  ## Docker
   299  
   300  To register a Runner using a Docker container:
   301  
   302  1. Run the following command:
   303  
   304      ```sh
   305      docker exec -it alloy-runner alloy-runner register
   306      ```
   307  
   308  1. Enter your AlloyCI instance URL:
   309  
   310      ```
   311      Please enter the coordinator URL (e.g. https://alloy-ci.com )
   312      https://alloy-ci.com
   313      ```
   314  
   315  1. Enter the token you obtained to register the Runner:
   316  
   317      ```
   318      Please enter the token for this runner
   319      xxx
   320      ```
   321  
   322  1. Enter a description for the Runner:
   323  
   324      ```
   325      Please enter the description for this runner
   326      [hostame] my-runner
   327      ```
   328  
   329  1. Enter the [tags associated with the Runner][tags], you can change this later in AlloyCI's UI:
   330  
   331      ```
   332      Please enter the tags for this runner (comma separated):
   333      my-tag,another-tag
   334      ```
   335  
   336  1. Choose whether the Runner should pick up jobs that do not [have tags][tags],
   337     you can change this later in AlloyCI's UI (defaults to false):
   338  
   339      ```
   340      Whether to run untagged jobs [true/false]:
   341      [false]: true
   342      ```
   343  
   344  1. Choose whether to lock the Runner to the current project, you can change
   345     this later in AlloyCI's UI. Useful when the Runner is specific (defaults to
   346     true):
   347  
   348      ```
   349      Whether to lock Runner to current project [true/false]:
   350      [true]: true
   351      ```
   352  
   353  1. Enter the [Runner executor](../executors/README.md):
   354  
   355      ```
   356      Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
   357      docker
   358      ```
   359  
   360  1. If you chose Docker as your executor, you'll be asked for the default
   361     image to be used for projects that do not define one in `.alloy-ci.json`:
   362  
   363      ```
   364      Please enter the Docker image (eg. ruby:2.1):
   365      alpine:latest
   366      ```
   367  
   368  [tags]: https://docs.alloy.com/ce/ci/runners/#using-tags