Skip to content

Logging for medium scale deployment

Manojvv edited this page Feb 20, 2018 · 4 revisions

Why Logging?

Logging is an essential part in sunbird because all the applications are running inside the docker swarm. As it is hard to retrieve logs from the containers, log aggregation provides developers and support teams with special glasses which enable them to see logs without overhead.

How do we achieve?

Sunbird Log aggregation overview (https://github.com/project-sunbird/sunbird-devops/wiki/Log-aggregation-overview)

How to setup?

For the medium scale deployment, we will use the same docker swarm(app server) for deploying the logging stack. Make sure logger stack is deployed after the sunbird-core services deployment.

Steps:

  • SSH to app-server.
  • cd sunbird-devops/deploy
  • Update the Logging configuration block inside ~/sunbird-devops/deploy/config file.
  • ./sunbird_install.sh -s logger

NOTE: For logging setup, we need the different version of elasticsearch(v^2.4). Above script will install elasticsearch(v^2.4) on the app-server because we already have another version of elasticsearch on db-server which is used by sunbird application.

Detailed information about the Logger variables in ~/sunbird-devops/deploy/config

  • For the variables vault_google_client_id, vault_google_client_secret follow the below steps:
  1. Goto browser, run the link https://console.developers.google.com/apis/credentials

  2. Click Create

  3. Provide project name

  4. Click create credentials and select option OAuth client ID

  5. Configure consent screen

  6. Fill the mandatory items

  7. Select Web application 8.Set

    • Authorised JavaScript origins: https://{{your_dns_name}}
    • Authorised redirect URIs : https://{{your_dns_name}}/oauth2/callback
  8. Click create

  9. Set these values in config

    • vault_google_client_id: Client ID
    • vault_google_client_secret: Client secret
Clone this wiki locally