Skip to content

Commit 8d34bd2

Browse files
committed
- Added missing newlines at the end of several scripts and YAML files to adhere to best practices.
- Updated various shell commands and YAML configurations for improved readability and consistency. - Ensured proper formatting in multiple files, including deployment scripts and task definitions. Signed-off-by: Gustavo Lira <[email protected]>
1 parent 3069af7 commit 8d34bd2

File tree

93 files changed

+399
-413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+399
-413
lines changed

.ibm/orchestrator-infra/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Orchestrator Infrastructure Only
22

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

56
## Components
67

@@ -191,7 +192,7 @@ oc logs -l app=sonataflow-platform-data-index-service -n orchestrator-infra
191192
```bash
192193
# Check workflow status
193194
oc get sonataflow -n orchestrator-infra
194-
oc describe sonataflow <workflow-name> -n orchestrator-infra
195+
oc describe sonataflow orchestrator-infra < workflow-name > -n
195196
```
196197

197198
## Uninstall
@@ -210,6 +211,7 @@ oc delete application orchestrator-infra -n openshift-gitops
210211
## Support
211212

212213
For issues or questions:
214+
213215
- Check the logs: `oc logs -n orchestrator-infra <pod-name>`
214216
- Review events: `oc get events -n orchestrator-infra`
215217
- Consult the [Orchestrator documentation](https://github.com/parodos-dev/orchestrator-helm-chart)

.ibm/orchestrator-infra/deploy-orchestrator.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
2727
info() { echo -e "${BLUE}[INFO]${NC} $*"; }
2828

2929
print_help() {
30-
cat <<EOF
30+
cat << EOF
3131
Usage: $(basename "$0") [OPTIONS]
3232
3333
Deploy Orchestrator Infrastructure without RHDH/Backstage
@@ -97,7 +97,7 @@ while [[ $# -gt 0 ]]; do
9797
DRY_RUN="true"
9898
shift
9999
;;
100-
-h|--help)
100+
-h | --help)
101101
print_help
102102
exit 0
103103
;;
@@ -112,30 +112,30 @@ done
112112
# Check prerequisites
113113
log "Checking prerequisites..."
114114

115-
if ! command -v oc >/dev/null 2>&1; then
115+
if ! command -v oc > /dev/null 2>&1; then
116116
error "oc CLI not installed. Please install OpenShift CLI."
117117
exit 1
118118
fi
119119

120-
if ! command -v ansible-playbook >/dev/null 2>&1; then
120+
if ! command -v ansible-playbook > /dev/null 2>&1; then
121121
error "ansible-playbook not installed. Please install Ansible."
122122
exit 1
123123
fi
124124

125-
if ! oc whoami >/dev/null 2>&1; then
125+
if ! oc whoami > /dev/null 2>&1; then
126126
error "Not logged into OpenShift. Please run 'oc login' first."
127127
exit 1
128128
fi
129129

130-
info "Cluster: $(oc whoami --show-console 2>/dev/null || echo "unknown")"
130+
info "Cluster: $(oc whoami --show-console 2> /dev/null || echo "unknown")"
131131
info "User: $(oc whoami)"
132132

133133
# Check Python kubernetes library
134-
if ! python3 -c "import kubernetes" 2>/dev/null; then
134+
if ! python3 -c "import kubernetes" 2> /dev/null; then
135135
warn "Python kubernetes library not installed. Installing..."
136-
pip3 install kubernetes --user --break-system-packages 2>/dev/null || \
137-
pip3 install kubernetes --user 2>/dev/null || \
138-
error "Failed to install kubernetes library. Please install manually: pip3 install kubernetes"
136+
pip3 install kubernetes --user --break-system-packages 2> /dev/null \
137+
|| pip3 install kubernetes --user 2> /dev/null \
138+
|| error "Failed to install kubernetes library. Please install manually: pip3 install kubernetes"
139139
fi
140140

141141
if [ "$DRY_RUN" = "true" ]; then
@@ -156,11 +156,11 @@ fi
156156
# Clean namespace if requested
157157
if [ "$CLEAN" = "true" ]; then
158158
log "Cleaning namespace $NAMESPACE..."
159-
oc delete namespace "$NAMESPACE" --ignore-not-found --wait=false 2>/dev/null || true
160-
159+
oc delete namespace "$NAMESPACE" --ignore-not-found --wait=false 2> /dev/null || true
160+
161161
# Wait for namespace deletion
162162
for _ in {1..30}; do
163-
if ! oc get namespace "$NAMESPACE" >/dev/null 2>&1; then
163+
if ! oc get namespace "$NAMESPACE" > /dev/null 2>&1; then
164164
break
165165
fi
166166
echo -n "."
@@ -212,4 +212,4 @@ else
212212
error "Deployment failed with code: $RET"
213213
error "Check the logs above for details"
214214
exit $RET
215-
fi
215+
fi

.ibm/orchestrator-infra/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818

1919
# Install Orchestrator infrastructure
2020
install_orchestrator_infra: true
21-
21+
2222
# Keycloak
2323
deploy_keycloak: true
2424
rhdh_keycloak_auth: true
25-
25+
2626
# GitOps (optional)
2727
enable_gitops: "{{ enable_gitops | default(false) }}"
2828

2929
# Backend secret
3030
backstage_backend_auth_secret: "orchestrator123"
31-
31+
3232
tasks:
3333
- name: Display deployment configuration
3434
debug:
@@ -143,4 +143,4 @@
143143
- " 1. Check pods: oc get pods -n {{ rhdh_ns }}"
144144
- " 2. Configure your RHDH/Backstage instance with the endpoints above"
145145
- " 3. Add Orchestrator plugins to your Backstage dynamic-plugins"
146-
- "=========================================================="
146+
- "=========================================================="

.ibm/orchestrator-infra/orchestrator-infra-playbook.yml

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@
1212

1313
# Use original project defaults but override the namespace
1414
rhdh_ns: "{{ orchestrator_namespace }}"
15-
15+
1616
# Keycloak configuration
1717
deploy_keycloak: true
1818
rhdh_keycloak_auth: true
1919
rhdh_keycloak_client_id: "orchestrator"
2020
rhdh_keycloak_client_secret: "orchestrator-secret"
2121
rhdh_keycloak_realm: "orchestrator"
22-
22+
2323
# PostgreSQL for Orchestrator
2424
orchestrator_db_name: "backstage_plugin_orchestrator"
2525

2626
# Install only orchestrator infrastructure (not RHDH)
2727
install_orchestrator_infra: true
28-
28+
2929
# Deploy directory
3030
rhdh_deploy_dir: "/tmp/orchestrator-infra-deploy"
3131
rhdh_config_dir: "{{ rhdh_deploy_dir }}/config"
32-
32+
3333
# Serverless Logic Operator
3434
install_serverless_operator: true
35-
35+
3636
# GitOps (optional)
3737
enable_gitops: false
38-
38+
3939
# Workflow samples
4040
workflow_repo: "https://github.com/rhdh-orchestrator-test/serverless-workflows.git"
41-
41+
4242
tasks:
4343
- name: Verify OpenShift connection
4444
kubernetes.core.k8s_info:
@@ -105,40 +105,40 @@
105105
app: postgresql-orchestrator
106106
spec:
107107
containers:
108-
- name: postgresql
109-
image: registry.redhat.io/rhel9/postgresql-15:latest
110-
env:
111-
- name: POSTGRESQL_USER
112-
valueFrom:
113-
secretKeyRef:
114-
name: postgresql-orchestrator-secret
115-
key: database-user
116-
- name: POSTGRESQL_PASSWORD
117-
valueFrom:
118-
secretKeyRef:
119-
name: postgresql-orchestrator-secret
120-
key: database-password
121-
- name: POSTGRESQL_DATABASE
122-
valueFrom:
123-
secretKeyRef:
124-
name: postgresql-orchestrator-secret
125-
key: database-name
126-
- name: POSTGRESQL_MAX_CONNECTIONS
127-
value: "200"
128-
ports:
129-
- containerPort: 5432
130-
name: postgresql
131-
volumeMounts:
132-
- name: postgresql-data
133-
mountPath: /var/lib/pgsql/data
108+
- name: postgresql
109+
image: registry.redhat.io/rhel9/postgresql-15:latest
110+
env:
111+
- name: POSTGRESQL_USER
112+
valueFrom:
113+
secretKeyRef:
114+
name: postgresql-orchestrator-secret
115+
key: database-user
116+
- name: POSTGRESQL_PASSWORD
117+
valueFrom:
118+
secretKeyRef:
119+
name: postgresql-orchestrator-secret
120+
key: database-password
121+
- name: POSTGRESQL_DATABASE
122+
valueFrom:
123+
secretKeyRef:
124+
name: postgresql-orchestrator-secret
125+
key: database-name
126+
- name: POSTGRESQL_MAX_CONNECTIONS
127+
value: "200"
128+
ports:
129+
- containerPort: 5432
130+
name: postgresql
131+
volumeMounts:
132+
- name: postgresql-data
133+
mountPath: /var/lib/pgsql/data
134134
volumeClaimTemplates:
135-
- metadata:
136-
name: postgresql-data
137-
spec:
138-
accessModes: [ "ReadWriteOnce" ]
139-
resources:
140-
requests:
141-
storage: 5Gi
135+
- metadata:
136+
name: postgresql-data
137+
spec:
138+
accessModes: ["ReadWriteOnce"]
139+
resources:
140+
requests:
141+
storage: 5Gi
142142

143143
- name: Create PostgreSQL Service
144144
kubernetes.core.k8s:
@@ -151,8 +151,8 @@
151151
namespace: "{{ orchestrator_namespace }}"
152152
spec:
153153
ports:
154-
- port: 5432
155-
targetPort: 5432
154+
- port: 5432
155+
targetPort: 5432
156156
selector:
157157
app: postgresql-orchestrator
158158
type: ClusterIP
@@ -259,8 +259,8 @@
259259
spec:
260260
flow:
261261
id: "{{ item.name }}"
262-
version: '1.0'
263-
specVersion: '0.8'
262+
version: "1.0"
263+
specVersion: "0.8"
264264
name: "{{ item.description }}"
265265
start: Start
266266
states:
@@ -271,7 +271,10 @@
271271
end: true
272272
loop:
273273
- { name: "user-onboarding", description: "User Onboarding Workflow" }
274-
- { name: "infrastructure-provisioning", description: "Infrastructure Provisioning Workflow" }
274+
- {
275+
name: "infrastructure-provisioning",
276+
description: "Infrastructure Provisioning Workflow",
277+
}
275278
when: install_orchestrator_infra | bool
276279

277280
# GitOps configuration (optional)
@@ -336,4 +339,4 @@
336339
- ""
337340
- "Check pods status:"
338341
- " oc get pods -n {{ orchestrator_namespace }}"
339-
- "========================================================"
342+
- "========================================================"

.ibm/orchestrator-infra/orchestrator-plugin-help.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# :wave: Need help enabling **Orchestrator** plugins on RHDH
22

3-
*Chart / Image*
3+
_Chart / Image_
4+
45
```
56
chart: quay.io/rhdh/chart 1.7-154-CI
67
image: quay.io/redhat-developer-hub/rhdh-hub-rhel9:1.7-154-CI
78
namespace: rhdh-ci
89
```
910

10-
*What I tried*
11+
_What I tried_
12+
1113
1. `@redhat/[email protected]` + integrity → npm 404
12-
2. Path to dist dir `./dynamic-plugins/dist/backstage-plugin-orchestrator` → ENOENT (no package.json)
13-
3. Path to tgz `./dynamic-plugins/dist/backstage-plugin-orchestrator-backend-dynamic-1.7.1.tgz` → tarball corrupted / ENOENT
14+
2. Path to dist dir `./dynamic-plugins/dist/backstage-plugin-orchestrator` → ENOENT (no
15+
package.json)
16+
3. Path to tgz `./dynamic-plugins/dist/backstage-plugin-orchestrator-backend-dynamic-1.7.1.tgz`
17+
tarball corrupted / ENOENT
1418
4. Combos of the above (with/without integrity) → same errors
1519

1620
Installer always ends with:
21+
1722
```text
1823
Error while installing plugin … with 'npm pack'
1924
npm error enoent Could not read package.json …
2025
```
2126

22-
Anyone know the correct reference for the Orchestrator tarballs **in this image** or a flag to skip `npm pack`?
27+
Anyone know the correct reference for the Orchestrator tarballs **in this image** or a flag to skip
28+
`npm pack`?
2329

2430
Thanks! :pray:
25-
26-
27-
28-

.ibm/orchestrator-infra/rhdh-orchestrator-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ data:
8585
# Scaffolder Module for Orchestrator
8686
- package: https://npm.stage.registry.redhat.com/@redhat/backstage-plugin-scaffolder-backend-module-orchestrator-dynamic/-/backstage-plugin-scaffolder-backend-module-orchestrator-dynamic-1.7.1-rc.1.tgz
8787
integrity: sha512-qeOiYBn7XzT39q1w/86wSeuTPD50IJSZlBI2iSNy8k5hmqaIxZ9OWIEaT1QPgfSbeniYxmYGQZiyZWdMNXscIA==
88-
disabled: false
88+
disabled: false

.ibm/orchestrator-infra/roles/deploy-cost-metrics-operator/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ costmetrics_label_namespaces:
1414
- rhdh
1515
- sonataflow-infra
1616
- rhdh-operator
17-
- costmanagement-metrics-operator
17+
- costmanagement-metrics-operator

.ibm/orchestrator-infra/roles/deploy-cost-metrics-operator/tasks/create_costmanagement_resource.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
ansible.builtin.shell: |
66
cat << EOF | oc apply -f -
77
{{ lookup('template', 'costmanagement_resource.yaml.j2') }}
8-
EOF
8+
EOF

.ibm/orchestrator-infra/roles/deploy-cost-metrics-operator/tasks/create_secret.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
ansible.builtin.shell: |
66
cat << EOF | oc apply -f -
77
{{ lookup('template', 'costmanagement_secret.yaml.j2') }}
8-
EOF
8+
EOF

.ibm/orchestrator-infra/roles/deploy-cost-metrics-operator/tasks/install_operator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
name: "{{ costmetrics_operator_name }}"
2626
source: "{{ costmetrics_operator_source }}"
2727
sourceNamespace: "{{ costmetrics_operator_source_namespace }}"
28-
EOF
28+
EOF

0 commit comments

Comments
 (0)