diff --git a/deploy/copy_cm.sh b/deploy/copy_cm.sh deleted file mode 100755 index d20a6cf277..0000000000 --- a/deploy/copy_cm.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copy configmaps from other namespaces -# DST_NS: Destination namespace - -function copying_cm() { - UTIL_URL=https://raw.githubusercontent.com/mosip/mosip-infra/master/deployment/v3/utils/copy_cm_func.sh - COPY_UTIL=./copy_cm_func.sh - DST_NS=prereg - - 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 diff --git a/deploy/prereg-apitestrig/README.md b/deploy/prereg-apitestrig/README.md new file mode 100644 index 0000000000..95eaadd08f --- /dev/null +++ b/deploy/prereg-apitestrig/README.md @@ -0,0 +1,44 @@ +# APITESTRIG + +## Introduction +ApiTestRig will test the working of APIs of the MOSIP modules. + +## Install +* Review `values.yaml` and, Make sure to enable required modules for apitestrig operation. +* 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. +* This particular functionality caters to scenarios where the script needs to be employed on a server utilizing self-signed SSL certificates. + +## Uninstall +* To uninstall ApiTestRig, run `delete.sh` script. +```sh +./delete.sh +``` + +## Run apitestrig manually + +#### Rancher UI +* Run apitestrig manually via Rancher UI. + ![apitestrig-2.png](../../docs/apitestrig-2.png) +* There are two modes of apitestrig `smoke` & `smokeAndRegression`. +* By default, apitestrig will execute with `smokeAndRegression`.
+ If you want to run apitestrig with only `smoke`.
+ You have to update the `apitestrig` configmap and rerun the specific apitestrig job. + +#### CLI +* Download Kubernetes cluster `kubeconfig` file from `rancher dashboard` to your local. + ![apitestrig-1.png](../../docs/apitestrig-1.png) +* Install `kubectl` package to your local machine. +* Run apitestrig manually via CLI by creating a new job from an existing k8s cronjob. + ``` + kubectl --kubeconfig= -n apitestrig create job --from=cronjob/ + ``` + example: + ``` + kubectl --kubeconfig=/home/xxx/Downloads/qa4.config -n apitestrig create job --from=cronjob/cronjob-apitestrig-masterdata cronjob-apitestrig-masterdata + ``` diff --git a/deploy/prereg-apitestrig/install.sh b/deploy/prereg-apitestrig/install.sh index 18f36b5c6b..657b2fd67e 100644 --- a/deploy/prereg-apitestrig/install.sh +++ b/deploy/prereg-apitestrig/install.sh @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then fi NS=prereg -CHART_VERSION=0.0.1-develop +CHART_VERSION=1.3.0-beta.1-develop COPY_UTIL=../copy_cm_func.sh echo Create $NS namespace @@ -127,4 +127,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 -installing_apitestrig # calling function \ No newline at end of file +installing_apitestrig # calling function diff --git a/deploy/prereg-apitestrig/values.yaml b/deploy/prereg-apitestrig/values.yaml new file mode 100644 index 0000000000..2c9f8e9e13 --- /dev/null +++ b/deploy/prereg-apitestrig/values.yaml @@ -0,0 +1,7 @@ +modules: + prereg: + enabled: true + image: + repository: mosipqa/apitest-prereg + tag: develop + pullPolicy: Always diff --git a/deploy/README.md b/deploy/prereg/README.md similarity index 96% rename from deploy/README.md rename to deploy/prereg/README.md index cd8a05f772..e42b61bb13 100644 --- a/deploy/README.md +++ b/deploy/prereg/README.md @@ -25,7 +25,7 @@ On a browser open `https:///pre-registration-ui/`. Example `h ## Rate Control Using Envoyfilter - Using Envoyfilter one can limit the rate of http requests coming in to a resource. Reference: [Istio Policty Enforcement](https://istio.io/latest/docs/tasks/policy-enforcement/rate-limit/#local-rate-limit) and [Rate Limit Filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter). -- Edit the envoyfilter [here](./rate-control-envoyfilter.yaml) +- Edit the envoyfilter [here](rate-control-envoyfilter.yaml) - Edit these values in the envoyfilter accordingly. ``` token_bucket: diff --git a/deploy/delete.sh b/deploy/prereg/delete.sh similarity index 100% rename from deploy/delete.sh rename to deploy/prereg/delete.sh diff --git a/deploy/get_logs.sh b/deploy/prereg/get_logs.sh similarity index 100% rename from deploy/get_logs.sh rename to deploy/prereg/get_logs.sh diff --git a/deploy/install.sh b/deploy/prereg/install.sh similarity index 100% rename from deploy/install.sh rename to deploy/prereg/install.sh diff --git a/deploy/rate-control-envoyfilter.yaml b/deploy/prereg/rate-control-envoyfilter.yaml similarity index 100% rename from deploy/rate-control-envoyfilter.yaml rename to deploy/prereg/rate-control-envoyfilter.yaml diff --git a/deploy/restart.sh b/deploy/prereg/restart.sh similarity index 100% rename from deploy/restart.sh rename to deploy/prereg/restart.sh diff --git a/deploy/samples/sample_address_proof.pdf b/deploy/prereg/samples/sample_address_proof.pdf similarity index 100% rename from deploy/samples/sample_address_proof.pdf rename to deploy/prereg/samples/sample_address_proof.pdf diff --git a/deploy/samples/sample_exception_proof.pdf b/deploy/prereg/samples/sample_exception_proof.pdf similarity index 100% rename from deploy/samples/sample_exception_proof.pdf rename to deploy/prereg/samples/sample_exception_proof.pdf diff --git a/deploy/samples/sample_identity_proof.pdf b/deploy/prereg/samples/sample_identity_proof.pdf similarity index 100% rename from deploy/samples/sample_identity_proof.pdf rename to deploy/prereg/samples/sample_identity_proof.pdf diff --git a/deploy/samples/sample_relationship_proof.pdf b/deploy/prereg/samples/sample_relationship_proof.pdf similarity index 100% rename from deploy/samples/sample_relationship_proof.pdf rename to deploy/prereg/samples/sample_relationship_proof.pdf diff --git a/docs/apitestrig-1.png b/docs/apitestrig-1.png new file mode 100644 index 0000000000..a7f36f6f05 Binary files /dev/null and b/docs/apitestrig-1.png differ diff --git a/docs/apitestrig-2.png b/docs/apitestrig-2.png new file mode 100644 index 0000000000..c6e48e63d3 Binary files /dev/null and b/docs/apitestrig-2.png differ