GitLab CI Module - Kate Grechishkina

Tackle stage 1 first and the last stage last, but the others can be completed in any order you prefer.

Goal of this checklist: Set a clear path for GitLab-CI training

Stage 1: Commit and Become familiar with what GitLab CI is

  • Done with Stage 1
  1. Ping your manager on the issue to notify them you have started @rspainhower, trainer - @atanayno
  2. Commit to this by notifying the current experts that they can start routing non-technical GitLab CI questions to you
  3. Commit to this by adding yourself to the knowledge areas page.
  4. GitLab University
    1. Getting started with GitLab and GitLab CI. Read the articles from Introduction to GitLab CI/CD section.
    2. The Basics of GitLab CI
    3. Continuous Integration, Delivery, and Deployment with GitLab
    4. 10 Things to Know About GitLab CI
    5. GitLab Container Registry
    6. GitLab & Docker - Recording
  5. CI Training Video by Jose Tores - Slides - Example App
  6. CI Backend Architecture walkthrough video | Diagram - watch to learn how everything connects together.

Stage 2: Basic CI

  • Done with Stage 2
  1. Read the Table Of Contents for the .gitlab-ci.yml docs and make sure you know the meaning of every heading.
  2. Set up a repository on GitLab.com and create a .gitlab-ci.yml file to get a pipeline running using the free shared runners on GitLab.com (this can be a basic toy project).
  3. Note that your builds may show as Pending until a shared runner becomes available (the next step will solve this).
  4. Install your own Runner (locally or hosted somewhere) following the Setup Instructions
  5. Read about the different Executors
  6. Register your runner as a Specific Runner on your project, and test that it now runs the builds for your project.
  7. Create an example project on your own GitLab instance.
  8. Register a shared runner on your GitLab instance and make sure it can successfully run the build for your project.
  9. Optional, for GitLab.com: Watch this video on ways to troubleshoot runner on GitLab.com. Refer to this issue for questions and links. Note: As it was recorded August 2018, some links may be out of date.

Stage 3: Intermediate CI

  • Done with Stage 3
  1. Read about Pipelines and Jobs.

  2. Check how to see the status of Pipeline and Jobs.

  3. Read about using Docker Images with GitLab CI.

  4. Register a Docker Runner and change your .gitlab-ci.yml to use a Docker image for your language of choice.

  5. Read about Artifacts.

  6. Change .gitlab-ci.yml to create artifacts.

  7. Set the Maximum Artifacts size in Admin and create artifacts above the limit, then check the build log for errors.

    ERROR: Uploading artifacts as "archive" to coordinator... too large archive id=247 responseStatus=413 Request Entity Too Large status=413 token=A3F5U24S

    https://cos7ob.kate.gitlab.support/kate/ci-module-tests/-/pipelines/106

  8. Read about Multi-project pipelines.

  9. Change your .gitlab-ci.yml to trigger a pipeline in another project.

    https://cos7ob.kate.gitlab.support/kate/ci-module-tests/-/pipelines/108

  10. Review the Runner Troubleshooting guide and try to reproduce issues where possible.

    1. https://docs.gitlab.com/runner/faq/#enable-debug-mode-logging-in-configtoml

    2. https://docs.gitlab.com/runner/faq/#im-seeing-x509-certificate-signed-by-unknown-authority

      [root@kate-cos8runner khrechyshkina]# gitlab-runner register Runtime platform                                 arch=amd64 os=linux pid=201829 revision=e95f89a0 version=13.4.1
      Running in system-mode.                            
                                                
      Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
      https://kategrechishkina-gitlab-1.sr.gitlab.support/
      Please enter the gitlab-ci token for this runner:
      Q_s_6c7supti9YxAuprS
      Please enter the gitlab-ci description for this runner:
      [kate-cos8runner]: 
      Please enter the gitlab-ci tags for this runner (comma separated):
      
      ERROR: Registering runner... failed                 runner=Q_s_6c7s status=couldn't execute POST against https://kategrechishkina-gitlab-1.sr.gitlab.support/api/v4/runners: Post https://kategrechishkina-gitlab-1.sr.gitlab.support/api/v4/runners: x509: certificate signed by unknown authority
      PANIC: Failed to register this runner. Perhaps you are having network problems 
  11. Read the rest of the GitLab CI Documentation.

  12. Set up a project with a basic web application that has some tests. Your CI script should deploy it to Heroku automatically when all the tests pass.

Pipeline: https://cos7ob.kate.gitlab.support/kate/ci-module-stage3-12/-/pipelines/177

Application: https://khrechyshkina-ruby-test-app.herokuapp.com/

  1. Create a basic GitLab Pages project on GitLab.com and make sure the CI script builds it and that the website is visible afterwards.

Stage 4: Advanced CI

Please ensure that you review with your trainer/manager if they would like you to do all the tasks in this stage.

  • Done with Stage 4
  1. Set up a container registry for your project.

  2. Build a Docker image and upload it to the project registry as part of the CI pipeline.

  3. Add or integrate a Kubernetes cluster to your project.

  4. Deploy your application to Kubernetes via GitLab CI using the Docker container you built. One option is to customize the Auto DevOps template.

  5. Set up Review Apps to be deployed to Kubernetes.

  6. Create a custom image to speed up your build times by having the dependencies pre-installed (the same way it is done for GitLab CE and EE). See it in action on the first line here.

  7. Set up a manual deploy step, so that it does not deploy to production unless someone clicks the button to do so.

    image

  8. Speed up a pipeline using caching.

Stage 5: Tickets

  • Done with Stage 5
  1. Answer 20 GitLab CI tickets and paste the links here, even if a ticket seems too advanced for you to answer. Find the answers from an expert and relay it to the customer.

    1. https://gitlab.zendesk.com/agent/tickets/183358
    2. https://gitlab.zendesk.com/agent/tickets/183768 - this one is mostly about npm registry but it touched on CI as well.
    3. https://gitlab.zendesk.com/agent/tickets/182472
    4. https://gitlab.zendesk.com/agent/tickets/183814
    5. https://gitlab.zendesk.com/agent/tickets/184573
    6. https://gitlab.zendesk.com/agent/tickets/185252
    7. https://gitlab.zendesk.com/agent/tickets/183961
    8. https://gitlab.zendesk.com/agent/tickets/186106
    9. https://gitlab.zendesk.com/agent/tickets/185923 - it is more of a runner issue
    10. https://gitlab.zendesk.com/agent/tickets/184925
    11. https://gitlab.zendesk.com/agent/tickets/187166
    12. https://gitlab.zendesk.com/agent/tickets/187457
    13. https://gitlab.zendesk.com/agent/tickets/187565
    14. https://gitlab.zendesk.com/agent/tickets/188911
    15. https://gitlab.zendesk.com/agent/tickets/188985
    16. https://gitlab.zendesk.com/agent/tickets/189487
    17. https://gitlab.zendesk.com/agent/tickets/188966
    18. https://gitlab.zendesk.com/agent/tickets/188995
    19. https://gitlab.zendesk.com/agent/tickets/190362
    20. https://gitlab.zendesk.com/agent/tickets/190033

Stage 6: Pair on Customer Calls

  • Done with Stage 6
  1. Participate on two customer calls regarding Sales or Troubleshooting GitLab CI.
    1. call with Shekhar Aryal - https://gitlab.zendesk.com/agent/tickets/193905
    2. call with ___

Final Stage

  1. Have your trainer and manager review this issue.
  2. Manager: Have a CI expert in Support review 5-7 of the tickets from Stage 5 and report back to you on whether sufficient CI knowledge has been demonstrated.
  3. Manager: schedule a call (or integrate into 1:1) to review how the module went once you have reviewed this issue.
  4. Submit a MR to declare yourself a CI Expert on the team page.
Edited by Kate Grechishkina