You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Enno Richter 5c19e4a62b use whitenoise for static file delivery 3 years ago
deps use whitenoise for static file delivery 3 years ago
perfadm use whitenoise for static file delivery 3 years ago
.drone.yml restructure application 3 years ago
.envrc copy from flask-openshift 3 years ago
.gitignore use whitenoise for static file delivery 3 years ago
MANIFEST.in use whitenoise for static file delivery 3 years ago
README.md configure local development & Kubernetes execution support 3 years ago
image.nix use whitenoise for static file delivery 3 years ago
pyenv.nix use whitenoise for static file delivery 3 years ago
setup.py add admin views 3 years ago
shell.nix switch to (stable) <nixpkgs> 3 years ago
template.yml use whitenoise for static file delivery 3 years ago

README.md

perfadm

Local development configuration

  1. Create Service Account, e.g. using oc create sa perfadmdev.
  2. Set Redirect-Uri for the Service Account using oc edit sa perfadmdev, add the following:
    metadata:
      annotations:
        serviceaccounts.openshift.io/oauth-redirecturi.first: http://127.0.0.1:5000/authorize
    

    You might need to replace 127.0.0.1:5000 based on the address your development server binds to.

  3. Get client_secret using oc sa get-token perfadmdev.
  4. Create config file (e.g. config_dev.py) with the following content:
    OC_SERVICEACCOUNT_NAMESPACE = "perfadm"  # your project/namespace name, e.g. perfadm
    OC_SERVICEACCOUNT_NAME = "perfadm_dev"
    OC_OAUTH_CONFIG_URL = "https://<put-openshift-ip-here>:8443/.well-known/oauth-authorization-server"
    OC_CLIENT_SECRET = "<put-client-secret-here>"
    OC_REQUESTS_VERIFY = False
    SECRET_KEY = "insecure-devenv"
    

    You might be ok with the already included config_dev.py.

  5. Activate config file (e.g. by using PERFADM_CONFIG=config_dev.py flask run inside the perfadm directory).