Skip to content

Commit

Permalink
Merge pull request #749 from Mohanraj209/develop
Browse files Browse the repository at this point in the history
[MOSIP-35421] Moved installtion scripts of prereg apitestrig.
  • Loading branch information
ckm007 authored Oct 28, 2024
2 parents 10f6a32 + 98fadec commit 18f8bdb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
11 changes: 8 additions & 3 deletions deploy/prereg/copy_cm_func.sh → deploy/copy_cm_func.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ fi
if [ $# -ge 5 ]
then
kubectl -n $4 delete --ignore-not-found=true $RESOURCE $5
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | sed "s/name: $2/name: $5/g" | kubectl -n $4 create -f -
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | sed "s/name: $2/name: $5/g" | kubectl -n $4 create -f -
else
kubectl -n $4 delete --ignore-not-found=true $RESOURCE $2
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | kubectl -n $4 create -f -
fi
kubectl -n $3 get $RESOURCE $2 -o yaml | sed "s/namespace: $3/namespace: $4/g" | kubectl -n $4 create -f -
fi





4 changes: 2 additions & 2 deletions 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=mimoto
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
10 changes: 5 additions & 5 deletions 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=mimoto
NS=prereg
CHART_VERSION=0.0.1-develop
COPY_UTIL=../copy_cm_func.sh

echo Create $NS namespace
kubectl create ns $NS
Expand All @@ -18,7 +19,6 @@ function installing_apitestrig() {
helm repo update

echo Copy Configmaps
COPY_UTIL=../copy_cm_func.sh
$COPY_UTIL configmap global default $NS
$COPY_UTIL configmap keycloak-host keycloak $NS
$COPY_UTIL configmap artifactory-share artifactory $NS
Expand Down Expand Up @@ -97,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 @@ -117,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/prereg/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
1 change: 1 addition & 0 deletions deploy/prereg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fi

NS=prereg
CHART_VERSION=0.0.1-develop
COPY_UTIL=../copy_cm_func.sh

echo Create $NS namespace
kubectl create ns $NS
Expand Down

0 comments on commit 18f8bdb

Please sign in to comment.