github.com/ssube/gitlab-ci-multi-runner@v1.2.1-0.20160607142738-b8d1285632e6/docs/install/osx.md (about)

     1  ### Install on OSX
     2  
     3  (In the future there will be a brew package).
     4  
     5  Download the binary for your system:
     6  
     7  ```bash
     8  sudo curl --output /usr/local/bin/gitlab-ci-multi-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-darwin-amd64
     9  ```
    10  
    11  Give it permissions to execute:
    12  
    13  ```bash
    14  sudo chmod +x /usr/local/bin/gitlab-ci-multi-runner
    15  ```
    16  
    17  **The rest of commands execute as the user who will run the runner.**
    18  
    19  Register the runner:
    20  ```bash
    21  gitlab-ci-multi-runner register
    22  
    23  Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci )
    24  https://gitlab.com/ci
    25  Please enter the gitlab-ci token for this runner
    26  xxx
    27  Please enter the gitlab-ci description for this runner
    28  my-runner
    29  INFO[0034] fcf5c619 Registering runner... succeeded
    30  Please enter the executor: shell, docker, docker-ssh, ssh?
    31  docker
    32  Please enter the Docker image (eg. ruby:2.1):
    33  ruby:2.1
    34  INFO[0037] Runner registered successfully. Feel free to start it, but if it's
    35  running already the config should be automatically reloaded!
    36  ```
    37  
    38  Install runner as service and start it:
    39  
    40  ```bash
    41  cd ~
    42  gitlab-ci-multi-runner install
    43  gitlab-ci-multi-runner start
    44  ```
    45  
    46  Voila! Runner is installed and will be run after system reboot.
    47  
    48  ### Update
    49  
    50  Stop the service:
    51  
    52  ```bash
    53  gitlab-ci-multi-runner stop
    54  ```
    55  
    56  Download binary to replace runner's executable:
    57  
    58  ```bash
    59  curl -o /usr/local/bin/gitlab-ci-multi-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-darwin-amd64
    60  ```
    61  
    62  Give it permissions to execute:
    63  
    64  ```bash
    65  chmod +x /usr/local/bin/gitlab-ci-multi-runner
    66  ```
    67  
    68  Start the service:
    69  
    70  ```bash
    71  gitlab-ci-multi-runner start
    72  ```
    73  
    74  Make sure that you read the [FAQ](../faq/README.md) section which describes
    75  some of the most common problems with GitLab Runner.
    76  
    77  ### Limitations on OSX
    78  
    79  >**Note:**
    80  The service needs to be installed from the Terminal by running its GUI
    81  interface as your current user. Only then will you be able to manage the service.
    82  
    83  Currently, the only proven to work mode for OSX is running service in user-mode.
    84  
    85  Since the service will be running only when the user is logged in, you should
    86  enable auto-logging on your OSX machine.
    87  
    88  The service will be launched as one of `LaunchAgents`. By using `LaunchAgents`,
    89  the builds will be able to do UI interactions, making it possible to run and
    90  test on the iOS simulator.
    91  
    92  It's worth noting that OSX also has `LaunchDaemons`, the services running
    93  completely in background. `LaunchDaemons` are run on system startup, but they
    94  don't have the same access to UI interactions as `LaunchAgents`. You can try to
    95  run the Runner's service as `LaunchDaemon`, but this mode of operation is not
    96  currently supported.
    97  
    98  You can verify that the Runner created the service configuration file after
    99  executing the `install` command, by checking the
   100  `~user/Library/LaunchAgents/gitlab-runner.plist` file.
   101  
   102  ### Upgrade the service file
   103  
   104  In order to upgrade the `LaunchAgent` configuration, you need to uninstall and
   105  install the service:
   106  
   107  ```bash
   108  gitlab-ci-multi-runner uninstall
   109  gitlab-ci-multi-runner install
   110  gitlab-ci-multi-runner start
   111  ```