Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fe038fb
RHIDP-9016 - Create automated script to provision RHDH Orchestrator i…
gustavolira Oct 22, 2025
c081965
RHIDP-9016 - removing empty file
gustavolira Oct 22, 2025
3d2869d
RHIDP-9016
gustavolira Oct 22, 2025
67e02cf
Update setup.yml to refine namespace creation condition for workflows
gustavolira Oct 22, 2025
104574a
- Added missing newlines at the end of several scripts and YAML files…
gustavolira Oct 22, 2025
d05602b
chore(orchestrator-infra): address review feedback
gustavolira Oct 27, 2025
d4f5b7b
fix(orchestrator-infra): wait for Serverless Logic Operator before cr…
gustavolira Oct 28, 2025
f86a450
fix(orchestrator-infra): install Serverless operators directly instea…
gustavolira Oct 28, 2025
a970731
fix(orchestrator-infra): ensure Knative components are ready before i…
gustavolira Oct 28, 2025
6eb96fa
fix(orchestrator-infra): add OperatorGroup for Logic Operator namespace
gustavolira Oct 28, 2025
70c8dc0
fix(orchestrator-infra): ensure rhdh_ns variable uses orchestrator-in…
gustavolira Oct 28, 2025
c2fe3f7
fix(orchestrator-infra): configure Logic Operator for AllNamespaces mode
gustavolira Oct 28, 2025
e28896e
fix(orchestrator-infra): configure OperatorGroup correctly for Logic …
gustavolira Oct 28, 2025
d509442
docs(orchestrator-infra): update README with correct script names and…
gustavolira Oct 28, 2025
ef09167
docs(orchestrator-infra): add changelog and review responses document…
gustavolira Oct 28, 2025
e9a92cb
chore(orchestrator-infra): fix trailing whitespace
gustavolira Oct 28, 2025
02658bf
fix(orchestrator-infra): use correct label for Logic Operator control…
gustavolira Oct 28, 2025
a963fab
fix(orchestrator-infra): add missing orchestrator_db_name variable to…
gustavolira Oct 28, 2025
7177e1c
fix(orchestrator-infra): add missing workflow_repo and workflow_manif…
gustavolira Oct 28, 2025
cba6e05
fix(orchestrator-infra): check for Succeed condition instead of Ready
gustavolira Oct 28, 2025
14418f4
fix(orchestrator-infra): use correct PostgreSQL service name for work…
gustavolira Oct 28, 2025
c24524d
fix(orchestrator-infra): improve namespace cleanup process
gustavolira Oct 28, 2025
8d25a30
fix(orchestrator-infra): use correct secret key names for PostgreSQL …
gustavolira Oct 28, 2025
1b0579c
fix(orchestrator-infra): use postgres user to create orchestrator dat…
gustavolira Oct 28, 2025
312caa7
feat(orchestrator-infra): add configurable workflow image support
gustavolira Oct 28, 2025
6cc9671
chore(orchestrator-infra): remove obsolete CHANGELOG and REVIEW_RESPO…
gustavolira Oct 28, 2025
b9626cb
fix(orchestrator-infra): improve workflow pod wait conditions with ti…
gustavolira Oct 28, 2025
36841cd
fix(orchestrator-infra): correct Data Index Service URL in script output
gustavolira Oct 28, 2025
492c477
docs(orchestrator-infra): update Data Index Service URL with correct …
gustavolira Oct 28, 2025
f25f7ad
rhidp-9016 - Create automated script to provision RHDH Orchestrator i…
gustavolira Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 239 additions & 0 deletions .ibm/orchestrator-infra/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
# Orchestrator Infrastructure Only

This project deploys the complete infrastructure needed for the Orchestrator plugin without
RHDH/Backstage. It includes all the supporting services required for workflow orchestration.

## Components

- **PostgreSQL**: Database for storing workflow data and orchestrator metadata
- **Keycloak**: Identity and access management for authentication (optional)
- **Serverless Logic Operator**: Manages SonataFlow workflows
- **SonataFlow Platform**: Provides Data Index and Job Service
- **Sample Workflows**: Pre-configured workflow examples
- **GitOps Configuration**: ArgoCD setup for continuous deployment (optional)

## Prerequisites

- OpenShift 4.10+ cluster
- `oc` CLI installed and configured
- Cluster admin privileges
- Git (optional, for GitOps features)

## Quick Start

```bash
# Make scripts executable
chmod +x deploy-orchestrator.sh scripts/*.sh

# Deploy all components
./deploy-orchestrator.sh

# Deploy without Keycloak
./deploy-orchestrator.sh --no-keycloak

# Deploy with GitOps
./deploy-orchestrator.sh --enable-gitops

# Update existing deployment (don't clean namespace)
./deploy-orchestrator.sh --no-clean

# Use custom namespace
./deploy-orchestrator.sh --namespace my-orchestrator
```

## Individual Component Deployment

You can deploy components individually:

```bash
# Deploy Keycloak only
./scripts/01-deploy-keycloak.sh

# Deploy PostgreSQL only
./scripts/02-deploy-postgresql.sh

# Deploy Serverless Logic Operator and SonataFlow
./scripts/03-deploy-serverless-operator.sh

# Configure GitOps
./scripts/04-deploy-gitops.sh

# Note: Sample workflows are now automatically deployed via Ansible
# No manual script execution needed
```

## Configuration

### PostgreSQL

- **Database**: `backstage_plugin_orchestrator`
- **Schema**: `orchestrator`
- **Default Credentials**:
- Admin: `postgres` / `postgres123`
- Orchestrator: `orchestrator` / `orchestrator123`

### Keycloak

- **Admin Console**: Available via OpenShift route
- **Default Admin**: `admin` / `admin123`
- **Realm**: `orchestrator`
- **Client ID**: `orchestrator`

### SonataFlow Services

- **Data Index Service**: Indexes workflow instances for querying
- **Job Service**: Manages workflow timers and scheduled tasks

## Integration with RHDH/Backstage

To integrate this infrastructure with your RHDH/Backstage instance:

1. **Add Orchestrator Dynamic Plugins** to your Backstage configuration:

```yaml
plugins:
- package: "@redhat/backstage-plugin-orchestrator-backend-dynamic"
pluginConfig:
orchestrator:
dataIndexService:
url: http://sonataflow-platform-data-index-service.orchestrator-infra
# Note: The plugin automatically appends /graphql to the URL
#
# Or with full URL:
# url: http://sonataflow-platform-data-index-service.orchestrator-infra.svc.cluster.local:80

- package: "@redhat/backstage-plugin-orchestrator"
# Frontend configuration...
```

2. **Configure Database Connection** in Backstage:

```yaml
backend:
database:
client: pg
connection:
host: postgresql.orchestrator-infra.svc.cluster.local
port: 5432
user: orchestrator
password: orchestrator123
database: backstage_plugin_orchestrator
```

3. **Configure Authentication** (if using Keycloak):

```yaml
auth:
providers:
oidc:
development:
metadataUrl: https://<keycloak-route>/realms/orchestrator/.well-known/openid-configuration
clientId: orchestrator
clientSecret: orchestrator-secret
```

## Accessing Services

After deployment, you can access the services:

```bash
# Get all routes
oc get routes -n orchestrator-infra

# Get service endpoints
oc get svc -n orchestrator-infra

# Check pod status
oc get pods -n orchestrator-infra

# View logs
oc logs -n orchestrator-infra <pod-name>
```

## Sample Workflows

The deployment includes the following sample workflow:

- **greeting**: Demonstrates a simple greeting workflow with language selection

To list deployed workflows:

```bash
oc get sonataflow -n orchestrator-infra
```

## GitOps Management

If GitOps is enabled, the infrastructure is managed by ArgoCD:

```bash
# Get ArgoCD URL
oc get route openshift-gitops-server -n openshift-gitops

# Get admin password
oc get secret openshift-gitops-cluster -n openshift-gitops -o jsonpath='{.data.admin\.password}' | base64 -d
```

## Troubleshooting

### PostgreSQL Connection Issues

```bash
# Test database connection
oc exec -it postgresql-0 -n orchestrator-infra -- psql -U postgres -d backstage_plugin_orchestrator -c "\dt"
```

### Logic Operator CSV Failed

If the Logic Operator CSV shows `Failed` state but CRDs are installed, this is expected behavior.
The operator installs CRDs successfully even when CSV shows Failed status. Verify:

```bash
# Check if CRDs are available
oc get crd sonataflowplatforms.sonataflow.org

# Check if controller is running
oc get pods -n openshift-serverless-logic
```

### SonataFlow Services Not Starting

```bash
# Check SonataFlowPlatform status
oc describe sonataflowplatform sonataflow-platform -n orchestrator-infra

# Check Data Index logs
oc logs -l app=sonataflow-platform-data-index-service -n orchestrator-infra

# Verify Logic Operator controller is running
oc get pods -n openshift-serverless-logic -l app.kubernetes.io/name=sonataflow-operator
```

### Workflow Deployment Issues

```bash
# Check workflow status
oc get sonataflow -n orchestrator-infra
oc describe sonataflow orchestrator-infra < workflow-name > -n
```

## Uninstall

To remove all components:

```bash
# Delete namespace and all resources
oc delete namespace orchestrator-infra
oc delete namespace openshift-serverless-logic

# Remove GitOps artifacts (if deployed)
oc delete application orchestrator-infra -n openshift-gitops
```

## Support

For issues or questions:

- Check the logs: `oc logs -n orchestrator-infra <pod-name>`
- Review events: `oc get events -n orchestrator-infra`
- Consult the [Orchestrator documentation](https://github.com/parodos-dev/orchestrator-helm-chart)
Loading
Loading