Skip to content

Commit

Permalink
Rework READMEs to add application properties
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Sep 26, 2024
1 parent 34485b7 commit 1424d42
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 2 deletions.
14 changes: 14 additions & 0 deletions create-ocp-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ If the Jira issue isn't resolved within 60 seconds, the workflow fires a timeout

This workflow can be extended to introduce more capabilities, such as creating K8s resource in OpenShift cluster.

## Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `JIRA_URL` | The jira server URL || |
| `JIRA_USERNAME` | The jira username || |
| `JIRA_API_TOKEN` | The jira password || |
| `OCP_API_SERVER_URL` | The OCP API server url || |
| `OCP_API_SERVER_TOKEN` | The authorization bearer token to use when sending request to OCP || |


## Input
- `Audit Jira Project Key` [required] - the Jira Project Key to which the workflow is configured to work and has permission to create and update and issue of type Task.
- `Operations Jira Project Key` [required] - the Jira Project Key to which the workflow is configured to work and has permission to create and update and issue of type Task.
Expand Down
16 changes: 16 additions & 0 deletions modify-vm-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ The VM updater workflow is a workflow that demonstrates the following features o
## Prequisites
* Having the openshift-cnv operator installed and running

## Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `JIRA_URL` | The jira server URL || |
| `JIRA_USERNAME` | The jira username || |
| `JIRA_API_TOKEN` | The jira password || |
| `OCP_CONSOLE_URL` | The OCP Console server url. Will be used for links in notifications || |
| `OCP_API_SERVER_URL` | The OCP API server url || |
| `OCP_API_SERVER_TOKEN` | The authorization bearer token to use when sending request to OCP || |
| `VM_CHECK_RUNNING_MAX_RETRIES` | Amount of retries before considering the VM is not running || 10 |


## Input
- `Jira Project Key` [required] - the Jira Project Key to which the workflow is configured to work and has permission to create and update and issue of type Task.
- `VM name` [required] - The name of the VM to create
Expand Down
24 changes: 24 additions & 0 deletions move2kube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ Once the transformation is over, move2kube provides a zip file containing the tr
![m2k.svg](https://raw.githubusercontent.com/parodos-dev/serverless-workflows/main/move2kube/m2k.svg)

Note that if an error occurs during the migration planning there is no feedback given by the move2kube instance API. To overcome this, we defined a maximum amount of retries (`move2kube_get_plan_max_retries`) to execute while getting the planning before exiting with an error. By default the value is set to 10 and it can be overridden with the environment variable `MOVE2KUBE_GET_PLAN_MAX_RETRIES`.

## Workflow application configuration
### Move2kube workflow
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `MOVE2KUBE_URL` | The move2kube instance server URL || |
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `MOVE2KUBE_GET_PLAN_MAX_RETRIES` | The amount of retries to get the plan before failing the workflow || 10 |


### m2k-func serverless function
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `MOVE2KUBE_API` | The move2kube instance server URL || |
| `SSH_PRIV_KEY_PATH` | The absolute path to the SSH private key || |
| `BROKER_URL` | The knative broker URL || |
| `LOG_LEVEL` | The log level || INFO |


## Components
The use case has the following components:
1. `m2k`: the `Sonataflow` resource representing the workflow. A matching `Deployment` is created by the sonataflow operator..
Expand Down
10 changes: 10 additions & 0 deletions mta-v7.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Users are encouraged to use this workflow as self-service alternative for intera
a mass-migration of project from a managed place, the project stakeholders can use this (or automation) to regularly check
the cloud-readiness compatibility of their code.

# Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `MTA_URL` | The MTA Hub server URL || |


# Inputs
- `repositoryUrl` [mandatory] - the git repo url to examine
- `recipients` [mandatory] - A list of recipients for the notification in the format of `user:<namespace>/<username>` or `group:<namespace>/<groupname>`, i.e. `user:default/jsmith`.
Expand Down
4 changes: 3 additions & 1 deletion mtv-migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ This workflow is a continuation of the MTV assessment workflow. It executes an M
## Workflow diagram
![MTV Migration workflow diagram](https://github.com/parodos-dev/serverless-workflows/blob/main/mtv-migration/mtv.svg?raw=true)

## Application configuration
## Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `OCP_API_SERVER_URL` | The OpensShift API Server URL || |
| `OCP_API_SERVER_TOKEN`| The OpensShift API Server Token || |

Expand Down
4 changes: 3 additions & 1 deletion mtv-plan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ This workflow is an assessment workflow type, that creates an MTV Plan resource
## Workflow diagram
![MTV Plan workflow diagram](https://github.com/parodos-dev/serverless-workflows/blob/main/mtv-plan/mtv.svg?raw=true)

## Application configuration
## Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `OCP_API_SERVER_URL` | The OpensShift API Server URL || |
| `OCP_API_SERVER_TOKEN`| The OpensShift API Server Token || |

Expand Down
16 changes: 16 additions & 0 deletions request-vm-cnv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ While the issue is not resolved, the workflow polls the issue to check its statu
Then, the workflow is checking the status of the VM for a given amount of time. Once the maximum retries amount is reached or the VM ready, a notification with the status is sent.
* If the creation is denied, a notification is sent.

## Workflow application configuration
Application properties can be initialized from environment variables before running the application:

| Environment variable | Description | Mandatory | Default value |
|-----------------------|-------------|-----------|---------------|
| `BACKSTAGE_NOTIFICATIONS_URL` | The backstage server URL for notifications || |
| `NOTIFICATIONS_BEARER_TOKEN` | The authorization bearer token to use to send notifications || |
| `JIRA_URL` | The jira server URL || |
| `JIRA_USERNAME` | The jira username || |
| `JIRA_API_TOKEN` | The jira password || |
| `OCP_CONSOLE_URL` | The OCP Console server url. Will be used for links in notifications || |
| `OCP_API_SERVER_URL` | The OCP API server url || |
| `OCP_API_SERVER_TOKEN` | The authorization bearer token to use when sending request to OCP || |
| `VM_CHECK_RUNNING_MAX_RETRIES` | Amount of retries before considering the VM is not running || 10 |


## Input
- `Jira Project Key` [required] - the Jira Project Key to which the workflow is configured to work and has permission to create and update and issue of type Task.
- `VM name` [required] - The name of the VM to create
Expand Down

0 comments on commit 1424d42

Please sign in to comment.