https://github.com/getindata/streaming-cli
Python CLI for streaming platform
https://github.com/getindata/streaming-cli
Last synced: 9 months ago
JSON representation
Python CLI for streaming platform
- Host: GitHub
- URL: https://github.com/getindata/streaming-cli
- Owner: getindata
- License: apache-2.0
- Created: 2021-11-17T10:54:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T13:25:37.000Z (almost 3 years ago)
- Last Synced: 2025-04-09T20:11:26.305Z (about 1 year ago)
- Language: Python
- Size: 457 KB
- Stars: 5
- Watchers: 12
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/getindata/streaming-cli)
[](https://opensource.org/licenses/Apache-2.0)
[](https://semver.org/)
[](https://pypi.org/project/streamingcli/)
[](https://pepy.tech/badge/streamingcli)
# Streaming platform CLI
## Usage
### Platform operations
#### Environments
You can set up your own environment, which will allow you to connect to Ververica/K8S operator. You need to fill
properties within `config/` directory. `config/flink_deployment.yml` is default deployment descriptor file
for each environment (you can overwrite it using `--file-descriptor-path` flag). You can use jinja for templating
(look at the tests for an example). `base` environment is the default environment. Others environment override
parameters from `base`. You need to have in `base` or your own environment `profile.yml`
file with given schema:
```yaml
deployment_mode:
docker_registry_url:
```
You need also extra file(s) with Ververica/Kubernetes configuration
and optionally other configuration used for templating.
Example `vvp.yml`:
```yaml
vvp:
url:
namespace:
deployment_target:
```
Example `k8s.yml`:
```yaml
k8s:
namespace: test_ns
```
For most of the command, you can pass the environment name with `--env`
or export environmental variable as `SCLI_ENV`.
#### Deploying job
```shell
scli project deploy \
--vvp-api-token "x§11d091jd1jd9jasd0j" \
--docker-image-tag "${CI_COMMIT_TAG}" \
--profile "dev"
```
#### Building job Docker image
```shell
scli project build \
--docker-image-tag "latest"
```
#### Logging to Docker repository
```shell
scli docker login \
--username "user" \
--password "password" \
--profile "dev"
```
> Parameters`--docker-image-tag` is optional and has default value `latest`.
### Providing certificates
Scli uses `requests` library to deploy jobs to Ververica Platform via REST Api. Currently `requests` does not support
automatic downloading of intermediate certificates so entire chain of certificates should be present before making
a http call
example:
```sh
sh -c 'CA_CERT_PATH=`python3 -c "import requests; print(requests.certs.where())"`;for CERT in certs/*; do cat ${CERT}; done >> ${CA_CERT_PATH}';
```
### Project operations
## SCLI Development
### Prerequisities ##
* `pipenv`
### Build
* `make setup` - Install dependencies required to build a wheel package
* `make cli/package` - Create a wheel package
### Install
* `make cli/install` - Install a wheel package
* `make cli/install/force` - Reinstall a wheel package