Prerequisites
Before installing myos, ensure you have the following prerequisites:Python Version: myos requires Python 3.6 or higher
OpenStack CLI
The myos SDK depends on the OpenStack CLI (python-openstackclient) to interact with your OpenStack cloud. You must have this installed and configured before using myos.
Installation Steps
Configure OpenStack Credentials
Create or update your Test your configuration:
~/.config/openstack/clouds.yaml file with your cloud credentials:clouds.yaml
The cloud name (e.g.,
admin) will be used when initializing the Cloud object in myos.Install myos SDK
Clone the myos repository and add it to your Python path:To use myos, ensure the directory is in your Python path:Or add it programmatically in your Python scripts:
Since myos doesn’t have a setup.py, you can either add the directory to your
PYTHONPATH or install it in development mode if you create a setup.py file.Multiple Cloud Configurations
You can configure multiple clouds in yourclouds.yaml file for different environments:
clouds.yaml
Troubleshooting
OpenStack CLI Not Found
If you see errors about theopenstack command not being found:
- Ensure
python-openstackclientis installed:pip install python-openstackclient - Verify it’s in your PATH:
which openstack - Try reinstalling:
pip uninstall python-openstackclient && pip install python-openstackclient
Authentication Errors
If you encounter authentication errors:- Verify your
clouds.yamlconfiguration - Test with the OpenStack CLI directly:
openstack --os-cloud admin token issue - Check that your credentials are correct and have the necessary permissions
- Ensure the
auth_urlis accessible from your network