Metadata-Version: 2.4
Name: wos-deploy
Version: 2.1.0
Summary: Deploy and operate WOS server instances (ring, global, tick-quote add-on) with Docker Compose on published images
License-Expression: Apache-2.0
Keywords: wos,deployment,docker,docker-compose
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# wos-deploy

`wos-deploy` — create and operate WOS server instances with Docker Compose on published
`wos-prod-s*` images: a private ring, a global ring, or a tick-quote add-on (RFQ)
instance with an optional realtime CTP feeder.

## Requirements

- Python 3.9+ (the tool is stdlib-only)
- Docker Engine with the compose plugin (`docker compose`)
- Linux or macOS host, `x86_64` or `arm64`

## Install

```bash
pip install wos-deploy
wos-deploy --version
```

`wos` is installed as a short alias of `wos-deploy`; every command below works with either name.

## Quick start — a tick-quote add-on (RFQ) instance

```bash
wos-deploy setup-folder ./my-rfq --env prod --port-offset 37
cd my-rfq
wos-deploy setup-rfq -r --image-tag <tag-with-the-rfq-role>   # add --registry HOST:PORT for a private registry
wos-deploy deploy
wos-deploy config        # prints the storage-master and upload-web endpoints
```

`--image-tag` is required: there is no default tag, and only the tag you name is pulled.

With `--enable_ctp` (and `--enable_secondary` on an arm64 host) the realtime CTP feeder
runs on an x64 service with your own CTP account; the inputs are stored only in
`./rfq-ctp.env` (mode 0600). See `wos-deploy setup-rfq --help`.

## Quick start — a private ring

```bash
wos-deploy setup-folder ./my-ring --env prod --port-offset 3
cd my-ring
wos-deploy setup-private --wosgw <global-gateway-host>:<port> -r
wos-deploy deploy
```

## Commands

| Command | Description |
|---|---|
| `wos-deploy setup-folder <name>` | Create a deployment folder |
| `wos-deploy setup-private --wosgw H:P` | Configure a private ring (host arch auto-detected) |
| `wos-deploy setup-global` | Configure a global ring |
| `wos-deploy setup-rfq` | Configure a tick-quote add-on instance |
| `wos-deploy deploy [--skip-pull]` | Pull images and start services |
| `wos-deploy re-setup` | Regenerate an instance's generated layer |
| `wos-deploy restart [SERVICE]` | Restart services without reinitialising |
| `wos-deploy shutdown [SERVICE]` | Stop services |
| `wos-deploy status [-j]` | Container status |
| `wos-deploy logs [-f] [SERVICE]` | Service logs |
| `wos-deploy shell <SERVICE>` | Interactive shell in a container |
| `wos-deploy config` | Resolved configuration (secrets masked) |
| `wos-deploy rollback` | Return to the images of the previous deploy |
| `wos-deploy reset` | Remove containers, volumes and state |

## Building from source

```bash
./build.sh --wheel-only     # dist/wos_deploy-<version>-py3-none-any.whl + sdist
```

## Licence

Apache-2.0 (see `LICENSE`).
