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:
Provision Pre-requisites: Current easy installer supports azure cloud service provider. Please provision the following resources required
Azure Kubernetes Cluster: Please follow the steps mentioned in the below azure documentation link to provision AKS cluster using azure protal and generate the kubeconfig file for the same and save it in the server/local machine from where you will be running the installer script.
https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
kubernetes version: 1.24.x
Node size: 4 Core, 16 GB RAM,
Node count range: 6 to 10
Azure Storage account with following containers
sunbird-contents-dev
public containerflink-state-backend
private container
Google re-captcha : Follow the steps mentioned in the below link. Select Challenge(v2) -> Invisible reCAPTCHA badge. https://www.google.com/recaptcha/admin/create
Google OAuth Credentials: Follow the steps mentioned in the below link and set
Authorised redirect URIs
value to https://{domain-name}/oauth2/callback . Save Client id and Client secret values. https://developers.google.com/workspace/guides/create-credentials#oauth-client-idDomain name and SSL Certificates: You can create free Letsencrypt SSL certificates using https://punchsalad.com/ssl-certificate-generator/ for the domain which is valid for 90 days. Or purchase the SSL certs from Godaddy or Namecheap like vendors
Update environment values
Clone the repository
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
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 step 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 !
K9s download link: https://k9scli.io/topics/install/
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. If you are running installer from server(not local machine).Make sure SSH tunnel is done b/w local machine to server.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.
Go to
http://localhost:8080/auth/admin/master/console/#/realms/sunbird/clients
username: admin password: admin
Click
lms
client -> Selectservice account roles
-> Click onClient roles
drop down -> Selectrealm management
-> Selectmanage-users in
Available Roles -> Click onAdd Selected
Click on
Credentials TAB
-> Copy the secret value -> Updatesunbird_sso_client_secret
variable value inglobal-values.yaml
with the copied secret valueClick on
Realm Settings
->Keys
-> Click onpublic key
button-> Copy the key. Update the variablessunbird_sso_publickey
andkeycloak_sunbird_realm_public_key
inglobal-values.yaml
with the copied public keyClick on
Realm Settings
-> Click on Themes -> Selectsunbird
as a login theme -> click save
Goto
http://localhost:8080/auth/admin/master/console/#/realms/sunbird/user-federation
Click oncassandra-storage-provider
-> Copy theProvider ID
. Update thesunbird_keycloak_user_federation_provider_id
variable inglobal-values.yaml
with the copied Provider IDGoto
http://localhost:8080/auth/admin/master/console/#/realms/sunbird/keys
-> copy KID of Type RSA . Update the variablekeycloak_sunbird_realm_kid
in global-values.yaml
Run the Ed easy installer post install script
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}
Functional Configuration:
Once above steps are completed, functional configurations need to be setup. Following postman collection helps to setup minimal functional configuration.You can leverage same postman collection to setup functional configuration for your use case.
To configure these functionalities, you will need to use the Postman tool. You can download and install the Postman tool by visiting the following link: https://www.postman.com/downloads/.
Please refer the below mentioned postman collection to setup minimal functional configuration for content creation workflow.
Download the postman collection of Sunbird-Ed functional configuration
Download the postman environment variable file
Import postman collection and environment variables to postman tool
Update below mentioned environmental variables in postman tool. Please refer global_values.yaml file for varaible values.
Import the Postman collection and environment files. Then, go to the "Environment" section and choose the "sunbird-easeinstall" environment. Update the values of the "host" and "kong_api_key" variables, and remember to save the changes.
Once you have updated the environment variables, click on the "Collections" tab located in the upper-left corner. From the dropdown menu in the upper-right corner, select the desired environment name.
Now, you can start triggering the APIs in the collection one by one, following the specified sequence. Proceed to the next API only when the response from the current API is a successful "200" status code.
If you have any queries or facing issues please create a discussion thread at https://github.com/orgs/Sunbird-Ed/discussions/categories/installation
Last updated