FINERACT-2421: Fix kubernetes minikube example configuration
This commit is contained in:
@@ -18,53 +18,56 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
echo "Setting Up Fineract service configuration..."
|
||||
kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | LC_CTYPE=C tr -dc A-Za-z0-9 | head -c 16)
|
||||
set -e
|
||||
|
||||
echo "Setting up Fineract service configuration..."
|
||||
kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | LC_CTYPE=C tr -dc A-Za-z0-9 | head -c 16) 2>/dev/null || echo "Secret already exists, skipping..."
|
||||
kubectl apply -f fineractmysql-configmap.yml
|
||||
|
||||
echo
|
||||
echo "Starting fineractmysql..."
|
||||
kubectl apply -f fineractmysql-deployment.yml
|
||||
|
||||
fineractmysql_pod=""
|
||||
while [[ ${#fineractmysql_pod} -eq 0 ]]; do
|
||||
fineractmysql_pod=$(kubectl get pods -l tier=fineractmysql --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
|
||||
done
|
||||
|
||||
fineractmysql_status=$(kubectl get pods ${fineractmysql_pod} --no-headers -o custom-columns=":status.phase")
|
||||
while [[ ${fineractmysql_status} -ne 'Running' ]]; do
|
||||
sleep 1
|
||||
fineractmysql_status=$(kubectl get pods ${fineractmysql_pod} --no-headers -o custom-columns=":status.phase")
|
||||
done
|
||||
echo "Waiting for fineractmysql to be ready..."
|
||||
kubectl wait --for=condition=ready pod -l tier=fineractmysql --timeout=300s
|
||||
|
||||
echo
|
||||
echo "Starting fineract server..."
|
||||
kubectl apply -f fineract-server-deployment.yml
|
||||
|
||||
fineract_server_pod=""
|
||||
while [[ ${#fineract_server_pod} -eq 0 ]]; do
|
||||
fineract_server_pod=$(kubectl get pods -l tier=backend --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
|
||||
done
|
||||
|
||||
fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase")
|
||||
while [[ ${fineract_server_status} -ne 'Running' ]]; do
|
||||
sleep 1
|
||||
fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase")
|
||||
done
|
||||
echo "Waiting for fineract-server to be ready..."
|
||||
kubectl wait --for=condition=ready pod -l app=fineract-server --timeout=300s
|
||||
|
||||
echo "Fineract server is up and running"
|
||||
|
||||
echo
|
||||
echo "Starting Mifos Community UI..."
|
||||
kubectl apply -f fineract-mifoscommunity-deployment.yml
|
||||
|
||||
fineract_mifoscommunity_pod=""
|
||||
while [[ ${#fineract_mifoscommunity_pod} -eq 0 ]]; do
|
||||
fineract_mifoscommunity_pod=$(kubectl get pods -l tier=backend --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
|
||||
done
|
||||
echo "Waiting for mifos-community to be ready..."
|
||||
kubectl wait --for=condition=ready pod -l app=mifos-community --timeout=300s
|
||||
|
||||
fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase")
|
||||
while [[ ${fineract_mifoscommunity_status} -ne 'Running' ]]; do
|
||||
sleep 1
|
||||
fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase")
|
||||
done
|
||||
echo "Mifos Community UI is up and running"
|
||||
|
||||
echo
|
||||
echo "============================================"
|
||||
echo "Fineract Kubernetes deployment is ready!"
|
||||
echo "============================================"
|
||||
echo
|
||||
echo "To access the Mifos web application:"
|
||||
echo " minikube service mifos-community"
|
||||
echo
|
||||
echo "To access the Fineract API directly:"
|
||||
echo " minikube service fineract-server --url --https"
|
||||
echo
|
||||
echo "Default credentials:"
|
||||
echo " Username: mifos"
|
||||
echo " Password: password"
|
||||
echo
|
||||
echo "To check pod status:"
|
||||
echo " kubectl get pods"
|
||||
echo
|
||||
echo "To view logs:"
|
||||
echo " kubectl logs deployment/fineract-server"
|
||||
echo " kubectl logs deployment/mifos-community"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user