Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. Using Argo Rollouts for progressive deployment delivery
			To use Argo Rollouts and manage progressive delivery, after you install the Red Hat OpenShift GitOps Operator on the cluster, you can create and configure a RolloutManager custom resource (CR) instance in the namespace of your choice. You can scope the RolloutManager CR for single or multiple namespaces.
		
2.1. Prerequisites Copia collegamentoCollegamento copiato negli appunti!
- 
						You have access to the cluster with 
cluster-adminprivileges. - You have access to the OpenShift Container Platform web console.
 - Red Hat OpenShift GitOps 1.9.0 or a newer version is installed on your cluster.
 
2.2. Creating a RolloutManager custom resource Copia collegamentoCollegamento copiato negli appunti!
				To manage progressive delivery of deployments by using Argo Rollouts in Red Hat OpenShift GitOps, you must create and configure a RolloutManager custom resource (CR) in the namespace of your choice. By default, any new argo-rollouts instance has permission to manage resources only in the namespace where it is deployed, but you can use Argo Rollouts in multiple namespaces as required.
			
Prerequisites
- Red Hat OpenShift GitOps 1.9.0 or a newer version is installed on your cluster.
 
Procedure
- Log in to the OpenShift Container Platform web console as a cluster administrator.
 - 
						In the Administrator perspective, click Operators 
Installed Operators.  - 
						Create or select the project where you want to create and configure a 
RolloutManagercustom resource (CR) from the Project drop-down menu. - Select Red Hat OpenShift GitOps from the installed operators.
 - In the Details tab, under the Provided APIs section, click Create instance in the RolloutManager pane.
 On the Create RolloutManager page, select the YAML view and use the default YAML or edit it according to your requirements:
Example:
RolloutManagerCRCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Click Create.
 - In the RolloutManager tab, under the RolloutManagers section, verify that the Status field of the RolloutManager instance shows as Phase: Available.
 In the left navigation pane, verify the creation of the namespace-scoped supporting resources:
- 
								Click Workloads 
Deployments to verify that the argo-rolloutsdeployment is available with the Status showing as1 of 1 podsrunning. - 
								Click Workloads 
Secrets to verify that the argo-rollouts-notification-secretsecret is available. - 
								Click Networking 
Services to verify that the argo-rollouts-metricsservice is available. - 
								Click User Management 
Roles to verify that the argo-rolloutsrole andargo-rollouts-aggregate-to-admin,argo-rollouts-aggregate-to-edit, andargo-rollouts-aggregate-to-viewcluster roles are available. - 
								Click User Management 
RoleBindings to verify that the argo-rolloutsrole binding is available. 
- 
								Click Workloads 
 
2.3. Deleting a RolloutManager custom resource Copia collegamentoCollegamento copiato negli appunti!
				Uninstalling the Red Hat OpenShift GitOps Operator does not remove the resources that were created during installation. You must manually delete the RolloutManager custom resource (CR) before you uninstall the Red Hat OpenShift GitOps Operator.
			
Prerequisites
- Red Hat OpenShift GitOps 1.9.0 or a newer version is installed on your cluster.
 - 
						A 
RolloutManagerCR exists in your namespace. 
Procedure
- Log in to the OpenShift Container Platform web console as a cluster administrator.
 - 
						In the Administrator perspective, click Operators 
Installed Operators.  - 
						Click the Project drop-down menu and select the project that contains the 
RolloutManagerCR. - Select Red Hat OpenShift GitOps from the installed operators.
 - Click the RolloutManager tab to find RolloutManager instances under the RolloutManagers section.
 - Click the instance.
 - 
						Click Actions 
Delete RolloutManager from the drop-down menu, and click Delete to confirm in the dialog box.  - In the RolloutManager tab, under the RolloutManagers section, verify that the RolloutManager instance is not available anymore.
 In the left navigation pane, verify the deletion of the namespace-scoped supporting resources:
- 
								Click Workloads 
Deployments to verify that the argo-rolloutsdeployment is deleted. - 
								Click Workloads 
Secrets to verify that the argo-rollouts-notification-secretsecret is deleted. - 
								Click Networking 
Services to verify that the argo-rollouts-metricsservice is deleted. - 
								Click User Management 
Roles to verify that the argo-rolloutsrole andargo-rollouts-aggregate-to-admin,argo-rollouts-aggregate-to-edit, andargo-rollouts-aggregate-to-viewcluster roles are deleted. - 
								Click User Management 
RoleBindings to verify that the argo-rolloutsrole binding is deleted. 
- 
								Click Workloads 
 
2.4. Installing Argo Rollouts CLI on Linux Copia collegamentoCollegamento copiato negli appunti!
You can install the Argo Rollouts CLI on Linux.
Prerequisites
- 
						You have installed the OpenShift Container Platform CLI (
oc). 
Procedure
Download the latest version of the Argo Rollouts CLI binary,
kubectl-argo-rollouts, by running the following command:curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64
$ curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the
kubectl-argo-rolloutsbinary is executable by running the following command:chmod +x ./kubectl-argo-rollouts-linux-amd64
$ chmod +x ./kubectl-argo-rollouts-linux-amd64Copy to Clipboard Copied! Toggle word wrap Toggle overflow Move the
kubectl-argo-rolloutsbinary to the system path by running the following command:mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts
# mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rolloutsCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantEnsure that you have superuser privileges to run this command.
Verify that the plugin is installed correctly by running the following command and receiving the similar output:
oc argo rollouts version
$ oc argo rollouts versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
2.5. Installing Argo Rollouts CLI on Mac OS Copia collegamentoCollegamento copiato negli appunti!
If you are a macOS user, you can install the Argo Rollouts CLI by using the Homebrew package manager.
Prerequisites
- 
						You have installed the Homebrew (
brew) package manager. 
Procedure
Run the following command to install the Argo Rollouts CLI:
brew install argoproj/tap/kubectl-argo-rollouts
$ brew install argoproj/tap/kubectl-argo-rolloutsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 
2.6. Enabling Argo Rollouts UI on an Argo CD instance Copia collegamentoCollegamento copiato negli appunti!
To enable Argo Rollouts UI on an Argo CD instance, complete the following steps.
Prerequisites
- 
						You have access to the cluster with 
cluster-adminprivileges. - You have installed the Red Hat OpenShift GitOps Operator on your OpenShift Container Platform cluster.
 - You have configured the RolloutManager custom resource (CR).
 
Procedure
- Log in to the OpenShift Container Platform web console.
 - 
						In the Administrator perspective of the web console, click Operators 
Installed Operators.  - Select Red Hat OpenShift GitOps from the installed Operators list and click the Argo CD tab.
 - 
						Select the Argo CD instance in the Argo CD tab under the 
openshift-gitopsnamespace. Click YAML and add the following configuration to configure the Argo Rollouts UI:
Example enabling Argo Rollouts UI in the Argo CD CR
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
 - Set this value to
trueto configure theenableRolloutsUIfield. 
- Click Save.
 - 
						In the Administrator perspective of the web console, navigate to the 
						
						 menu OpenShift GitOps Cluster Argo CD. The login page of the Argo CD Web UI is displayed in a new window.  To access the Argo Rollouts UI in the Argo CD Web UI, configure a sample application that includes the Argo Rollouts resources.
NoteThe
enableRolloutsUIfield restarts the Argo CD server deployment pod, so it takes a few seconds for the Argo Rollouts extension to enable in the Argo CD Web UI.