Skip to content

Commit

Permalink
Revert "Revert "Merge pull request #486 from ase-101/localdev"" (#492)
Browse files Browse the repository at this point in the history
Signed-off-by: ase-101 <[email protected]>
  • Loading branch information
ase-101 authored Dec 19, 2024
1 parent 1ff1d57 commit 63dd861
Show file tree
Hide file tree
Showing 72 changed files with 2,531 additions and 581 deletions.
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# eSignet Signup

signup-service is part of the esignet, but has a separate Helm chart to install and manage it in a completely independent namespace.
## Overview

This repository contains a signup UI and signup service to handle signup operations by the end user. This module can be
used to fast-track the availability of any digital service to end users via eSignet. eSignet has built-in support for the
integration with the signup module. The signup service is flexible to connect to any ID registry system via a well-defined plugin interface.

Currently, signup supports below features:
1. Register User
2. Reset password
3. Online video based identity verification workflow integration via plugin

## Build (for developers)
The project requires JDK 11.
1. Build:
```
$ mvn clean install -Dgpg.skip=true -Dmaven.gitcommitid.skip=true
```
## Installing in k8s cluster using helm
signup-service is part of the esignet, but has a separate Helm chart to install and manage it in a completely independent namespace.
### Pre-requisites
1. Set the kube config file of the Esignet k8 cluster having esignet services is set correctly in PC.
1. Below are the dependent services required for signup service integrated with MOSIP IDA:
1. Below are the dependent services required for signup service integrated with [Mock Identity System](https://github.com/mosip/esignet-mock-services/tree/master/mock-identity-system)
| Chart | Chart version |
|---|---|
|[Keycloak](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/iam) | 7.1.18 |
Expand Down Expand Up @@ -36,11 +55,35 @@ cd deploy
cd deploy
./restart-signup.sh
```
### Additional services required
To complete the signup portal deployment below MOSIP kernel services are required to be deployed.
* otpmanager
* authmanager
* auditmanager
* notifier
* Initialize the db script to create mosip_kernel and mosip_audit databases make sure to update the existing db-common-secret in init_values.yaml if postgres-initialization already done
* copy db-common-secret from existing postgres deployment secret if its already created
* run the postgres-init.sh
```
cd deploy
./postgres-init.sh
```
#### Prerequisites for MOSIP kernel services:
1. msg-gateway
2. config-server
3. artifactory
4. mock-smtp
5. kernel
```
cd deploy (follow the above sequence and run the install.sh for each module installation)

```
## Partner onboarding
* Perform Partner onboarding for esignet Signup OIDC client using [steps](partner-onboarder/README.md) only if mosip-identity plugin is used.
## APIs
API documentation is available [here](https://mosip.stoplight.io/docs/identity-provider/branches/signupV1/t9tvfbteqqokf-e-signet-signup-portal-ap-is).
API documentation is available [here](docs/esignet-signup-openapi.yaml).
## License
This project is licensed under the terms of [Mozilla Public License 2.0](LICENSE).
1 change: 1 addition & 0 deletions api-test/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ test-output/
testng-report/
/reg
./reg
.temp*
2 changes: 1 addition & 1 deletion api-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
6 changes: 6 additions & 0 deletions deploy/artifactory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Artifactory

## Install
```sh
./install.sh
```
30 changes: 30 additions & 0 deletions deploy/artifactory/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Uninstalls artifactory
# Usage: ./delete.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

function deleting_artifactory() {
NS=artifactory
while true; do
read -p "Are you sure you want to delete artifactory helm chart?(Y/n) " yn
if [ $yn = "Y" ]
then
helm -n $NS delete artifactory
break
else
break
fi
done
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
deleting_artifactory # calling function
35 changes: 35 additions & 0 deletions deploy/artifactory/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# Installs artifactory
## Usage: ./install.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

NS=artifactory
CHART_VERSION=0.0.1-develop

echo Create $NS namespace
kubectl create ns $NS

function installing_artifactory() {
echo Istio label
kubectl label ns $NS istio-injection=enabled --overwrite
helm repo update

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

kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status

echo Installed artifactory service
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
installing_artifactory # calling function
25 changes: 25 additions & 0 deletions deploy/artifactory/restart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Restart the artifactory service
## Usage: ./restart.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

function Restarting_artifactory() {
NS=artifactory
kubectl -n $NS rollout restart deploy

kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status

echo Restarted Artifactory services
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
Restarting_artifactory # calling function
11 changes: 11 additions & 0 deletions deploy/config-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Config server

## Introduction
Config server serves all properties required by MOSIP modules. This must be installed before any other MOSIP modules.

## Install
* Review `values.yaml` and make sure git repository parameters are as per your installation.
* Install
```sh
./install.sh
```
32 changes: 32 additions & 0 deletions deploy/config-server/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Uninstalls config server
## Usage: ./delete.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

function config_server() {
NS=config-server
while true; do
read -p "Are you sure you want to delete config-server helm charts?(Y/n) " yn
if [ $yn = "Y" ]
then
kubectl -n $NS delete configmap keycloak-host
kubectl -n $NS delete secret keycloak keycloak-client-secrets
helm -n $NS delete config-server
break
else
break
fi
done
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
config_server # calling function
38 changes: 38 additions & 0 deletions deploy/config-server/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# Installs config-server
## Usage: ./install.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

# 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

NS=config-server
CHART_VERSION=0.0.1-develop

echo Create $NS namespace
kubectl create ns $NS || true

echo Istio label
kubectl label ns $NS istio-injection=enabled --overwrite
helm repo update

COPY_UTIL=../copy_cm_func.sh
$COPY_UTIL configmap keycloak-host keycloak $NS
$COPY_UTIL configmap esignet-global esignet $NS
$COPY_UTIL configmap msg-gateway msg-gateways $NS

$COPY_UTIL secret keycloak keycloak $NS
$COPY_UTIL secret db-common-secrets postgres $NS
$COPY_UTIL secret keycloak-client-secrets keycloak $NS
$COPY_UTIL secret msg-gateway msg-gateways $NS

echo Installing config-server
helm -n $NS install config-server mosip/config-server -f values.yaml --wait --version $CHART_VERSION
echo Installed Config-server.
25 changes: 25 additions & 0 deletions deploy/config-server/restart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Restart the config-server service
## Usage: ./restart.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

function config_server() {
NS=esignet
kubectl -n $NS rollout restart deploy esignet-config-server

kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status

echo Restarted config-server services
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
config_server # calling function
Loading

0 comments on commit 63dd861

Please sign in to comment.