Quickstart & Deployment
Prerequisites
- Docker Engine 24+ and Docker Compose v2
- Python 3.11+ (optional, for running the local
pytestIQ/OQ qualification suite and GMP binder generator)
Step 1: Configure Environment & Launch the Stack
Clone the GxPHistorian GitHub repository, copy the GxP environment template, and start all 7 orchestrated services:
git clone https://github.com/saram-io/gxp-historian.gitcd gxp-historiancp .env.example .envdocker compose up -d --buildVerify that all 7 containers (postgres-control, clickhouse-archive, instrument-mock-server, edge-collector, historian-api, gxphistorian-mcp, grafana-vision) are running and healthy:
docker compose pscurl -s http://localhost:8020/api/v1/health | jq .curl -s http://localhost:8030/health | jq .curl -s http://localhost:8095/health | jq .curl -s -X POST http://localhost:8095/control/self-test | jq .Expected Health Response (historian-api & gxphistorian-mcp)
{ "status": "healthy", "service": "gxphistorian-mcp", "protocol": "Model Context Protocol (MCP) + Pydantic AI", "mcp_endpoint": "/mcp", "ai_model": "google:gemini-3-flash-preview", "live_llm_enabled": false, "postgres": { "connected": true }, "clickhouse": { "connected": true }, "pydantic_ai_agents": [ "gxp_deviation_investigator_agent", "gxp_copilot_agent" ], "mcp_tools_count": 6, "mcp_resources_count": 3}Step 2: Inspect Seeded GxP Assets, Tags & Part 11 Users
On initial startup, init-postgres/01_control_plane_part11.sql seeds the ISA-95 asset hierarchy, multi-protocol bioprocess tags, and 21 CFR Part 11 user accounts inside an attributed bootstrap transaction (SET LOCAL app.actor_id = 'system_bootstrap').
Seeded ISA-95 Assets (assets)
| Asset ID | Asset Name | ISA-95 ltree Asset Path | Template |
|---|---|---|---|
1 | Bioreactor_201 | BioCorp.Fremont.USP.Bioreactor_201 | Bioreactor_USP_Template |
2 | Cleanroom_ISO7 | BioCorp.Fremont.Facilities.Cleanroom_ISO7 | Cleanroom_EMS_Template |
3 | Chrom_Skid_01 | BioCorp.Fremont.DSP.Chrom_Skid_01 | Chromatography_DSP_Template |
Seeded Multi-Protocol GxP Tags (tags)
| Tag ID | Tag Name | ISA-95 ltree Asset Path | Attribute | Units | Step Tag (LOCF) | Deadband (exc_dev) | Limits (Low / High) | Source Protocol |
|---|---|---|---|---|---|---|---|---|
101 | BR201_TEMP_PV | BioCorp.Fremont.USP.Bioreactor_201 | Vessel_Temp | degC | false (LINEAR) | 0.05 | 36.0 / 38.0 | OPC_UA |
102 | BR201_PH_PV | BioCorp.Fremont.USP.Bioreactor_201 | Vessel_pH | pH | false (LINEAR) | 0.02 | 6.8 / 7.4 | OPC_UA |
103 | BR201_AGIT_STATE | BioCorp.Fremont.USP.Bioreactor_201 | Agitator_Mode | state | true (LOCF) | 0.0 | 0.0 / 2.0 | S7COMM |
301 | CR_ISO7_DP_PV | BioCorp.Fremont.Facilities.Cleanroom_ISO7 | Differential_Pressure | Pa | false (LINEAR) | 0.5 | 12.5 / 25.0 | BACNET_IP |
401 | CHROM_UV280_PV | BioCorp.Fremont.USP.Bioreactor_201 | UV280_Absorbance | mAU | false (LINEAR) | 0.1 | 0.0 / 2500.0 | OPC_DA |
Seeded 21 CFR Part 11 Accounts (users)
[!NOTE]
init-postgres/01_control_plane_part11.sqlseeds bcrypt password hashes viapgcrypto(crypt(..., gen_salt('bf', 10))).
| User ID | Full Name | Role | Qualification Password |
|---|---|---|---|
operator_01 | Sarah Jenkins (USP Lead Operator) | OPERATOR | Operator_2026! |
qa_approver_01 | Dr. Marcus Vance (QA Qualified Person) | QA_APPROVER | QA_Approver_2026! |
Step 3: Access Interactive Interfaces
- Swagger / OpenAPI Interactive REST Docs:
- Open
http://localhost:8020/docsin your browser.
- Open
- Pydantic AI Co-Pilot &
gxphistorian-mcpServer (:8030):- Streamable HTTP MCP endpoint:
http://localhost:8030/mcp - Manifest & OpenAPI Docs:
http://localhost:8030/mcp/manifestandhttp://localhost:8030/docs
- Streamable HTTP MCP endpoint:
- Multi-Protocol Biopharma Instrument Mock Server (
instrument-mock-serveron:8095,:4840,:5020,:47808/udp,:1102,:4001):- Open
http://localhost:8095/docsfor the interactive protocol control plane, or run the 6-protocol wire self-test and push live samples toedge-collector:Terminal window curl -s -X POST http://localhost:8095/control/self-test \-H "Content-Type: application/json" \-d '{"push_to_edge_collector": true}' | jq . - See the full Mock Instrument Server & Protocol Testing Guide for raw socket testing (
OPC UA,Modbus ABCD/CDAB,BACnet/IP,Siemens S7 DB10,Moxa RS-232 MT-SICS, andOPC DA / PI UFL) and fault/excursion injection (/control/override).
- Open
- Grafana Vision Operator HMI:
- Open
http://localhost:3020/d/gxphistorian-gxp-bioreactor-hmi - Login with
admin/GxP_Grafana_2026!
- Open
- Verify 21 CFR Part 11 Audit Hash Chain:
Terminal window curl -s http://localhost:8020/api/v1/audit-trail/verify | jq . - Run the 21-Test Automated IQ/OQ Qualification Suite:
Terminal window .venv/bin/pytest -v
Step 4: Optional Hybrid Cloud Deployment (AWS, Microsoft Azure & Google Cloud)
To deploy GxPHistorian in a hybrid OT + Cloud topology (keeping edge-collector at Purdue Level 2.5 on-premises while running 15-Year WORM Object Lock storage, Zero-ETL Parquet Lakehouses, or Managed PostgreSQL 16 + ClickHouse in AWS, Microsoft Azure, or Google Cloud):
# 1. Inspect validated hybrid cloud blueprints & WORM XML policies via REST APIcurl -s "http://localhost:8020/api/v1/cloud/hybrid-blueprints?provider=aws&pattern=pattern_b_cloud_core" | jq .
# 2. Or launch the Thin Purdue Level 2.5 Edge Collector stack (Pattern B) streaming over HTTPS/mTLS (:8443)docker compose -f deploy/hybrid-cloud/docker-compose.edge-only.yml configSee the Hybrid Cloud Deployment Guide (AWS, Azure & GCP) for step-by-step cloud walkthroughs.