This section covers deploying the Manetu PolicyEngine in production environments.
:::tip Quick Navigation
<SectionHeader icon="standalone" level={3}>Standalone Server
Run the mpe serve command as a standalone decision-point process:
mpe serve -b domain.yml --port 9000
<SectionHeader icon="docker" level={3}>Docker Container
You may also run the server as a Docker container:
docker run -p 9000:9000 -v $PWD:/mnt ghcr.io/manetu/policyengine:latest serve -b /mnt/domain.yml --port 9000
<SectionHeader icon="kubernetes" level={3}>Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: mpe-pdp
spec:
replicas: 3
selector:
matchLabels:
app: mpe-pdp
template:
metadata:
labels:
app: mpe-pdp
spec:
containers:
- name: mpe
image: ghcr.io/manetu/policyengine:latest
command: ["serve", "-b", "/mnt/domain.yml", "--port", "9000"]
ports:
- containerPort: 9000
env:
- name: MPE_LOG_LEVEL
value: ".:info"
- name: MPE_LOG_FORMATTER
value: "json"
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
readinessProbe:
grpc:
port: 9000
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
grpc:
port: 9000
initialDelaySeconds: 10
periodSeconds: 15
---
apiVersion: v1
kind: Service
metadata:
name: mpe-pdp
spec:
selector:
app: mpe-pdp
ports:
- port: 9000
targetPort: 9000
type: ClusterIP
:::tip Premium Feature: Kubernetes Operator The Community Edition requires manual deployment and configuration of decision points. The Premium Edition includes a Kubernetes Operator that automatically configures policy decision points as sidecars. This approach offers significant advantages:
Deploy multiple replicas for high availability:
Restrict access to the policy server:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: mpe-server-policy
spec:
podSelector:
matchLabels:
app: mpe-server
ingress:
- from:
- podSelector:
matchLabels:
needs-authz: "true"
ports:
- port: 9000
For production, configure TLS at the load balancer or service mesh level.
Use structured logging for observability:
export MPE_LOG_FORMATTER=json
export MPE_LOG_LEVEL=.:info
:::tip Premium Feature: Advanced Observability The Community Edition provides basic logging. The Premium Edition adds enterprise-grade observability including:
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |