Skip to content

Sanofi-IADC/konviw-slides

Repository files navigation

Slide Macro - an Atlassian Connect App using Express

Slide Macro is a replacement of the Page Properties Macro for slides rendering in Konviw.

Development environment

Create & configure credentials.json in the project root

{
  "hosts" : {
     "sanofiprojects-sandbox-686.atlassian.net": {
        "product" : "confluence",
        "username" : "[email protected]",
        "password" : "YOUR_SECRET_KEY"
     }
  }
}

You can generate confluence API KEY at this page: https://id.atlassian.com/manage-profile/security/api-tokens

Install dependencies

npm install

Configure local tunnel uzywajac dokumentacji at this page: http://ngrok.com

Configure .env file

APP_PORT=8080
APP_BASE_URL=/
NODE_ENV=development

Run macro

npm start

Deployment

Configure .env file

APP_PORT=8080
APP_BASE_URL=/
POSTGRESQL_USERNAME
POSTGRESQL_PASSWORD
POSTGRESQL_URL
POSTGRESQL_PORT
POSTGRESQL_DATABASE
NODE_ENV=deployment

Deployment strategy

  1. Configure project in Openshift
  2. You need to be authenticated to Your Artficatory for example JFrog
  3. Create Docker image locally using:
docker build --build-arg APP_BASE_URL=<URL> -f ./Dockerfile -t konviw-slides:<VERSION> .
  1. Create Tag on that image using:
docker tag <IMAGE_ID> <IMAGE>:latest
docker tag <IMAGE_ID> <IMAGE>:<VERSION>
  1. Push images to artifactory using:
docker push <IMAGE>:<VERSION>
docker push <IMAGE>:latest
  1. Create application in openshift using option Container Images
  2. Once application is configured You need to open Workloads -> Deployments section using Administrator Access in which You need to specify envivonment variables:
APP_PORT=8080
POSTGRESQL_USER - Specify value once You will create step 8.
POSTGRESQL_PASSWORD - Specify value once You will create step 8.
POSTGRESQL_URL - Specify value once You will create step 8 - POSTGRESQL_URL - Service IP
POSTGRESQL_PORT - Specify value once You will create step 8.
POSTGRESQL_DATABASE - Specify value once You will create step 8.
HTTP_PROXY
http_proxy
HTTPS_PROXY
https_proxy
no_proxy - Please include IP of Your POD database
NO_PROXY - Please include IP of Your POD database
  1. Once envivonment variables configuration is done we need to create postgres database using option Container Images. In image path/name specify (one of them):
registry.redhat.io/rhel8/postgresql-12
rhel8/postgresql-12
  1. Once service with pod is created You need to You need to open Workloads -> Deployments section using Administrator Access in which You need to specify envivonment variables for database:
POSTGRESQL_ADMIN_PASSWORD
POSTGRESQL_USER
POSTGRESQL_PASSWORD
POSTGRESQL_DATABASE
  1. Attach PVC to database deployment with mount path property:
Mount path: var/lib/pgsql/data
  1. Last step is to create Visual connector (You can do it using arrow between Application and Postgres Database)

Links

Support