Build
Overview
To install SunbirdED release-5.0.0
, we will need to run many Jenkins jobs and a couple of manual steps. Some of the jobs need to be run in a specific order. This page details out the list of jobs, their order and the github release tags to be used for each job.
Create Plugin Containers / Folder Structure
We will create few folders in azure for storing sunbird plugins
Our deployment job always tries to delete the folder first before uploading, so we need to have the placeholders before running the jobs
We will create the folders by uploading random files from a random folder on your PC
Create a public container with the name you have set for the variable
sunbird_content_azure_storage_container
and run the below commands
Upload the default T&C file to
sunbird_content_azure_storage_container
container in a folder named terms-and-conditions. You can get a copy of the sample T&C file from here. You are free to edit the HTML as per your requirementsCreate a private container named
label
in AzureRun the below command in your Jenkins VM where you cloned the sunbird-devops repo
Upload Initial Plugins
Upload the initial set of plugins to
sunbird_content_azure_storage_container
containerDownload the initial Plugins from here
Run the below command from the directory where content-plugins.zip is unzipped
Create a container named
public
in your Azure storage account from the Azure portal with public access levelCreate a container named
artifacts
in your Azure storage account from the Azure portal with private access level
Upload Maxmind Database to Azure Blob
Download the Maxmind city database in zip format from Maxmind website
Upload the zip file to the
artifacts
container in Azure
Code Builds
Note:
Jenkins will have many jobs which may not be documented or is not suitable for adoption yet
Jobs listed on this page is sufficient to setup Sunbird and not every job present in Jenkins is required to be run
Jobs can be run in parallel to speed up execution. The only exception is you should NOT run multiple jobs which clone the code from same repo in parallel
If you get errors in some of the build jobs, rerun the job again
The errors are usually due to missing maven jars or maven repo timeouts
If you get errors even after re-running the job, come back to it later, there are other jobs which would generate dependent jars
Infra Provision
Note:
Jobs can be run in parallel to speed up execution. The only exception is you should NOT run multiple jobs which will provision packages on the same server in parallel
ArtifactUpload
Every job in the Build directory has a corresponding job in ArtifactUpload directory with the same name
These jobs are auto triggered and usually run without issues after the corresponding job in the build directory succeeds
The job will fail if your ansible inventory setup is incorrect or incomplete
If the job has failed, fix the ansible variables issue and rerun the job to upload the artifact / docker image
Ensure the artifact upload jobs are successful before proceeding
Code Deploy
Note:
We will run the jobs which are a pre-requisite for other jobs first
The pre-requisite jobs reside in different folders so we will be jumping across folders
Jobs in the Deploy directory can be run in parallel and don’t have any restrictions if the code is from same repo unlike the Build directory
Ensure you don’t run those jobs in parallel which modify the databases (such as cassandra, neo4j etc)
Last updated