scheduke: dockerize scheduling_service

Bug: b:260229970, b:279494971
Change-Id: I4e99b901cc6f829f4e000f3632ccc7a9b2981451
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/test-scheduling/scheduke/+/4535097
Reviewed-by: Derek Beckett <dbeckett@chromium.org>
Tested-by: Jard Loucks <jaredloucks@google.com>
Reviewed-by: Steve Van Der Hoeven <svdh@google.com>
Commit-Queue: Jard Loucks <jaredloucks@google.com>
8 files changed
tree: 50c9344161cde5bd6f8130895404e558b3cb4387
  1. kuota/
  2. request_puller/
  3. scheduling_service/
  4. simulator/
  5. .gitignore
  6. .style.yapf
  7. DIR_METADATA
  8. docker_build
  9. docker_debug
  10. docker_run
  11. Dockerfile.scheduling_service
  12. OWNERS
  13. PRESUBMIT.py
  14. README.md
  15. run_go_unittests.sh
  16. run_simulator_v2.py
README.md

Introduction

Scheduke is the build task scheduler for Chromium OS infrastructure.

Currently this repository contains the scheduling simulator code in simulator/ and scheduler/

Install

This project requires the following python packages:

  • yapf
  • sortedcontainers
  • fnvhash

Common issues

Missing yapf style

If you encounter an issue similar to this:

  File "*/yapf/yapflib/style.py", line 680, in _CreateStyleFromConfigParser
    base_style = _STYLE_NAME_TO_FACTORY[based_on]()
KeyError: 'yapf'

You'll need to update your yapf version to the latest, or at least 0.31 or later. Note that there might be another copy of yapf in depot_tools and the depot_tools should be updated as well.

Run the scheduling service locally

  • Set up sudoless docker if you haven‘t--it’s required for gcloud and docker to work together.

  • Build the image

    ./docker_build
    
  • Launch a container with the image

    ./docker_run
    
    • To send a request to the container
      curl localhost:8080/device_event
      
  • To open a shell into the image

    ./docker_debug