Skip to main content

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

  1. Install racetrack client: pip3 install racetrack-client
  2. Configure access token to your git repository: racetrack config credentials set REPO_URL USERNAME TOKEN
  3. Deploy your job to Racetrack: racetrack deploy . https://racetrack.example.com/ikp-rt/lifecycle
  4. 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] [RACETRACK_URL] has 2 optional arguments:

  • WORKDIR - a place where the fatman.yaml is, by default it's current directory
  • RACETRACK_URL - URL address to Racetrack 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 at http://127.0.0.1:7002.

Showing logs

To see recent logs from your Fatman output, run racetrack logs command:

racetrack logs . https://racetrack.example.com/ikp-rt/lifecycle

racetrack logs [WORKDIR] [RACETRACK_URL] has 2 arguments:

  • WORKDIR - a place where the fatman.yaml is, by default it's current directory
  • RACETRACK_URL - URL address to Racetrack server, where the Fatman is deployed.

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 racetrack_url https://racetrack.example.com/ikp-rt/lifecycle

Then you can run just racetrack deploy command (without RACETRACK_URL argument), racetrack_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 credentials set REPO_URL USERNAME TOKEN

Racetrack URL aliases

You can set up aliases for Racetrack server URL addresses by issuing command:

racetrack config alias set ALIAS RACETRACK_URL

If you operate with many environments, setting short names may come in handy. For instance:

racetrack config alias set dev https://dev.racetrack.example.com/ikp-rt/lifecycle
racetrack config alias set test https://test.racetrack.example.com/ikp-rt/lifecycle
racetrack config alias set prod https://prod.racetrack.example.com/ikp-rt/lifecycle
racetrack config alias set kind http://localhost:7002
racetrack config alias set compose http://localhost:7102

and then you can use your short names instead of full RACETRACK_URL address when calling racetrack deploy . dev.

Development setup

Clone IKP-RT repository and run it inside this directory:

make setup

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

racetrack-client-0.3.0.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

racetrack_client-0.3.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file racetrack-client-0.3.0.tar.gz.

File metadata

  • Download URL: racetrack-client-0.3.0.tar.gz
  • Upload date:
  • Size: 31.8 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

Hashes for racetrack-client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2a7702022ccc161f7151bea02496858d1ee23a09db936af687ecceb72fa47f3d
MD5 5e4366a84c205ff16e90e97193dea2af
BLAKE2b-256 9f47dca7fa91f46a32133b11eca083d26ad2b33e11f9e13d8fad0d20a6c4d8e2

See more details on using hashes here.

File details

Details for the file racetrack_client-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: racetrack_client-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 38.3 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

Hashes for racetrack_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6206f9eed0cf151ec37b208267c6e8b91fbd2a65c90f34d6194249ddf4fd4e9
MD5 78d621b1a9d27d4e90e8d1e7494b78fb
BLAKE2b-256 0828b64fe36c74b0f57afdbf1e16c9acd6780d220ea27a714c967a19cc79a087

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page