Easy installer (Draft)

Overview:

Easy installer is meant to install Sunbird Ed platform on Kubernetes cluster which helps the adopter to setup Sunbird Ed platform within in few hours.

Pre-requisites:

  • Server or Laptop with Ubuntu 20.04 LTS operating system
  • Azure Kubernets Cluster
  • Azure Storage Account
  • Domain name and SSL Certificates
  • Google re-captcha
  • Google OAuth Credentials
To successfully complete Sunbird installation, you need to have:
  • System administrator permissions to the cloud resources
  • Hands-on experience in administering and debugging Linux systems
  • Hands-on experience using Docker and Kubernetes to run containerized workloads

Steps:

  1. 1.
    Provision Pre-requisites: Current easy installer supports azure cloud service provider. Please provision the following resources required
  2. 2.
    Update environment values
    • Clone the repository
      git clone https://github.com/project-sunbird/sunbird-devops -b oneclickinstaller
      cd sunbird-devops/oneclickinstaller
      chmod +x *sh
      • Use your favourite text editor and update variables mentioned in global-values.yaml. Follow the instructions mentioned in the global-values.yaml file under every variable
  3. 3.
    Run the Ed easy installer bash script. While the installer is running, you can view the deployments to the kubernetes cluster using any kubernetes client like kubectl or k9s. This will take 45 min to 1 hour based on the internet speed on the machine where you are running the script. Take a break and check back !
bash ./install-ed.sh /path/to/kubeconfig.yaml -i ed-install
  1. 4.
    Manual keycloak configurations
NOTE: These manual configurations will be automated in the next consequent releases
  • Port forward to keycloak pod to access admin console through web browser. Make sure there is no process running on port 8080 on the system from where you are running the installer. Also, make sure context to kubectl is set to the right kubernetes cluster.
    ​
    POD_NAME=$(kubectl get pods -n dev | grep keycloak | awk '{print $1}')
    kubectl port-forward -n dev "$POD_NAME" 8080:8080
    ​
  • Goto http://localhost:8080/auth/admin/master/console/#/realms/sunbird/clients
    username: admin password: admin
    • Click lms client -> Select service account roles -> Click on Client roles drop down -> Select realm management -> Select manage-users in Available Roles -> Click on Add Selected
    • Click on Credentials TAB-> Copy the secret value -> Update sunbird_sso_client_secret variable value in global-values.yaml with the copied secret value
    • Click on Realm Settings-> Keys -> Click on public key button-> Copy the key. Update the variables sunbird_sso_publickey and keycloak_sunbird_realm_public_key in global-values.yaml with the copied public key
    • Click on Realm Settings -> Click on Themes -> Select sunbird as a login theme -> click save
    ​
  • Goto http://localhost:8080/auth/admin/master/console/#/realms/sunbird/user-federation Click on cassandra-storage-provider -> Copy the Provider ID. Update the sunbird_keycloak_user_federation_provider_id variable in global-values.yaml with the copied Provider ID
  • Goto http://localhost:8080/auth/admin/master/console/#/realms/sunbird/keys -> copy KID of Type RSA . Update the variable keycloak_sunbird_realm_kid in global-values.yaml
  1. 5.
    Run the Ed easy installer post install script
bash ./install-ed.sh /path/to/kubeconfig.yaml -i postscript
  1. 6.
    Update the DNS record: Get the public ip printed on the console and add DNS A record for the same domain you have added to global-values.yaml. Access the Ed instance using https://{domain-name}
Once this is done, functional configurations to be setup based on the use case you would like to implement Sunbird Ed for.
Please refer the below mentioned postman collection to setup minimal functional configuration for content and course creation workflow. We will be automating this process in the coming sprints and update the documentation here. Please check this page for updates.

Postman Collection

Download the postman collection of Sunbird-Ed configuration

Postman environment variables:

Download the postman environment variables & update the values after importing to postman.
Please refer global_values.yaml file for varaible values.
Environment key name
global_values.yaml key name
Description
host
domain
http://example.co.oin
kong_api_key
Bearer {{sunbird_encryption_key}}
Bearer xxx.yyy.zzz
keycloak_access_token
​
auth_client_id
​
​
auth_client_secret
sunbird_sso_client_secret
​
auth_grantType
​
​
​https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-postman-data Install Newman & run configuration postman collection on server from where easy installer has initiated(./install-ed.sh) using below commands.
$ npm install -g newman
$ newman run path_to_Sunbird_ED_collection.json -e path_to_environment.json
If you have any queries or facing issues please create thread at https://github.com/orgs/Sunbird-Ed/discussions/categories/installation
​