Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DSD-6742] Added Kernel dependencies to Signup repo #454

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ cd deploy
cd deploy
./restart-signup.sh
```
## Deploy dependent services for Signup onboarding
1. msg-gateway
2. config-server
3. artifactory
4. mock-smtp
5. kernel
## Partner onboarding
* Perform Partner onboarding for esignet Signup OIDC client using [steps](partner-onboarder/README.md) only if mosip-identity plugin is used.

Expand Down
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
164 changes: 164 additions & 0 deletions deploy/config-server/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
gitRepo:
uri: https://github.com/mosip/mosip-config
version: es-qa
## Folders within the base repo where properties may be found.
searchFolders: ""
private: false
## User name of user who has access to the private repo. Ignore for public repo
username: ""
token: ""

envVariables:
- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_DBUSER_PASSWORD
valueFrom:
secretKeyRef:
name: db-common-secrets
key: db-dbuser-password
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_API_PUBLIC_HOST
valueFrom:
configMapKeyRef:
name: esignet-global
key: mosip-api-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_API_INTERNAL_HOST
valueFrom:
configMapKeyRef:
name: esignet-global
key: mosip-api-internal-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_INTERNAL_URL
valueFrom:
configMapKeyRef:
name: keycloak-host
key: keycloak-internal-url
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_EXTERNAL_URL
valueFrom:
configMapKeyRef:
name: keycloak-host
key: keycloak-external-url
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_INTERNAL_HOST
valueFrom:
configMapKeyRef:
name: keycloak-host
key: keycloak-internal-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_EXTERNAL_HOST
valueFrom:
configMapKeyRef:
name: keycloak-host
key: keycloak-external-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: keycloak
key: admin-password
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MPARTNER_DEFAULT_AUTH_SECRET
valueFrom:
secretKeyRef:
name: keycloak-client-secrets
key: mpartner_default_auth_secret
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_PMS_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: mosip_pms_client_secret
name: keycloak-client-secrets
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_ADMIN_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: mosip_admin_client_secret
name: keycloak-client-secrets
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_PREREG_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: mosip_prereg_client_secret
name: keycloak-client-secrets
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMTP_HOST
valueFrom:
configMapKeyRef:
name: msg-gateway
key: smtp-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMS_HOST
valueFrom:
configMapKeyRef:
name: msg-gateway
key: sms-host
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMTP_PORT
valueFrom:
configMapKeyRef:
name: msg-gateway
key: smtp-port
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMS_PORT
valueFrom:
configMapKeyRef:
name: msg-gateway
key: sms-port
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMTP_USERNAME
valueFrom:
configMapKeyRef:
name: msg-gateway
key: smtp-username
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMS_USERNAME
valueFrom:
configMapKeyRef:
name: msg-gateway
key: sms-username
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMTP_SECRET
valueFrom:
secretKeyRef:
name: msg-gateway
key: smtp-secret
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMS_AUTHKEY
valueFrom:
secretKeyRef:
name: msg-gateway
key: sms-authkey
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SMS_SECRET
valueFrom:
secretKeyRef:
name: msg-gateway
key: sms-secret
enabled: true

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_SIGNUP_HOST
valueFrom:
configMapKeyRef:
key: mosip-signup-host
name: esignet-global
enabled: true
Loading
Loading