Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #215 from gtrivedi88/HACDOCS-607
Browse files Browse the repository at this point in the history
Added the release an application page to the main navigation and updated it with the latest updates.
  • Loading branch information
gtrivedi88 authored Dec 7, 2023
2 parents 3d6d6d8 + 942bc80 commit da0bbe7
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 257 deletions.
5 changes: 3 additions & 2 deletions docs/modules/ROOT/nav-how-to-guides.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*** xref:how-to-guides/Secure-your-supply-chain/proc_inspect-slsa-provenance.adoc[Downloading your SLSA provenance]
*** xref:how-to-guides/Secure-your-supply-chain/proc_java_dependencies.adoc[Configuring dependencies rebuild for Java apps in the CLI]
** xref:how-to-guides/proc_managing-compliance-with-the-enterprise-contract.adoc[Managing compliance with the Enterprise Contract]
** xref:how-to-guides/con_release_application.adoc[Releasing an application]
*** xref:how-to-guides/proc_release_plan.adoc[Creating a `releasePlan` object]
** xref:how-to-guides/proc_managed_services_onboarding.adoc[Managed services team onboarding]
** xref:how-to-guides/proc_delete_application.adoc[Deleting an application]
Expand All @@ -35,6 +38,4 @@ Commenting these out per HACDOCS-425 and -414

////
Commenting out this xref for now because Burr said this page is currently unsupported. --Christian ([email protected]), 2/16/2023
** xref:cli/proc_release_application.adoc[Releasing an application]
** xref:how-to-guides/proc_managed_services_onboarding.adoc[CLI: Managed services team onboarding]
////
23 changes: 23 additions & 0 deletions docs/modules/ROOT/pages/how-to-guides/con_release_application.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
= Releasing an application
:icons: font
:numbered:
:source-highlighter: highlightjs

Two teams work together to release an application:

* *Development team* - The team that develops and supports the application in a pre-production environment.
* *Managed environment team* - The team that supports the production instance of that application.
image::managed_environment.png[alt=Managed Environment]

[1] When an application is ready for release, the Development team contacts the Managed Environment team; for example, their organization's SRE team, requesting access to the Managed environment for the first production release.

[2] The Managed environment team creates the managed environment and responds to the development team with the managed environment's configuration details. The Managed environment inherits some details of the development team’s workspace. However, the development team has limited access to the production environment, which is a part of the managed environment.

[3] The development team creates a matching configuration in their environment that is same as that of the Managed environment and attempts to release the application to production.

[4] The Managed environment team validates the initial release and configures a traffic gateway, which allows external traffic to the application.

.Next steps
link:https://redhat-appstudio.github.io/docs.appstudio.io/Documentation/main/how-to-guides/proc_release_plan/[Creating a `releasePlan` object]
Original file line number Diff line number Diff line change
Expand Up @@ -3,101 +3,72 @@ When an application is ready for release, the Development team contacts the Mana

The Managed Environment team creates the following objects on the Managed workspace:

* *ReleaseStrategy* - The `ReleaseStrategy` object, created by the Managed Environment team, specifies the release pipeline that the system uses to release an application in their environment, as well as which enterprise contract the system must first validate.
* *ReleasePlanAdmission* - The Managed Environment team creates the ReleasePlanAdmission object in response to the `ReleasePlan` object created by the development team. It indicates that the Managed Environment team has approved the xref:how-to-guides/proc_release_application.adoc#_creating_a_releaseplan_object[`ReleasePlan`] object for an application. It also specifies a `ReleaseStrategy` to be used for that particular Application and, optionally, an Environment to which the application will be deployed.
* *ReleasePlanAdmission* - The Managed Environment team creates or updates the `ReleasePlanAdmission` object in response to the `ReleasePlan` object created by the development team. It indicates that the Managed Environment team has approved the application specified in the link:https://redhat-appstudio.github.io/docs.appstudio.io/Documentation/main/how-to-guides/proc_release_plan/[ReleasePlan] object.
* *`copy-application.sh`* - The Managed Environment team runs the `copy-application.sh` script by defining the application name before releasing an application to production. The script copies the application and all of its components from the Development to the Managed workspace. As a result, when releasing an application to production, the Managed Environment team uses the application on its workspace rather than the one on the Developer workspace.
Additionally, if the Development team adds a new component to the application on their workspace, they must notify the Managed Environment team. So they can run the `copy-application.sh` script again to ensure that the managed workspace has the most recent version of the application.
== The `ReleaseStrategy` object
== Creating a `ReleasePlanAdmission` object

.*Prerequisites*

* An existing Development and Managed workspace.

* An existing `ReleasePlan` object.
* An existing `ReleasePlan` object in the Development workspace.

.*Procedures*

* Create a release_strategy.yaml object by running:
. Create a `ReleasePlanAdmission.yaml` object locally.

+
[source,]
----
oc apply -f releasestrategy.yaml -n managed
----

+
*Example release_strategy.yaml object*
*Example `ReleasePlanAdmission.yaml` object*

+
[source,yaml]
----
apiVersion: appstudio.redhat.com/v1alpha1
kind: ReleaseStrategy <.>
kind: ReleasePlanAdmission
metadata:
name: strategy <.>
namespace: managed-environment <.>
name: sre-production <.>
namespace: managed-workspace <.>
spec:
pipeline: release <.>
bundle: quay.io/{ProductName}-release/release-pipeline:main <.>
policy: policy <.>
----
<.> The name of the resource that the Managed Environment team creates.
<.> The name of the release strategy.
<.> The name of the managed environment to which the system deploys an application.
<.> The name of the pipeline that the system uses when releasing an application to a managed environment.
<.> The URL to the release pipeline bundle.
<.> The URL to the enterprise contract policy config file which stores the policies and collections. The system validates the enterprise contract policies before releasing an application to production.

== The ReleasePlanAdmission object

.*Prerequisites*
* An existing Development and Managed workspace.

* An existing `ReleasePlan` object in the Development workspace.

* An existing `ReleaseStrategy` object.

.*Procedures*


* Create a `release_plan_admission.yaml` object by running:
applications:
- demo-app <.>
data: <key> <.>
environment: <sre-production> <.>
origin: <dev-workspace> <.>
pipelineRef: <pipeline_ref> <.>
policy: <policy> <.>
serviceAccount: <service-account> <.>
+
[source,]
----
oc apply -f releaseplanadmission.yaml -n managed
----

+
NOTE: The `release_plan_admission.yaml` represents the reciprocal link to the release_plan.yaml objects created by the development team.
<.> 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.

+
*Example `release_plan_admission.yaml` object*
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,yaml]
[source,shell]
----
apiVersion: appstudio.redhat.com/v1alpha1
kind: ReleasePlanAdmission <.>
metadata:
name: sre-production <.>
namespace: managed <.>
spec:
application: demo-app <.>
environment: sre-production <.>
origin: <dev-workspace> <.>
releaseStrategy: <release-strategy> <.>
oc apply -f ReleasePlanAdmission.yaml -n managed
----
<.> The name of the resource that the Managed Environment team creates.
<.> The name of the release plan.
<.> The Managed Environment team’s workspace.
<.> The name of the application that you want to deploy to the managed workspace.
<.> The workspace from which the application updates are allowed to be received in the Managed workspace.
<.> The workspace on which the application updates are received. This workspace is created by the Development team.
<.> The release strategy that you defined in the `ReleaseStrategy` object.

.*Verification*

. On the Trusted Application Pipeline console, select the *Release services* > *Release plan admission* tab.
. Review the Release plan admission object that you just added. Using the Release plan admission tab, you can update or delete the selected Release plan object.


== The `copy-application.sh` script
Expand All @@ -106,18 +77,17 @@ releaseStrategy: <release-strategy> <.>

* An existing Development and Managed workspace.

* Download link:https://github.com/redhat-appstudio/release-service-utils/blob/main/copy-application.sh[./copy-application.sh] script.

.*Procedures*

* Run the following command to copy the application from the development workspace to the managed workspace:

+
[source,]
[source,shell]
----
./copy-application.sh <managed workspace name> -a <development workspace name>/<application name>
----

+
=======
NOTE: Run `./{ProductName}copy.sh --help` to review all the help options of the script.
=======

To show the command usage information, run the `./copy-application.sh --help` command.
186 changes: 0 additions & 186 deletions docs/modules/ROOT/pages/how-to-guides/proc_release_application.adoc

This file was deleted.

Loading

0 comments on commit da0bbe7

Please sign in to comment.