Skip to content

Update Variables

rjshrjndrn edited this page Nov 27, 2017 · 17 revisions

Notes

Sunbird have 2 repositories.

  1. Public
  2. Private

While private(sunbird-devops) repository contains all inventories and group vars, public(project-sunbird) contains source code of infrastructure.

All of these points are applicable to dev/staging environments

Variables can be found in below locations

  • project-sunbird/sunbird-devops/roles/stack-sunbird/defaults/main.yml

  • ekstep/sunbird-devops/inventories/{{ env }}/group_vars/main.yml

  • ekstep/sunbird-devops/inventories/{{ env }}/secrets.yml

  • project-sunbird/sunbird-devops/ansible/roles/stack-sunbird/templates/{{ service_name }}.env

Variables: General guidelines

If you're updating a new variable in the code, then please follow guidelines.

  • All user defined variables must be initialized in project-sunbird/sunbird-devops/roles/stack-sunbird/defaults/main.yml

    example

    sunbird_actor_system_name: ""
    
  • Static values can be hard-coded in project-sunbird/sunbird-devops/ansible/roles/stack-sunbird/templates/{{ service_name }}.env

    example

    sunbird_version: "1.2.3"
    
  • All secrets must be preceded with vault_ and declare in sunbird-devops/ansible/roles/stack-sunbird/templates/{{ service_name }}.env

    example

    application_password: "{{vault_application_password}}"
    

    Actual secret have to be defined in ekstep/sunbird-devops/inventories/{{ env }}/secrets.yml

    ansible-vault edit ekstep/sunbird-devops/inventories/{{ env }}/secrets.yml
    
    vault_application_password: sample_password_123