Skip to content

Commit 2449492

Browse files
committed
Docs updates
1 parent 5be8c47 commit 2449492

File tree

11 files changed

+835
-14
lines changed

11 files changed

+835
-14
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ ENV NODE_ENV=production \
133133
PORT=3000 \
134134
HOST=0.0.0.0 \
135135
DATABASE_PATH=/data/executions.db \
136-
BOLT_PROJECT_PATH=/bolt-project
136+
BOLT_PROJECT_PATH=/bolt-project \
137+
# Integration settings (disabled by default)
138+
PUPPETDB_ENABLED=false \
139+
PUPPETSERVER_ENABLED=false \
140+
HIERA_ENABLED=false
137141

138142
# Health check
139143
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \

Dockerfile.alpine

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ ENV NODE_ENV=production \
150150
FACTER_operatingsystem=Alpine \
151151
FACTER_osfamily=Linux \
152152
FACTER_kernel=Linux \
153-
PUPPET_SKIP_OS_CHECK=true
153+
PUPPET_SKIP_OS_CHECK=true \
154+
# Integration settings (disabled by default)
155+
PUPPETDB_ENABLED=false \
156+
PUPPETSERVER_ENABLED=false \
157+
HIERA_ENABLED=false
154158

155159
# Health check
156160
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \

Dockerfile.ubuntu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ ENV NODE_ENV=production \
144144
PORT=3000 \
145145
HOST=0.0.0.0 \
146146
DATABASE_PATH=/data/executions.db \
147-
BOLT_PROJECT_PATH=/bolt-project
147+
BOLT_PROJECT_PATH=/bolt-project \
148+
# Integration settings (disabled by default)
149+
PUPPETDB_ENABLED=false \
150+
PUPPETSERVER_ENABLED=false \
151+
HIERA_ENABLED=false
148152

149153
# Health check
150154
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \

README.md

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,11 @@ git commit --no-verify -m "message"
283283

284284
## Docker Deployment
285285

286-
### Building the Docker Image
286+
For comprehensive Docker deployment instructions including all integrations, see the [Docker Deployment Guide](docs/docker-deployment.md).
287287

288-
```bash
289-
docker build -t padawi:latest .
290-
```
288+
### Quick Start
291289

292-
### Running with Docker
290+
### Building the Docker Image
293291

294292
```bash
295293
# Using the provided script
@@ -346,8 +344,14 @@ Access the application at <http://localhost:3000>
346344
ssh -L 3000:localhost:3000 user@your-workstation
347345
```
348346

347+
```bash
348+
docker build -t pabawi:latest .
349+
```
350+
349351
### Running with Docker Compose
350352

353+
The docker-compose.yml file includes comprehensive configuration for all integrations:
354+
351355
```bash
352356
# Start the service
353357
docker-compose up -d
@@ -359,6 +363,54 @@ docker-compose logs -f
359363
docker-compose down
360364
```
361365

366+
#### Enabling Integrations
367+
368+
To enable integrations, create a `.env` file in the project root with your configuration:
369+
370+
```env
371+
# PuppetDB Integration
372+
PUPPETDB_ENABLED=true
373+
PUPPETDB_SERVER_URL=https://puppetdb.example.com
374+
PUPPETDB_PORT=8081
375+
PUPPETDB_TOKEN=your-token-here
376+
PUPPETDB_SSL_ENABLED=true
377+
PUPPETDB_SSL_CA=/ssl-certs/ca.pem
378+
PUPPETDB_SSL_CERT=/ssl-certs/client.pem
379+
PUPPETDB_SSL_KEY=/ssl-certs/client-key.pem
380+
381+
# Puppetserver Integration
382+
PUPPETSERVER_ENABLED=true
383+
PUPPETSERVER_SERVER_URL=https://puppet.example.com
384+
PUPPETSERVER_PORT=8140
385+
PUPPETSERVER_SSL_ENABLED=true
386+
PUPPETSERVER_SSL_CA=/ssl-certs/ca.pem
387+
PUPPETSERVER_SSL_CERT=/ssl-certs/client.pem
388+
PUPPETSERVER_SSL_KEY=/ssl-certs/client-key.pem
389+
390+
# Hiera Integration
391+
HIERA_ENABLED=true
392+
HIERA_CONTROL_REPO_PATH=/control-repo
393+
HIERA_ENVIRONMENTS=["production","staging"]
394+
HIERA_FACT_SOURCE_PREFER_PUPPETDB=true
395+
```
396+
397+
#### Volume Mounts for Integrations
398+
399+
Update the docker-compose.yml volumes section to include your SSL certificates and control repository:
400+
401+
```yaml
402+
volumes:
403+
# Existing mounts
404+
- ./bolt-project:/bolt-project:ro
405+
- ./data:/data
406+
407+
# SSL certificates for PuppetDB/Puppetserver
408+
- /path/to/ssl/certs:/ssl-certs:ro
409+
410+
# Hiera control repository
411+
- /path/to/control-repo:/control-repo:ro
412+
```
413+
362414
Access the application at <http://localhost:3000>
363415
364416
**⚠️ Security Note**: Only access via localhost. For remote access, use SSH port forwarding:
@@ -632,7 +684,7 @@ Special thanks to all contributors and the Puppet community.
632684
### Integration Setup
633685

634686
- [PuppetDB Integration Setup](docs/puppetdb-integration-setup.md) - PuppetDB configuration guide
635-
- [Puppetserver Setup](docs/PUPPETSERVER_SETUP.md) - Puppetserver configuration guide
687+
- [Puppetserver Setup](docs/uppetserver-integration-setup.md) - Puppetserver configuration guide
636688
- [PuppetDB API Documentation](docs/puppetdb-api.md) - PuppetDB-specific API endpoints
637689

638690
### Additional Resources

docker-compose.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ services:
1313
- ./bolt-project:/bolt-project:ro
1414
# Mount data directory for SQLite database (read-write)
1515
- ./data:/data
16+
# Mount SSL certificates for PuppetDB/Puppetserver integration (optional, read-only)
17+
# Uncomment and adjust paths as needed:
18+
# - /path/to/ssl/certs:/ssl-certs:ro
19+
# Mount Hiera control repository (optional, read-only)
20+
# Uncomment and adjust path as needed:
21+
# - /path/to/control-repo:/control-repo:ro
1622
# Persist node_modules
1723
- node_modules:/workspace/node_modules
1824
- backend_node_modules:/workspace/backend/node_modules
@@ -43,6 +49,68 @@ services:
4349
# Logging configuration
4450
- LOG_LEVEL=${LOG_LEVEL:-info}
4551

52+
# PuppetDB integration configuration (disabled by default)
53+
- PUPPETDB_ENABLED=${PUPPETDB_ENABLED:-false}
54+
- PUPPETDB_SERVER_URL=${PUPPETDB_SERVER_URL:-}
55+
- PUPPETDB_PORT=${PUPPETDB_PORT:-8081}
56+
- PUPPETDB_TOKEN=${PUPPETDB_TOKEN:-}
57+
- PUPPETDB_TIMEOUT=${PUPPETDB_TIMEOUT:-30000}
58+
- PUPPETDB_RETRY_ATTEMPTS=${PUPPETDB_RETRY_ATTEMPTS:-3}
59+
- PUPPETDB_RETRY_DELAY=${PUPPETDB_RETRY_DELAY:-1000}
60+
- PUPPETDB_SSL_ENABLED=${PUPPETDB_SSL_ENABLED:-false}
61+
- PUPPETDB_SSL_CA=${PUPPETDB_SSL_CA:-}
62+
- PUPPETDB_SSL_CERT=${PUPPETDB_SSL_CERT:-}
63+
- PUPPETDB_SSL_KEY=${PUPPETDB_SSL_KEY:-}
64+
- PUPPETDB_SSL_REJECT_UNAUTHORIZED=${PUPPETDB_SSL_REJECT_UNAUTHORIZED:-true}
65+
- PUPPETDB_CACHE_TTL=${PUPPETDB_CACHE_TTL:-300000}
66+
- PUPPETDB_CIRCUIT_BREAKER_THRESHOLD=${PUPPETDB_CIRCUIT_BREAKER_THRESHOLD:-5}
67+
- PUPPETDB_CIRCUIT_BREAKER_TIMEOUT=${PUPPETDB_CIRCUIT_BREAKER_TIMEOUT:-60000}
68+
- PUPPETDB_CIRCUIT_BREAKER_RESET_TIMEOUT=${PUPPETDB_CIRCUIT_BREAKER_RESET_TIMEOUT:-30000}
69+
70+
# Puppetserver integration configuration (disabled by default)
71+
- PUPPETSERVER_ENABLED=${PUPPETSERVER_ENABLED:-false}
72+
- PUPPETSERVER_SERVER_URL=${PUPPETSERVER_SERVER_URL:-}
73+
- PUPPETSERVER_PORT=${PUPPETSERVER_PORT:-8140}
74+
- PUPPETSERVER_TOKEN=${PUPPETSERVER_TOKEN:-}
75+
- PUPPETSERVER_TIMEOUT=${PUPPETSERVER_TIMEOUT:-30000}
76+
- PUPPETSERVER_RETRY_ATTEMPTS=${PUPPETSERVER_RETRY_ATTEMPTS:-3}
77+
- PUPPETSERVER_RETRY_DELAY=${PUPPETSERVER_RETRY_DELAY:-1000}
78+
- PUPPETSERVER_INACTIVITY_THRESHOLD=${PUPPETSERVER_INACTIVITY_THRESHOLD:-3600}
79+
- PUPPETSERVER_SSL_ENABLED=${PUPPETSERVER_SSL_ENABLED:-false}
80+
- PUPPETSERVER_SSL_CA=${PUPPETSERVER_SSL_CA:-}
81+
- PUPPETSERVER_SSL_CERT=${PUPPETSERVER_SSL_CERT:-}
82+
- PUPPETSERVER_SSL_KEY=${PUPPETSERVER_SSL_KEY:-}
83+
- PUPPETSERVER_SSL_REJECT_UNAUTHORIZED=${PUPPETSERVER_SSL_REJECT_UNAUTHORIZED:-true}
84+
- PUPPETSERVER_CACHE_TTL=${PUPPETSERVER_CACHE_TTL:-300000}
85+
- PUPPETSERVER_CIRCUIT_BREAKER_THRESHOLD=${PUPPETSERVER_CIRCUIT_BREAKER_THRESHOLD:-5}
86+
- PUPPETSERVER_CIRCUIT_BREAKER_TIMEOUT=${PUPPETSERVER_CIRCUIT_BREAKER_TIMEOUT:-60000}
87+
- PUPPETSERVER_CIRCUIT_BREAKER_RESET_TIMEOUT=${PUPPETSERVER_CIRCUIT_BREAKER_RESET_TIMEOUT:-30000}
88+
89+
# Hiera integration configuration (disabled by default)
90+
- HIERA_ENABLED=${HIERA_ENABLED:-false}
91+
- HIERA_CONTROL_REPO_PATH=${HIERA_CONTROL_REPO_PATH:-}
92+
- HIERA_CONFIG_PATH=${HIERA_CONFIG_PATH:-hiera.yaml}
93+
- HIERA_ENVIRONMENTS=${HIERA_ENVIRONMENTS:-["production"]}
94+
- HIERA_FACT_SOURCE_PREFER_PUPPETDB=${HIERA_FACT_SOURCE_PREFER_PUPPETDB:-true}
95+
- HIERA_FACT_SOURCE_LOCAL_PATH=${HIERA_FACT_SOURCE_LOCAL_PATH:-}
96+
- HIERA_CATALOG_COMPILATION_ENABLED=${HIERA_CATALOG_COMPILATION_ENABLED:-false}
97+
- HIERA_CATALOG_COMPILATION_TIMEOUT=${HIERA_CATALOG_COMPILATION_TIMEOUT:-60000}
98+
- HIERA_CATALOG_COMPILATION_CACHE_TTL=${HIERA_CATALOG_COMPILATION_CACHE_TTL:-300000}
99+
- HIERA_CACHE_ENABLED=${HIERA_CACHE_ENABLED:-true}
100+
- HIERA_CACHE_TTL=${HIERA_CACHE_TTL:-300000}
101+
- HIERA_CACHE_MAX_ENTRIES=${HIERA_CACHE_MAX_ENTRIES:-10000}
102+
- HIERA_CODE_ANALYSIS_ENABLED=${HIERA_CODE_ANALYSIS_ENABLED:-true}
103+
- HIERA_CODE_ANALYSIS_LINT_ENABLED=${HIERA_CODE_ANALYSIS_LINT_ENABLED:-true}
104+
- HIERA_CODE_ANALYSIS_MODULE_UPDATE_CHECK=${HIERA_CODE_ANALYSIS_MODULE_UPDATE_CHECK:-true}
105+
- HIERA_CODE_ANALYSIS_INTERVAL=${HIERA_CODE_ANALYSIS_INTERVAL:-3600000}
106+
- HIERA_CODE_ANALYSIS_EXCLUSION_PATTERNS=${HIERA_CODE_ANALYSIS_EXCLUSION_PATTERNS:-["**/vendor/**","**/fixtures/**"]}
107+
108+
# Integration priority configuration (optional)
109+
- BOLT_PRIORITY=${BOLT_PRIORITY:-5}
110+
- PUPPETDB_PRIORITY=${PUPPETDB_PRIORITY:-10}
111+
- PUPPETSERVER_PRIORITY=${PUPPETSERVER_PRIORITY:-8}
112+
- HIERA_PRIORITY=${HIERA_PRIORITY:-6}
113+
46114
healthcheck:
47115
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
48116
interval: 30s

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,5 +745,5 @@ The plugin architecture is designed for easy extension:
745745
- [Integrations API](./integrations-api.md)
746746
- [Configuration Guide](./configuration.md)
747747
- [PuppetDB Integration Setup](./puppetdb-integration-setup.md)
748-
- [Puppetserver Setup](./PUPPETSERVER_SETUP.md)
748+
- [Puppetserver Setup](./uppetserver-integration-setup.md)
749749
- [Troubleshooting Guide](./troubleshooting.md)

docs/configuration.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,12 @@ services:
907907
- /path/to/bolt-project:/bolt-project:ro
908908
# Mount database (persistent)
909909
- pabawi-data:/data
910-
# Mount SSH keys (read-only)
910+
# Mount SSL keys (read-only)
911911
- ~/.ssh:/root/.ssh:ro
912+
# Mount SSL certificates for integrations (read-only)
913+
- /path/to/ssl/certs:/ssl-certs:ro
914+
# Mount Hiera control repository (read-only)
915+
- /path/to/control-repo:/control-repo:ro
912916
environment:
913917
PORT: 3000
914918
HOST: 0.0.0.0
@@ -922,6 +926,38 @@ services:
922926
CACHE_INVENTORY_TTL: 60000
923927
CACHE_FACTS_TTL: 300000
924928
CONCURRENT_EXECUTION_LIMIT: 10
929+
930+
# PuppetDB Integration
931+
PUPPETDB_ENABLED: "true"
932+
PUPPETDB_SERVER_URL: "https://puppetdb.example.com"
933+
PUPPETDB_PORT: 8081
934+
PUPPETDB_SSL_ENABLED: "true"
935+
PUPPETDB_SSL_CA: "/ssl-certs/ca.pem"
936+
PUPPETDB_SSL_CERT: "/ssl-certs/client.pem"
937+
PUPPETDB_SSL_KEY: "/ssl-certs/client-key.pem"
938+
PUPPETDB_TIMEOUT: 30000
939+
PUPPETDB_CACHE_TTL: 300000
940+
941+
# Puppetserver Integration
942+
PUPPETSERVER_ENABLED: "true"
943+
PUPPETSERVER_SERVER_URL: "https://puppet.example.com"
944+
PUPPETSERVER_PORT: 8140
945+
PUPPETSERVER_SSL_ENABLED: "true"
946+
PUPPETSERVER_SSL_CA: "/ssl-certs/ca.pem"
947+
PUPPETSERVER_SSL_CERT: "/ssl-certs/client.pem"
948+
PUPPETSERVER_SSL_KEY: "/ssl-certs/client-key.pem"
949+
PUPPETSERVER_TIMEOUT: 30000
950+
PUPPETSERVER_CACHE_TTL: 300000
951+
952+
# Hiera Integration
953+
HIERA_ENABLED: "true"
954+
HIERA_CONTROL_REPO_PATH: "/control-repo"
955+
HIERA_CONFIG_PATH: "hiera.yaml"
956+
HIERA_ENVIRONMENTS: '["production","staging"]'
957+
HIERA_FACT_SOURCE_PREFER_PUPPETDB: "true"
958+
HIERA_CACHE_ENABLED: "true"
959+
HIERA_CACHE_TTL: 300000
960+
925961
restart: unless-stopped
926962
healthcheck:
927963
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]

0 commit comments

Comments
 (0)