Skip to content

Commit

Permalink
introducing MTV workflows
Browse files Browse the repository at this point in the history
FLPATH-1367
https://issues.redhat.com/browse/FLPATH-1367

Signed-off-by: Yaron Dayagi <[email protected]>
  • Loading branch information
ydayagi authored and pkliczewski committed Jun 24, 2024
1 parent 4cd758b commit c5a84ec
Show file tree
Hide file tree
Showing 12 changed files with 294 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/mtv-migration/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions charts/mtv-migration/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: mtv-migration
description: A Helm chart for the MTV Migration serverless workflow
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

icon: https://raw.githubusercontent.com/parodos-dev/parodos-dev.github.io/main/assets/images/WO_black.svg
77 changes: 77 additions & 0 deletions charts/mtv-migration/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
MTV Migration
===========

# Configuration
Set `TARGET_NS` to the target namespace:
```console
TARGET_NS=sonataflow-infra
```

# Installation
## Persistence pre-requisites
If persistence is enbaled, you must have a PostgreSQL instance running in the cluster, in the same `namespace` as the workflows.

A `secret` containing the instance credentials must exists as well.

See https://www.parodos.dev/orchestrator-helm-chart/postgresql on how to install a PostgreSQL instance. Please follow the section detailing how to install using helm. In this document, a `secret` holding the credentials is created.


## Installing helm chart
From `charts` folder run
```console
helm install mtv-migration mtv-migration --namespace=${TARGET_NS}
```


You need to edit the `sonataflow` resource to set the correct value for the `persistence` `spec`.
The defaults are:
```
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: mtv-migration
```

Make sure the above values match what is deployed on your namespace `TARGET_NS`.

You can patch the resource by running (update it if needed with your own values):
```bash
oc patch sonataflow/mtv-migration \
-n ${TARGET_NS} \
--type merge \
-p '
{
"spec": {
"persistence": {
"postgresql": {
"secretRef": {
"name": "sonataflow-psql-postgresql",
"userKey": "postgres-username",
"passwordKey": "postgres-password"
},
"serviceRef": {
"name": "sonataflow-psql-postgresql",
"port": 5432,
"databaseName": "sonataflow",
"databaseSchema": "mtv-migration"
}
}
}
}
}'
```


Run the following to set environment variables in the workflow:
```console
oc -n ${TARGET_NS} patch sonataflow mtv-migration --type merge -p '{"spec": { "podTemplate": { "container": { "env": [{"name": "OCP_API_SERVER_URL", "value": "<Target openshift URL>"}, {"name": "OCP_API_SERVER_TOKEN", "value": "<Token to access the target OCP cluster>"}]}}}}'
```

The `OCP_API_SERVER_TOKEN` should be associated with a service account.
20 changes: 20 additions & 0 deletions charts/mtv-migration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

MTV Migration
===========

A Helm chart for the MTV Migration serverless workflow


## Configuration

The following table lists the configurable parameters of the MTV Migration chart and their default values.

| Parameter | Description | Default |
| ------------------------ | ----------------------- | -------------- |
| | | |



---
_Documentation generated by [Frigate](https://frigate.readthedocs.io)._

10 changes: 10 additions & 0 deletions charts/mtv-migration/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [],
"properties": {},
"examples": [{}]
}
Empty file.
23 changes: 23 additions & 0 deletions charts/mtv-plan/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions charts/mtv-plan/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: mtv-plan
description: A Helm chart for the MTV Plan serverless assessment workflow
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

icon: https://raw.githubusercontent.com/parodos-dev/parodos-dev.github.io/main/assets/images/WO_black.svg
77 changes: 77 additions & 0 deletions charts/mtv-plan/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
MTV Plan
===========

# Configuration
Set `TARGET_NS` to the target namespace:
```console
TARGET_NS=sonataflow-infra
```

# Installation
## Persistence pre-requisites
If persistence is enbaled, you must have a PostgreSQL instance running in the cluster, in the same `namespace` as the workflows.

A `secret` containing the instance credentials must exists as well.

See https://www.parodos.dev/orchestrator-helm-chart/postgresql on how to install a PostgreSQL instance. Please follow the section detailing how to install using helm. In this document, a `secret` holding the credentials is created.


## Installing helm chart
From `charts` folder run
```console
helm install mtv-plan mtv-plan --namespace=${TARGET_NS}
```


You need to edit the `sonataflow` resource to set the correct value for the `persistence` `spec`.
The defaults are:
```
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: mtv-plan
```

Make sure the above values match what is deployed on your namespace `TARGET_NS`.

You can patch the resource by running (update it if needed with your own values):
```bash
oc patch sonataflow/mtv-plan \
-n ${TARGET_NS} \
--type merge \
-p '
{
"spec": {
"persistence": {
"postgresql": {
"secretRef": {
"name": "sonataflow-psql-postgresql",
"userKey": "postgres-username",
"passwordKey": "postgres-password"
},
"serviceRef": {
"name": "sonataflow-psql-postgresql",
"port": 5432,
"databaseName": "sonataflow",
"databaseSchema": "mtv-plan"
}
}
}
}
}'
```


Run the following to set environment variables in the workflow:
```console
oc -n ${TARGET_NS} patch sonataflow mtv-plan --type merge -p '{"spec": { "podTemplate": { "container": { "env": [{"name": "OCP_API_SERVER_URL", "value": "<Target openshift URL>"}, {"name": "OCP_API_SERVER_TOKEN", "value": "<Token to access the target OCP cluster>"}]}}}}'
```

The `OCP_API_SERVER_TOKEN` should be associated with a service account.
20 changes: 20 additions & 0 deletions charts/mtv-plan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

MTV Plan
===========

A Helm chart for the MTV Plan serverless assessment workflow


## Configuration

The following table lists the configurable parameters of the Create OCP project chart and their default values.

| Parameter | Description | Default |
| ------------------------ | ----------------------- | -------------- |
| | | |



---
_Documentation generated by [Frigate](https://frigate.readthedocs.io)._

10 changes: 10 additions & 0 deletions charts/mtv-plan/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [],
"properties": {},
"examples": [{}]
}
Empty file added charts/mtv-plan/values.yaml
Empty file.

0 comments on commit c5a84ec

Please sign in to comment.