Easy installer (Draft)
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.
- 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
- 1.Provision Pre-requisites: Current easy installer supports azure cloud service provider. Please provision the following resources required
- Azure Kuberentes Cluster: Please follow the steps mentioned in the below documentation tp provision AKS cluster 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. kubernetes version: 1.24.x , Node size: 4 Core, 16 GB RAM, Node count range: 1 to 8 https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
- Azure Storage account with following containers
sunbird-content-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-id - Domain 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
- 2.Update environment values
- Clone the repositorygit clone https://github.com/project-sunbird/sunbird-devops -b oneclickinstallercd sunbird-devops/oneclickinstallerchmod +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.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
- 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 -> 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 value - Click 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 key - Click 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 ID - Goto
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
- 5.Run the Ed easy installer post install script
bash ./install-ed.sh /path/to/kubeconfig.yaml -i postscript
- 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.
Download the postman collection of Sunbird-Ed configuration
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 | | Generate using Auth-Token API
https://www.postman.com/sunbird-building-blocks/workspace/sunbird-ed/documentation/25186239-6547f9fc-5f16-495c-b5e0-d76f5a78d66d?entity=request-81d7a679-2c0d-4413-9d63-868d4fdd0b67
Copy "access_token" value from response |
auth_client_id | | |
auth_client_secret | sunbird_sso_client_secret | |
auth_grantType | | |
https://github.com/vinukumar-vs/Sunbird_ED_Postman/blob/master/Sunbird-Ed%20template.postman_environment.json
How to import environment variables into postman.
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
Last modified 29d ago