Skip to content

Installation

Jake Callahan edited this page Feb 1, 2024 · 3 revisions

Linux Installation (Fedora/RHEL/Centos)

Prerequisites

Broker has relatively few system package requirements. At a baseline you'll need cmake and likely python development packages. Please also ensure that your system python matches the minimum Broker supports. You can find that information in PyPi

dnf install cmake python3-devel

Installing from pip

pip install broker

You will then want to create a local broker_settings.yaml file based on the latest example

Installing a git clone

cd <broker repo directory>
pip install . 
cp broker_settings.yaml.example broker_settings.yaml

Then edit the broker_settings.yaml file

If you are using the Container provider, then install/configure the extra dependency based on your container runtime of choice.

pip install broker[podman]
or
pip install broker[docker]

These may not work correctly in non-bash environments.

Broker can also be ran outside of its base directory. In order to do so, specify the directory broker's files are in with the BROKER_DIRECTORY envronment variable. BROKER_DIRECTORY=/home/jake/Programming/broker/ broker inventory

Installation MacOS 12.x

brew install cmake
brew install openssl
brew install libssh2
cd <broker root directory>

pip install .   ( install Broker cloned locally )   
or   
pip install broker   ( install latest version from PyPI )

cp broker_settings.yaml.example broker_settings.yaml

Then edit the broker_settings.yaml file

Error: If pycurl fails, remove the current version of pycurl and reinstall using openSSL:

$ pip uninstall pycurl
$ PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L$(brew --prefix openssl)/lib" CPPFLAGS="-I$(brew --prefix openssl)/include" pip install --compile --install-option="--with-openssl" pycurl

Error: If libsshX.Y.dylib cannot be found, follow the additional steps:

  • Locate the .dylib files from within libssh2 (likely in /opt/homebrew/Cellar/ or /usr/lib/)
  • Export the path to the .dylibs directory as the DYLD_LIBRARY_PATH environment variable;

export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/libssh2/1.10.0/lib/

  • Place the export statement in your working shell config; .zshrc etc

Container Provider

If you are using the Container provider, then install the extra dependency based on your container runtime of choice.

pip install broker[podman]
or
pip install broker[docker]

These may not work correctly in non-bash environments.

Broker can also be ran outside of its base directory. In order to do so, specify the directory broker's files are in with the BROKER_DIRECTORY envronment variable. BROKER_DIRECTORY=/home/jake/Programming/broker/ broker inventory

Beaker Provider

The beaker provider uses the bkr cli utility provided by the beaker-client python package. The supported auth type for this is kerberos-based. Due to this, we need to add an additional system-level dependency.

sudo dnf install -y krb5-devel

Then install broker's beaker dependencies

pip install broker[beaker]

Next, you will want to add/update the Beaker section of Broker's settings file. At a minimum, you will need to add in the hub_url

Beaker:
    hub_url: https://beaker.engineering.<host>.com

Finally, create the directory and put these contents in ~/.beaker_client/config *Note: Please pay attention to the KRB_REALM as it is case sensitive!

KRB_REALM = "IPA.<HOST>.COM"
AUTH_METHOD = "krbv"
HUB_URL = "https://beaker.engineering.<host>.com/"

At this point, you should obtain a new kerberos ticket through whatever means you normally would (kinit), then test if everything is properly configured by running the below command. If no errors are raised, then you're good to go!

broker providers Beaker --jobs --mine