Move files to 2.7 docs

This commit is contained in:
LucasSaintarbor
2024-01-05 10:13:11 -08:00
parent f03ac43b69
commit df5ca0229a
14 changed files with 32 additions and 32 deletions
@@ -0,0 +1,11 @@
---
title: AWS Marketplace Common Issues
---
1. Uninstalling Rancher Prime may not cleanly remove all the resources that Rancher created. You are encouraged to use the [Rancher resource cleanup script](https://github.com/rancher/rancher-cleanup) to perform a more comprehensive cleanup if necessary. However, we recommend first preparing and migrating any other workloads off the cluster to destroy the cluster to complete the uninstallation since cleanup is not recoverable.
```shell
helm uninstall -n cattle-rancher-csp-deployer-system rancher-cloud
```
1. When migrating Rancher to a different EKS by following the steps specified in [Rancher Backups and Disaster Recovery](../../../pages-for-subheaders/backup-restore-and-disaster-recovery.md), you must reinstall Rancher Prime on the target EKS cluster after restoring from the backup. Furthermore, the restored Rancher version must not be newer than the version available in the AWS marketplace.
@@ -0,0 +1,146 @@
---
title: Installing Rancher Prime PAYG on AWS
---
This page covers installing the Rancher Prime PAYG offering on Amazon's AWS Marketplace.
## Preparing your cluster
### OIDC provider
Your EKS cluster requires an OIDC provider to be installed. To check for an OIDC provider, find the OIDC issuer with the following command. Substitute `$CLUSTER_NAME` with the name of your EKS cluster and `$REGION` with the region where it is running:
```shell
aws eks describe-cluster --name $CLUSTER_NAME --region $REGION --query cluster.identity.oidc.issuer --output text
```
A URL is returned, like `https://oidc.eks.region.amazonaws.com/id/1234567890ABCDEF`. The part after `https://` will be referred to in later instructions as the OIDC Provider Identity (e.g. `oidc.eks.region.amazonaws.com/id/1234567890ABCDEF`). The final section of the URL, `1234567890ABCDEF`, is the `$OIDC_ID`.
Using the `$OIDC_ID` of the issuer found above, you can check if a provider is installed with the following command:
```shell
aws iam list-open-id-connect-providers | grep $OIDC_ID
```
If there is no output, you will need to create an OIDC provider:
```shell
eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --region $REGION --approve
```
### IAM Role
An IAM role and an attached policy are required to provide the necessary permissions. The role name is passed as an argument during the Helm deployment.
Create the role with a `$ROLE_NAME` of your choosing (for example, `rancher-csp-iam-role`) and the required policy attached to it:
```shell
eksctl create iamserviceaccount \
--name rancher-csp-billing-adapter \
--namespace cattle-csp-billing-adapter-system \
--cluster $CLUSTER_NAME \
--region $REGION \
--role-name $ROLE_NAME --role-only \
--attach-policy-arn 'arn:aws:iam::aws:policy/AWSMarketplaceMeteringFullAccess' \
--approve
```
## Installing Rancher
1. Log Helm into the AWS Marketplace Elastic Container Registry (ECR) to fetch the application. The AWS Marketplace ECR is always in the `us-east-1` region:
```shell
export HELM_EXPERIMENTAL_OCI=1
aws --region us-east-1 ecr get-login-password \
| helm registry login --username AWS \
--password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
```
1. Install Rancher into your cluster using Helm. Customize your Helm installation values if needed:
:::note
Rancher Prime utilizes cert-manager to issue and maintain its certificates. Rancher will generate a CA certificate of its own and sign a certificate using that CA.
:::
The Rancher hostname must be resolvable by a public DNS. For more details, please refer to the [Prerequisites](prerequisites.md) section. For example, if the DNS name is rancher.my.org, `$HOST_NAME`=`rancher.my.org`.
```shell
helm install -n cattle-rancher-csp-deployer-system rancher-cloud --create-namespace \
oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/suse/$REPOSITORY/rancher-cloud-helm/rancher-cloud \
--version $CHART_VERSION \
--set rancherHostname=$HOST_NAME \
--set rancherServerURL=https://$HOST_NAME \
--set rancherReplicas=$REPLICAS \
--set rancherBootstrapPassword=$BOOTSTRAP_PASSWORD \
--set rancherIngressClassName=nginx \
--set global.aws.accountNumber=$AWS_ACCOUNT_ID \
--set global.aws.roleName=$ROLE_NAME
```
:::note
Monitor the logs for the `rancher-cloud` pod since it is deleted 1 minute after a successful or failed installation.
```shell
kubectl logs -f rancher-cloud -n cattle-rancher-csp-deployer-system
```
:::
1. After a successful deployment, running the following command should produce a similar output:
```shell
kubectl get deployments --all-namespaces
```
```shell
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
cattle-csp-billing-adapter-system csp-rancher-usage-operator 1/1 1 1 30m
cattle-csp-billing-adapter-system rancher-csp-billing-adapter 1/1 1 1 30m
cattle-fleet-local-system fleet-agent 1/1 1 1 29m
cattle-fleet-system fleet-controller 1/1 1 1 29m
cattle-fleet-system gitjob 1/1 1 1 29m
cattle-provisioning-capi-system capi-controller-manager 1/1 1 1 28m
cattle-system rancher 1/1 1 1 32m
cattle-system rancher-webhook 1/1 1 1 29m
cert-manager cert-manager 1/1 1 1 32m
cert-manager cert-manager-cainjector 1/1 1 1 32m
cert-manager cert-manager-webhook 1/1 1 1 32m
ingress-nginx ingress-nginx-controller 1/1 1 1 33m
kube-system coredns 2/2 2 2 38m
```
### Check Helm Chart Installation
Check that the Helm chart installation is complete:
```shell
helm ls -n cattle-rancher-csp-deployer-system
```
After completing the Helm chart installation, you can verify the installation was successful:
```shell
helm status rancher-cloud -n cattle-rancher-csp-deployer-system
```
Refer to the [Troubleshooting](troubleshooting.md) section for a failed installation.
After the Helm chart installation is complete, Rancher Prime is successfully installed.
## Log into the Rancher Dashboard
You may now log in to the Rancher dashboard by pointing your browser to the Rancher server URL `https://$RANCHER_HOSTNAME`, where the Rancher hostname is the [hostname](#installing-rancher) is your chosen hostname when installing Rancher.
:::note
The Rancher hostname must be resolvable by public DNS. For more details, please refer to the [Prerequisites](prerequisites.md) section.
:::
## Uninstalling Rancher Prime PAYG Offering
To uninstall the Rancher Prime PAYG offering, migrate any non-Rancher workloads to a different cluster and destroy the Rancher cluster.
@@ -0,0 +1,15 @@
---
title: Prerequisites
---
Before using Rancher Prime on AWS as a pay-as-you-go (PAYG) offering, you need the following resources, information, and tools:
- A Rancher-compatible EKS cluster. For more details, please see the [Rancher support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/). Please refer to [Creating an EKS cluster](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-amazon-eks.md) for bringing up an EKS cluster to [install Rancher Prime PAYG](installing-rancher-prime.md).
- An ingress is installed on the EKS cluster so that Rancher is accessible outside the cluster. Please refer to [Rancher documentation](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-amazon-eks.md#5-install-an-ingress) for instructions on deploying Ingress-NGINX on an EKS cluster.
- Get the Load Balancer IP. Please refer to [Rancher documentation](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-amazon-eks.md#6-get-load-balancer-ip) and save the EXTERNAL-IP.
- The Rancher hostname must be a fully qualified domain name (FQDN), and its corresponding IP address must be resolvable from a public DNS. Please refer to [Rancher documentation](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-amazon-eks.md#7-set-up-dns) for instructions on how to set up DNS. This DNS is set up to point to the EXTERNAL-IP saved.
- Installation requires you to have the following tools available and properly configured to access your AWS account and your EKS cluster:
- `aws`
- `curl`
- `eksctl`
- `helm` (v3 or greater)
@@ -0,0 +1,59 @@
---
title: Troubleshooting Rancher Prime PAYG Cluster in AWS
---
This section contains information to help troubleshoot issues when installing the Rancher Prime PAYG offering.
## Jobs and Pods
Check the status of pods or jobs:
```shell
kubectl get pods --all-namespaces
```
If a pod is not in a `Running` state, you can attempt to find the root cause with the following commands:
- Describe pod: `kubectl describe pod <pod name> -n <namespaces>`
- Pod container logs: `kubectl logs <pod name> -n <namespaces>`
- Describe job: `kubectl describe job <job name> -n <namespaces>`
- Logs from the containers of pods of the job: `kubectl logs -l job-name=<job name> -n <namespaces>`
## Recovering from Failed Pods
If any of the pods aren't running, check the `rancher-cloud` pod:
```shell
kubectl get pods --all-namespaces | grep rancher-cloud
```
If the `rancher-cloud` pod is in an `Error` state, wait for the pod to be deleted. This should take about one minute.
Fix the problem and run:
```shell
helm upgrade -n cattle-rancher-csp-deployer-system rancher-cloud --create-namespace \
oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/suse/$REPOSITORY/rancher-cloud-helm/rancher-cloud --install \
--version $CHART_VERSION \
--set rancherHostname=$HOST_NAME \
--set rancherServerURL=https://$HOST_NAME \
--set rancherReplicas=$REPLICAS \
--set global.aws.accountNumber=$AWS_ACCOUNT_ID \
--set global.aws.roleName=$ROLE_NAME
```
## Rancher Usage Record Not found
When you attempt to retrieve a usage record, you might see the following message:
```shell
Error from server (NotFound): cspadapterusagerecords.susecloud.net "rancher-usage-record" not found" Check Configuration, Retrieve generated configuration csp-config
```
To resolve the error, run:
```shell
kubectl get configmap -n cattle-csp-billing-adapter-system csp-config -o yaml
```
If a configuration is not listed, you can attempt to find the root cause by checking the pod status and log. See [Jobs and Pods](#jobs-and-pods) for more details.
@@ -0,0 +1,31 @@
---
title: Upgrading Rancher Prime PAYG Cluster in AWS
---
The AWS Marketplace PAYG offering is tied to a billing adapter and the Rancher Prime version. These are periodically updated as new versions of the billing adapter or Rancher Prime are released. In this situation, the Helm chart will be updated with new tags and digests, and a new version of the Helm chart will be uploaded.
To upgrade the deployed Helm chart with the latest version, run the following Helm command:
```shell
helm upgrade -n cattle-rancher-csp-deployer-system rancher-cloud --create-namespace \
oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/suse/$REPOSITORY/rancher-cloud-helm/rancher-cloud \
--version $UPGRADED_CHART_VERSION \
--set rancherHostname=$HOST_NAME \
--set rancherServerURL=https://$HOST_NAME \
--set rancherReplicas=$REPLICAS \
--set rancherIngressClassName=nginx \
--set global.aws.accountNumber=$AWS_ACCOUNT_ID \
--set global.aws.roleName=$ROLE_NAME
```
To check if the upgraded Helm chart deployed successfully, run the following Helm command:
```shell
helm ls -n cattle-rancher-csp-deployer-system
```
:::warning
Rancher Prime PAYG customers will have constraints on getting updates to the offering based on the latest version SUSE has published to AWS, which may trail slightly behind the latest Rancher release.
:::
@@ -0,0 +1,7 @@
---
title: Azure Marketplace Common Issues
---
1. Uninstalling Rancher Prime may not cleanly remove all the resources that Rancher created. Users are encouraged to use the [Rancher resource cleanup script](https://github.com/rancher/rancher-cleanup) to perform a more comprehensive cleanup if necessary. However, it is recommended to migrate any other workloads off the cluster and prepare to destroy the cluster to complete the uninstallation since cleanup is not recoverable.
1. When migrating Rancher to a different AKS cluster by following the steps specified in [Rancher Backups and Disaster Recovery](../../../pages-for-subheaders/backup-restore-and-disaster-recovery.md), Rancher Prime must be reinstalled via the Azure Marketplace on the target AKS cluster after restoring from the backup. Furthermore, the restored Rancher version must not be newer than the version available in the Azure Marketplace.
@@ -0,0 +1,95 @@
---
title: Installing Rancher Prime PAYG on Azure
---
This page covers installing the Rancher Prime PAYG offering on Microsoft's Azure Marketplace.
## How to Install Rancher Prime PAYG
Refer to the following steps for creating a new deployment of Rancher Prime from the Azure Marketplace page.
1. Select the **Rancher Prime with 24x7 Support** offer (either **EU and UK only** or **non-EU and non-UK only**) that corresponds to the location where your account is registered.
1. Choose the plan from the dropdown list. View the **Plans + Pricing** tab for more details about the plan.
1. Select **Create**.
### Basics
On the **Basics** tab, specify the **Project details** and **Instance details**:
1. Select an existing **Subscription** from the dropdown list.
1. Select an existing **Resource group** from the dropdown list.
:::note
The **Create new** resource group feature is not supported.
:::
![Create new resource group not supported](/img/install-rancher-prime-basics-create-new.png)
1. Select an existing **AKS Cluster Name** from the dropdown list.
1. Choose an **Extension Resource name**. It can consist of alphanumeric characters and dots; the length must be between 2 and 253 characters.
![Basics tab](/img/install-rancher-prime-basics.png)
1. Select **Next**.
### Rancher Configuration
On the **Rancher Configuraion** tab, specify the following information:
1. Enter the **Hostname** for Rancher. The Rancher hostname must be a fully qualified domain name (FQDN) and the Rancher server URL will be created using this hostname.
:::note
The IP address of the Rancher hostname must be resolvable by a public DNS.
:::
1. Using the slider, select the number of **Replicas**.
1. Choose and confirm a **Bootstrap Password**. During the first login, you will use the bootstrap password to authenticate to the Rancher dashboard.
:::note
The current Rancher deployment exposes the bootstrap password in the Cluster configuration settings in Azure Portal. Until this is resolved, we suggest changing the Admin password after initial login by editing your profile in the Rancher dashboard.
:::
![Rancher Configuration](/img/install-rancher-prime-bootstrap-password.png)
1. Select **Next**.
### Review + create
1. On the **Review + create** tab, review the summary of the offer (Price, Basics, Rancher Configuration) and the link to **view automation template** (Azure Resource Manager Template).
1. Select **Create** to start the deployment.
### Deployment Complete
After the deployment is completed, the Rancher Prime Kubernetes service extension is successfully installed.
:::note
On the **Extensions + applications** page, the **Provisioning State** may show **Succeeded** even though the deployment may still be in progress. You can monitor the deployment progress by logging into the AKS cluster and looking at the **rancher-cloud** deployment.
:::
## Log into the Rancher Dashboard
You may now login to Rancher dashboard by pointing your browser to the Rancher server URL *https://$RANCHER_HOSTNAME*, where *Rancher hostname* is the [hostname](#rancher-configuration) you have chosen when configuring Rancher.
:::note
The Rancher hostname must be resolvable by public DNS. Please refer to the [Prerequisites](prerequisites.md) section for more details.
:::
## How to Use Rancher
After logging into Rancher Prime, you should notice the Welcome to Rancher Prime message at the top of the screen.
![Rancher Prime Home](/img/install-rancher-prime-home.png)
If your Rancher Prime PAYG deployment only has **Welcome to Rancher** at the top of the screen, please ensure you've updated to the latest version, and reset the branding to default (i.e., "suse") from **Global Settings**.
![Global Settings](/img/install-rancher-prime-global-settings.png)
## Rancher Prime PAYG Billing
View billing information in the Azure Portal by going to **Home** > **Cost Management (subscription) | Cost analysis**.
## Uninstalling Rancher Prime PAYG Offering
To uninstall the Rancher Prime PAYG offering, migrate any non-Rancher workloads to a different cluster and destroy the Rancher cluster.
@@ -0,0 +1,9 @@
---
title: Prerequisites
---
Before using Rancher Prime on Azure as a pay-as-you-go (PAYG) offering, you need the following resources, information, and tools:
- A Rancher-compatible AKS cluster. For more details, please see the [Rancher support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/). You can only install the Rancher Prime PAYG offering onto clusters in regions where AKS and Azure Container Apps are available. See the [Azure documentation](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=container-apps,kubernetes-service&regions=all) for details. Please see [Creating an AKS cluster](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks.md#3-create-the-aks-cluster) for bringing up an AKS cluster to [install Rancher Prime PAYG](installing-rancher-prime.md).
- An ingress installed on the AKS cluster so that Rancher is accessible outside the cluster. Please refer to [Rancher documentation](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks.md#5-install-an-ingress) for instructions on how to deploy Ingress-NGINX on an AKS cluster.
- The Rancher hostname must be a fully qualified domain name (FQDN), and its corresponding IP address must be resolvable from a public DNS. Please refer to [Rancher documentation](../../../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks.md#7-set-up-dns) for instructions on how to set up DNS.
@@ -0,0 +1,86 @@
---
title: Troubleshooting Rancher Prime PAYG Cluster in Azure
---
This section contains information to help troubleshoot issues when installing the Rancher Prime PAYG offer and configuring the billing adapter.
## Deployment
After a successful deployment, check the status of the deployment, it should list similar pod and chart output.
```shell
kubectl get deployments --all-namespaces=true
```
```shell
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
cattle-csp-billing-adapter-system csp-rancher-usage-operator 1/1 1 1 8h
cattle-csp-billing-adapter-system rancher-csp-billing-adapter 1/1 1 1 8h
cattle-fleet-local-system fleet-agent 1/1 1 1 8h
cattle-fleet-system fleet-controller 1/1 1 1 8h
cattle-fleet-system gitjob 1/1 1 1 8h
cattle-provisioning-capi-system capi-controller-manager 1/1 1 1 8h
cattle-system rancher 3/3 3 3 8h
cattle-system rancher-webhook 1/1 1 1 8h
cert-manager cert-manager 1/1 1 1 8h
cert-manager cert-manager-cainjector 1/1 1 1 8h
cert-manager cert-manager-webhook 1/1 1 1 8h
ingress-nginx ingress-nginx-controller 1/1 1 1 9h
kube-system coredns 2/2 2 2 20h
kube-system coredns-autoscaler 1/1 1 1 20h
kube-system extension-agent 1/1 1 1 8h
kube-system extension-operator 1/1 1 1 8h
kube-system konnectivity-agent 2/2 2 2 20h
kube-system metrics-server 2/2 2 2 20h
```
## Jobs and Pods
Check the status of pods or jobs:
```shell
kubectl get pods --all-namespaces
```
If a pod is not in Running state, you can attempt to find the root cause with the following commands:
- Describe pod: `kubectl describe pod <pod name> -n <namespaces>`
- Pod container logs: `kubectl logs <pod name> -n <namespaces>`
- Describe job: `kubectl describe job <job name> -n <namespaces>`
- Logs from the containers of pods of the job: `kubectl logs -l job-name=<job name> -n <namespaces>`
## Rancher Usage Record Not found
When you attempt to retrieve a usage record, you might see the following message:
```shell
Error from server (NotFound): cspadapterusagerecords.susecloud.net "rancher-usage-record" not found" Check Configuration, Retrieve generated configuration csp-config
```
To resolve the error, run:
```shell
kubectl get configmap -n cattle-csp-billing-adapter-system csp-config -o yaml
```
If a configuration is not listed, you can attempt to find the root cause by checking the pod status and log. See [Jobs and Pods](#jobs-and-pods) for more details.
## Multiple Extensions of the Same Type
When you attempt to install an extension of the same type, you will see the following message:
```shell
Multiple extensions of same type is not allowed at this scope. (Code: ValidationFailed)"
```
AKS cluster already has the extension with the same type. To resolve the error, uninstall the extension and re-deploy with the same cluster.
## Resource Already Existing in your Cluster
When you attempt to install a resource or extension that already exists, you will see the following message:
```shell
Helm installation failed : Resource already existing in your cluster : Recommendation Manually delete the resource(s) that currently exist in your cluster and try installation again. To delete these resources run the following commands: kubectl delete <resource type> -n <resource namespace> <resource name> : InnerError [rendered manifests contain a resource that already exists. Unable to continue with install: ServiceAccount "rancher" in namespace "cattle-system" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "test-nv2-reinstall": current value is "testnv2-plan"]
```
AKS cluster already has the extension installed. To resolve the error, uninstall the extension as suggested in the error message by deleting the resource via the kubectl command, or uninstall the extension in Azure Console and re-deploy with the same cluster.
@@ -0,0 +1,17 @@
---
title: Upgrading Rancher Prime PAYG Cluster in Azure
---
The Azure Marketplace PAYG offering is periodically updated as a new version of Rancher Prime is released and for optimizations in the integration with Azure.
To update to the latest version of the Rancher Prime PAYG offering supported in the marketplace listing, run the following command in the cluster Cloud Shell:
```shell
az k8s-extension update --name <cluster extension resource name> --cluster-name <cluster name> --resource-group <resource group> --cluster-type managedClusters --version <version to be upgraded>
```
:::note
PAYG customers will have constraints on getting updates to the offer based on the latest version SUSE has published to Azure, which may trail slightly behind the latest Rancher release.
:::