Installation Instructions¶
Note
oidc-client
requires python 3.6 or higher:
Development Server¶
For development, OIDC Client can be run without installation as a python module from the root folder /oidc-client
:
cd oidc-client
python -m oidc_client.app
This starts the OIDC Client with aiohttp.web.run_app
.
Installation¶
OIDC Client can be installed into the python environment with pip install
from the root folder /oidc-client
:
cd oidc-client
pip install .
The server can then be started with the following command:
start_oidc_client
This starts the OIDC Client with aiohttp.web.run_app
.
Production Server¶
For production it is recommended to use gunicorn instead of aiohttp’s default server for stability.
To start the production server, the web application must first be built, as described in the Installation section above. The host and port must also be provided beforehand in environment variables:
export APP_HOST=0.0.0.0
export APP_PORT=8080
The production server is started from the root folder /oidc-client
with:
gunicorn oidc_client.app:init --bind $APP_HOST:$APP_PORT \
--worker-class aiohttp.GunicornUVLoopWebWorker \
--workers 4
Container Deployment¶
OIDC Client can also be built into a container and then be deployed.
Builds must be initiated from the root folder /oidc-client
.
To build OIDC Client into an image using s2i
:
s2i build . centos/python-36-centos7 cscfi/oidc-client
To run the built image with docker:
docker run -d -p 8080:8080 cscfi/oidc-client