Skip to content
Snippets Groups Projects

Document setting up GitLab Runner against a GDK-supervised GitLab

All threads resolved!

Closes #144 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • This is very nice @nick.thomas . Do you think it would make sense to factor out the 'set up GDK' bits and view it more as 'turn working GDK installation into a CI test rig'?

    • bind to 0.0.0.0
    • find the right IP and verify it (great that you go into this, this is not obvious unless you have done it before)
    • proceed with steps to get runner hooked up
  • Achilleas Pipinellis Marked this merge request as a Work In Progress

    Marked this merge request as a Work In Progress

  • Awesome! I'm gonna try this soon :) I marked this as a WIP for the time being.

  • Nick Thomas Added 1 commit:

    Added 1 commit:

    • 23087d76 - Update runner documentation to use the GDK gem
  • Nick Thomas Added 1 commit:

    Added 1 commit:

    • d1a6fa0c - Remove repetition of GDK setup procedure
  • @axil since you marked this WIP I am going to assign it to you too.

    Thanks for the changes @nick.thomas

  • Reassigned to @axil

  • since you marked this WIP I am going to assign it to you too.

    @jacobvosmaer-gitlab Hahaha, well played 😄 I'll take a look thanks.

  • Nick Thomas Added 1 commit:

    Added 1 commit:

    • 45903fa3 - Clarify the GitLab Runner config file location, some more notes.
  • Author Maintainer

    @axil one more look?

  • Nick Thomas Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • @nick.thomas where are we on this? What is the next step?

  • Author Maintainer

    @jacobvosmaer-gitlab I made the requested changes; it's waiting for review from @axil, I think we both forgot about it.

    From my perspective, this is ready to be merged.

  • I'll take a look and test tomorrow :)

  • Achilleas Pipinellis
  • @nick.thomas woot! It works! I registered successfully and could pick up a build! But, I then got

    fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@192.168.2.11:3000/root/test2.git/': Failed to connect to 192.168.2.11 port 3000: Connection refused

    what could cause this? I ran the build in a public project. Tried with specific and shared runners, with and without sudo.

    Maybe we should put this in a troubleshooting section :)

    Output from debug:

    Using Docker executor with image alpine:latest ...  build=1123 project=12 runner=3c935d78
    Applying docker.Client transport fix: &{false 0xc420019a10 <nil> 0xc42001b0e0 unix:///var/run/docker.sock 0xc42017ff80 0xc420198ae0 [1 18] [] [] <nil>}  host=unix:///var/run/docker.sock
    Creating build volume...                            build=1123 project=12 runner=3c935d78
    Using container e7df62c210a17f28e6fdbfeb6ca3d31f2023ff6b2ed664098d7a9c29a372036f as cache /builds/root ...  build=1123 project=12 runner=3c935d78
    Creating services...                                build=1123 project=12 runner=3c935d78
    Creating user-defined volumes...                    build=1123 project=12 runner=3c935d78
    Using container 590ef55e4b7afa1f84eb6ab79d2a003d5a33ce292e3ece2d29331a5e4d19f153 as cache /cache ...  build=1123 project=12 runner=3c935d78
    Starting Docker command...                          build=1123 project=12 runner=3c935d78
    Looking for prebuilt image gitlab-runner-prebuilt-x86_64:HEAD ...  build=1123 project=12 runner=3c935d78
    Looking for image sha256:bdeaf7d4249d5ba395eaf1c07f4b7451f2e64f4db30c730bae7ebdfc40068ec3 ...  build=1123 project=12 runner=3c935d78
    Removed container runner-3c935d78-project-12-concurrent-0-predefined with No such container: runner-3c935d78-project-12-concurrent-0-predefined  build=1123 project=12 runner=3c935d78
    Creating container runner-3c935d78-project-12-concurrent-0-predefined ...  build=1123 project=12 runner=3c935d78
    Looking for image alpine:latest ...                 build=1123 project=12 runner=3c935d78
    Pulling docker image alpine:latest ...              build=1123 project=12 runner=3c935d78
    Using axil to connect to https://index.docker.io/v1/ in order to resolve alpine:latest ...  build=1123 project=12 runner=3c935d78
    Removed container runner-3c935d78-project-12-concurrent-0-build with No such container: runner-3c935d78-project-12-concurrent-0-build  build=1123 project=12 runner=3c935d78
    Creating container runner-3c935d78-project-12-concurrent-0-build ...  build=1123 project=12 runner=3c935d78
    Feeding runners to channel                          builds=1
    WARNING: No TLS connection state                  
    Submitting build to coordinator... ok               build=1123 runner=3c935d78
    Appending trace to coordinator... ok                build=1123 build-log=0-169 build-status=running code=202 runner=3c935d78 sent-log=0-169 status=202 Accepted
    Waiting for signals...                              build=1123 project=12 runner=3c935d78
    Executing on runner-3c935d78-project-12-concurrent-0-predefined the set -eo pipefail
    set +o noclobber
    : | eval $'echo "Running on $(hostname) via thedude..."\nexport CI=$\'true\'\nexport CI_BUILD_REF=$\'de149d8ed64c5babab7229892a1c0d72cc21ded0\'\nexport CI_BUILD_BEFORE_SHA=$\'de149d8ed64c5babab7229892a1c0d72cc21
    ded0\'\nexport CI_BUILD_REF_NAME=$\'master\'\nexport CI_BUILD_ID=1123\nexport CI_BUILD_REPO=$\'http://gitlab-ci-token:y-PiUj6wfZozYMW7sn9g@192.168.2.11:3000/root/test2.git\'\nexport CI_BUILD_TOKEN=$\'y-PiUj6wfZo
    zYMW7sn9g\'\nexport CI_PROJECT_ID=12\nexport CI_PROJECT_DIR=$\'/builds/root/test2\'\nexport CI_SERVER=$\'yes\'\nexport CI_SERVER_NAME=$\'GitLab CI\'\nexport CI_SERVER_VERSION=\'\'\nexport CI_SERVER_REVISION=\'\'
    \nexport GITLAB_CI=$\'true\'\nexport CI=$\'true\'\nexport GITLAB_CI=$\'true\'\nexport CI_BUILD_ID=1123\nexport CI_BUILD_TOKEN=$\'y-PiUj6wfZozYMW7sn9g\'\nexport CI_BUILD_REF=$\'de149d8ed64c5babab7229892a1c0d72cc2
    1ded0\'\nexport CI_BUILD_BEFORE_SHA=$\'de149d8ed64c5babab7229892a1c0d72cc21ded0\'\nexport CI_BUILD_REF_NAME=$\'master\'\nexport CI_BUILD_NAME=$\'pages\'\nexport CI_BUILD_STAGE=$\'deploy\'\nexport CI_SERVER_NAME=
    $\'GitLab\'\nexport CI_SERVER_VERSION=$\'8.13.0-pre\'\nexport CI_SERVER_REVISION=$\'d078779\'\nexport CI_PROJECT_ID=12\nexport CI_PROJECT_NAME=$\'test2\'\nexport CI_PROJECT_PATH=$\'root/test2\'\nexport CI_PROJEC
    T_NAMESPACE=$\'root\'\nexport CI_PROJECT_URL=$\'http://192.168.2.11:3000/root/test2\'\nexport CI_PIPELINE_ID=66\nexport CI_RUNNER_ID=1\nexport CI_RUNNER_DESCRIPTION=$\'gdk\'\nexport CI_RUNNER_TAGS=$\'docker\'\ne
    xport CI_REGISTRY=$\'example.com\'\nexport CI_REGISTRY_IMAGE=$\'example.com/root/test2\'\nexport GITLAB_USER_ID=1\nexport GITLAB_USER_EMAIL=$\'admin@example.com\'\nif [[ -d "/builds/root/test2/.git" ]]; then\n  
    echo $\'\\x1b[32;1mFetching changes...\\x1b[0;m\'\n  $\'cd\' "/builds/root/test2"\n  $\'git\' "config" "fetch.recurseSubmodules" "false"\n  $\'rm\' "-f" ".git/index.lock"\n  $\'git\' "clean" "-ffdx"\n  $\'git\' 
    "reset" "--hard"\n  $\'git\' "remote" "set-url" "origin" "http://gitlab-ci-token:y-PiUj6wfZozYMW7sn9g@192.168.2.11:3000/root/test2.git"\n  $\'git\' "fetch" "origin" "--prune" "+refs/heads/*:refs/remotes/origin/*
    " "+refs/tags/*:refs/tags/*"\nelse\n  $\'mkdir\' "-p" "/builds/root/test2.tmp/git-template"\n  $\'rm\' "-r" "-f" "/builds/root/test2"\n  $\'git\' "config" "-f" "/builds/root/test2.tmp/git-template/config" "fetch
    .recurseSubmodules" "false"\n  echo $\'\\x1b[32;1mCloning repository...\\x1b[0;m\'\n  $\'git\' "clone" "http://gitlab-ci-token:y-PiUj6wfZozYMW7sn9g@192.168.2.11:3000/root/test2.git" "/builds/root/test2" "--templ
    ate" "/builds/root/test2.tmp/git-template"\n  $\'cd\' "/builds/root/test2"\nfi\necho $\'\\x1b[32;1mChecking out de149d8e as master...\\x1b[0;m\'\n$\'git\' "checkout" "-q" "de149d8ed64c5babab7229892a1c0d72cc21ded
    0"\n'
      build=1123 project=12 runner=3c935d78
    Starting container 38e067fc9d03914d5fc2f00f69536861ace1070bd4e7430de87961b0a340da25 ...  build=1123 project=12 runner=3c935d78
    Attaching to container 38e067fc9d03914d5fc2f00f69536861ace1070bd4e7430de87961b0a340da25 ...  build=1123 project=12 runner=3c935d78
    Waiting for container 38e067fc9d03914d5fc2f00f69536861ace1070bd4e7430de87961b0a340da25 ...  build=1123 project=12 runner=3c935d78
    Container 38e067fc9d03914d5fc2f00f69536861ace1070bd4e7430de87961b0a340da25 finished with exit code 1  build=1123 project=12 runner=3c935d78
    WARNING: Build failed: exit code 1                  build=1123 project=12 runner=3c935d78
    WARNING: No TLS connection state                  
    Submitting build to coordinator... ok               build=1123 runner=3c935d78
    Removed container bfa5334fb38870202756ef0e917c3926f810fc5a700c052ac0b196beaa64d77d with <nil>  build=1123 project=12 runner=3c935d78
    Removed container 38e067fc9d03914d5fc2f00f69536861ace1070bd4e7430de87961b0a340da25 with <nil>  build=1123 project=12 runner=3c935d78
    Closed all idle connections for docker.Client: &{false 0xc420019b00 <nil> 0x288e020 unix:///var/run/docker.sock 0xc42017ff80 0xc420198ae0 [1 18] [1 24] [1 18] 0xc420019b30}
    WARNING: No TLS connection state                  
    Edited by Achilleas Pipinellis
  • Nick Thomas Added 77 commits:

    Added 77 commits:

    • 45903fa3...7daff8af - 76 commits from branch gitlab-org:master
    • 7160dd74 - Document setting up GitLab Runner against a GDK-supervised GitLab
  • Nick Thomas Added 1 commit:

    Added 1 commit:

    • 57f9911f - Document setting up GitLab Runner against a GDK-supervised GitLab
  • Author Maintainer

    @axil thanks for the review! I think I've addressed all comments.

    The issue you're seeing is that the "bind to all IPs on your machine" step hasn't worked properly. I'm unsure how you ended up in that situation - was gdk already running and hasn't been restarted? Is the host file not present?

    I've added notes inline for both situations; if you'd rather have it in troubleshooting, let me know and I'll change it.

  • Achilleas Pipinellis
  • The issue you're seeing is that the "bind to all IPs on your machine" step hasn't worked properly. I'm unsure how you ended up in that situation - was gdk already running and hasn't been restarted? Is the host file not present?

    @nick.thomas yeah, host is there and I see the Starting GitLab in /home/axil/git/gitlab/gdk/ce on port 0.0.0.0:3000 message when I start it. Still no luck. I'll investigate more later. I left one more comment to address and then we can merge :) https://gitlab.com/gitlab-org/gitlab-development-kit/merge_requests/177#note_16841092

  • Nick Thomas Resolved all discussions

    Resolved all discussions

  • Author Maintainer

    @axil another possibility is that 192.168.2.11 is the wrong IP - feel free to ping me on slack with ifconfig output if you continue to have no joy!

  • Achilleas Pipinellis Resolved all discussions

    Resolved all discussions

  • Achilleas Pipinellis Status changed to merged

    Status changed to merged

  • Mentioned in commit c3dd36fa

  • Thanks for being patient with my nitpicking @nick.thomas :)

  • Please register or sign in to reply
    Loading