Opal Python client, a command line scripting tool written in Python, enables automation of tasks in a Opal server.
You can install Opal Python Client via the following two methods:
- use the Debian/RPM package manager
- use a Python package
Debian Package Installation¶
Follow the OBiBa Debian Repository instructions and run:
sudo apt-get install opal-python-client
RPM Package Installation¶
Follow the OBiBa RPM Repository instructions and run:
sudo yum install opal-python-client
Python Package Installation¶
This type of package is cross-platform (Linux, Windows, Mac).
Install on Linux or Mac
- Download the most recent version
- Decompress the file and enter the installation folder:
tar xvzf opal-python-client-X.XX.tar.gz cd opal-python-client-X.XX
- Install the package:
sudo python setup.py install --record installed_files.lst
The –record will generate a list of installed files on your system. Since there is no uninstaller, you can use this file to remove the Opal Python Client package. You can do this by executing the following command:
sudo cat installed_files.lst | xargs rm -rf
Install on Windows
- Using Cygwin
You can install Cygwin, making sure that CURL, Python, gcc are included and follow these steps inside a Cygwin BASH window:
cd /usr/lib cp libcurl.dll.a libcurl.a cd <your-desired-dir> curl -C - -O https://github.com/obiba/opal/releases/download/X.XX/opal-python-client-X.XX.tar.gz tar xzvf opal-python-client-X.XX.tar.gz cd opal-python-client-X.XX python setup.py install --record installed_files.lst
- Using plain Windows tools
This Windows installation is the most complicated one but does not required any third party tools. You are required to do a few manual installations before the package is fully usable. The following steps were tested on a Windows 7.
- You must have Python installed on your Windows system. Run this installer in case you don’t have one.
- Download the Google protobuf binary and make sure that its containing folder is in your path.
- Download the Google protobuf source package containing the setup.py file and follow these steps:
unzip protobuf-2.5.0.zip cd protobuf-2.5.0/python python setup.py install
- Go to the Python Libs site and download the file pycurl-7.19.0.win-amd64-py2.7.exe
- Run the installer and follow the instructions until the package is installed
- Download the most recent version and follow these steps:
unzip opal-python-client-X.XX.tar.gz cd opal-python-client-X.XX python setup.py bdist_wininst cd dist
- Execute the generated installer and follow the instructions (opal-python-client-X.XX.win-amd64.exe)
To get the options of the command line:
This command will display which sub-commands are available. Further, given a subcommand obtained from command above, its help message can be displayed via:
opal <subcommand> --help
This command will display available subcommands.