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

256 integrate health checks and monitoring for the server e5 #297

Open
wants to merge 86 commits into
base: main
Choose a base branch
from

Conversation

Tekum-Emmanuella
Copy link
Collaborator

No description provided.

Christiantyemele and others added 30 commits November 18, 2024 17:21
…into 245-integration-environment-for-didcomm-mediator-server-deployment-e6
…into 245-integration-environment-for-didcomm-mediator-server-deployment-e6
…6-integrate-health-checks-and-monitoring-for-the-server-e5
@Tekum-Emmanuella Tekum-Emmanuella added enhancement New feature or request Pending labels Jan 17, 2025
@Tekum-Emmanuella Tekum-Emmanuella self-assigned this Jan 17, 2025
@Tekum-Emmanuella Tekum-Emmanuella linked an issue Jan 17, 2025 that may be closed by this pull request
@Tekum-Emmanuella Tekum-Emmanuella marked this pull request as draft January 17, 2025 13:04
@chendiblessing chendiblessing marked this pull request as ready for review January 22, 2025 11:09
Comment on lines +1 to +3
target/
**/target/
.idea/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not push this file

Comment on lines +1 to +5
SERVER_PUBLIC_DOMAIN="http://didcomm-mediator.com"
SERVER_LOCAL_PORT="8080"
STORAGE_DIRPATH="crates/generic-server/target/storage"
MONGO_DBN="mediator-coordination"
MONGO_URI="mongodb://mongodb:27017"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not push this too

Comment on lines 27 to 33

# Environment variables files
.env.example
.env


# Reference crate
mediator-server
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also remove this file

env_file:
- .env
environment:
- MONGODB_URI=mongodb://mongodb:27019/your_database_name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not read the MONGO_URI from the env file

Comment on lines +1 to +35
name: Publish Image

on:
push:
branches:
- '*'
tags:
- 'v*'

env:
IMAGE_NAME: didcomm-mediator-rs

jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME

# Ensure all uppercase characters are converted to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip the git ref prefix from the version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

Comment on lines +1 to +80

# **Application Deployment Documentation**

## **1. Prerequisites**
- **Tools and Software Required**:
- Helm version (e.g., `Helm 3.x`)
- Kubernetes version (e.g., `1.25+`)
- Minikube/Cluster setup
- Other dependencies (e.g., Docker, kubectl, etc.)
- **Environment Setup**:
- Access to the Kubernetes cluster
- Required configurations or credentials


## **3. Helm Chart Structure**
- **Chart Overview**:
- Structure of the Helm chart (values.yaml, templates, etc.).
- Purpose of critical templates (e.g., Deployment, Service, ConfigMap).
- Default vs. custom configurations.
- **Customization**:
- How to override values.yaml using custom configurations.
Example:
```bash
helm install mediator ./mediator-charts --values custom-values.yaml
```
- mandatory values are;

**MONGO_DBN**,
**MONGO_URI**,
**SERVER_LOCAL_PORT** and
**SERVER_PUBLIC_DOMAIN**


## **4. Deployment Guide**
- **Steps to Deploy**:
1. Clone the repository:
```bash
git clone https://github.com/adorsys/didcomm-mediator-rs.git
```
2. Install dependencies:
```bash
helm dependency update mediator-charts
```
3. Deploy using Helm:
```bash
helm install mediator mediator-charts --namespace didcomm-mediator
```
4. Verify deployment status:
```bash
kubectl get pods -n didcomm-mediator
kubectl get services -n didcomm-mediator
```
- **Notes on Namespaces**:
- Importance of creating and using the correct namespace.
- **Rollback Instructions**:
- How to roll back to a previous release:
```bash
helm rollback my-app <revision>
```

---

## **5. Accessing the Application**
- **Port Forwarding**:
- Steps to forward the service ports locally for testing:
```bash
kubectl port-forward service/<service-name> 8080:<target-port>
```
- **Ingress/LoadBalancer Details**:
- Steps to access the application if exposed via Ingress or LoadBalancer.

## **7. Monitoring and Debugging**
- **Logs**:
- How to fetch logs for debugging:
```bash
kubectl logs <pod-name> -n didcomm-mediator
```
- **Monitoring Tools**:
- Mention tools used (e.g., Prometheus, Grafana, ELK Stack).
- Steps to configure and access monitoring dashboards.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes are not related to the isssue

Comment on lines +1 to +19
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-mongodb-deployment
namespace: {{ .Values.namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-mongodb
template:
metadata:
labels:
app: {{ .Release.Name }}-mongodb
spec:
containers:
- name: mongodb
image: mongo:latest
ports:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all the charts folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate health checks and monitoring for the server E5.
2 participants