VKube-CLI User-End
Project description
Vkube Command Tool For User
Install
pip install vkube-cli-user
Run CLI Locally
Install virtualenv to run the CLI tool locally:
pip3 install virtualenv
Create virtual environment:
virtualenv venv
Activate virtual environment:
source venv/bin/activate
Deactivate virtual environment:
deactivate
Install CLI Globally from Source Code
Navigate to the repository root:
cd /path_to_project #directory containing setup.py
pip3 install -e . # may need to manually create ~/.vkube/config.yaml
or
pip3 install . # auto generates ~/.vkube/config.yaml
Install CLI with isolated dependencies:
pip3 install --user pipx
export PATH="$HOME/.local/bin:$PATH"
pipx install ~/path_to_project
pipx install --editable ~/path_to_project
Using vkube-cli
After installing locally, from the root path ("xxx/vkube-cli"):
- Add DockerhubToken or GHCRToken:
vkube config -w DockerhubToken=dckr_pat_xxxx
vkube config -w GHCRToken=ghcr_xxx
-
Configure VKubefile.yaml
-
Deploy using:
vkube deploy -f ./VKubefile.yaml #can deploy from any directory by specifying VKubefile.yaml path
Export Dependencies
pip freeze > requirements.txt
Notes
When configuring VKubefile.yaml, the build image context is "." (current directory where command is executed):
vkube deploy -f .VKubefile.yaml
For example, if running from vkube_cli directory, the build context is vkube_cli. Using COPY app.py /app in Dockerfile will fail if app.py doesn't exist in vkube_cli.
Known Issues
1. Docker Not Running
If Docker isn't running, you'll see:
Error: Unable to connect to Docker. Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2. Image Push Failures
Network issues may prevent image pushing:
Pushing image encountering error: [{'status': 'The push refers to repository [docker.io/yourusername/myapp]'}, {'errorDetail': {'message': 'Get "https://registry-1.docker.io/v2/": net/http: TLS handshake timeout'}, 'error': 'Get "https://registry-1.docker.io/v2/": net/http: TLS handshake timeout'}]
Release CLI to PyPI
Build Package
Ensure setuptools, wheel and twine are installed:
pip install setuptools wheel twine
Build package from project root:
python setup.py sdist bdist_wheel
This creates a dist/ directory containing .tar.gz and .whl files for PyPI upload.
Generate Version Number from Git Tags
Install:
pip install setuptools_scm
Use specific tag to release
git fetch --tags
git checkout v1.0.0 # switch to v1.0.0 tag
Upload to PyPI
twine upload dist/* -u __token__ -p <your-pypi-api-token>
Test Installation
After uploading to PyPI, test if the tool can be successfully installed via pip:
pip install vkube
vkube
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vkube-1.0.3.tar.gz.
File metadata
- Download URL: vkube-1.0.3.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d9760de3eaf26e4bc2c319f31075f81c2b8f3fda0279fc1d97832de09996a6
|
|
| MD5 |
80a5e09706c18ecce9951982df4b834f
|
|
| BLAKE2b-256 |
d8cecba6a3c1537627957fb1cf3d01a59b65ca5375f9689ea8f3f0cc29cec27a
|
File details
Details for the file vkube-1.0.3-py3-none-any.whl.
File metadata
- Download URL: vkube-1.0.3-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14683e3c24a30eb3fe87d56304e28c682dfa31bb20f26312ef9e78f0b83618c0
|
|
| MD5 |
b646e251cd5ee22bf99c06e1b41c67a9
|
|
| BLAKE2b-256 |
a7339a2e73e910815546dda5c91c6dca3eba138f38c00f354f2c0286e8033be6
|