-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from project-sunbird/release-7.0.0
Release 7.0.0
- Loading branch information
Showing
147 changed files
with
9,986 additions
and
1,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# Adding Support for a New Cloud Provider | ||
|
||
## Requirements | ||
|
||
### Cluster Specifications | ||
- **Minimum Requirements:** | ||
- CPU: 48 vCPUs | ||
- Memory: 192 GB | ||
- **Recommended Node Size:** | ||
- 3 nodes of `Standard_B16as_v2` (16 vCPUs, 64 GB RAM) | ||
|
||
### Networking | ||
- Public Subnet | ||
|
||
### Storage Buckets | ||
Create the following buckets: | ||
1. `storage_container_private` | ||
2. `storage_container_public` | ||
3. `reports_container_private` | ||
4. `telemetry_container_private` | ||
5. `backups_container_private` | ||
6. `flink_state_container_private` | ||
7. `dial_state_container_public` | ||
|
||
### Additional Requirements | ||
1. Storage Account | ||
2. Random String | ||
3. Encryption String | ||
4. JWT Tokens | ||
5. RSA Keys | ||
|
||
--- | ||
|
||
## Steps to Add a New Cloud Provider | ||
|
||
### Step 1: Create a New Folder | ||
- Navigate to the `terraform` directory and create a folder for the new cloud provider. | ||
Example: `terraform/gcp/` | ||
|
||
### Step 2: Recommended Folder Structure | ||
Organize the folder as follows: | ||
```plaintext | ||
terraform/<cloud_provider>/ | ||
├── _common | ||
│ ├── kubernetescluster.hcl | ||
│ ├── keys.hcl | ||
│ ├── network.hcl | ||
│ ├── output-file.hcl | ||
│ ├── serviceaccount.hcl | ||
│ ├── storage.hcl | ||
│ └── upload-files.hcl | ||
├── modules | ||
│ ├── kubernetescluster | ||
│ ├── keys | ||
│ ├── network | ||
│ ├── output-file | ||
│ ├── serviceaccount | ||
│ ├── storage | ||
│ └── upload-files | ||
└── template/ | ||
├── kubernetescluster | ||
│ └── terragrunt.hcl | ||
├── create_tf_backend.sh | ||
├── environment.hcl | ||
├── global-values.yaml | ||
├── install.sh | ||
├── keys | ||
│ └── terragrunt.hcl | ||
├── network | ||
│ └── terragrunt.hcl | ||
├── output-file | ||
│ └── terragrunt.hcl | ||
├── postman.env.json | ||
├── storage | ||
│ └── terragrunt.hcl | ||
├── terragrunt.hcl | ||
└── upload-files | ||
└── terragrunt.hcl | ||
``` | ||
|
||
### Step 3: Copy Template Files | ||
Copy the template files from the Azure configuration: | ||
```sh | ||
cp sunbird-ed-installer/terraform/azure/template/{environment.hcl,global-values.yaml,install.sh} sunbird-ed-installer/terraform/gcp/template/ | ||
In global-values.yaml, add this variable: | ||
cloud_provider: "REPLACE_ME" # for configuring GCP and AWS installations | ||
``` | ||
|
||
### Step 4: Structuring Output Files | ||
This will become the input for Helm bundles: | ||
```plaintext | ||
global-cloud-values.yaml | ||
environment.hcl | ||
global-values.yaml | ||
``` | ||
|
||
### Step 5: Helm Changes | ||
In Helm charts, wherever cloud values are being referred to, use the following format: | ||
```yaml | ||
{{- if eq .Values.global.cloud_provider "aws" }} | ||
# AWS Specific Values | ||
{{- else if eq .Values.global.cloud_provider "gcp" }} | ||
# GCP Specific Values | ||
{{- end }} | ||
``` | ||
|
||
#### Example: | ||
In **Helm charts**, using a direct reference for **Azure**: | ||
```yaml | ||
container_name: "{{ .Values.global.azure_telemetry_container_name }}" | ||
``` | ||
Using an `if-else` condition for multiple cloud providers: | ||
```yaml | ||
container_name: | ||
{{- if eq .Values.global.cloud_provider "aws" }} | ||
"{{ .Values.global.aws_public_bucket_name }}" | ||
{{- else if eq .Values.global.cloud_provider "gcp" }} | ||
"{{ .Values.global.gcp_public_bucket_name }}" | ||
{{- else }} | ||
"{{ .Values.telemetry_container_private }}" | ||
{{- end }} | ||
``` | ||
|
||
### Step 6: Enable Service Account and Add Annotations | ||
When using storage buckets, ensure the appropriate service account is enabled and annotated | ||
For example: | ||
```yaml | ||
serviceAccount: | ||
create: true | ||
name: <created at step 2> | ||
annotations: | ||
iam.gke.io/gcp-service-account: iam.gke.io/gcp-service-account: <service-account-name>@<project-id>.iam.gserviceaccount.com | ||
``` | ||
|
||
For **Azure installation**, please refer to the documentation: | ||
`/sunbird-ed-installer/README.md` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,28 @@ | |
|
||
#### Pre-requisites | ||
|
||
1. Domain Name | ||
2. SSL Certificate(FullChain -> private key and Certificate+CA_Bundle). **Fullchain is mandatory**, else installation will fail. | ||
|
||
#### Required CLI tools | ||
1. Azure CLI (https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) | ||
2. jq (https://jqlang.github.io/jq/download/) | ||
3. rclone (https://rclone.org/) | ||
4. Terraform (https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) | ||
5. Terragrunt (https://terragrunt.gruntwork.io/docs/getting-started/install/) | ||
7. Linux / Macos / Gitbash (Windows) | ||
8. Python 3 | ||
9. PyJwt python package (you can using using pip) | ||
10. [kubectl](https://kubernetes.io/docs/tasks/tools/) | ||
11. [helm](https://helm.sh/docs/intro/quickstart/#install-helm) | ||
12. Postman CLI (https://learning.postman.com/docs/getting-started/installation/installation-and-updates/) | ||
1. **Domain Name** | ||
2. **SSL Certificate**: The FullChain, consisting of the private key and Certificate+CA_Bundle, is mandatory for installation. | ||
3. **Google OAuth Credentials**: [Create credentials](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id) | ||
4. **Google V3 ReCaptcha Credentials**: [Create credentials](https://www.google.com/recaptcha/admin) | ||
5. **Email Service Provider** | ||
6. **MSG91 SMS Service Provider API Token** (Optional): Required for sending OTPs to registered email addresses during user registration or password reset. | ||
7. **YouTube API Token** (Optional): Necessary for uploading video content directly via YouTube URL. | ||
|
||
#### Required CLI Tools | ||
|
||
1. [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) | ||
2. [jq](https://jqlang.github.io/jq/download/) | ||
3. [rclone](https://rclone.org/) | ||
4. [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) | ||
5. [Terragrunt](https://terragrunt.gruntwork.io/docs/getting-started/install/) | ||
6. Linux / MacOS / GitBash (Windows) | ||
7. Python 3 | ||
8. PyJWT Python Package (install via pip) | ||
9. [kubectl](https://kubernetes.io/docs/tasks/tools/) | ||
10. [helm](https://helm.sh/docs/intro/quickstart/#install-helm) | ||
11. [Postman CLI](https://learning.postman.com/docs/getting-started/installation/installation-and-updates/) | ||
|
||
|
||
**Note:** | ||
|
||
|
@@ -39,7 +46,6 @@ We will copy your existing files in the below location with a `.bak` extension a | |
| Name | Description | | ||
|----------------|------------------| | ||
|`environment` | Environment name (between 1 - 9 charcaters). Example: *dev*, *stage* | | ||
|`random_string` | Alphanumeric random string (between 12 - 24) characters. Example: *U2PNfwcz6rb9756ZwAwZ* | | ||
|
||
#### Mandatory variables in `global-values.yaml` | ||
| Name | Description | | ||
|
@@ -60,6 +66,11 @@ cd dev | |
2. Update required values in `environment.hcl` and `global-values.yaml` files | ||
3. Run `bash install.sh` | ||
|
||
## Client form setup | ||
To setup client forms - Run the install.sh with the function create_client_forms | ||
|
||
`bash install.sh create_client_forms` | ||
|
||
## Default users in the instance | ||
This installation setup creates the following default users with different roles. Feel free to update the password using "Forgot password" option or create new users using API's | ||
|
||
|
@@ -72,3 +83,4 @@ This installation setup creates the following default users with different roles | |
|Book Reviewer | [email protected] | bookReviewer@123| | ||
|Public User 1 | [email protected] | User1@123| | ||
|Public User 2 | [email protected] | User2@123| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.