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.
-
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
-
Install requirements (e.g., virtualenv with ansible):
./setup.sh
Azure Batch¶
-
Log on to the Azure console using the credentials here.
-
Go to the Batch account
clwsbatchaccount
. -
Select
Pools
and ensure there are four Batch Pools shown on the page:dev-cpu-pool
,dev-gpu-pool
,prod-cpu-pool
, andprod-gpu-pool
. If any of them are missing, create a new Batch pool by following the instructions here. -
Select
Jobs
and ensure there are four Batch Jobs shown on the page:dev-cpu
,dev-gpu
,prod-cpu
andprod-gpu
. If any of them are missing, create a new Batch job by following the instructions here.
Test all code locally¶
-
Checkout the
master
branch. -
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 intomaster
. (Ping members to approve) The commit message should beBump 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 updatecommon.py
,constants.js
,setup.py
andREST-API-Reference.md
) -
Build and start an instance locally.
python3.6 codalab_service.py start -bd
-
Make sure all tests pass.
python3.6 test_runner.py default
-
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.
-
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.
- Use the latest released