Skip to content

Commit

Permalink
Merge pull request #1023 from ckm007/release-1.2.1.x
Browse files Browse the repository at this point in the history
[MOSIP-34233]
  • Loading branch information
ckm007 authored Jul 18, 2024
2 parents 8734d7d + c25e57f commit 287591b
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 135 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/chart-lint-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ on:
- 1.*
- 0.*
- develop
- MOSIP*
- release*
paths:
- './helm/**'
- 'helm/**'

jobs:
chart-lint-publish:
Expand All @@ -57,6 +56,7 @@ jobs:
LINTING_LINTCONF_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/lintconf.yaml"
LINTING_CHART_TESTING_CONFIG_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-testing-config.yaml"
LINTING_HEALTH_CHECK_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/health-check-schema.yaml"
DEPENDENCIES: "mosip,https://mosip.github.io/mosip-helm;"
secrets:
TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
1 change: 0 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
```
./install.sh
```

## Admin proxy
Admin service accesses other services like Materdata and Keymanager and currently there is only one URL that is used to connect to both these services. This will get fixed in future versions, but as a an interim solution, Admin Proxy docker has been created, which is basically an Nginx proxy connecting to the above services with these URLs:
```
Expand Down
3 changes: 3 additions & 0 deletions deploy/copy_cm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
# DST_NS: Destination namespace

function copying_cm() {
UTIL_URL=https://github.com/mosip/mosip-infra/blob/master/deployment/v3/utils/copy_cm_func.sh
COPY_UTIL=./copy_cm_func.sh
DST_NS=admin

wget -q $UTIL_URL -O copy_cm_func.sh && chmod +x copy_cm_func.sh

$COPY_UTIL configmap global default $DST_NS
$COPY_UTIL configmap artifactory-share artifactory $DST_NS
$COPY_UTIL configmap config-server-share config-server $DST_NS
Expand Down
33 changes: 0 additions & 33 deletions deploy/copy_cm_func.sh

This file was deleted.

25 changes: 25 additions & 0 deletions deploy/copy_cm_kernel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Copy configmaps from other namespaces
# DST_NS: Destination namespace

function copying_cm() {
UTIL_URL=https://github.com/mosip/mosip-infra/blob/master/deployment/v3/utils/copy_cm_func.sh
COPY_UTIL=./copy_cm_func.sh
DST_NS=kernel

wget -q $UTIL_URL -O copy_cm_func.sh && chmod +x copy_cm_func.sh

$COPY_UTIL configmap global default $DST_NS
$COPY_UTIL configmap artifactory-share artifactory $DST_NS
$COPY_UTIL configmap config-server-share config-server $DST_NS
return 0
}

# set commands for error handling.
set -e
set -o errexit ## set -e : exit the script if any statement returns a non-true return value
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable
set -o errtrace # trace ERR through 'time command' and other functions
set -o pipefail # trace ERR through pipes
copying_cm # calling function

7 changes: 4 additions & 3 deletions deploy/delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ function deleting_admin() {
read -p "Are you sure you want to delete ALL Admin helm charts?(Y/n) " yn
if [ $yn = "Y" ]
then
kubectl delete -n $NS -f admin-proxy.yaml
kubectl delete -n $NS -f admin-proxy.yaml
helm -n $NS delete admin-hotlist
helm -n $NS delete admin-service
helm -n $NS delete admin-ui
helm -n $KNS delete otpmanager
helm -n $KNS delete masterdata
break
else
break
Expand All @@ -30,4 +31,4 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable
set -o errtrace # trace ERR through 'time command' and other functions
set -o pipefail # trace ERR through pipes
deleting_admin # calling function
deleting_admin # calling function
20 changes: 8 additions & 12 deletions deploy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ if [ $# -ge 1 ] ; then
fi

NS=admin
NS_KERNEL=kernel
CHART_VERSION=12.1.0
ADMIN_UI_CHART_VERSION=12.0.1
CHART_VERSION=12.1.0-develop

echo Create $NS namespace
kubectl create ns $NS
Expand All @@ -30,26 +28,24 @@ function installing_admin() {
echo Installing Admin-Proxy into Masterdata and Keymanager.
kubectl -n $NS apply -f admin-proxy.yaml

ADMIN_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-admin-host})
echo Installing masterdata and allowing Admin UI to access masterdata services.
helm -n $KNS install masterdata mosip/masterdata --set istio.corsPolicy.allowOrigins\[0\].exact=https://$ADMIN_HOST --version $CHART_VERSION

echo Installing syncdata
helm -n $KNS install syncdata mosip/syncdata --version $CHART_VERSION

echo Installing admin hotlist service.
helm -n $NS install admin-hotlist mosip/admin-hotlist --version $CHART_VERSION

echo Installing admin service. Will wait till service gets installed.
helm -n $NS install admin-service mosip/admin-service --set istio.corsPolicy.allowOrigins\[0\].prefix=https://$ADMIN_HOST --wait --version $CHART_VERSION

echo Installing admin-ui
helm -n $NS install admin-ui mosip/admin-ui --set admin.apiUrl=https://$API_HOST/v1/ --set istio.hosts\[0\]=$ADMIN_HOST --version $ADMIN_UI_CHART_VERSION

kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status

echo Installed admin services

echo "Admin portal URL: https://$ADMIN_HOST/admin-ui/"

echo Installing masterdata and allowing Admin UI to access masterdata services.
helm -n $NS_KERNEL install masterdata mosip/masterdata --set istio.corsPolicy.allowOrigins\[0\].exact=https://$ADMIN_HOST --version $CHART_VERSION

echo Installing syncdata
helm -n $NS_KERNEL install syncdata mosip/syncdata --version $CHART_VERSION
return 0
}

Expand Down
2 changes: 1 addition & 1 deletion helm/admin-hotlist/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: admin-hotlist
description: A Helm chart for MOSIP Admin Hotlist
type: application
version: 12.1.0
version: 12.1.0-develop
appVersion: ""
dependencies:
- name: common
Expand Down
19 changes: 0 additions & 19 deletions helm/admin-hotlist/templates/clusterrolebinding.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/admin-hotlist/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ service:
image:
registry: docker.io
repository: mosipid/hotlist-service
tag: 1.2.1.0
tag: 1.2.0.1

## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
Expand Down
2 changes: 1 addition & 1 deletion helm/admin-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: admin-service
description: A Helm chart for MOSIP Admin module
type: application
version: 12.1.0
version: 12.1.0-develop
appVersion: ""
dependencies:
- name: common
Expand Down
19 changes: 0 additions & 19 deletions helm/admin-service/templates/clusterrolebinding.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/admin-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ service:
image:
registry: docker.io
repository: mosipid/admin-service
tag: 1.2.1.0
tag: 1.2.0.1

## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
Expand Down
2 changes: 1 addition & 1 deletion helm/masterdata/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: masterdata
description: A Helm chart for MOSIP Masterdata module
type: application
version: 12.1.0
version: 12.1.0-develop
appVersion: ""
dependencies:
- name: common
Expand Down
19 changes: 0 additions & 19 deletions helm/masterdata/templates/clusterrolebinding.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/masterdata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ service:
image:
registry: docker.io
repository: mosipid/kernel-masterdata-service
tag: 1.2.1.0
tag: 1.2.0.1
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down
2 changes: 1 addition & 1 deletion helm/syncdata/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: syncdata
description: A Helm chart for MOSIP Syncdata module
type: application
version: 12.1.0
version: 12.1.0-develop
appVersion: ""
dependencies:
- name: common
Expand Down
19 changes: 0 additions & 19 deletions helm/syncdata/templates/clusterrolebinding.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/syncdata/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ service:
image:
registry: docker.io
repository: mosipid/kernel-syncdata-service
tag: 1.2.1.0
tag: 1.2.0.1
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down

0 comments on commit 287591b

Please sign in to comment.