client tool for a chacra service
Project description
chacractl
A client interface to interact with the chacra service (http://github.com/ceph/chacra).
configuration
The client writes a configuration file at $HOME/.chacractl with some needed information:
# This file was automatically generated by the chacractl CLI # make sure to update it with the correct user and key to talk to the API url = "http://example/" user = "admin" key = "secret" ssl_verify = True
These values need to be modified so that the CLI can interact with the remote API.
binaries
The CLI allows for a few interactions with binaries, depending on the action needed the requirements may change. For example when trying to upload a binary, the tool can accept either stdin or an actual file input.
create
For POSTing a binary, if posting a single binary it is best to just pass the full path as the last argument to the binary subcommand:
chacractl binary create project/ref/distro/distro-version/arch /path/to/binary.rpm
But for convenience, if sending many files, it can also accept them from stdin, usually with the output of a find command that can be filtered with grep or similar.
Below is an example of such a command for a project like ceph-deploy:
find ~/repos | grep ceph-deploy | grep rpm | grep noarch | grep el6 | chacractl binary create ceph-deploy/master/centos/6/noarch
If a binary already exists and there is a need to re-upload it, the --force flag must be used. In that case the request will be a PUT and the resource will be overwritten in the API.
exists
Check whether a given url endpoint exists or not. This subcommand requires the full url part (as opposed to other subcommands that require the url starting from the project name):
chacractl exists repos/ceph-deploy/master/centos/7
If the endpoint is not found it will return a non-zero exit status
repos
Repositories can be updated or fully re-created. This is useful when the API changes and the repository creation wasn’t triggered.
recreate
A recreate call will fully remove a repository on disc and will instruct the API to queue a repo creation. These actions are not immediate: the removal of the repository will happen as soon as the request is processed and the repository creation will be done when the queue does the job (possibly after a configured timeout)
A simple call would look like:
chacractl repo recreate ceph/infernalis/debian/jessie
Note how the full path to the distribution version is needed.
update
Similar to recreate, but it will not remove the actual repository on disc before queuing the request. It is useful when a binary has been added and the client wants to ensure it is added to the repo:
chacractl repo update ceph/infernalis/debian/jessie
set-raw
Repos have a “type” inferred from the binaries they contain; if rpms are uploaded, the repo will be created as an rpm repo; if debs, a Debian repo will result. ‘Raw’ repos are simple containers for binaries that need no further processing into repositories, such as .zip files or other binary products that will be simply downloaded. For such repos, use set-raw to set the type of the repo so that no asynchronous repo construction is requested.
chacractl repo set-raw ceph/infernalis/windows/1809
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chacractl-0.0.24.tar.gz
.
File metadata
- Download URL: chacractl-0.0.24.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.0 requests-toolbelt/0.9.1 urllib3/1.26.2 tqdm/4.62.1 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63a0a481096efda6eba798f4c7ab74c72f72d9c364a01ff86fb1caa2eae548d7 |
|
MD5 | e59729e3c4b658b691669335f2dfde5c |
|
BLAKE2b-256 | 4b58bedd11dc30f4c6673cfcb01a5e42b7f0a3c2b07cab8659767d682d94b4c8 |
File details
Details for the file chacractl-0.0.24-py3-none-any.whl
.
File metadata
- Download URL: chacractl-0.0.24-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.0 requests-toolbelt/0.9.1 urllib3/1.26.2 tqdm/4.62.1 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1337d2078c8550be5a119528463a61ff3b8b3e48029ad3440df74b350b35856f |
|
MD5 | 27ee8e5e7b090b22f4577e021581bde9 |
|
BLAKE2b-256 | 533280e2b872069248f51ba897b54d711f809d8cf179273cfbd0b7b266936093 |