Skip to content

Commit

Permalink
feat(STONEINTG-697): Update integraiton-service doc
Browse files Browse the repository at this point in the history
* Update integration-service architecture doc since integration
  don't create SEB for successful snapshot

Signed-off-by: Hongwei Liu <hongliu@redhat.com>
  • Loading branch information
hongweiliu17 committed Apr 19, 2024
1 parent 2412d59 commit 8c1d19d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions architecture/integration-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ The Integration service uses the pipeline, snapshot, and environment controllers
- When a build pipeline completes, Integration service creates a Snapshot CR representing a new collection of components that should be tested together.
- When Integration Service sees a new Snapshot CR (created either by itself or by a user), it coordinates deployment of the application for testing. It does this by creating new “ephemeral” AppStudio Environment CRs which trigger the GitOps Service to provision the ephemeral test environment.
- After the environment is ready and the application snapshot has been deployed to it, Integration Service tests and validates the application according to user-provided configuration. It does this by executing Tekton PipelineRuns against the ephemeral test Environment.
- When all of the required test Tekton PipelineRuns have passed, Integration service triggers a deployment of the application to all Environments which are not labeled as "ephemeral" and which do not have a `parentEnvironment` set. For most users, this will result in a deployment to their "development" environment (or to their "staging" environment, if they do not have a dev environment).
- Finally, if any automatic ReleasePlans have been created by the user in the workspace, it will create a Release CR signalling intent to release the tested content, to be carried out by the [release-service](./release-service.md).

The diagram below shows the interaction of the integration service and other services.
Expand All @@ -36,7 +35,6 @@ The [Integration Service](./integration-service.md) is dependent on the followin
- Provides the facility to create
- Snapshots defining sets of Builds to test
- Environment to test the Application on
- SnapshotEnvironmentBindings to have the Snapshot of the Application deployed to a specific Environment
- [Hybrid Application Service](./hybrid-application-service.md)
- Provides the Application and Component model. Integration Service updates the pullspec reference on the Component CR when a component passes its required testing.
- [Release Service](./release-service.md)
Expand Down Expand Up @@ -77,7 +75,6 @@ Below are the list of CRs that the integration service is responsible for intera
| Snapshot | Post Component build PipelineRun completes. | Used as the source input for the test gate pipeline |
| PipelineRuns | Post Snapshot creation | To test the Snapshot |
| Release | Post PipelineRun if there is a ReleasePlan for the Application, if the auto-release flag is set on the ReleasePlan | To signal to the Release Service to automatically push the Snapshot to the Production Environment |
| SnapshotEnvironmentBinding | When deploying the Snapshot to an Environment | Create a new SnapshotEnvironmentBinding for the Dev/Stage Environment if a matching SnapshotEnvironmentBinding doesn’t already exist |

### READ

Expand All @@ -91,7 +88,6 @@ Below are the list of CRs that the integration service is responsible for intera

| Custom Resource | When? | Why? |
|---|---|---|
| SnapshotEnvironmentBinding | Post Test PipelineRun | To promote the Snapshot to the next Environment (Dev/Stage) |
| Snapshot | Post Test PipelineRun | To mark the snapshot validated so that it can be promoted to the next environment |
| Component | Post Test PipelineRun | To update the Component with the image spec, in order to update the global candidates list |

Expand Down Expand Up @@ -191,23 +187,21 @@ The Integration service needs secrets mounted so that the `Environment Provision
9. Compare new Snapshot from step 8 to step 3
- If determined the same, proceed to step 10
- If determined not the same, proceed to step 14
10. Update the spec.Snapshot of SnapshotEnvironmentBinding(s) for lowest environments with the `<snapshot name>`
11. Query ReleasePlan `spec.application` for the specific application in question
10. Query ReleasePlan `spec.application` for the specific application in question
- Check the auto-release flag on the ReleasePlan too
- If ReleasePlan for Application found proceed to step 12
- If ReleasePlan for Application NOT found proceed to step 13
12. Create a Release with the `spec.ReleasPlan` and `spec.Snapshot`
13. Done - Repeat from Step 1 again
14. If not the same, repeat step 4
11. Create a Release with the `spec.ReleasPlan` and `spec.Snapshot`
12. Done - Repeat from Step 1 again
13. If not the same, repeat step 4
- Assign the same annotations except
Test: composite
Snapshot: name from step 8
- Pass in the Snapshot name as a parameter
15. Watch the PipelineRun of `test: composite` and `snapshot: <snapshot name>`
14. Watch the PipelineRun of `test: composite` and `snapshot: <snapshot name>`
- When PipelineRuns complete
- If all PipelineRuns passed, mark the Snapshot as validated by setting its status condition HACBSTestsSucceeded as true
16. Repeat step 10
17. Repeat step 11-13
15. Repeat step 11-12
### Image extraction details
Expand Down
Binary file modified diagrams/integration-service/integration-service-data-flow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8c1d19d

Please sign in to comment.