Install Authenticate

Haventec Authenticate and Console requires a PostgreSQL database

See setting up a database for details.

Create configuration files

Each container requires a configuration file with a list of variables to specify the database details and the URI of the other container. Please edit it to match your environment.

Haventec Authenticate configuration file

Create the file env_haventec_authenticate.list . This is an example:


    #######################################
    # Haventec Authenticate env variables #
    #######################################
    # Database properties (Note: The current Haventec Authenticate version only supports postgreSQL DB)
    DB_HOST=postgres
    DB_PORT=5432
    DB_NAME=htauthenticate
    DB_USER=haventec
    DB_PASS=password

    # Haventec Console API URI
    # Used to communicate to Haventec Console
    HAVENTEC_CONSOLE_API_URI=http://console:9005/api

    # Haventec Authenticate URI
    # Used to communicate to Haventec Authenticate
    HAVENTEC_AUTHENTICATE_URI=http://authenticate:9000

    # Profile chosen to run the application Haventec Authenticate
    PROFILE=production_postgres
    

Haventec Console configuration file

Create the file env_haventec_console.list . This is an example:


    ##################################
    # Haventec Console env variables #
    ##################################
    # Database properties (Note: The current Haventec Console version only supports PostgreSQL DB)
    DB_HOST=postgres
    DB_PORT=5432
    DB_NAME=htconsole
    DB_USER=haventec
    DB_PASS=password

    # Haventec Console URI
    # Used to communicate to Haventec Console
    HAVENTEC_CONSOLE_URI=http://console:9005

    # Haventec Authenticate URI
    # Used to communicate to Haventec Authenticate
    HAVENTEC_AUTHENTICATE_URI=http://authenticate:9000

    # Profile chosen to run the application Haventec Authenticate
    PROFILE=production_postgres
    

Download the Haventec Docker images

Log into Docker hub

Open a terminal and log into Docker Hub with the account credentials provided to you by Haventec.

If you cannot access the Haventec Docker repository, please contact us.


    docker login --username=yourusername
    

Load the Haventec Docker images


    docker pull haventec/authenticate:latest
    docker pull haventec/console:latest
    

For simplicity, this manual will run both containers on a single local server. The containers need to communicate to each other so we need to create a docker network to allow that communication.


    docker network create haventec-network
    

If you have the PostgreSQL DB also running locally in a docker, we have to add it to the docker network:


    docker network connect --alias postgres haventec-network postgres
    

Run Haventec Authenticate Docker

Execute the following command from the folder that contains the configuration file env_haventec_authenticate.list.


    docker run  --env-file env_haventec_authenticate.list \
        --name "haventec_authenticate"                    \
        -it -p9000:9000                                   \
        --net haventec-network                            \
        --net-alias "authenticate"                        \
        "haventec/authenticate:latest"
    

Test


    http://localhost:9000/authenticate/v1-2/health
    

You should see a health status like


    {
        "responseStatus": {
            "status": "SUCCESS",
            "message": "OK",
            "code": ""
        }
    }
    

You can access your local Authenticate Swagger documents at

http://localhost:9000/authenticate/v1-2/api-docs.html

Run Haventec Console Docker

Execute the following command from the folder that contains the configuration file env_haventec_console.list.


    docker run  --env-file env_haventec_console.list  \
        --name "haventec_console"                     \
        -it -p9005:9005                               \
        --net haventec-network                        \
        --net-alias "console"                         \
        "haventec/console:latest"
    

Test


    http://localhost:9005/
    

You should see a the Haventec Console login page

Test


    http://localhost:9005/api/cloud-portal/v1-2/health
    

You should see a health status like


    {
        "responseStatus": {
            "status": "SUCCESS",
            "message": "OK",
        "code": ""
        }
    }
    

Next steps

Setup Authenticate