Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Install

Nigel Perkins edited this page Feb 18, 2021 · 19 revisions

Install and use Python 3

For installing versions of Python, we recommend using pyenv.

We currently recommend using Python 3.8

Install pipx

Make sure python resolves to Python3 before running this step:

python -m pip install --user pipx

Install servicemanager

pipx install servicemanager

Or if you want to upgrade to the latest:

pipx upgrade servicemanager

Configure your workspace

You must define a WORKSPACE environment variable that points to a root directory under which you will checkout service repositories:

export WORKSPACE="$HOME/my-development-folder"

Adjust the above command as necessary according to your shell, and your desired location.

Note that the workspace directory must exist (mkdir -p $WORKSPACE).

Checkout / Update your service-manager-config

You must checkout the service-manager-config repository under your $WORKSPACE.

Going forwards, you should look to keep this repository up-to-date.

Tab-completion

From 0.0.13, servicemanager can use argcomplete to provide tab completion in bash. In order to enable this, put the following in .bashrc or .profile in your home directory:

eval "$(register-python-argcomplete sm)"

Java

Many of the services defined in service-manager-config require a JRE to run. If you wish to run from source, you will require a full JDK.

You must ensure that your JAVA_HOME and PATH environment variables are set appropriately for an OpenJDK Java8 installation.

Troubleshooting

There is a small script in Troubleshooting-Installations that may assist in diagnosing issues with your Python setup, and servicemanager installation.

Note: Sourcing content from the Internet into your shell is convenient, but not always safe. Verify the contents of the script before running the command below:

source <(curl -s https://raw.githubusercontent.com/wiki/hmrc/service-manager/Troubleshooting-Installations.md)