16. Running Panmo Confab Application On-Prem¶
16.1. Overview¶
This document outlines the requirements and procedure to deploy the Panmo Confab application on an on-premises infrastructure. The application leverages various services, including databases, domains, Docker-based services, and workers. Additionally, it requires specific configurations for Redis and S3-compatible storage to fully support background tasks and storage operations.
16.2. Minimum Requirements¶
Hardware: 2 CPU cores, 4GB RAM, and 20 GB storage per server.
Operating System: A modern linux server on all servers.
Docker: Ensure Docker is installed on all servers intended for hosting the application components.
PostgreSQL Database: A PostgreSQL server version 14 or higher, accessible within your network.
16.3. Production Requirements¶
Network Configuration: Ensure all servers can communicate with each other over the network.
Firewall Configuration: Open ports 22, 80, 443, 5000, 5432, 6379, and 8000 for the application to function correctly.
Internet Access: Ensure servers have internet access for package installation and updates.
SSH Access: Ensure SSH access to all servers for deployment and maintenance.
Redis: A Redis instance for Celery’s task queuing and execution.
S3-Compatible Storage: For file storage and backups, requiring specific buckets and access keys.
Domain Configuration: A domain name configured to point to ingress server.
SSL/TLS Certificates: SSL Certificates for the domain name.
Optional Extras: If you have the following components, we can configure them as needed. These services can also be provided as a managed service by Panmo Cloud.
Monitoring and Alerting: For tracking application health and performance.
Backup and Restore: For data protection and recovery.
Logging and Auditing: For tracking application events and user actions.
Notification and Messaging: For sending alerts and notifications to users through Email and slack.
JIRA Integration: For creating and managing issues directly from the application.
16.4. Procedure¶
16.4.1. Minimal Deployment¶
The minimal deployment of the Panmo Confab application on-premises involves setting up the following components: 1. Panmo Confab Application 2. PostgreSQL Database
On the server intended for hosting the Panmo Confab application, follow these steps:
16.4.2. Step 1: Install Docker¶
Install Docker on the server using the following commands: (For RHEL 9)
sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release git -y
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
16.4.3. Step 2: Clone the Repository¶
Clone the Panmo Confab repository to the server:
dnf install https://github.com/cli/cli/releases/download/v2.45.0/gh_2.45.0_linux_amd64.rpm
gh auth login
gh repo clone panmo-us/mars-analytics
16.4.4. Step 3: Bring Up the Application Containers¶
Navigate to the cloned repository and bring up the application containers using Docker Compose:
version: "3.9"
services:
web:
build:
context: .
dockerfile: Dockerfile
environment:
- "DJANGO_DEBUG=True"
- "MODE=dev"
- "DATABASE_URL=postgres://postgres@db/postgres"
entrypoint: ""
command: python manage.py runserver 0.0.0.0:5000
ports:
- "5000:5000"
depends_on:
- db
db:
image: postgres:14-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
volumes:
postgres_data:
cd mars-analytics
docker-compose up -d
16.4.5. Step 4: DB Migrations¶
Once the application and database containers are up and running, apply the database migrations:
docker compose exec web python manage.py makemigrations confab
docker compose exec web python manage.py migrate --run-syncdb
docker compose exec web python manage.py loaddata ./data/*.yaml
docker compose exec web python manage.py createcachetable
docker compose exec web python manage.py createsuperuser
16.4.6. Step 5: Production Deployment¶
Additional services such as monitoring, alerting, backup, and restore can be configured as needed to enhance the application’s functionality and reliability. These are optional but recommended for a production deployment.
They are environment specific and can be configured by modifying the Docker Compose file or environment variables. Contact Panmo Cloud support for assistance in setting up these services.
16.5. Conclusion¶
Following this comprehensive guide ensures the Panmo Confab application is correctly set up on your on-premises infrastructure. Follow the minimal deployment for basic set up and try out the application. The guide also provides additional requirements for running a production-grade deployment. For further assistance or managed services, contact Panmo Cloud support.