Skip to content

Commit

Permalink
Merge pull request #1039 from shubham17998/release-1.5.x
Browse files Browse the repository at this point in the history
[DSD-6742] Updated Install scripts and README
  • Loading branch information
ckm007 authored Dec 11, 2024
2 parents 2781a9b + 15724e8 commit 74aba18
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
18 changes: 15 additions & 3 deletions deploy/esignet-apitestrig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@

## Introduction
ApiTestRig will test the working of APIs of the MOSIP modules.

## Install
* Create a directory for apitestrig on the NFS server at `/srv/nfs/mosip/<sandbox>/apitestrig/`:
```
mkdir -p /srv/nfs/mosip/<sandbox>/apitestrig/
```
* Ensure the directory has 777 permissions:
```
chmod 777 /srv/nfs/mosip/<sandbox>/apitestrig
```
* Add the following entry to the /etc/exports file:
```
/srv/nfs/mosip/<sandbox>/apitestrig *(ro,sync,no_root_squash,no_all_squash,insecure,subtree_check)
```
* Review `values.yaml` and, Make sure to enable required modules for apitestrig operation.
* Install
```sh
* run `./install.sh`.
```
./install.sh
```

* During the execution of the `install.sh` script, a prompt appears requesting information regarding the presence of a public domain and a valid SSL certificate on the server.
* If the server lacks a public domain and a valid SSL certificate, it is advisable to select the `n` option. Opting it will enable the `init-container` with an `emptyDir` volume and include it in the deployment process.
* The init-container will proceed to download the server's self-signed SSL certificate and mount it to the specified location within the container's Java keystore (i.e., `cacerts`) file.
Expand Down
10 changes: 4 additions & 6 deletions deploy/esignet-apitestrig/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,22 @@ function installing_apitestrig() {
helm repo update

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 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
kubectl -n $NS delete --ignore-not-found=true configmap db
kubectl -n $NS delete --ignore-not-found=true configmap apitestrig

DB_HOST=$( kubectl -n default get cm global -o json |jq -r '.data."mosip-api-internal-host"' )
API_INTERNAL_HOST=$( kubectl -n default get cm global -o json |jq -r '.data."mosip-api-internal-host"' )
ENV_USER=$( kubectl -n default get cm global -o json |jq -r '.data."mosip-api-internal-host"' | awk -F '.' '/api-internal/{print $1"."$2}')
DB_HOST=$( kubectl -n esignet get cm esignet-global -o json |jq -r '.data."mosip-api-internal-host"' )
API_INTERNAL_HOST=$( kubectl -n esignet get cm esignet-global -o json |jq -r '.data."mosip-api-internal-host"' )
ENV_USER=$( kubectl -n esignet get cm esignet-global -o json |jq -r '.data."mosip-api-internal-host"' | awk -F '.' '/api-internal/{print $1"."$2}')

read -p "Please enter the time(hr) to run the cronjob every day (time: 0-23) : " time
if [ -z "$time" ]; then
Expand Down Expand Up @@ -132,7 +130,7 @@ function installing_apitestrig() {
echo "NFS server not provided; EXITING."
exit 1;
fi
read -p "Please provide NFS directory to store reports from NFS server (e.g. /srv/nfs/<sandbox>/apitestrig/), make sure permission is 777 for the folder: " nfs_path
read -p "Please provide NFS directory to store reports from NFS server (e.g. /srv/nfs/mosip/<sandbox>/apitestrig/), make sure permission is 777 for the folder: " nfs_path
if [[ -z $nfs_path ]]; then
echo "NFS Path not provided; EXITING."
exit 1;
Expand Down
4 changes: 2 additions & 2 deletions deploy/esignet-apitestrig/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ modules:
esignet:
enabled: true
image:
repository: mosipqa/apitest-esignet
tag: develop
repository: mosipdev/apitest-esignet
tag: release-1.5.x
pullPolicy: Always

resources:
Expand Down
6 changes: 6 additions & 0 deletions helm/esignet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ extraEnvVars: |
value: esignet
- name: IDA_AUTHENTICATOR_ENV
value: Staging
- name: MOSIP_ESIGNET_UI_CONFIG_USERNAME_PREFIX
value: '+855'
- name: MOSIP_ESIGNET_INTEGRATION_KEY_BINDER
value: MockKeyBindingWrapperService
- name: MOSIP_ESIGNET_SIGNUP_ID_TOKEN_AUDIENCE
value: mosip-signup-oauth-client
- name: REDIS_HOST
valueFrom:
configMapKeyRef:
Expand Down

0 comments on commit 74aba18

Please sign in to comment.