Commit 3d52b12b authored by Keshav Prasad's avatar Keshav Prasad Committed by Rajesh Rajendran
Browse files

fix: codebase from 2.1.0 (#604)

* Issue #000 feat: postgres restore role

* feat: Adding vars of relase-2.0.0 for adopters

* feat: vars of relase-2.0.0 and 1.15 for adopters

* Release 2.0 and 1.15 vars for adopters (#580)

* feat: Adding vars of relase-2.0.0 for adopters

* fix: Fixing jenkins version and Yarn config file

* fix: Fixing private_Repo vars

* fix: Adding new host group for monitoring and logging

* Create Jenkinsfile

* Create plugin.yml

* Update plugin.yml (#591)

* fix: updating badger and apimanager configs (#593)

* fix: Adding redis group

* Issue #000 feat: updated postgres restore role

* Issue #000 feat: added postgres restore jenkins file

* fix: added missing vars

* fix: updating base url value
parent 499386e8
master login-changes loginRegisterBtn prasath-release-5.1.0 release-5.1.0 release-5.1.0-api release-5.1.0-apiuat release-5.1.0-bulk-enrol-unenrol release-5.1.0-uat release-5.1.0-uatLatest release-5.1.0-uatapi release-5.1.0-upsmf-prod release-uat-nginx revert-5-login-changes upstream/release-5.1.0-vdn 3nodeinstall 3node-prior-rebase-2-5 3node-2.6.0 3node 3node_bak_new temp-ratelimit_RC1 tags-for-monitoring-jobs tag-for-backups tag-for-backups_RC1 tag-2.4.0 sunbird.org-release-2.3.0 service-rename-player-2.5.0_RC9 service-rename-kong-2.5.0_RC4 service-rename-content-2.3.0_RC4 revert-incorrect revert-942-release-2.6.0 revert-872-SC-1392-ftl-fix release-dock-0.0.3_RC2 release-dock-0.0.3_RC1 release-5.2.0-inquiry_RC1 release-5.1.0_RC3 release-5.1.0_RC2 release-5.1.0_RC1 release-5.0.2 release-5.0.2_RC1 release-5.0.1 release-5.0.1_RC1 release-5.0.0 release-5.0.0_RC5 release-5.0.0_RC4 release-5.0.0_RC3 release-5.0.0_RC2 release-5.0.0_RC1 release-5.0.0-vdn_RC1 release-4.10.2_RC1 release-4.10.1 release-4.10.1_RC2 release-4.10.1_RC1 release-4.10.0 release-4.10.0_RC1 release-4.10.0-vdn_RC1 release-4.9.0 release-4.9.0_RC4 release-4.9.0_RC3 release-4.9.0_RC2 release-4.9.0_RC1 release-4.9.0-vdn_RC2 release-4.9.0-vdn_RC1 release-4.8.0 release-4.8.0_RC8 release-4.8.0_RC7 release-4.8.0_RC6 release-4.8.0_RC5 release-4.8.0_RC4 release-4.8.0_RC3 release-4.8.0_RC2 release-4.8.0_RC1 release-4.8.0-vdn_RC1 release-4.7.0 release-4.7.0_RC3 release-4.7.0_RC2 release-4.7.0_RC1 release-4.7.0-vdn_RC1 release-4.6.0 release-4.6.0_RC4 release-4.6.0_RC3 release-4.6.0_RC2 release-4.6.0_RC1 release-4.5.0 release-4.5.0_RC6 release-4.5.0_RC5 release-4.5.0_RC4 release-4.5.0_RC3 release-4.5.0_RC2 release-4.5.0_RC1 release-4.4.1_RC2 release-4.4.1_RC1 release-4.4.1-vdn_RC2 release-4.4.1-vdn_RC1 release-4.4.0 release-4.4.0_RC10 release-4.4.0_RC9 release-4.4.0_RC8 release-4.4.0_RC7 release-4.4.0_RC6 release-4.4.0_RC5 release-4.4.0_RC4 release-4.4.0_RC3 release-4.4.0_RC2 release-4.4.0_RC1 release-4.3.0 release-4.3.0_RC7 release-4.3.0_RC6 release-4.3.0_RC5 release-4.3.0_RC4 release-4.3.0_RC3 release-4.3.0_RC2 release-4.3.0_RC1 release-4.2.0 release-4.2.0_RC6 release-4.2.0_RC5 release-4.2.0_RC4 release-4.2.0_RC3 release-4.2.0_RC2 release-4.2.0_RC1 release-4.1.0 release-4.1.0_RC20 release-4.1.0_RC19 release-4.1.0_RC18 release-4.1.0_RC17 release-4.1.0_RC16 release-4.1.0_RC15 release-4.1.0_RC14 release-4.1.0_RC13 release-4.1.0_RC12 release-4.1.0_RC11 release-4.1.0_RC10 release-4.1.0_RC9 release-4.1.0_RC8 release-4.1.0_RC7 release-4.1.0_RC6 release-4.1.0_RC5 release-4.1.0_RC4 release-4.1.0_RC3 release-4.1.0_RC2 release-4.1.0_RC1 release-4.0.0 release-4.0.0_RC6 release-4.0.0_RC5 release-4.0.0_RC4 release-4.0.0_RC3 release-4.0.0_RC2 release-4.0.0_RC1 release-3.9.0 release-3.9.0_RC18 release-3.9.0_RC17 release-3.9.0_RC16 release-3.9.0_RC15 release-3.9.0_RC14 release-3.9.0_RC13 release-3.9.0_RC12 release-3.9.0_RC11 release-3.9.0_RC10 release-3.9.0_RC9 release-3.9.0_RC8 release-3.9.0_RC7 release-3.9.0_RC6 release-3.9.0_RC5 release-3.9.0_RC4 release-3.9.0_RC3 release-3.9.0_RC2 release-3.9.0_RC1 release-3.8.0 release-3.8.0_RC14 release-3.8.0_RC13 release-3.8.0_RC12 release-3.8.0_RC11 release-3.8.0_RC10 release-3.8.0_RC9 release-3.8.0_RC8 release-3.8.0_RC7 release-3.8.0_RC6 release-3.8.0_RC5 release-3.8.0_RC4 release-3.8.0_RC3 release-3.8.0_RC2 release-3.8.0_RC1 release-3.7.0_RC16 release-3.7.0_RC15 release-3.7.0_RC14 release-3.7.0_RC13 release-3.7.0_RC12 release-3.7.0_RC11 release-3.7.0_RC10 release-3.7.0_RC9 release-3.7.0_RC8 release-3.7.0_RC7 release-3.7.0_RC6 release-3.7.0_RC5 release-3.7.0_RC4 release-3.7.0_RC3 release-3.7.0_RC2 release-3.7.0_RC1 release-3.6.5_RC1 release-3.6.0_RC8 release-3.6.0_RC7 release-3.6.0_RC6 release-3.6.0_RC5 release-3.6.0_RC4 release-3.6.0_RC3 release-3.6.0_RC2 release-3.6.0_RC1 release-3.5.0 release-3.5.0_RC8 release-3.5.0_RC7 release-3.5.0_RC6 release-3.5.0_RC5 release-3.5.0_RC4 release-3.5.0_RC3 release-3.5.0_RC2 release-3.5.0_RC1 release-3.4.0 release-3.4.0_RC21 release-3.4.0_RC20 release-3.4.0_RC19 release-3.4.0_RC18 release-3.4.0_RC17 release-3.4.0_RC16 release-3.4.0_RC15 release-3.4.0_RC14 release-3.4.0_RC13 release-3.4.0_RC12 release-3.4.0_RC11 release-3.4.0_RC10 release-3.4.0_RC9 release-3.4.0_RC8 release-3.4.0_RC7 release-3.4.0_RC6 release-3.4.0_RC5 release-3.4.0_RC4 release-3.4.0_RC3 release-3.4.0_RC2 release-3.4.0_RC1 release-3.3.0_RC24 release-3.3.0_RC23 release-3.3.0_RC22 release-3.3.0_RC21 release-3.3.0_RC20 release-3.3.0_RC19 release-3.3.0_RC18 release-3.3.0_RC17 release-3.3.0_RC16 release-3.3.0_RC15 release-3.3.0_RC14 release-3.3.0_RC13 release-3.3.0_RC12 release-3.3.0_RC11 release-3.3.0_RC10 release-3.3.0_RC9 release-3.3.0_RC8 release-3.3.0_RC7 release-3.3.0_RC6 release-3.3.0_RC5 release-3.3.0_RC4 release-3.3.0_RC3 release-3.3.0_RC2 release-3.3.0_RC1 release-3.2.7 release-3.2.7_RC14 release-3.2.7_RC13 release-3.2.7_RC12 release-3.2.7_RC11 release-3.2.7_RC10 release-3.2.7_RC9 release-3.2.7_RC8 release-3.2.7_RC7 release-3.2.7_RC6 release-3.2.7_RC5 release-3.2.7_RC4 release-3.2.7_RC3 release-3.2.7_RC2 release-3.2.7_RC1 release-3.2.0_RC21 release-3.2.0_RC20 release-3.2.0_RC19 release-3.2.0_RC18 release-3.2.0_RC17 release-3.2.0_RC16 release-3.2.0_RC15 release-3.2.0_RC14 release-3.2.0_RC13 release-3.2.0_RC12 release-3.2.0_RC11 release-3.2.0_RC10 release-3.2.0_RC9 release-3.2.0_RC8 release-3.2.0_RC7 release-3.2.0_RC6 release-3.2.0_RC5 release-3.2.0_RC4 release-3.2.0_RC3 release-3.2.0_RC2 release-3.2.0_RC1 release-3.1.0 release-3.1.0_RC10 release-3.1.0_RC9 release-3.1.0_RC8 release-3.1.0_RC7 release-3.1.0_RC6 release-3.1.0_RC5 release-3.1.0_RC4 release-3.1.0_RC3 release-3.1.0_RC2 release-3.1.0_RC1 release-3.0.1_RC7 release-3.0.1_RC6 release-3.0.1_RC5 release-3.0.1_RC4 release-3.0.1_RC3 release-3.0.1_RC2 release-3.0.1_RC1 release-3.0.0 release-3.0.0_RC42 release-3.0.0_RC41 release-3.0.0_RC40 release-3.0.0_RC39 release-3.0.0_RC38 release-3.0.0_RC37 release-3.0.0_RC36 release-3.0.0_RC35 release-3.0.0_RC34 release-3.0.0_RC33 release-3.0.0_RC32 release-3.0.0_RC31 release-3.0.0_RC30 release-3.0.0_RC29 release-3.0.0_RC28 release-3.0.0_RC27 release-3.0.0_RC26 release-3.0.0_RC25 release-3.0.0_RC24 release-3.0.0_RC23 release-3.0.0_RC22 release-3.0.0_RC21 release-3.0.0_RC20 release-3.0.0_RC19 release-3.0.0_RC18 release-3.0.0_RC17 release-3.0.0_RC16 release-3.0.0_RC15 release-3.0.0_RC14 release-3.0.0_RC13 release-3.0.0_RC12 release-3.0.0_RC11 release-3.0.0_RC10 release-3.0.0_RC9 release-3.0.0_RC8 release-3.0.0_RC7 release-3.0.0_RC6 release-3.0.0_RC5 release-3.0.0_RC4 release-3.0.0_RC3 release-3.0.0_RC2 release-3.0.0_RC1 release-2.10.0 release-2.10.0_RC24 release-2.10.0_RC23 release-2.10.0_RC22 release-2.10.0_RC21 release-2.10.0_RC20 release-2.10.0_RC19 release-2.10.0_RC18 release-2.10.0_RC17 release-2.10.0_RC16 release-2.10.0_RC15 release-2.10.0_RC14 release-2.10.0_RC13 release-2.10.0_RC12 release-2.10.0_RC11 release-2.10.0_RC10 release-2.10.0_RC9 release-2.10.0_RC8 release-2.10.0_RC7 release-2.10.0_RC6 release-2.10.0_RC5 release-2.10.0_RC4 release-2.10.0_RC3 release-2.10.0_RC2 release-2.10.0_RC1 release-2.9.0_RC13 release-2.9.0_RC12 release-2.9.0_RC11 release-2.9.0_RC10 release-2.9.0_RC9 release-2.9.0_RC8 release-2.9.0_RC7 release-2.9.0_RC6 release-2.9.0_RC5 release-2.9.0_RC4 release-2.9.0_RC3 release-2.9.0_RC2 release-2.9.0_RC1 release-2.8.0 release-2.8.0_RC34 release-2.8.0_RC33 release-2.8.0_RC32 release-2.8.0_RC31 release-2.8.0_RC30 release-2.8.0_RC29 release-2.8.0_RC28 release-2.8.0_RC27 release-2.8.0_RC26 release-2.8.0_RC25 release-2.8.0_RC24 release-2.8.0_RC23 release-2.8.0_RC22 release-2.8.0_RC21 release-2.8.0_RC20 release-2.8.0_RC19 release-2.8.0_RC18 release-2.8.0_RC17 release-2.8.0_RC16 release-2.8.0_RC15 release-2.8.0_RC14 release-2.8.0_RC13 release-2.8.0_RC12 release-2.8.0_RC11 release-2.8.0_RC10 release-2.8.0_RC9 release-2.8.0_RC8 release-2.8.0_RC7 release-2.8.0_RC6 release-2.8.0_RC5 release-2.8.0_RC4 release-2.8.0_RC3 release-2.8.0_RC2 release-2.8.0_RC1 release-2.8.0-desktopapis-hotfix release-2.7.0 release-2.7.0_RC16 release-2.7.0_RC15 release-2.7.0_RC14 release-2.7.0_RC13 release-2.7.0_RC12 release-2.7.0_RC11 release-2.7.0_RC10 release-2.7.0_RC9 release-2.7.0_RC8 release-2.7.0_RC7 release-2.7.0_RC6 release-2.7.0_RC5 release-2.7.0_RC4 release-2.7.0_RC3 release-2.7.0_RC2 release-2.7.0_RC1 release-2.6.5_RC3 release-2.6.5_RC2 release-2.6.5_RC1 release-2.6.5_Kong10_RC2 release-2.6.0 release-2.6.0_kong9 release-2.6.0_kong_RC1 release-2.6.0_RC25 release-2.6.0_RC24 release-2.6.0_RC23 release-2.6.0_RC22 release-2.6.0_RC21 release-2.6.0_RC20 release-2.6.0_RC19 release-2.6.0_RC18 release-2.6.0_RC17 release-2.6.0_RC16 release-2.6.0_RC15 release-2.6.0_RC14 release-2.6.0_RC13 release-2.6.0_RC12 release-2.6.0_RC11 release-2.6.0_RC10 release-2.6.0_RC9 release-2.6.0_RC8 release-2.6.0_RC7 release-2.6.0_RC6 release-2.6.0_RC5 release-2.6.0_RC4 release-2.6.0_RC3 release-2.6.0_RC2 release-2.6.0_RC1 release-2.6.0-k8s_9467d13 release-2.5.0 release-2.5.0_RC12 release-2.5.0_RC11 release-2.5.0_RC10 release-2.5.0_RC9 release-2.5.0_RC9_portalfix release-2.5.0_RC8 release-2.5.0_RC7 release-2.5.0_RC6 release-2.5.0_RC5 release-2.5.0_RC4 release-2.5.0_RC4_kong release-2.5.0_RC3 release-2.5.0_RC2 release-2.5.0_RC1 release-2.4.0 release-2.4.0_RC9 release-2.4.0_RC9_portal_RC2 release-2.4.0_RC9_portal_RC1 release-2.4.0_RC8 release-2.4.0_RC7 release-2.4.0_RC6 release-2.4.0_RC5 release-2.4.0_RC4 release-2.4.0_RC3 release-2.4.0_RC2 release-2.4.0_RC2_kong_9 release-2.4.0_RC1 release-2.3.5_RC5 release-2.3.5_RC4 release-2.3.5_RC3 release-2.3.5_RC2 release-2.3.5_RC1 release-2.3.5_RC1_kong_9 release-2.3.0 release-2.3.0_RC9 release-2.3.0_RC8 release-2.3.0_RC7 release-2.3.0_RC6 release-2.3.0_RC5 release-2.3.0_RC4 release-2.3.0_RC3 release-2.3.0_RC2 release-2.3.0_RC1 portal-fix player-var original-tag-2.4.0 master master_e26ae85 loadtest-release-2.10.0_nginx_prometheus kubernetes keycloak-3.2.0 keycloak-3.2.0_RC1 keycloak7_RC1 jenkins-config fix-tag-2.4.0 es-mapping dock-0.0.3_RC7 dock-0.0.3_RC6 dock-0.0.3_RC5 dock-0.0.3_RC4 dock-0.0.3_RC3 dock-0.0.3_RC2 dock-0.0.3_RC1 dock-0.0.3-before-delete dock-0.0.2_RC13 dock-0.0.2_RC12 dock-0.0.2_RC11 dock-0.0.2_RC10 dock-0.0.2_RC9 dock-0.0.2_RC8 dock-0.0.2_RC7 dock-0.0.2_RC6 dock-0.0.2_RC5 dock-0.0.2_RC4 dock-0.0.2_RC3 dock-0.0.2_RC2 dock-0.0.2_RC1 backup SMYALTAMASH-patch-1 SB-14110
No related merge requests found
Showing with 282 additions and 92 deletions
+282 -92
......@@ -335,7 +335,8 @@ sunbird_open_saber_bridge_enable: 'false'
sunbird_content_service_enable_logging: 'true'
sunbird_language_service_api_key: "{{core_vault_sunbird_ekstep_api_key}}"
sunbird_installation_display_name: "{{sunbird_app_name}} {{env}}"
sunbird_ekstep_api_base_url: "https://{{ekstep_s3_env}}.ekstep.in/api" #API base URL of the Ekstep environment. Use `https://qa.ekstep.in/api` for non-prod deployments, and use `https://api.ekstep.in/` for prod deployment.
sunbird_ekstep_proxy_base_url: "https://{{ekstep_s3_env}}.ekstep.in" #Base URL of the Ekstep environment. Use `https://qa.ekstep.in/` for non-prod deployments, and `https://community.ekstep.in/` for prod deployment.
sunbird_ekstep_api_base_url: "{{sunbird_ekstep_proxy_base_url}}/api" #API base URL of the Ekstep environment. Use `https://qa.ekstep.in/api` for non-prod deployments, and use `https://api.ekstep.in/` for prod deployment.
sunbird_language_service_api_base_url: '{{sunbird_ekstep_api_base_url}}/language'
kong_version: 1.5.0-gold
......
- hosts: local
become: yes
gather_facts: no
vars_files:
- "{{inventory_dir}}/secrets.yml"
environment:
AZURE_STORAGE_ACCOUNT: "{{ azure_plugin_storage_account_name }}"
AZURE_STORAGE_KEY: "{{ azure_plugin_storage_account_key }}"
tasks:
- name: delte plugin org_sunbird_questionunit_quml
command: "az storage blob delete-batch --source {{ plugin_container_name }} --pattern content-plugins/{{ plugins_name }}"
async: 3600
poll: 10
tags:
- org_sunbird_questionunit_quml
- name: upload plugin org_sunbird_questionunit_quml
command: "az storage blob upload-batch --destination {{ plugin_container_name }}/content-plugins/{{ plugins_name }} --source {{ source_file }}"
async: 3600
poll: 10
tags:
- org_sunbird_questionunit_quml
- hosts: postgresql-restore
- hosts: local
become: yes
vars_files:
- ['{{inventory_dir}}/secrets.yml', 'secrets/{{env}}.yml']
- ['{{inventory_dir}}/secrets.yml']
roles:
- postgresql-restore
- postgres-azure-managed-service-restore
tags:
- postgresql-restore
postgresql_restore_dir: /tmp/postgres-restore
postgres_backup_azure_container_name: postgresql-backup
db:
name: ['keycloak', 'api_manager_{{ postgres_env }}', 'badger', 'quartz']
role: ['keycloak', 'api_manager_{{ postgres_env }}', 'badger', 'quartz']
user: ['azure_superuser, {{ env_user_name }}']
#these variables are passed as extra vars
postgres_backup_filename:
postgres_user:
postgres_password:
postgres_hostname:
postgres_env:
- name: install psycopg2
package:
name: python-psycopg2
state: present
- name: ensure restore dir exists
file: path="{{ postgresql_restore_dir }}" state=directory mode=0777
- set_fact:
postgres_backup_filepath: "{{ postgresql_restore_dir }}/{{ postgres_backup_filename }}"
- name: Download backup from azure
command: az storage blob download -c {{ postgres_backup_azure_container_name }} --name {{ postgres_backup_filename }} -f {{ postgres_backup_filepath }}
args:
chdir: "{{ postgres_restore_dir }}"
async: 100
poll: 10
- name: unarchive artifact
unarchive: src={{ postgresql_restore_dir }}/{{ postgres_backup_filename }} dest={{ postgresql_restore_dir }}/ copy=no
- name: Create db's
postgresql_db:
login_user: "{{ postgres_user }}"
login_password: "{{ postgres_password }}"
login_host: "{{ postgres_hostname }}"
name: "{{ item }}"
state: present
with_items: "{{ db.name }}"
async: 1000
poll: 10
- name: Create role and grant access to db's
postgresql_user:
login_user: "{{ postgres_user }}"
login_password: "{{ postgres_password }}"
login_host: "{{ postgres_hostname }}"
db: "{{ item[0] }}"
name: "{{ item[1] }}"
priv: ALL
state: present
role_attr_flags: CREATEROLE
with_nested:
- "{{ db.name }}"
- "{{ db.role }}"
async: 1000
poll: 10
- name: create user
postgresql_user:
login_user: "{{ postgres_user }}"
login_password: "{{ postgres_password }}"
login_host: "{{ postgres_hostname }}"
name: "{{ item }}"
with_items: "{{ db.user }}"
async: 1000
poll: 10
- name: Restore db's
postgresql_db:
login_user: "{{ postgres_user }}"
login_password: "{{ postgres_password }}"
login_host: "{{ postgres_hostname }}"
name: "{{ item }}"
state: restore
target: "{{ item }}.sql"
args:
chdir: "{{ postgres_restore_dir }}"
with_items: "{{ db.name }}"
......@@ -110,3 +110,4 @@ sunbird_analytics_blob_account_key:
sunbird_portal_player_cdn_enabled:
sunbird_portal_preview_cdn_url:
cdn_file_path:
sunbird_portal_cdn_blob_url:
......@@ -12,7 +12,7 @@ echo -e "\n\e[0;32m${bold}Installating Jenkins${normal}"
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
sudo apt-get update
sudo apt-get install -y jenkins=2.164.2
sudo apt-get install -y jenkins=2.164.3
echo -e "\n\e[0;32m${bold}Installating PIP${normal}"
apt-get install -y python-pip
......
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.32">
<flow-definition plugin="workflow-job@2.33">
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
......@@ -18,26 +18,22 @@
<paramsToUseForLimit></paramsToUseForLimit>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.67">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.3">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/project-sunbird/sunbird-devops</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>${github_release_tag}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<scriptPath>images/kong/Jenkinsfile.build</scriptPath>
<lightweight>false</lightweight>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.70">
<script>node(){
build_tag=&quot;1.8.0-gold&quot;
name=&quot;kong&quot;
node=env.NODE_NAME
org=env.hub_org
sh &quot;&quot;&quot;
docker pull sunbird/kong:1.8.0-gold
docker tag sunbird/kong:1.8.0-gold ${org}/${name}:${build_tag}
&quot;&quot;&quot;
writeFile file: &apos;metadata.json&apos;, text: &apos;{ &quot;image_name&quot; : &quot;&apos; + name + &apos;&quot;, &quot;image_tag&quot; : &quot;&apos; + build_tag + &apos;&quot;, &quot;node_name&quot; : &quot;&apos; + node + &apos;&quot;}&apos;
archiveArtifacts artifacts: &apos;metadata.json&apos;, onlyIfSuccessful: true
}</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.31">
<flow-definition plugin="workflow-job@2.33">
<actions>
<org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction plugin="workflow-multibranch@2.20">
<org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction plugin="workflow-multibranch@2.21">
<jobPropertyDescriptors>
<string>hudson.model.ParametersDefinitionProperty</string>
<string>com.sonyericsson.rebuild.RebuildSettings</string>
......@@ -20,20 +20,10 @@
</strategy>
</jenkins.model.BuildDiscarderProperty>
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.29">
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.31">
<autoRebuild>false</autoRebuild>
<rebuildDisabled>false</rebuildDisabled>
</com.sonyericsson.rebuild.RebuildSettings>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>github_release_tag</name>
<description>&lt;font color=red size=2&gt;&lt;b&gt;CAUTION: If the value is blank, latest code will be built. Specify github tag name to build from a tag.&lt;/b&gt;&lt;/font&gt;</description>
<defaultValue></defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents@2.0.1">
<maxConcurrentPerNode>0</maxConcurrentPerNode>
<maxConcurrentTotal>0</maxConcurrentTotal>
......@@ -44,40 +34,25 @@
<paramsToUseForLimit></paramsToUseForLimit>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
<triggers>
<com.cloudbees.jenkins.GitHubPushTrigger plugin="github@1.29.4">
<spec></spec>
</com.cloudbees.jenkins.GitHubPushTrigger>
</triggers>
<triggers/>
</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.63">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.3">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/project-sunbird/sunbird-devops.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>${github_release_tag}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions>
<hudson.plugins.git.extensions.impl.CloneOption>
<shallow>true</shallow>
<noTags>false</noTags>
<reference></reference>
<depth>0</depth>
<honorRefspec>false</honorRefspec>
</hudson.plugins.git.extensions.impl.CloneOption>
</extensions>
</scm>
<scriptPath>images/openbadger/Jenkinsfile</scriptPath>
<lightweight>false</lightweight>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.70">
<script>node(){
build_tag=&quot;1.8.0-gold&quot;
name=&quot;badger&quot;
node=env.NODE_NAME
org=env.hub_org
sh &quot;&quot;&quot;
docker pull sunbird/${name}:${build_tag}
docker tag sunbird/${name}:${build_tag} ${org}/${name}:${build_tag}
&quot;&quot;&quot;
writeFile file: &apos;metadata.json&apos;, text: &apos;{ &quot;image_name&quot; : &quot;&apos; + name + &apos;&quot;, &quot;image_tag&quot; : &quot;&apos; + build_tag + &apos;&quot;, &quot;node_name&quot; : &quot;&apos; + node + &apos;&quot;}&apos;
archiveArtifacts artifacts: &apos;metadata.json&apos;, onlyIfSuccessful: true
}</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
<disabled>false</disabled>
......
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.32">
<flow-definition plugin="workflow-job@2.33">
<actions>
<org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction plugin="workflow-multibranch@2.21">
<jobPropertyDescriptors>
......@@ -20,7 +20,7 @@
</strategy>
</jenkins.model.BuildDiscarderProperty>
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.30">
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.31">
<autoRebuild>false</autoRebuild>
<rebuildDisabled>false</rebuildDisabled>
</com.sonyericsson.rebuild.RebuildSettings>
......@@ -32,7 +32,7 @@
<randomName>choice-parameter-196500122471866</randomName>
<visibleItemCount>1</visibleItemCount>
<script class="org.biouno.unochoice.model.GroovyScript">
<secureScript plugin="script-security@1.57">
<secureScript plugin="script-security@1.60">
<script>if (override_private_branch.equals(&quot;true&quot;)) {
return &quot;&quot;&quot;&lt;input name=&quot;value&quot; value=&quot;${private_repo_branch}&quot; class=&quot;setting-input&quot; type=&quot;text&quot;&gt;&lt;br&gt; &lt;font color=dimgray size=2&gt;&lt;b&gt;Change this value to checkout a different branch from private repository.&lt;/b&gt;&lt;/font&gt;&quot;&quot;&quot;
}
......@@ -40,7 +40,7 @@ else
return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quot;&quot;</script>
<sandbox>false</sandbox>
</secureScript>
<secureFallbackScript plugin="script-security@1.57">
<secureFallbackScript plugin="script-security@1.60">
<script>return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quot;&quot;</script>
<sandbox>false</sandbox>
</secureFallbackScript>
......@@ -57,7 +57,7 @@ return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quo
<randomName>choice-parameter-196500128714203</randomName>
<visibleItemCount>1</visibleItemCount>
<script class="org.biouno.unochoice.model.GroovyScript">
<secureScript plugin="script-security@1.57">
<secureScript plugin="script-security@1.60">
<script>if (override_public_branch.equals(&quot;true&quot;)) {
return &quot;&quot;&quot;&lt;input name=&quot;value&quot; value=&quot;&quot; class=&quot;setting-input&quot; type=&quot;text&quot;&gt;&lt;br&gt; &lt;font color=dimgray size=2&gt;&lt;b&gt;Provide the tag or branch name to checkout the Jenkinsfile and codebase.&lt;br&gt;Note: The tag or branch name for this job should be taken from &lt;a href=&quot;https://github.com/project-sunbird/sunbird-data-pipeline&quot;&gt;project-sunbird/sunbird-data-pipeline&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&quot;&quot;&quot;;
......@@ -66,7 +66,7 @@ else
return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quot;&quot;</script>
<sandbox>false</sandbox>
</secureScript>
<secureFallbackScript plugin="script-security@1.57">
<secureFallbackScript plugin="script-security@1.60">
<script>return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quot;&quot;</script>
<sandbox>false</sandbox>
</secureFallbackScript>
......@@ -77,9 +77,17 @@ return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quo
<choiceType>ET_FORMATTED_HTML</choiceType>
<omitValueField>true</omitValueField>
</org.biouno.unochoice.DynamicReferenceParameter>
<hudson.model.StringParameterDefinition>
<name>hosts</name>
<description>&lt;font color=dimgray size=2&gt;&lt;b&gt;Specify IP or group to limit the run on specific IP or host&lt;/b&gt;&lt;/font&gt;</description>
<defaultValue>all</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents@2.0.1">
<maxConcurrentPerNode>0</maxConcurrentPerNode>
<maxConcurrentTotal>0</maxConcurrentTotal>
<categories class="java.util.concurrent.CopyOnWriteArrayList"/>
<throttleEnabled>false</throttleEnabled>
<throttleOption>project</throttleOption>
......@@ -87,8 +95,8 @@ return &quot;&quot;&quot;&lt;b&gt;This parameter is not used&lt;/b&gt;&quot;&quo
<paramsToUseForLimit></paramsToUseForLimit>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.66">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.3">
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.70">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.10.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
......
......@@ -22,7 +22,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/postgresql-restore.yml"
ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass"
ansibleExtraArgs = "--extra-vars \"postgres_backup_filename=${params.postgres_backup_filename} postgres_user=${params.postgres_user} postgres_password=${params.postgres_password} postgres_hostname=${params.postgres_hostname} postgres_env=${params.postgres_env}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
......
@Library('deploy-conf') _
node() {
try {
String ANSI_GREEN = "\u001B[32m"
String ANSI_NORMAL = "\u001B[0m"
String ANSI_BOLD = "\u001B[1m"
String ANSI_RED = "\u001B[31m"
String ANSI_YELLOW = "\u001B[33m"
stage('checkout public repo') {
cleanWs()
checkout scm
}
ansiColor('xterm') {
values = lp_dp_params()
values.put('module', 'Core')
stage('get artifact') {
currentWs = sh(returnStdout: true, script: 'pwd').trim()
artifact = values.artifact_name + ":" + values.artifact_version
values.put('currentWs', currentWs)
if (params.artifact_source == "ArtifactRepo") {
println(ANSI_BOLD + ANSI_YELLOW + '''\
Option chosen is ArtifactRepo, ignoring any previously copied artifacts and new artifacts will be downloaded from remote source
'''.stripIndent().replace("\n", " ") + ANSI_NORMAL)
ansiblePlaybook = "${currentWs}/ansible/artifacts-download.yml"
ansibleExtraArgs = """\
--extra-vars "artifact=${artifact}
artifact_path=${currentWs}/${artifact}"
--vault-password-file /var/lib/jenkins/secrets/vault-pass
""".stripIndent().replace("\n", " ")
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
ansible_playbook_run(values)
}
else{
println(ANSI_BOLD + ANSI_YELLOW + '''\
Option chosen is JenkinsJob, using the artifacts copied
'''.stripIndent().replace("\n", " ") + ANSI_NORMAL)
}
}
stage('deploy artifact'){
sh """
unzip ${artifact}
unzip content-plugins.zip
chmod a+x content-plugins/az_copy.sh
mv content-plugins ansible
"""
ansiblePlaybook = "${currentWs}/ansible/plugin.yml"
ansibleExtraArgs = "--tags org_sunbird_questionunit_quml --extra-vars \" plugins_name=${params.plugin_name} source_file=${currentWs}/ansible/content-plugins/${params.plugin_name}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
ansible_playbook_run(values)
archiveArtifacts artifacts: "${artifact}", fingerprint: true, onlyIfSuccessful: true
archiveArtifacts artifacts: 'metadata.json', onlyIfSuccessful: true
currentBuild.description = "${values.artifact_version}"
}
}
}
catch (err) {
throw err
}
}
##########################################
# Starting Of Core VARS
env: #Name of the environment, e.g. dev, staging or production.
env_name: "{{ env }}"
domain_name: #Domain on which the portal will be accessed. e.g. staging.{implementation-name}.org
proto: # Protocol
bootstrap_user:
bootstrap_key_path:
ssh_public_key_deployer: "" # SSH Public key for deployer user, with which ansible will execute tasks
ekstep_s3_env: qa # dev or qa of ekstep for plugins
ekstep_s3_env: qa # dev or qa or prod of ekstep for plugins
learningservice_ip: # Load balancer IP for learning server
searchservice_ip: # search service Load balancer IP
analyticsapi_ip: # Analytics Service Load Balancer IP
......@@ -67,4 +68,6 @@ keycloak_ekstep_sunbird_login_theme_dest: "/opt/keycloak/themes/sunbird/login"
keycloak_postgresql: "postgresql-9.4.1212.jar"
sunbird_auth_version: 1.0v
############## Release-1.15.0 & 2.0.0 ##################
#sunbird_cassandra_replication_strategy: '{"class":"NetworkTopologyStrategy","datacenter1":2}' # If using cluster give this value and choose datacenter and replication factor as required '{"class":"NetworkTopologyStrategy","datacenter1":2}' if not using cluster, leave this variable commented
......@@ -36,15 +36,26 @@ log-es-1
[swarm-agent-for-prometheus:children]
swarm-agent-for-prometheus-1
[swarm-agent-for-grafana-1]
[swarm-agent-for-prometheus-stateful:children]
swarm-agent-for-prometheus
[swarm-dashboard-1]
18.0.0.15
[swarm-agent-for-grafana:children]
swarm-agent-for-grafana-1
[swarm-dashboard:children]
swarm-dashboard-1
[swarm-agent-for-alertmanager-1]
[swarm-agent-dashboard-1]
18.0.0.15
[swarm-agent-dashboard:children]
swarm-agent-dashboard-1
[alertmanager_stateful:children]
swarm-agent-dashboard
[swarm-agent-for-alertmanager-1]
18.0.0.15
[es-1]
18.0.0.9 es_instance_name=es-1 es_etc_node_master=true es_etc_node_data=true
......@@ -92,6 +103,15 @@ postgresql-master
[kafka:children]
kafka-1
[processing-cluster-zookeepers]
18.0.0.50 # Zookeeper IP of processing cluster in Data pipeline
[zookeeper:children]
processing-cluster-zookeepers
[lp-redis]
18.0.0.51 # Redis master IP of Knowledge platform
[local]
localhost
......@@ -127,6 +147,8 @@ swarm-nodes
swarm-manager
kafka
keycloak
swarm-dashboard
swarm-agent-dashboard
[env:children]
core
......@@ -142,4 +164,4 @@ swarm-manager
# cluster_name=DC1
#
ansible_ssh_user=deployer
ansible_ssh_private_key_file=/run/secrets/deployer_ssh_key
ansible_ssh_private_key_file=/var/lib/jenkins/secrets/deployer_ssh_key
# !! Might deprecate
core_vault_sunbird_ekstep_api_key:
core_vault_sunbird_encryption_key:
core_vault_sunbird_encryption_key: #Random hash to encrypt data
core_vault_kong__test_jwt:
############# Core #######################
......@@ -21,7 +21,7 @@ core_vault_ansible_vault_password:
################### DONT FILL THESE VARIABLES INITIALLY ###################
core_vault_sunbird_sso_publickey: # Get After Keycloak Deployment
core_vault_sunbird_api_auth_token: #Authorization key (JWT) to access Sunbird APIs. This will be in the output of deploy-apis.sh script, extracting it out is documented in the deployment wiki.
core_vault_sunbird_api_auth_token: #Take the jwt token api-management-test-user from Jenkins job OnboardConsumers and update core_vault_sunbird_api_auth_token if using KP and DP along with core
core_vault_sunbird_keycloak_user_federation_provider_id: # Get after keycloak deployment
######################## Not mandatory ###################################
......
......@@ -9,6 +9,11 @@
[core-cassandra]
15.0.0.7
[core-es-1]
15.0.0.50 # This should be elasticsearch master IP of Core
[core-es:children]
core-es-1
################# LP ##########################
[search]
......@@ -56,9 +61,14 @@ cassandra
15.0.3.8
[influxdb]
#15.0.3.8
15.0.3.6
[redis]
15.0.3.5
[redisall:children]
redis
[processing-cluster-kafka]
15.0.3.8
15.0.3.7
......@@ -70,7 +80,6 @@ cassandra
[telemetry-search-cluster1]
15.0.2.6
[telemetry-search-cluster:children]
telemetry-search-cluster1
......
......@@ -38,5 +38,5 @@ neo4j_enterprise: "true"
## backup
backup_azure_storage_account_name: sunbirdbackupsdev
### overriding backup secret
backup_azure_storage_access_key: "{{lp_vault_backup_azure_storage_secret}}"
backup_azure_storage_access_key: "{{lp_vault_azure_storage_secret}}"
......@@ -31,9 +31,12 @@ redis1
[learning-neo4j-cluster:children]
learning-neo4j-node1
[cassandra]
[cassandra-node-1] # The old cassandra group has been renamed to cassandra-node-* to accomadate for clusters
15.0.2.7
[cassandra:children]
cassandra-node-1
[dp-cassandra]
15.0.2.7
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment