-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from Rakshithb1/MOSIP-36836
[MOSIP-36836] added helm chart
- Loading branch information
Showing
48 changed files
with
1,222 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# inji verify services | ||
|
||
## Install | ||
* Run `install-all.sh` to deploy inji verify services. | ||
``` | ||
cd deploy | ||
./install-all.sh | ||
``` | ||
|
||
## Delete | ||
* Run `delete-all.sh` to remove inji verify services. | ||
``` | ||
cd deploy | ||
./delete-all.sh | ||
``` | ||
|
||
## Restart | ||
* Run `restart-all.sh` to restart inji verify services. | ||
``` | ||
cd deploy | ||
./restart.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# deletes inji-verify services in correct order | ||
## Usage: ./delete-all.sh [kubeconfig] | ||
|
||
if [ $# -ge 1 ] ; then | ||
export KUBECONFIG=$1 | ||
fi | ||
|
||
function Deleting_All() { | ||
ROOT_DIR=`pwd` | ||
|
||
declare -a module=("inji-verify-service" | ||
"inji-verify-ui" | ||
) | ||
|
||
echo Installing inji-verify services | ||
|
||
for i in "${module[@]}" | ||
do | ||
cd $ROOT_DIR/"$i" | ||
./delete.sh | ||
done | ||
|
||
echo All inji-verify services deleted sucessfully. | ||
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_All # calling function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# inji verify service | ||
|
||
## Install | ||
``` | ||
./install.sh | ||
``` | ||
|
||
## Restart | ||
``` | ||
./restart.sh | ||
``` | ||
|
||
## Delete | ||
``` | ||
./delete.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# Uninstalls all inji-verify-service helm charts | ||
## Usage: ./delete.sh [kubeconfig] | ||
|
||
if [ $# -ge 1 ] ; then | ||
export KUBECONFIG=$1 | ||
fi | ||
|
||
function Deleting_inji-verify-service() { | ||
NS=injiverify | ||
while true; do | ||
read -p "Are you sure you want to delete all inji-verify-service helm charts?(Y/n) " yn | ||
if [ $yn = "Y" ] | ||
then | ||
helm -n $NS delete inji-verify-service | ||
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_inji-verify-service # calling function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# Installs all inji-verify-service helm charts | ||
## Usage: ./install.sh [kubeconfig] | ||
|
||
if [ $# -ge 1 ] ; then | ||
export KUBECONFIG=$1 | ||
fi | ||
|
||
NS=injiverify | ||
CHART_VERSION=0.0.1-develop | ||
|
||
echo Create $NS namespace | ||
kubectl create ns $NS | ||
|
||
function installing_inji-verify-service() { | ||
|
||
echo Istio label | ||
kubectl label ns $NS istio-injection=enabled --overwrite | ||
helm repo add mosip https://mosip.github.io/mosip-helm | ||
helm repo update | ||
|
||
echo Copy configmaps | ||
./copy_cm.sh | ||
|
||
echo "Do you have public domain & valid SSL? (Y/n) " | ||
echo "Y: if you have public domain & valid ssl certificate" | ||
echo "n: If you don't have a public domain and a valid SSL certificate. Note: It is recommended to use this option only in development environments." | ||
read -p "" flag | ||
|
||
if [ -z "$flag" ]; then | ||
echo "'flag' was provided; EXITING;" | ||
exit 1; | ||
fi | ||
ENABLE_INSECURE='' | ||
if [ "$flag" = "n" ]; then | ||
ENABLE_INSECURE='--set enable_insecure=true'; | ||
fi | ||
|
||
echo Installing inji-verify-service | ||
helm -n $NS install inji-verify-service mosip/inji-verify-service --version $CHART_VERSION $ENABLE_INSECURE | ||
|
||
kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status | ||
|
||
echo Installed inji-verify-service 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_inji-verify-service # calling function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Restart the inji-verify-service services | ||
|
||
if [ $# -ge 1 ] ; then | ||
export KUBECONFIG=$1 | ||
fi | ||
|
||
function Restarting_inji-verify-service() { | ||
NS=injiverify | ||
kubectl -n $NS rollout restart deploy inji-verify-service | ||
|
||
kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status | ||
|
||
echo Retarted inji-verify-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 | ||
Restarting_inji-verify-service # calling function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# inji verify ui | ||
|
||
## Install | ||
``` | ||
./install.sh | ||
``` | ||
|
||
## Restart | ||
``` | ||
./restart.sh | ||
``` | ||
|
||
## Delete | ||
``` | ||
./delete.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# Copy configmaps from other namespaces | ||
# DST_NS: Destination namespace | ||
|
||
function copying_cm() { | ||
COPY_UTIL=./copy_cm_func.sh | ||
DST_NS=injiverify | ||
|
||
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# Copy configmap and secret from one namespace to another. | ||
# ./copy_cm_func.sh <resource> <configmap_name> <source_namespace> <destination_namespace> [name] | ||
# Parameters: | ||
# resource: configmap|secret | ||
# name: Optional new name of the configmap or secret in destination namespace. This may be needed if there is | ||
# clash of names | ||
|
||
if [ $1 = "configmap" ] | ||
then | ||
RESOURCE=configmap | ||
elif [ $1 = "secret" ] | ||
then | ||
RESOURCE=secret | ||
else | ||
echo "Incorrect resource $1. Exiting.." | ||
exit 1 | ||
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 - | ||
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 | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Installs inji-verify services in correct order | ||
## Usage: ./install-all.sh [kubeconfig] | ||
|
||
if [ $# -ge 1 ] ; then | ||
export KUBECONFIG=$1 | ||
fi | ||
|
||
ROOT_DIR=`pwd` | ||
|
||
function installing_All() { | ||
|
||
declare -a module=("inji-verify-service" | ||
"inji-verify-ui" | ||
) | ||
|
||
echo Installing inji-verify services | ||
|
||
for i in "${module[@]}" | ||
do | ||
cd $ROOT_DIR/"$i" | ||
./install.sh | ||
done | ||
|
||
echo All inji-verify services deployed sucessfully. | ||
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_All # calling function |
Oops, something went wrong.