Phase 2
Phase 2
Group Members:
___________________________________________________________________________
SOLUTION ARCHITECTURE
The solution architecture for CollabSphere aims to create a robust and efficient integration of DevOps
tools to streamline workflows and improve team collaboration. By integrating tools like GitHub,
Jenkins, Slack, JIRA, Docker, Kubernetes, Prometheus, and Grafana, the architecture ensures a
To achieve this, the following steps and directory structures have been established:
Directory Structure
The project is structured as follows to facilitate easy navigation, modularization, and scalability:
CollabSphere/
│ │ ├── github_webhook.py
│ │ └── github_repo_fetcher.py
│ │ ├── trigger_build.py
│ │ ├── send_notifications.py
│ │ ├── jira_issue_fetcher.py
│ │ └── jira_issue_updater.py
│ │ ├── run_container.py
│ │ └── k8s_deployment.py
│ │ ├── expose_metrics.py
│ └── flask_webhook_handler.py
│ ├── start_docker_containers.sh
│ ├── deploy_k8s.sh
│ ├── monitor_services.sh
│ └── collabsphere.log
│ ├── test_github.py
│ ├── test_slack.py
│ ├── test_jira.py
│ └── test_prometheus.py
GitHub is used for version control to ensure collaborative development, tracking of changes,
git init
git add .
PHASE 2
Jenkins is used to automate the build, test, and deployment processes. The pipeline is
1. Jenkins Setup:
o Install Jenkins on a server and configure it with necessary plugins like Docker,
repository.
o Create a Jenkinsfile in the root of the project. This file defines the pipeline
stages.
Example Jenkinsfile:
pipeline {
agent any
PHASE 2
environment {
DOCKER_IMAGE = 'collabsphere'
REGISTRY_URL = '<your_docker_registry_url>'
K8S_CLUSTER = '<kubernetes_cluster_name>'
stages {
stage('Checkout') {
steps {
git 'https://github.com/<username>/CollabSphere.git'
steps {
script {
}
PHASE 2
steps {
script {
stage('Deploy to Kubernetes') {
steps {
script {
sh '''
'''
}
PHASE 2
post {
success {
failure {
Prometheus and Grafana are used for monitoring the application and generating real-time
alerts.
1. Prometheus Configuration:
scrape_configs:
- job_name: 'collabsphere'
static_configs:
PHASE 2
- targets: ['localhost:8000']
2. Grafana Setup:
import time
start_http_server(8000)
while True:
time.sleep(10)
FUTURE PLAN
webhooks.