-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from arewm/migrate-advanced-how-tos
Migrate and update basic release documentation
- Loading branch information
Showing
5 changed files
with
202 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 68 additions & 1 deletion
69
...odules/ROOT/pages/advanced-how-tos/releasing/create-release-plan-admission.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,68 @@ | ||
= Creating a release plan admission | ||
= Creating a release plan admission | ||
|
||
A ReleasePlanAdmission (RPA) CR exists within a managed workspace. It defines the specific pipeline to run and a given xref:/advanced-how-tos/managing-compliance-with-ec.adoc[Enterprise Contract] Policy which needs to pass for the Snapshot before that pipeline can proceed. | ||
|
||
When an application is ready for release, the Development team contacts the owners of the managed workspace (for example, their organization's SRE team) and requested access to the managed workspace. A RPA object is then created in the managed workspace to specify the configuration. | ||
|
||
== Creating a `ReleasePlanAdmission` object | ||
|
||
.*Prerequisites* | ||
|
||
* An existing Development and Managed workspace. | ||
|
||
* An existing `ReleasePlan` object in the Development workspace. | ||
|
||
.*Procedures* | ||
|
||
. Create a `ReleasePlanAdmission.yaml` object locally. | ||
|
||
+ | ||
*Example `ReleasePlanAdmission.yaml` object* | ||
|
||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: appstudio.redhat.com/v1alpha1 | ||
kind: ReleasePlanAdmission | ||
metadata: | ||
name: sre-production <.> | ||
namespace: managed-workspace <.> | ||
spec: | ||
applications: | ||
- demo-app <.> | ||
data: <key> <.> | ||
environment: <sre-production> <.> | ||
origin: <dev-workspace> <.> | ||
pipelineRef: <pipeline_ref> <.> | ||
policy: <policy> <.> | ||
serviceAccount: <service-account> <.> | ||
---- | ||
|
||
+ | ||
<.> The name of the release plan admission. | ||
<.> The Managed environment team's workspace. | ||
<.> A list of applications that you want to enable to be deployed in the managed workspace. | ||
<.> Optional: An unstructured key used for providing data for the managed Pipeline. | ||
<.> Optional: The environment from which the application updates are allowed to be received in the Managed workspace. This environment is created by the Development team. | ||
<.> The development team workspace where the application is defined. | ||
<.> Reference to the Pipeline to be executed by the release service. | ||
<.> The enterprise contract policy against which the system validates an application before releasing it to production. | ||
<.> Optional: The name of the service account to use in the Pipeline to gain elevated privileges. It's used only if you have defined the `pipelineRef` value. | ||
|
||
+ | ||
NOTE: The ReleasePlanAdmission.yaml represents the reciprocal link to the ReleasePlan.yaml objects created by the development team. | ||
|
||
. In the Managed workspace, apply the `ReleasePlanAdmission.yaml` file and add the resource to your cluster by running the following command: | ||
|
||
+ | ||
[source,shell] | ||
---- | ||
oc apply -f ReleasePlanAdmission.yaml -n managed | ||
---- | ||
|
||
.*Verification* | ||
|
||
. In the {ProductName} UI, select the *Release services* > *Release plan admission* tab. | ||
. Review the RPA object that you just added. Using the Release plan admission tab, you can update or delete the selected Release plan object. | ||
. When a ReleasePlanAdmission is correctly configured to be paired with a ReleasePlan, its *Status* will display as being `Matched`. |
64 changes: 63 additions & 1 deletion
64
docs/modules/ROOT/pages/advanced-how-tos/releasing/create-release-plan.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
= Creating a release plan | ||
= Creating a release plan | ||
|
||
A ReleasePlan (RP) CR is created for a specific Application. It defines the the process to release a specific Application Snapshot in a target workspace, whether automatic releases are enabled, as well as additional data to pass to a corresponding RPA. | ||
|
||
== Creating a `ReleasePlan` object | ||
|
||
The development team creates a `ReleasePlan` object in the developer workspace. The `ReleasePlan` object includes a reference to the application that the development team wants to release, along with workspace where the application is supposed to be released. | ||
|
||
.*Prerequisites* | ||
|
||
* You have an existing Development workspace. | ||
* Ensure you have installed `oc`. | ||
* You have completed the steps listed in the xref:/getting-started/cli.adoc[Getting started in the CLI] page. | ||
|
||
.*Procedures* | ||
|
||
. Create a `ReleasePlan.yaml` object locally. | ||
|
||
+ | ||
*Example `ReleasePlan.yaml` object* | ||
|
||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: appstudio.redhat.com/v1alpha1 | ||
kind: ReleasePlan | ||
metadata: | ||
labels: | ||
release.appstudio.openshift.io/auto-release: 'true' | ||
release.appstudio.openshift.io/standing-attribution: 'true' | ||
release.appstudio.openshift.io/releasePlanAdmission: 'rpa-name' <.> | ||
name: sre-production <.> | ||
namespace: dev-workspace <.> | ||
spec: | ||
application: <application-name> <.> | ||
data: <key> <.> | ||
pipelineRef: <pipeline-ref> <.> | ||
serviceAccont: <service-account> <.> | ||
target: managed-workspace <.> | ||
---- | ||
|
||
+ | ||
<.> The name of the release plan. | ||
<.> The development team's workspace. | ||
<.> The name of the application that you want to deploy to the managed workspace. | ||
<.> Optional: The name of the RPA to use if more than one RPA references the specified application. | ||
<.> Optional: An unstructured key used for providing data for the managed Pipeline. | ||
<.> Optional: Reference to the Pipeline to be executed by the release service. | ||
<.> Optional: The name of the service account to use in the Pipeline to gain elevated privileges. It's used only if you have defined the `pipelineRef` value. | ||
<.> The workspace to which the system deploys the application. This workspace is created by the Managed environment team (for example, your organization's SRE team) | ||
|
||
. In the development workspace, apply the `ReleasePlan.yaml` file and add the resource to your cluster by running the following command: | ||
|
||
+ | ||
[source,shell] | ||
---- | ||
$ oc apply -f ReleasePlan.yaml -n dev | ||
---- | ||
|
||
.*Verification* | ||
|
||
. In the {ProductName} UI, select the *Release services* > *Release plan* tab. | ||
. Review the Release plan object that you just added. Using the Release plan tab, you can update or delete the selected Release plan object. |
59 changes: 59 additions & 0 deletions
59
docs/modules/ROOT/pages/advanced-how-tos/releasing/create-release.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
= Creating a release | ||
|
||
A Release CR is created to submit a specific Application Snapshot to be processed according to teh referenced ReleasePlan. | ||
|
||
== Creating a `Release` object | ||
|
||
The development team creates a `Release` object in the developer workspace. The `Release` object includes a reference to the application snapshot that the development team wants to release, along with release plan that will be used to release the application. | ||
|
||
.*Prerequisites* | ||
|
||
* You have an existing Development workspace. | ||
* Ensure you have installed `oc`. | ||
* You have completed the steps listed in the xref:/getting-started/cli.adoc[Getting started in the CLI] page. | ||
* You have completed the steps for creating a ReleasePlanAdmission and a matching ReleasePlan. | ||
|
||
.*Procedures* | ||
|
||
. Create a `Release.yaml` object locally. | ||
|
||
+ | ||
*Example `Release.yaml` object* | ||
|
||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: appstudio.redhat.com/v1alpha1 | ||
kind: Release | ||
metadata: | ||
name: <name-of-this-release> <.> | ||
namespace: dev-workspace <.> | ||
spec: | ||
releasePlan: <release-plan-name> <.> | ||
snapshot: <application-snapshot-name> <.> | ||
data: <key> <.> | ||
---- | ||
|
||
|
||
+ | ||
<.> The name of the release. | ||
<.> The development team's workspace. | ||
<.> The name of the release plan specifying the pipeline to run. | ||
<.> The name of the application snapshot that you want to release. | ||
<.> Optional: An unstructured key used for providing data for the managed Pipeline. | ||
|
||
. In the development workspace, apply the `Release.yaml` file and add the resource to your cluster by running the following command: | ||
|
||
+ | ||
[source,shell] | ||
---- | ||
$ oc apply -f Release.yaml -n dev | ||
---- | ||
|
||
.*Verification* | ||
|
||
. In the {ProductName} UI, select the *Applications* tab | ||
. Click on the application that is being released | ||
. Click on the *Releases* tab | ||
. See the recent releases that have been created for the application. | ||
. You can find a link to the release pipeline run by clicking on the name of the release that you created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters