CLI client tool for deploying workloads to Racetrack
Project description
Racetrack client context
racetrack-client
is a CLI client tool for deploying workloads to Racetrack (IKP-RT).
Racetrack system allows to deploy jobs in a one step. It transforms your code to in-operation workloads, e.g. Kubernetes workloads. You write some code according to a set of coventions, you include the manifest file which explains the code, and you submit it to Racetrack. A short while after, the service calling your code is in operation.
Quickstart
- Install
racetrack
client:pip3 install racetrack-client
- Configure access token to your git repository:
racetrack config set-credentials REPO_URL USERNAME TOKEN
- Deploy your job to Racetrack:
racetrack deploy . https://racetrack.example.com/ikp-rt/lifecycle
- You will see the URL of your deployed job in the output.
Installation
Install racetrack-client using pip:
pip3 install racetrack-client
Python 3.8+ is required. So if you have any troubles, try with:
sudo apt install python3.8 python3.8-dev python3.8-venv
python3.8 -m pip install racetrack-client
This will install racetrack
CLI tool. Verify installation by running racetrack
.
Usage
Run racetrack --help
to see usage.
Deploying
To deploy a job, just run in the place where fatman.yaml
is located:
racetrack deploy . https://racetrack.example.com/ikp-rt/lifecycle
racetrack deploy [WORKDIR] [LIFECYCLE_URL]
has 2 optional arguments:
WORKDIR
- a place where thefatman.yaml
is, by default it's current directoryLIFECYCLE_URL
- URL address to Lifecycle API-server, where a job should be deployed. If not given, it will be deployed to a URL configured in a local client config, by default it's set to a local cluster athttp://127.0.0.1:7002
.
Local client configuration
If you want to update client configuration (namely persist some preferences for later use), use the following command:
racetrack config set [CONFIG_NAME] [VALUE]
Local client configuration is stored at ~/.racetrack/config.yaml
.
Configuring default Racetrack URL
You can set default Racetrack URL address:
racetrack config set lifecycle_api_url https://racetrack.example.com/ikp-rt/lifecycle
Then you can run just racetrack deploy
command (without LIFECYCLE_URL
argument), lifecycle_url will be inferred from client configuration.
Private Job repositories
Before building & deploying a Job stored in a private git repository, you should make sure that Racetrack has access to it. Add git credentials to access your repository using command:
racetrack config set-credentials REPO_URL USERNAME TOKEN
REPO_URL
can be a full URL of a git remote (eg. https://gitlab.com/git/namespace/ikp-rt) or a general domain name (eg. https://gitlab.com) if you want to use same token for all repositories from there.USERNAME
is your git account usernameTOKEN
is a password to read from your repository. Use access tokens withread_repository
scope instead of your real password! Here's how to create personal access token in Gitlab
Development setup
Clone IKP-RT repository and run it inside this directory:
make setup
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file racetrack-client-0.0.4.tar.gz
.
File metadata
- Download URL: racetrack-client-0.0.4.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18bf32aec9c1e5f3c7b84350c6085067ba99be5244930298994f54eb9d587fb5 |
|
MD5 | 004cfd06895bd12bb6b9193d8867c807 |
|
BLAKE2b-256 | ae8a2c34bb8fec09426f9584b1dca5169b7cca2cc191f7498ad8be05bab448e6 |
File details
Details for the file racetrack_client-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: racetrack_client-0.0.4-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfc96cec8e8d9171b67d457c64091fd3ce5664e90403ebc397601bf5eacbfaf |
|
MD5 | e2edc087d3da965ff49a566a433bccaa |
|
BLAKE2b-256 | 73b75739d451d6e3a7a7891362309d22813e0eacf2ec0ffe7366fc1a6c88a34b |