|
1 |
| -= Creating a release plan admission |
| 1 | += Creating a release plan admission |
| 2 | + |
| 3 | +.*Prerequisites* |
| 4 | + |
| 5 | +* An existing Development and Managed workspace. |
| 6 | +
|
| 7 | +* An existing `ReleasePlan` object in the Development workspace. |
| 8 | +
|
| 9 | +.*Procedures* |
| 10 | + |
| 11 | +. Create a `ReleasePlanAdmission.yaml` object locally. |
| 12 | + |
| 13 | ++ |
| 14 | +*Example `ReleasePlanAdmission.yaml` object* |
| 15 | + |
| 16 | ++ |
| 17 | +[source,yaml] |
| 18 | +---- |
| 19 | +apiVersion: appstudio.redhat.com/v1alpha1 |
| 20 | +kind: ReleasePlanAdmission |
| 21 | +metadata: |
| 22 | + name: sre-production <.> |
| 23 | + namespace: managed-workspace <.> |
| 24 | +spec: |
| 25 | + applications: |
| 26 | + - demo-app <.> |
| 27 | + data: <key> <.> |
| 28 | + environment: <sre-production> <.> |
| 29 | + origin: <dev-workspace> <.> |
| 30 | + pipelineRef: <pipeline_ref> <.> |
| 31 | + policy: <policy> <.> |
| 32 | + serviceAccount: <service-account> <.> |
| 33 | +
|
| 34 | +---- |
| 35 | + |
| 36 | ++ |
| 37 | +<.> The name of the release plan admission. |
| 38 | +<.> The Managed environment team's workspace. |
| 39 | +<.> A list of applications that you want to enable to be deployed in the managed workspace. |
| 40 | +<.> Optional: An unstructured key used for providing data for the managed Pipeline. |
| 41 | +<.> 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. |
| 42 | +<.> The development team workspace where the application is defined. |
| 43 | +<.> Reference to the Pipeline to be executed by the release service. |
| 44 | +<.> The enterprise contract policy against which the system validates an application before releasing it to production. |
| 45 | +<.> 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. |
| 46 | + |
| 47 | ++ |
| 48 | +NOTE: The ReleasePlanAdmission.yaml represents the reciprocal link to the ReleasePlan.yaml objects created by the development team. |
| 49 | + |
| 50 | +. In the Managed workspace, apply the `ReleasePlanAdmission.yaml` file and add the resource to your cluster by running the following command: |
| 51 | + |
| 52 | ++ |
| 53 | +[source,shell] |
| 54 | +---- |
| 55 | +oc apply -f ReleasePlanAdmission.yaml -n managed |
| 56 | +---- |
| 57 | + |
| 58 | +.*Verification* |
| 59 | + |
| 60 | +. On the Trusted Application Pipeline console, select the *Release services* > *Release plan admission* tab. |
| 61 | +. 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. |
| 62 | + |
| 63 | + |
| 64 | +== The `copy-application.sh` script |
| 65 | + |
| 66 | +.*Prerequisites* |
| 67 | + |
| 68 | +* An existing Development and Managed workspace. |
| 69 | + |
| 70 | +* Download link:https://github.com/redhat-appstudio/release-service-utils/blob/main/copy-application.sh[./copy-application.sh] script. |
| 71 | + |
| 72 | +.*Procedures* |
| 73 | + |
| 74 | +* Run the following command to copy the application from the development workspace to the managed workspace: |
| 75 | + |
| 76 | ++ |
| 77 | +[source,shell] |
| 78 | +---- |
| 79 | +./copy-application.sh <managed workspace name> -a <development workspace name>/<application name> |
| 80 | +---- |
| 81 | + |
| 82 | ++ |
| 83 | +To show the command usage information, run the `./copy-application.sh --help` command. |
0 commit comments