Skip to content

Commit

Permalink
[MOSIP-29035] Updated esignet onboarder script to fetch value from do…
Browse files Browse the repository at this point in the history
…cker env vars (#414)

* [MOSIP-29035] Updated esignet onboarder script to fecth value from docker env vars

* [MOSIP-29035] Removed the dummy value for esignet misp key

* [MOSIP-29035] Updated dummy value with single quotes

---------

Co-authored-by: akilalakshmanan <[email protected]>
  • Loading branch information
akilalakshmanan and akilalakshmanan authored Oct 4, 2023
1 parent 4a39a0c commit 54656bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
6 changes: 3 additions & 3 deletions helm/esignet/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function installing_esignet() {
kubectl -n $NS create secret generic esignet-captcha --from-literal=esignet-captcha-site-key=$ESITE_KEY --from-literal=esignet-captcha-secret-key=$ESECRET_KEY --dry-run=client -o yaml | kubectl apply -f -

echo Setting up dummy values for esignet misp license key
kubectl create secret generic onboarder-keys -n $NS --from-literal=mosip-esignet-misp-key=111111 --dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic esignet-misp-onboarder-key -n $NS --from-literal=mosip-esignet-misp-key='' --dry-run=client -o yaml | kubectl apply -f -

./copy_cm_func.sh secret onboarder-keys esignet config-server
./copy_cm_func.sh secret esignet-misp-onboarder-key esignet config-server

echo Copy configmaps
./copy_cm.sh
Expand All @@ -40,7 +40,7 @@ function installing_esignet() {

kubectl -n config-server set env --keys=esignet-captcha-site-key --from secret/esignet-captcha deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server set env --keys=esignet-captcha-secret-key --from secret/esignet-captcha deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server set env --keys=mosip-esignet-misp-key --from secret/onboarder-keys deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server set env --keys=mosip-esignet-misp-key --from secret/esignet-misp-onboarder-key deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_

kubectl -n config-server get deploy -o name | xargs -n1 -t kubectl -n config-server rollout status

Expand Down
16 changes: 5 additions & 11 deletions partner-onboarder/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,16 @@ function installing_onboarder() {
--version $CHART_VERSION \
--wait --wait-for-jobs


misp_license_key=$(kubectl logs -n $NS job/esignet-resident-oidc-partner-onboarder-esignet | grep "MISP License Key:" | awk '{print $4}')
echo Misp License Key for Esignet Module is: $misp_license_key
resident_oidc_clientid=$(kubectl logs -n $NS job/esignet-resident-oidc-partner-onboarder-resident-oidc | grep "mpartner default resident OIDC clientId:" | awk '{print $6}')
echo Resident OIDC Client ID is: $resident_oidc_clientid
kubectl create secret generic onboarder-keys -n $NS --from-literal=mosip-esignet-misp-key=$misp_license_key --from-literal=resident-oidc-clientid=$resident_oidc_clientid --dry-run=client -o yaml | kubectl apply -f -
./copy_cm_func.sh secret onboarder-keys esignet config-server
./copy_cm_func.sh secret onboarder-keys esignet resident
kubectl -n config-server set env --keys=mosip-esignet-misp-key --from secret/onboarder-keys deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server set env --keys=resident-oidc-clientid --from secret/onboarder-keys deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
./copy_cm_func.sh secret esignet-misp-onboarder-key esignet config-server
./copy_cm_func.sh secret resident-oidc-onboarder-key esignet config-server
./copy_cm_func.sh secret resident-oidc-onboarder-key esignet resident
kubectl -n config-server set env --keys=mosip-esignet-misp-key --from secret/esignet-misp-onboarder-key deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server set env --keys=resident-oidc-clientid --from secret/resident-oidc-onboarder-key deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_
kubectl -n config-server get deploy -o name | xargs -n1 -t kubectl -n config-server rollout status
kubectl rollout restart deployment -n esignet esignet
kubectl rollout restart deployment -n resident resident
echo E-signet MISP License Key and Resident OIDC Client ID updated successfully.


echo Reports are moved to S3 under onboarder bucket

return 0
Expand Down

0 comments on commit 54656bc

Please sign in to comment.