python-shka-gadgets-openstackclient
This is a plugin of OpenStackClient (a.k.a. OSC) to make a single and simple virtual machine handy. In a typical use-case, the virtual machine (names “vanilla” here) given a floating IP address is created and used interactively. Sometimes the vanilla would be shelved; the floating IP address and the security rules are taken away when it is shelved, and these are given again when it is unshelved. After the interactive tasks, the given resources and the images would be cleaned out. The “vanilla” plugin simplifies such resource management in the project work.
Getting Started
sshfs and curl are prerequisites, and this plugin can be installed from PyPI using pip. It will install also a minimal OSC (=python-openstackclient) for the “vanilla” server management.
Example
python3 -m venv venv3
. ./venv3/bin/activate
pip3 install python-shka-gadgets-openstackclient
. ./openrc.sh
The openrc.sh here is a script for OSC environment, which you can download from the OpenStack dashboard of your project. The script will ask a password of the project.
openstack vanilla create --flavor standard.tiny --key-name mykey --image Ubuntu-18.04 --login ubuntu test
It creates a vanilla server named test on standard.tiny flavor from the Ubuntu 18.04 image. The specified key pair must be registered already. It gives a floating IP address to the vanilla and prepares a security group to login via ssh. And, in this case, the home directory of user ubuntu is accessible from ./vanilla via sshfs.
openstack server ssh --login ubuntu test
You can login to test as avobe if the login name is ubuntu.
openstack vanilla shelve test
It shelves test - It’s good when you will leave the project temporarily. The floating IP address and the security group is taken away. The old image used for the previous unshelve is removed. The ./vanilla folder would be unmounted.
openstack vanilla unshelve --login ubuntu test
You can unshelve test when you restart the project. The floating IP address and the security group are configured again. The ./vanilla folder would be mounted again.
openstack vanilla resize --flavor standard.xxlarge --login ubuntu test
You can resize test when you need more power, if the project supports it. The ./vanilla folder would be mounted again.
openstack vanilla delete test
After the project you can remove test completely.
There are more subcommands and the options of each subcommand. --help option will show them. For example,
$ openstack vanilla --help
Command "vanilla" matches:
vanilla allow me
vanilla create
vanilla delete
vanilla deny us
vanilla give ip
vanilla mount
vanilla resize
vanilla shelve
vanilla show id
vanilla show ip
vanilla show my ip
vanilla show status
vanilla take ip
vanilla unmount
vanilla unshelve
vanilla wait sshd
$ openstack vanilla create --help
usage: openstack vanilla create [-h] [--add-port <port>] --flavor <flavor>
--login <login-name> [--mount <mount-point>]
--key-name <key-name> --image <image>
[--volume <volume>]
<server>
Create a vanilla server.
positional arguments:
<server> Server (name or ID)
optional arguments:
-h, --help show this help message and exit
--add-port <port> Destination port (allow multiple times, default: [22])
--flavor <flavor> Create with this flavor (name or ID)
--login <login-name> Login name for sshfs mount (ssh -l option)
--mount <mount-point>
Directory of the vanilla server to mount (default: ~)
--key-name <key-name>
Keypair to inject into this server (optional
extension)
--image <image> Create server boot disk from this image (name or ID)
--volume <volume> Volume (size in GB for new or ID to mount)
This command is provided by the python-shka-gadgets-openstackclient plugin.
$
Copyright
See ./LICENSE
Metadata
Release files for python-shka-gadgets-openstackclient 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-shka-gadgets-openstackclient-0.5.4.tar.gz | 7.0 kB | Without provenance | Details for python-shka-gadgets-openstackclient-0.5.4.tar.gz |
Release files / python-shka-gadgets-openstackclient-0.5.4.tar.gz
| Download URL | python-shka-gadgets-openstackclient-0.5.4.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e38189b556fedb0a0167083c70e0a69f7f0a488a04db2800b1b83e958d2fe71
|
|
BLAKE2b-256 checksum How to use checksums |
004c7a5a30ae6284301b755486abaa526ccea8e2a1557469845c586d841966a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|
Security for python-shka-gadgets-openstackclient 0.5.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.