From 18fec3214b2d1d77c72b6d217f84918e593d4519 Mon Sep 17 00:00:00 2001 From: NupurSancheti <37798454+NupurSancheti@users.noreply.github.com> Date: Fri, 15 Nov 2019 18:40:35 +0530 Subject: [PATCH 1/2] unpublishing sb portal --- developer-docs/installation/install_sbportal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer-docs/installation/install_sbportal.md b/developer-docs/installation/install_sbportal.md index eb33b2732b..b75a90be94 100644 --- a/developer-docs/installation/install_sbportal.md +++ b/developer-docs/installation/install_sbportal.md @@ -2,8 +2,8 @@ title: Installing Sunbird Portal page_title: Installing Sunbird Portal description: Installing Sunbird requires two primary software components, the Sunbird portal or web application, and the Sunbird services stack or the backend API interface. -published: true -allowSearch: true +published: false +allowSearch: false --- From e48ad104bb6e16d63022e975866a7f89f0456afc Mon Sep 17 00:00:00 2001 From: NupurSancheti <37798454+NupurSancheti@users.noreply.github.com> Date: Fri, 22 Nov 2019 18:07:41 +0530 Subject: [PATCH 2/2] updating developers doc --- .../installation/developer_installation.md | 169 ------------------ developer-docs/installation/index.md | 26 --- .../installation/install_sbbackend.md | 134 -------------- .../installation/install_sbportal.md | 141 --------------- 4 files changed, 470 deletions(-) delete mode 100644 developer-docs/installation/developer_installation.md delete mode 100644 developer-docs/installation/index.md delete mode 100644 developer-docs/installation/install_sbbackend.md delete mode 100644 developer-docs/installation/install_sbportal.md diff --git a/developer-docs/installation/developer_installation.md b/developer-docs/installation/developer_installation.md deleted file mode 100644 index 6c404a0efc..0000000000 --- a/developer-docs/installation/developer_installation.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Developer Installation -page_title: Developer Installation -description: Installing the Sunbird portal or web application -published: true -allowSearch: true ---- - -## Overview - -This page provides information for you to install, setup, configure, run and use a Sunbird instance on your laptop or desktop. The objective of such an installation is to demo and test the Sunbird application. It is not advised to use the instance for a production environment. Follow the instructions provided on this page to ensure an optimal installation experience. Before installing Sunbird on your laptop or desktop, ensure that the you have the necessary resources and compliant target systems. - -## System Requirements - -To install Sunbird, ensure that your laptop or desktop has the following minimum system requirements: - -- Operating System: Windows 7 and above, or 4.2 Mac OS X 10.0 and above/Linux -- RAM: >1.5GB -- CPU: 2 cores, >2 GHz - -## Sunbird Components -Installing Sunbird requires two primary software components: - -- Sunbird portal or web application -- Sunbird services stack or the backend API interface - -## Sunbird Portal Setup - -The following sections provide you with the sequence to set up the Sunbird portal instance successfully - -### Prerequisites - -1.**Software dependencies** - - * [Node](https://nodejs.org/en/download/){:target="_blank"} - install the latest release of 8.11.2 LTS series - * [nodemon](https://www.npmjs.com/package/nodemon){:target="_blank"} - install nodemon - -2.**API Keys** - - * To get an API key, send an email to: info@sunbird.org - -**Note:** These installation instructions use cloud hosted Sunbird APIs, which require an API key. - -### Set Up the Sunbird Application - -1. To set up the Sunbird application **release 1.10** , get the [code](https://github.com/project-sunbird/sunbird-portal.git){:target="_blank"} from the sunbird-portal Git repository. - -2. Clone the repository to your local system using the command: - - **git clone https://github.com/project-sunbird/sunbird-portal.git** - -**Note**: Stable versions of the sunbird portal code are available via tags for each release. The master branch contains the latest stable release. To get the latest stable release of Sunbird, [click here](https://github.com/project-sunbird/sunbird-portal/){:target="_blank"}. - -3. After executing the **git clone** command, run the following set of commands in the console: - -
- $ cd {PROJECT-FOLDER}/src/app - $ npm install - $ cd {PROJECT-FOLDER}/src/app/client - $ npm install -- -***Note***: Ensure that you use node version 8.11.2 or above. - -4. Set the following environment variables when you are prompted to: - -
-sunbird_environment=local -sunbird_instance=sunbird -sunbird_default_channel=sunbird -- -## Configure the Service Stack - -The Sunbird portal application is powered by a set of service APIs. These API(s) run in a distributed environment when Sunbird is deployed to production. For the sake of simplicity and ease of debugging, you can run these service API(s) locally on a single server. - -Configure your Sunbird portal instance to use a cloud instance of the Sunbird service API(s) hosted by Sunbird, and are used for testing and demonstration purposes. - -***Note***: The cloud instance of the API(s) are not for production use. - -To edit the application configuration file: - -1. Open the **{PROJECT-FOLDER}/src/app/helpers/environmentVariablesHelper.js** file in any available text editor. - -2. Set the values for the following parameters: - - module.exports = { - - A) LEARNER_URL - LEARNER_URL: env.sunbird_learner_player_url || 'https://staging.open-sunbird.org/api/', - - B) CONTENT_URL - CONTENT_URL: env.sunbird_content_player_url || 'https://staging.open-sunbird.org/api/', - - C) CONTENT_PROXY - CONTENT_PROXY_URL: env.sunbird_content_proxy_url || 'https://staging.open-sunbird.org', - PORTAL_REALM: env.sunbird_portal_realm || 'sunbird', - - D) PORTAL_AUTH_SERVER_URL - PORTAL_AUTH_SERVER_URL: env.sunbird_portal_auth_server_url || 'https://staging.open-sunbird.org/auth', - PORTAL_AUTH_SERVER_CLIENT: env.sunbird_portal_auth_server_client || "portal", - ... - PORTAL_PORT: env.sunbird_port || 3000, - - E) PORTAL_API_AUTH_TOKEN - PORTAL_API_AUTH_TOKEN: env.sunbird_api_auth_token || 'E-mail to: info@sunbird.org' to get Auth-Token - ... - - F) PORTAL_ECHO_API_URL - PORTAL_ECHO_API_URL: env.sunbird_echo_api_url || '', - ... - - G) ANDROID_APP_URL - ANDROID_APP_URL: env.sunbird_android_app_url || 'http://www.sunbird.org' - - H) CONTENT CHANNEL FILTER TYPE - CONTENT_CHANNEL_FILTER_TYPE: env.sunbird_content_channel_filter_type || 'all', - Set the value to 'self', to get content that belongs to the current user's channel, - and set the value to 'all' to get content from all channels - ... - } - - -## Run the Application - -1. Before you run the application, install **nodemon**. To do so, use the following command: - -`npm install -g nodemon` - -2. After verifying the availability of nodemon, run the application by executing the following commands: - -
-$ cd {PROJECT-FOLDER}/src/app -$ node server.js -- -3. Open a new terminal window -
-$ cd {PROJECT-FOLDER}/src/app/client -$ nodemon -- -4. Open **http://localhost:3000** in the browser - -## Use the Application - -After successfully installing Sunbird, use demo user IDs to explore and test different workflows. - -* For each user role, you require a separate demo user ID and its respective password - -* Any user can be assigned one or more user role. The role rules that apply depend on the demo user ID and password that is used to sign in - -The following is the list of the demo user IDs per user role: - -User Role | User ID - ---------|---------- -Org Admin| adopterorgadmin@adopter -Content Creator| adoptercreator@adopter -Content Reviewer| adopterreviewer@adopter -Book Creator| adopterbookcreator@adopter -Book Reviewer| adopterbookreviewer@adopter -Flag Reviewer| adopterflagreviewer@adopter -Course Mentor| adoptercoursementor@adopter - -**Note:** - -* To get the password for each demo user ID, send an email to info@sunbird.org - -* For information on user roles, refer to [Types of Users](features-documentation/userrole){:target="_blank"} \ No newline at end of file diff --git a/developer-docs/installation/index.md b/developer-docs/installation/index.md deleted file mode 100644 index 098229d981..0000000000 --- a/developer-docs/installation/index.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Installation -page_title: Installation -description: installation -keywords: Try Sunbird, Installation method, Pre-requisites, prerequisites, Sandbox, Deployment, Install -allowSearch: true - ---- - -## Plan, Install and Configure Sunbird - -The deployment of Sunbird in a live environment requires several distributed components. Before you start installation, please understand the following possibilities: - -### Try Sunbird - -If you are looking to experiment with Sunbird and test its feature set, we recommend you use the [Sunbird sandbox](https://staging.open-sunbird.org/){:target="_blank"} which is hosted in the cloud. - -**Note: Data created in the sandbox is erased after 24 hours** - -### Extend Sunbird - -If you plan to modify and contribute code to the Sunbird project, we recommend you [Developer Installation](developer-docs/installation/developer_installation/){:target="_blank"}. This allows you to get started quickly and help extend the Sunbird. - -### Deploy Sunbird for your users - -If you plan to install Sunbird for your users, we recommend you follow the [Server Installation](developer-docs/installation/server_installation/){:target="_blank"} process. diff --git a/developer-docs/installation/install_sbbackend.md b/developer-docs/installation/install_sbbackend.md deleted file mode 100644 index 949f398cf9..0000000000 --- a/developer-docs/installation/install_sbbackend.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Installing Sunbird Backend -page_title: Installing Sunbird Backend -description: Installing Sunbird Backend requires the backend API interface. -published: true -allowSearch: true ---- -## Overview - -The purpose of this section is to assist you: - - with the installation of Sunbird LMS service on your local machine - - in testing Sunbird LMS service and API workflows - -## Prerequisites - -Before set up of Sunbird LMS service, following prerequisites need to be installed. - -1. [Apache Cassandra v3.10](http://archive.apache.org/dist/cassandra/3.10/) - -2. [Elastic Search v5.4.0](https://www.elastic.co/downloads/past-releases/elasticsearch-5-4-0) - -3. [Keycloak v3.2.1](https://www.keycloak.org/archive/downloads-3.2.1.html) - -After installation, keycloak administration console is accessible at `http://localhost:8080`. - -4. [PostgreSQL v9.5.14](https://www.postgresql.org/ftp/source/v9.5.14/) - -5. [Badgr](https://github.com/concentricsky/badgr-server) (integrated with master branch and commit SHA e6b8568798686217d1b9fff06dde57e0a681dd25) - -## Building Sunbird LMS Service - -Following are the steps to build Sunbird LMS Service: -1. Clone source code from `sunbird-lms-service` repository -``` -git clone https://github.com/project-sunbird/sunbird-lms-service.git -``` -2. Fetch source code for submodules -``` -cd sunbird-lms-service -git submodule update --init --recursive --remote -``` -3. Build `sunbird-lms-service` -``` -cd sunbird-lms-service -mvn clean install -DskipTests -``` - -## Minimal Configuration - -The following environment variables are part of minimalistic required configuration to get Sunbird LMS Service up and running. For complete list of supported environment configuration variables, please refer [LMS Service Environment Variables](http://docs.sunbird.org/latest/developer-docs/configuring_sunbird/env_variables_lms/). - -| Environment Variable | Description | -|----------------------|-------------| -| sunbird_cassandra_host | Comma-separated list of Cassandra cluster node IP addresses. | -| sunbird_cassandra_port | Comma-separated list of Cassandra cluster node ports. | -| sunbird_es_host | Comma-separted list of Elastic search node IP addresses. | -| sunbird_es_port | Comma-separated list of Elastic search node ports. | -| sunbird_sso_url | Base URL of Keycloak server. (e.g. http://localhost:8080/auth/) | -| sunbird_sso_realm | Realm of Keycloak server. Use default realm as master or you can create a new realm. | -| sunbird_sso_username | Keycloak admin user name. | -| sunbird_sso_password | Keycloak admin user password. | -| sunbird_sso_client_id | Keycloak client ID. Use default as admin-cli or you can create new client in Keycloak. | -| sunbird_installation | Sunbird installation name. | -| sunbird_quartz_mode | Mode (embedded or cluster) of quartz scheduler jobs. In cluster mode, PostgreSQL configuration is required. Set value as "embedded" for local installation. | -| ekstep_api_base_url | Base URL of EkStep platform. EkStep platform base URL is used to invoke platform functionality (e.g. Content APIs). | -| ekstep_authorization | API key to use for authentication with EkStep platform. | - -e.g. -``` -export sunbird_cassandra_host=localhost -export sunbird_cassandra_port=9042 - -export sunbird_es_host=localhost -export sunbird_es_port=9300 - -export sunbird_sso_url="http://localhost:8080/auth/" -export sunbird_sso_realm=master -export sunbird_sso_username=admin -export sunbird_sso_password=admin123 -export sunbird_sso_client_id=admin-cli - -export sunbird_installation=local -export sunbird_quartz_mode=embedded - -export ekstep_api_base_url="https://staging.open-sunbird.org/api" -export ekstep_authorization="your-auth-key" -``` - -## Creating Sunbird LMS Service Schema - -1. First run `cassandra.cql` script to create Sunbird keyspace, initial set of tables and indices. [cassandra.cql](https://github.com/project-sunbird/sunbird-lms-mw/blob/master/actors/src/main/resources/cassandra.cql) all cql to create the required keyspace, tables and indices -``` -cqlsh -f sunbird-lms-service/actors/sunbird-lms-mw/service/src/main/resources/cassandra.cql -``` -2. Next, perform migration. -``` -cd sunbird-lms-service/actors/sunbird-lms-mw/actors/sunbird-utils/cassandra-migration -mvn clean install -DskipTests -mvn exec:java -``` - -### Running Sunbird LMS Service - -1. Run following command. -``` -cd sunbird-lms-service/service -mvn play2:run -``` -**Note**: For running Sunbird LMS Service in debug mode use below command and perform remote debugging on port 9999. -``` -mvn play2:run -Dplay2.serverJvmArgs="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999" -``` - -## Sunbird LMS Service Initialisation - -Sunbird LMS Service initialisation involves following steps to create first root organisation and user. - -1. Create a user in Keycloak. - -2. Generate JWT token using following curl command with created user credentials. - -``` -curl -X POST - {{keycloak-base-url}}/auth/realms/{realm-name}/protocol/openid-connect/token - -H 'cache-control: no-cache' - -H 'content-type: application/x-www-form-urlencoded' - -d 'client_id={client-id}&username={username}&password={password}&grant_type=password' -``` - -3. Use `access_token` in the response to create first root organisation using [Organisation Management APIs](http://docs.sunbird.org/latest/apis/orgapi/). - -4. Create first Sunbird user in LMS Service using [User APIs](http://docs.sunbird.org/latest/apis/userapi/). - -Now that you are done with Sunbird LMS Service initialisation, you may onboard several other users and sub-organisations onto the platform. diff --git a/developer-docs/installation/install_sbportal.md b/developer-docs/installation/install_sbportal.md deleted file mode 100644 index b75a90be94..0000000000 --- a/developer-docs/installation/install_sbportal.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: Installing Sunbird Portal -page_title: Installing Sunbird Portal -description: Installing Sunbird requires two primary software components, the Sunbird portal or web application, and the Sunbird services stack or the backend API interface. -published: false -allowSearch: false ---- - - - -## Pre-requisites - -Before you install Sunbird on your laptop, examine your environment and gather data to ensure an optimal installation experience. -Review the following to determine that the environment has the necessary resources and compliant target systems to successfully install and run Sunbird. - -### System Requirements - -To install Sunbird, your laptop/PC should have at least the following minimum system requirements: - -- Operating System: Windows 7 and above/4.2 Mac OS X 10.0 and above/Linux -- RAM: >1.5GB -- CPU: 2 cores, >2 GHz - -Installing Sunbird requires two primary software components: - -- Sunbird portal or web application -- Sunbird services stack or the backend API interface. - -## Sunbird Portal Setup - -To set up the Sunbird portal successfully, follow these steps sequentially: - -1. Check for the prerequisites -2. Setup -3. Configure Backend Service Stack -4. Edit the Application Config -5. Run the Application - -### Pre-requisites -Check the following pre-requisites before installing and running the Sunbird-player application: - -1. **Software dependencies** - * [Node](https://nodejs.org/en/download/){:target="_blank"} - install the latest release of 6.x.x LTS series - * [Gulp](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md){:target="_blank"}- - latest version of gulp: `npm install -g gulp-cli` - * [nodemon](https://www.npmjs.com/package/nodemon){:target="_blank"} - Latest version of nodemon: `npm install -g nodemon` - -2. **API Keys** - -This installation guide will use a cloud hosted Sunbird APIs for which an API key is needed. - -- For getting an API key,send an email to: info@sunbird.org - -### Setup -For setting up the application, check out the [code](https://github.com/Sunbird-Ed/SunbirdEd-portal){:target="_blank"}. The code can be checked out via the command: - - git clone https://github.com/Sunbird-Ed/SunbirdEd-portal - -> ***Note***: Stable versions of the sunbird portal are available via tags for each release, and the master branch contains latest stable release. For latest stable release [refer](https://github.com/Sunbird-Ed/SunbirdEd-portal){:target="_blank"} - -Once the git clone command is over, run the following set of commands: - - - $ cd {PROJECT-FOLDER}/src/app - $ npm install - $ gulp download:editors - $ cd {PROJECT-FOLDER}/src/app/client - $ npm install - -## Configuring the Environment and Services Stack - -1. Configure the following system environment variables in the terminal which you have opened - -| Environment Variable | Value | Data Type | -|---------------------------|---------|-----------| -| sunbird_environment | local | string | -| sunbird_instance | sunbird | string | -| sunbird_default_channel | sunbird | string | -| sunbird_default_tenant | sunbird | string | - -> The initialization of these environmental variables can take place in a common place like in your **.bashrc** or **.bash_profile** - - -### Configure Backend Service Stack - -The Sunbird portal application is powered by a set of Service APIs. These Service API(s) run in a distributed environment.For instance, deploying the Sunbird to production; but for the sake of simplicity and ease of debugging, you can also run these service API(s) locally on a single server. - -For now, let us configure the Sunbird portal to use a cloud instance of the Sunbird Service API(s).These APIs are hosted by project Sunbird and are used for testing and demonstration purposes. - -> ***Note***: The cloud instance of the API(s) hosted by Project Sunbird are not for production usage. - -### Edit the Application Config - -Open `