Skip to content

Deployment Prerequisites

Cloud accounts

Instance Microsoft Azure Google Cloud Platform
worksheets.codalab.org CodaLab Sponsorship -
codalab.stanford.edu CodaLab Sponsorship hai-gcp-models

Ensure tools are installed (one-time setup)

If this is your first time, you'll need to install the right tools.

  1. Install the Azure CLI: main install page. This will give you the az terminal command to manipulate the Azure VMs. Make sure you're logged into Azure:

    az login         # see certs/credentials.txt for Azure login with codalab.worksheets@gmail.com
    az account list  # should show a8d074bb-feef-44b7-8c1e-ac2aaa3276a3
    
  2. Install requirements (e.g., virtualenv with ansible):

    ./setup.sh
    

Azure Batch

  1. Log on to the Azure console using the credentials here.

  2. Go to the Batch account clwsbatchaccount.

  3. Select Pools and ensure there are four Batch Pools shown on the page: dev-cpu-pool, dev-gpu-pool, prod-cpu-pool, and prod-gpu-pool. If any of them are missing, create a new Batch pool by following the instructions here.

  4. Select Jobs and ensure there are four Batch Jobs shown on the page: dev-cpu, dev-gpu,prod-cpu and prod-gpu. If any of them are missing, create a new Batch job by following the instructions here.

Test all code locally

  1. Checkout the master branch.

  2. Ensure the version is higher than the latest release. If not, change all instances of CODALAB_VERSION = ... in the code and create a PR to merge into master. (Ping members to approve) The commit message should be Bump to <new version>. In addition, search the codebase for <old version> (e.g. 0.5.10) in the codebase (for example, in Visual Studio Code you can do ctrl/cmd+shift+F to search the whole codebase) to make sure you updated all places. (As of 03/17/2020, you should update common.py, constants.js, setup.py and REST-API-Reference.md)

  3. Build and start an instance locally.

    python3.6 codalab_service.py start -bd
    
  4. Make sure all tests pass.

    python3.6 test_runner.py default
    
  5. Test it manually (extra sanity check).

    • Play around with the interface: click around some worksheets, upload a bundle, run a bundle, etc.
    • Play around with the CLI: try some cl commands.
  6. Note any backward incompatibilities.

    • Use the latest released cl that's installed from the PyPI (pip install codalab) and hit the new server (cl work localhost::).
    • If there are any problems, raise the issue to the team to discuss what action to take.