[![Python Version](https://img.shields.io/badge/python-3.8-blue.svg)](https://github.com/getindata/streaming-cli)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![SemVer](https://img.shields.io/badge/semver-2.0.0-green)](https://semver.org/)
[![PyPI version](https://badge.fury.io/py/streamingcli.svg)](https://pypi.org/project/streamingcli/)
[![Downloads](https://pepy.tech/badge/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/<env_name>` 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: <VVP|K8S_OPERATOR>
docker_registry_url: <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: <ververica_url>
namespace: <ververica_namespace>
deployment_target: <some_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
Raw data
{
"_id": null,
"home_page": "https://github.com/getindata/streaming-cli",
"name": "streamingcli",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "GetInData",
"author_email": "office@getindata.com",
"download_url": "https://files.pythonhosted.org/packages/61/97/bbf80047f17671c105507f9d3bad97bccea01bab556df4f568043ca959bf/streamingcli-2.0.3.tar.gz",
"platform": null,
"description": "[![Python Version](https://img.shields.io/badge/python-3.8-blue.svg)](https://github.com/getindata/streaming-cli)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![SemVer](https://img.shields.io/badge/semver-2.0.0-green)](https://semver.org/)\n[![PyPI version](https://badge.fury.io/py/streamingcli.svg)](https://pypi.org/project/streamingcli/)\n[![Downloads](https://pepy.tech/badge/streamingcli)](https://pepy.tech/badge/streamingcli)\n\n# Streaming platform CLI\n\n## Usage\n\n### Platform operations\n\n#### Environments\n\nYou can set up your own environment, which will allow you to connect to Ververica/K8S operator. You need to fill\nproperties within `config/<env_name>` directory. `config/flink_deployment.yml` is default deployment descriptor file\nfor each environment (you can overwrite it using `--file-descriptor-path` flag). You can use jinja for templating\n(look at the tests for an example). `base` environment is the default environment. Others environment override\nparameters from `base`. You need to have in `base` or your own environment `profile.yml`\nfile with given schema:\n```yaml\ndeployment_mode: <VVP|K8S_OPERATOR>\ndocker_registry_url: <docker_registry_url>\n```\nYou need also extra file(s) with Ververica/Kubernetes configuration\nand optionally other configuration used for templating.\n\nExample `vvp.yml`:\n```yaml\nvvp:\n url: <ververica_url>\n namespace: <ververica_namespace>\n deployment_target: <some_deployment_target>\n ```\n\nExample `k8s.yml`:\n```yaml\nk8s:\n namespace: test_ns\n```\n\nFor most of the command, you can pass the environment name with `--env`\nor export environmental variable as `SCLI_ENV`.\n\n#### Deploying job\n\n```shell\nscli project deploy \\\n --vvp-api-token \"x\u00a711d091jd1jd9jasd0j\" \\\n --docker-image-tag \"${CI_COMMIT_TAG}\" \\\n --profile \"dev\"\n```\n\n#### Building job Docker image\n\n```shell\nscli project build \\\n --docker-image-tag \"latest\"\n```\n\n#### Logging to Docker repository\n\n```shell\nscli docker login \\\n --username \"user\" \\\n --password \"password\" \\\n --profile \"dev\"\n```\n\n> Parameters`--docker-image-tag` is optional and has default value `latest`.\n\n### Providing certificates\nScli uses `requests` library to deploy jobs to Ververica Platform via REST Api. Currently `requests` does not support\nautomatic downloading of intermediate certificates so entire chain of certificates should be present before making\na http call\n\nexample:\n```sh\nsh -c 'CA_CERT_PATH=`python3 -c \"import requests; print(requests.certs.where())\"`;for CERT in certs/*; do cat ${CERT}; done >> ${CA_CERT_PATH}';\n\n```\n\n### Project operations\n\n## SCLI Development\n\n### Prerequisities ##\n\n* `pipenv`\n\n### Build\n\n* `make setup` - Install dependencies required to build a wheel package\n* `make cli/package` - Create a wheel package\n\n### Install\n\n* `make cli/install` - Install a wheel package\n* `make cli/install/force` - Reinstall a wheel package\n",
"bugtrack_url": null,
"license": "",
"summary": "Streaming platform CLI",
"version": "2.0.3",
"project_urls": {
"Homepage": "https://github.com/getindata/streaming-cli"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6197bbf80047f17671c105507f9d3bad97bccea01bab556df4f568043ca959bf",
"md5": "fa3c20e23595e927aeacd20d9a78de75",
"sha256": "6a3844f5ee796c980e19b2c5d0574db8d2cdad043de68986dea7fa8f1c458907"
},
"downloads": -1,
"filename": "streamingcli-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "fa3c20e23595e927aeacd20d9a78de75",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 29699,
"upload_time": "2023-07-25T13:25:39",
"upload_time_iso_8601": "2023-07-25T13:25:39.777945Z",
"url": "https://files.pythonhosted.org/packages/61/97/bbf80047f17671c105507f9d3bad97bccea01bab556df4f568043ca959bf/streamingcli-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-25 13:25:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "getindata",
"github_project": "streaming-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "streamingcli"
}