European Weather Cloud Command Line Interface
Watch Demo
·
Report Bugs
·
Request Features
·
Get Support
Table of Contents
- Introduction
- Prerequisites
- Installing
- Getting started
- Login to prepare the environment
- List Items in the catalog
- Deploy Items from the catalog
- Command-line flags and override precedence
- External IP override fix (issue 220)
- Test Items unreleased or from private sources
- Backends
- SW Bill of Materials
- Changelog
- Contributing
- Development
- Code Styling
- Code Unittesting
- Coverage Reporting
- Documenting
- Releasing to Package Registries
- Copyright and License
- Authors
The ewccli is the European Weather Cloud (EWC) Command Line Interface (CLI). This tool is developed to support EWC users on the use of the EWC services.
- You will need a python environment to run the library implementation of this code. Python version 3.10 or higher.
- git installed on your operating system. (usually is available to most OS nowadays)
You can use the following link to obtain:
- Applications Credentials (ID and secret)
We recommend installing ewccli inside a virtual environment to avoid dependency conflicts with system packages.
The EWC CLI Python package is available through PyPI:
pip install ewccliAvailable since version 0.9.1
The EWC CLI Python package is available through conda-forge:
conda install conda-forge::ewccli- Clone this repository and move into it
git clone THIS_REPO && cd ewccli- Create a virtual environment with python version >= 3.10
python3 -m venv ewcclienv- Activate the virtual environment
source ./ewcclienv/bin/activate- Upgrade pip
pip install --upgrade pip- Install the package
pip install -e .If Docker is your preferred containerization tool, you can replace
podmanwithdockerin the commands below.
You may also run in an completely isolated environment using containerization. After cloning the repository and cd into it.
- Clone this repository and move into it
git clone THIS_REPO && cd ewccli- Create a wheel package (
./dist/ewccli-<version>-py3-none-any.whl)
pip install -q buildpython3 -m build- Build an image including the package previously created
podman build --no-cache -t ewccli -f ./Containerfile .- Start a container with an interactive shell
podman run -it --rm --workdir /home/ewccli --entrypoint /bin/bash ewccliThen run ewc to verify everything works:
If you get a WARNING like WARNING: The script ewc is installed in '~/.local/bin' which is not on PATH. Add the following to your profile configuration file:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profileewc loginIMPORTANT:
- For credentials and profile settings, EWC CLI uses the following order of importance:
- env variables (for example
OS_APPLICATION_CREDENTIAL_ID/OS_APPLICATION_CREDENTIAL_SECRET) - CLI config (the saved profile under
~/.ewccli/profiles) - any other config (e.g. OpenStack
clouds.yamlor Kuberneteskubeconfigfile)
- env variables (for example
- For deployment flags and item settings, the precedence is different: explicit command-line flags win over environment variables, which win over catalog values. See Override precedence.
All your profiles are saved under ~/.ewccli/profiles
You can manually add profiles in the same file and the ewccli can use them already.
Info required for a profile:
[my-profile]
federee = EUMETSAT or ECMWF
region = CCI1 or CCI2 or ECIS-R1 or ECIS-R2
tenant_name = eumetsat-ewc-communityhub
application_credential_id =
application_credential_secret =
ssh_public_key_path =
ssh_private_key_path =
The following command shows the current available Items. Official Items are listed here.
ewc hub listewc hub deploy ITEMwhere ITEM is taken from ewc hub list command under Item column.
Every command supports -h / --help. For the authoritative and up-to-date
list of options, run:
ewc hub deploy --help
ewc infra create --helpMost flags also have an equivalent EWC_CLI_* environment variable, which is
useful in CI jobs and scripts.
| Flag | Environment variable | Applies to | What it does |
|---|---|---|---|
--server-name |
EWC_CLI_SERVER_NAME |
hub deploy |
Name of the target VM (defaults to the item name). |
--profile |
EWC_CLI_LOGIN_PROFILE |
hub deploy, infra |
Selects a saved profile from ~/.ewccli/profiles. For infra, put it before the subcommand: ewc infra --profile NAME create .... |
--item-inputs, -iu |
EWC_CLI_ITEM_INPUTS |
hub deploy |
Supplies item inputs as key=value; can be repeated. Lists/dicts use YAML syntax. |
--image-name, -ig |
EWC_CLI_OPENSTACK_IMAGE_NAME |
hub deploy, infra create |
Overrides the catalog values.osImageName, or selects the OpenStack image for plain VMs. |
--flavour-name, -fr |
EWC_CLI_OPENSTACK_FLAVOUR_NAME |
hub deploy, infra create |
Overrides the catalog values.osFlavorName (or the federee/region default). |
--external-ip / --no-external-ip |
EWC_CLI_EXTERNAL_IP |
hub deploy, infra create |
Enables or explicitly disables a public floating IP. Overrides ewccli.externalIP from the catalog (see issue 220). |
--networks, -n |
EWC_CLI_OPENSTACK_NETWORKS |
hub deploy, infra create |
Selects OpenStack networks. |
--security-groups, -sg |
EWC_CLI_OPENSTACK_SECURITY_GROUPS |
hub deploy, infra create |
Overrides the catalog values.osSecurityGroups. |
--keypair-name, -kp |
EWC_CLI_OPENSTACK_KEYPAIR_NAME |
hub deploy, infra create |
Selects the OpenStack keypair (default: <user>-ewccli-keypair). |
--root-volume |
— | hub deploy, infra create |
Root disk size in GB when boot-from-volume is enabled (default: 50). |
--extra-volume |
— | hub deploy, infra create |
Attaches an additional disk of the given size in GB; can be repeated. |
--dry-run |
EWC_CLI_DRY_RUN |
hub deploy, infra create |
Simulates the operation without making changes in the cloud. |
--force |
EWC_CLI_FORCE |
hub deploy, infra create |
Forces refresh/recreation of resources such as the cloned item sources. |
--path-to-catalog |
EWC_CLI_PATH_TO_CATALOGUE |
hub (group) |
Uses a custom catalog file. It must be placed before list, show or deploy. |
Notes on multi-value flags:
- On the command line, repeat the flag:
--security-groups default --security-groups ssh. - In environment variables, use comma-separated values:
EWC_CLI_OPENSTACK_SECURITY_GROUPS=default,ssh.
For hub deploy, settings are resolved in this order, highest priority first:
- Flags you pass explicitly, for example
--flavour-nameor--external-ip. - Matching
EWC_CLI_*environment variables. - Item metadata in the catalog (
values.*andewccli.*). - EWC CLI built-in defaults (for example, a 50 GB root volume and the
<user>-ewccli-keypairkeypair).
What this means in practice:
- Either
--external-ipor--no-external-ipalways overridesewccli.externalIPin the catalog. If you pass neither, the catalog value is used; if the catalog does not define the key, no public IP is requested. --flavour-name,--image-nameand--security-groupsoverride the correspondingvalues.osFlavorName,values.osImageNameandvalues.osSecurityGroupscatalog values. A warning panel is shown when your choice differs from the flavour, security groups or external IP recommended by the item.- Values supplied with
--item-inputsoverride the defaults declared invalues.inputSpec. Inputs without a default must be supplied by the user. - For
infra createthere is no catalog, so an unspecified external IP flag means no public IP. - Credentials follow the separate rules described in
Login to prepare the environment:
OS_APPLICATION_CREDENTIAL_*variables andclouds.yamlcan take precedence over values given toewc login.
Deploy an item with the defaults recommended by the catalog:
ewc hub deploy ecmwf-data-flavour
ewc hub deploy ecmwf-data-flavour --profile my-profile --server-name TOTOOverride the catalog recommendation for the public IP (this is the behavior
fixed on the fix-floating-ip branch):
# The catalog may say externalIP: false; this still requests a floating IP
ewc hub deploy ecmwf-data-flavour --server-name TOTO --external-ip
# Explicitly keep a VM private, even if the catalog requests a public IP
ewc hub deploy my-item --no-external-ip
# The same setting via environment variable (an explicit CLI flag still wins)
EWC_CLI_EXTERNAL_IP=true ewc hub deploy ecmwf-data-flavour --server-name TOTOOverride image, flavour, network and disk settings:
ewc hub deploy my-item \
--image-name "Ubuntu 24.04" \
--flavour-name 8cpu-16gbmem \
--security-groups default --security-groups ssh \
--networks my-network \
--root-volume 100 \
--extra-volume 50 --extra-volume 100 \
--keypair-name my-keypairProvide item inputs on the command line or via an environment variable:
ewc hub deploy my-item \
--item-inputs key1=value1 \
--item-inputs retries=3 \
--item-inputs "names=['a', 'b']"
EWC_CLI_ITEM_INPUTS="key1=value1,retries=3,names=['a', 'b']" ewc hub deploy my-itemUse a custom catalog, simulate a deployment, or create a plain VM without an item:
ewc hub --path-to-catalog ./custom_catalog.yaml list
ewc hub --path-to-catalog ./custom_catalog.yaml show my-item
ewc hub --path-to-catalog ./custom_catalog.yaml deploy my-item --external-ip
ewc hub deploy my-item --dry-run
ewc infra --profile my-profile create my-vm --external-ip
ewc infra create private-vm --no-external-ipIssue #220 reported that
ewc hub deploy ... --external-ip was silently ignored when an item defined
ewccli.externalIP: false (for example ecmwf-data-flavour), and that there
was no way to turn off a catalog-requested public IP from the command line.
In versions 0.9.3 and 0.10.0 the catalog value was applied after the CLI
value, so the catalog always won — including over EWC_CLI_EXTERNAL_IP.
The current fix-floating-ip branch fixes this by resolving the flag first
and falling back to the catalog only when the user did not pass a flag:
--external-ip(orEWC_CLI_EXTERNAL_IP=true) now enables a floating IP even when the catalog saysexternalIP: false.--no-external-ip(orEWC_CLI_EXTERNAL_IP=false) now disables it even when the catalog saysexternalIP: true.- If neither form is given, the catalog value is still honoured; items
without
ewccli.externalIPremain private by default. - A warning panel is printed when your explicit choice differs from the item recommendation.
ewc infra createis unaffected: omitting the flag means no external IP.
This fix is implemented in this checkout on branch fix-floating-ip
(commit 9153140). It is not part of the 0.10.0 release; it becomes
available in a released version once the branch is merged and released. To
get the corrected behavior before then, use this branch.
If you would like to test the deployment of:
-
an Item with private source code (local or remote)
OR
-
a new Item, not yet published in the EWC Community Hub
OR
-
a new version of an Item, not yet updated in the EWC Community Hub
you can take advantage of the --path-to-catalog to point the EWCCLI to the correct source location, and deploy the Item to your target tenant of choice.
Create a local catalogue file, named ./custom_catalog.yaml, with the complete metadata for your Item.
For reference see the example excerpt of Item metadata, with optional EWCCLI compatibility, enclosed in red below. You can find more concrete examples by browsing over metadata of Items already indexed in the catalog. Additionally, all details about required or optional attributes can be found on the schema documentation.
Attributes of particular interest during Item development and testing include:
ewccli.externalIPrequests a public floating IP address for the target VM. Passing--external-ipor--no-external-ipon the command line overrides this catalog value; see Command-line flags and override precedence and issue #220.sources, which can be:- Public GIT repository URI
- Absolute path to a local directory with the Item. The path needs to point to an existing non-empty directory
values.inputSpecis the list of inputs you want the user to be able to provide. Any input without default values is treated as required; users can set them when prompted during deployment, or by passing the--item-inputsarg as part of the deploy command.values.osImageName, which can be:- The full name of one of the OpenStack image listed on the EWC Knowledge Base
- The short name of the the OpenStack image; the EWCCLI will auto-resolve to the latest available minor version for the specified operative system
values.osFlavorNameis the OpenStack flavor (e.g.4cpu-4gbmem) used as default for the target VM during deployment of an hub item; it can be overridden with the--flavour-nameCLI flag. If omitted, the federee/region default flavour is used.values.osSecurityGroupsis a list of OpenStack Security Groups assigned to the target VM such that network traffic can reach it on certain ports. It can be overridden with the--security-groupsCLI flag.values.pathToMainFileis the relative path to your directory or repositoryvalues.pathToRequirementsFileis the relative path to your directory or repository
Once metadata is correct and complete, execute list, show or deploy commands as needed. Note that --path-to-catalog is a hub group option, so it goes before the subcommand, and show/deploy require the item name:
ewc hub --path-to-catalog ./custom_catalog.yaml list
ewc hub --path-to-catalog ./custom_catalog.yaml show my-item
ewc hub --path-to-catalog ./custom_catalog.yaml deploy my-itemYou can combine it with any of the flags described above, for example:
ewc hub --path-to-catalog ./custom_catalog.yaml deploy my-item \
--external-ip \
--item-inputs key1=value1This section described the backends used and which commands are backed by those backends.
Used by infra and hub subcommands.
Used by hub subcommand.
Used by hub subcommand. (COMING SOON)
Used by dns, s3, k8s subcommmands. (COMING SOON)
The following dependencies are not included in the package but they are required and will be downloaded at build or compilation time:
| Dependency | Version | License | Home URL |
|---|---|---|---|
| requests | 2.32.5 | Apache Software License (Apache-2.0) | https://requests.readthedocs.io/en/latest |
| click | 8.1.8 | BSD-3-Clause | https://github.com/pallets/click |
| rich | 14.1.0 | MIT License | https://github.com/Textualize/rich |
| rich-click | 1.8.9 | MIT License | https://pypi.org/project/rich-click |
| prompt_toolkit | 3.0.51 | BSD-3-Clause License | https://python-prompt-toolkit.readthedocs.io/en/stable |
| pyyaml | 6.0.2 | MIT License | https://pyyaml.org |
| cryptography | 45.0.6 | Apache-2.0 OR BSD-3-Clause | https://github.com/pyca/cryptography |
| openstacksdk | >=4.6.0,<5 | Apache Software License (Apache-2.0) | https://docs.openstack.org/openstacksdk/latest/ |
| ansible | 10.5.0 | GNU General Public License v3 or later (GPLv3+) (GPL-3.0-or-later) | https://www.redhat.com/en/ansible-collaborative |
| ansible-runner | 2.4.1 | Apache Software License (Apache Software License, Version 2.0) | https://ansible.readthedocs.io/projects/runner/en/latest |
| kubernetes | 33.1.0 | Apache Software License (Apache License Version 2.0) | https://github.com/kubernetes-client/python |
| pydantic | 2.12.5 | MIT License | https://github.com/pydantic/pydantic |
The following dependencies are only required for building/editing/testing the software:
| Dependency | Version | License | Home URL |
|---|---|---|---|
| pytest | 8.4.1 | MIT License (MIT) | https://docs.pytest.org/en/latest |
| pytest-html | 4.1.1 | MIT License (MIT) | https://github.com/pytest-dev/pytest-html |
| pytest-mock | 3.14.1 | MIT License (MIT) | https://github.com/pytest-dev/pytest-mock |
| coverage | 7.10.5 | Apache Software License (Apache License Version 2.0) | https://github.com/nedbat/coveragepy |
| pre-commit | 4.3.0 | MIT License (MIT) | https://github.com/pre-commit/pre-commit |
| sphinx | 8.1.3 | BSD-2-Clause License | https://www.sphinx-doc.org/en/master |
| sphinx-click | 6.0.0 | MIT License (MIT) | https://github.com/click-contrib/sphinx-click |
| sphinx-rtd-theme | 3.0.2 | MIT License (MIT) | https://sphinx-rtd-theme.readthedocs.io/en/stable |
| pydeps | 3.0.1 | BSD-2-Clause License | https://github.com/thebjorn/pydeps |
All notable changes (i.e. fixes, features and breaking changes) are documented in the CHANGELOG.md.
Thanks for taking the time to join our community and start contributing!
Please make sure to:
-
Familiarize yourself with our Code of Conduct before contributing.
-
See CONTRIBUTING.md for instructions on how to request or submit changes.
- Fork this repository and move into it
git clone https://github.com/ewcloud/ewccli.git && cd ewccli- Activate the virtual environment
source ./ewcclienv/bin/activate- Install the package for testing
pip install -e .[test]-
Modify the local code and test changes.
-
Push code to your fork and open a pull request.
Execute all linting tests by running:
pre-commit run --all-filesThis will provide you with hints about:
- Basic format of the files (i.e. spacing, line breaking, etc.) using
black - PEP standars infringement flagged by
flake8 - Static typing and type hinting recommendations given by
mypy
To enforce basic formating issues , run:
black ./Currently, there is no automated way of addressing errors raised by flake8 and mypy.
To resolve those, check the logs from the pre-commit execution, understand the type of error and adjust the code accordingly.
Execute all tests in all test files by running:
pytestExecute all tests in a test file
pytest ewccli/tests/ewccli_commands_hub_deploy_server_test.pyExecute a specific test in a file
pytest ewccli/tests/ewccli_commands_hub_deploy_server_test.py::test_no_matching_imagesExecute a specific test in a file with verbose
pytest -vv ewccli/tests/ewccli_commands_hub_deploy_server_test.py::test_no_matching_imagesGenerate unittest coverage reports in standard formats by executing:
coverage run --module pytest --no-header --verbose -ra --junitxml=coverage.xml --html=coverage.htmlGenerate documentation from source code docstrings:
sphinx-build -b html docs/source/ Documentation/Checkout RELEASING.md for details.
Copyright © EUMETSAT, ECMWF 2026
The provided code and instructions are licensed under GPLv3+. They are intended to automate the setup of an environment that includes third-party software components. The usage and distribution terms of the resulting environment are subject to the individual licenses of those third-party libraries.
Users are responsible for reviewing and complying with the licenses of all third-party components included in the environment.
Contact EUMETSAT for details on the usage and distribution terms.
- Francesco Murdaca - Initial work and maintainer - EUMETSAT



