Skip to content

Commit

Permalink
[MOSIP-35421] Moved installtion scripts of prereg apitestrig.
Browse files Browse the repository at this point in the history
Signed-off-by: Mohanraj209 <[email protected]>
  • Loading branch information
Mohanraj209 authored and Mohanraj209 committed Dec 12, 2024
1 parent 65b3c43 commit 3b4e95b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions api-test/deploy/prereg-apitestrig/delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ if [ $# -ge 1 ] ; then
fi

function deleting_apitestrig() {
NS=apitestrig
NS=prereg
while true; do
read -p "Are you sure you want to delete apitestrig helm charts?(Y/n) " yn
if [ $yn = "Y" ]
then
helm -n $NS delete apitestrig
helm -n $NS delete prereg-apitestrig
break
else
break
Expand Down
22 changes: 14 additions & 8 deletions api-test/deploy/prereg-apitestrig/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

NS=apitestrig
NS=prereg
CHART_VERSION=1.3.0-beta.1-develop
COPY_UTIL=../copy_cm_func.sh

echo Create $NS namespace
kubectl create ns $NS
Expand All @@ -17,11 +18,16 @@ function installing_apitestrig() {
kubectl label ns $NS istio-injection=disabled --overwrite
helm repo update

echo Copy configmaps
./copy_cm.sh
echo Copy Configmaps
$COPY_UTIL configmap global default $NS
$COPY_UTIL configmap keycloak-host keycloak $NS
$COPY_UTIL configmap artifactory-share artifactory $NS
$COPY_UTIL configmap config-server-share config-server $NS

echo Copy secrets
./copy_secrets.sh
echo echo Copy Secrtes
$COPY_UTIL secret keycloak-client-secrets keycloak $NS
$COPY_UTIL secret s3 s3 $NS
$COPY_UTIL secret postgres-postgresql postgres $NS

echo "Delete s3, db, & apitestrig configmap if exists"
kubectl -n $NS delete --ignore-not-found=true configmap s3
Expand Down Expand Up @@ -91,8 +97,8 @@ function installing_apitestrig() {
echo "eSignet service is not deployed. hence will be skipping esignet related test-cases..."
fi

echo Installing apitestrig
helm -n $NS install apitestrig mosip/apitestrig \
echo Installing prereg apitestrig
helm -n $NS install prereg-apitestrig mosip/apitestrig \
--set crontime="0 $time * * *" \
-f values.yaml \
--version $CHART_VERSION \
Expand All @@ -111,7 +117,7 @@ function installing_apitestrig() {
--set apitestrig.configmaps.apitestrig.NS="$NS" \
$ENABLE_INSECURE

echo Installed apitestrig.
echo Installed prereg apitestrig.
return 0
}

Expand Down
6 changes: 5 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
```

## Uninstall

```sh
./delete.sh
```

## Restart
```sh
./restart.sh
```

## Test
On a browser open `https://<prereg ui domain>/pre-registration-ui/`. Example `https://prereg.sandbox.xyz.net/pre-registration-ui`. Follow the instructions. You may use [sample documents](samples/) to upload during pre-registration.

Expand Down
Empty file added deploy/copy_cm_func.sh
Empty file.
9 changes: 4 additions & 5 deletions deploy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fi

NS=prereg
CHART_VERSION=1.3.0-beta.1-develop
COPY_UTIL=../copy_cm_func.sh

echo Create $NS namespace
kubectl create ns $NS
Expand All @@ -20,18 +21,16 @@ function installing_prereg() {
helm repo update

echo Copy configmaps
sed -i 's/\r$//' copy_cm.sh
./copy_cm.sh
$COPY_UTIL configmap global default $NS
$COPY_UTIL configmap artifactory-share artifactory $NS
$COPY_UTIL configmap config-server-share config-server $NS

API_HOST=`kubectl get cm global -o jsonpath={.data.mosip-api-host}`
PREREG_HOST=`kubectl get cm global -o jsonpath={.data.mosip-prereg-host}`

echo Install prereg-gateway
helm -n $NS install prereg-gateway mosip/prereg-gateway --set istio.hosts[0]=$PREREG_HOST --version $CHART_VERSION

echo Installing prereg-captcha
helm -n $NS install prereg-captcha mosip/prereg-captcha --version $CHART_VERSION

echo Installing prereg-application
helm -n $NS install prereg-application mosip/prereg-application --version $CHART_VERSION

Expand Down

0 comments on commit 3b4e95b

Please sign in to comment.