Skip to content

Commit 5e44137

Browse files
authored
Merge pull request #106656 from sakthi-vetrivel/aro-4.3
Adding docs for ARO 4.3 preview
2 parents 201fc1d + 42869d4 commit 5e44137

File tree

3 files changed

+257
-0
lines changed

3 files changed

+257
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: Azure Monitor integration for Azure Red Hat OpenShift 4.3
3+
description: Learn how to enable Azure Monitor on your Microsoft Azure Red Hat OpenShift cluster.
4+
author: sakthi-vetrivel
5+
ms.author: suvetriv
6+
ms.service: container-service
7+
ms.topic: conceptual
8+
ms.date: 03/06/2020
9+
---
10+
11+
# Azure Monitor integration for Azure Red Hat OpenShift 4.3
12+
13+
> [!IMPORTANT]
14+
> Azure Red Hat OpenShift 4.3 is offered in preview. Preview features are self-service and are provided as is and as available and are excluded from the service-level agreement (SLA) and limited warranty. Therefore, the features aren't meant for production use.
15+
16+
This article describes how to enable the private preview of Azure Monitor for containers for OpenShift 4.3 clusters hosted on-prem or in any cloud environment. The same instructions also apply to enable monitoring for Azure Red Hat OpenShift (ARO) 4.3 clusters.
17+
18+
## Prerequisites
19+
20+
- [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest)
21+
- [Helm 3](https://helm.sh/docs/intro/install/)
22+
- Access to kubeconfig of the kubernetes cluster
23+
- Access to an Azure subscription
24+
- Access to the OpenShift 4.3 cluster to install the Azure Monitor for Containers Helm chart
25+
- Minimum Contributor RBAC role permission on the Azure Subscription
26+
- Monitoring Agent requires the following outbound ports - and domains to send the monitoring data to the Azure Monitor backend (If blocked by proxy/firewall):
27+
- *.ods.opinsights.azure.com 443
28+
- *.oms.opinsights.azure.com 443
29+
- *.blob.core.windows.net 443
30+
- dc.services.visualstudio.com 443
31+
32+
## Onboarding
33+
34+
> [!TIP]
35+
> The script uses bash 4 features, so make sure your bash is up to date. You can check your current version with `bash --version`.
36+
37+
### Download the onboarding script
38+
39+
```bash
40+
curl -LO https://raw.githubusercontent.com/microsoft/OMS-docker/ci_feature/docs/openshiftV4/onboarding_azuremonitor_for_containers.sh
41+
```
42+
43+
Execute the following script with azureSubscriptionId, workspace Region, clusterName, and context of the Kubernetes cluster.
44+
45+
```bash
46+
bash onboarding_azuremonitor_for_containers.sh <azureSubscriptionId> <azureRegionforLogAnalyticsWorkspace> <clusterName> <kubeconfigContextNameOftheCluster>
47+
```
48+
49+
For example:
50+
51+
```bash
52+
bash onboarding_azuremonitor_for_containers.sh 27ac26cf-a9f0-4908-b300-9a4e9a0fb205 eastus myocp42 admin
53+
```
54+
55+
## Configure agent data collection
56+
57+
By default, Monitoring Agent collects the {stdout; stderr} container logs of all the containers running in all the namespaces except kube-system. If you want to configure the container log collection specific to particular namespace or namespaces, you can refer to [Container Insights agent configuration](../azure-monitor/insights/container-insights-agent-config.md). Here, you can configure Monitoring agent with desired data collection settings using config map.
58+
59+
## Configure scraping of Prometheus metrics
60+
61+
Azure Monitor for containers scrapes the Prometheus metrics and ingest to the Azure Monitor backend. Refer to [Container Insights Prometheus configuration](../azure-monitor/insights/container-insights-prometheus-integration.md) for the instructions how to configure Prometheus scraping.
62+
63+
After successful onboarding, navigate to [Hybrid Monitoring](https://aka.ms/azmon-containers-hybrid) and select Environment as **"All"** to view your newly onboarded OpenShift v4 cluster.
64+
65+
## Disable monitoring
66+
67+
If you would like to disable monitoring, you can delete the Azure Monitor for Containers Helm chart using the following command to stop collecting and ingesting monitoring data to Azure Monitor for containers backend.
68+
69+
``` bash
70+
helm del azmon-containers-release-1
71+
```
72+
73+
## Update monitoring
74+
75+
Rerun the onboarding script as described in the [Onboarding](#onboarding) section with the same parameter to update to latest Helm chart.
76+
77+
## After successful onboarding
78+
79+
Navigate to [Hybrid Monitoring](https://aka.ms/azmon-containers-hybrid), and you can see your newly enabled OpenShift/ARO v4 cluster with health status in the **Monitored Clusters** tab. There, you can get into deeper insights such as metrics, inventory, and logs by clicking the **Cluster** column.
80+
81+
## Supported features
82+
83+
For more on the supported features and functionality, see [Container Insights overview](../azure-monitor/insights/container-insights-overview.md).
84+
85+
Contact us via [email protected] for feedback and questions.
86+
87+
## Next steps
88+
89+
To learn more about monitoring, see:
90+
- [Container Insights overview](../azure-monitor/insights/container-insights-overview.md)
91+
92+
- [Log Query overview](../azure-monitor/log-query/log-query-overview.md)
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: Create an Azure Red Hat OpenShift 4.3 Cluster | Microsoft Docs
3+
description: Create a cluster with Azure Red Hat OpenShift 3.11
4+
author: lamek
5+
ms.author: suvetriv
6+
ms.service: container-service
7+
ms.topic: conceptual
8+
ms.date: 03/06/2020
9+
keywords: aro, openshift, az aro, red hat, cli
10+
#Customer intent: As a customer, I want to create an ARO custer using the command line.
11+
---
12+
13+
# Create, access, and manage an Azure Red Hat OpenShift 4.3 Cluster
14+
15+
> [!IMPORTANT]
16+
> Azure Red Hat OpenShift (ARO) 4.3 is offered in preview. Preview features are self-service and are provided as is and as available and are excluded from the service-level agreement (SLA) and limited warranty. Therefore, the features aren't meant for production use.
17+
18+
## Prerequisites
19+
20+
You'll need the following to create an Azure Red Hat OpenShift 4.3 cluster:
21+
22+
- Azure CLI version 2.0.72 or greater
23+
24+
- The 'az aro' extension
25+
26+
- A virtual network containing two empty subnets, each with no network security group attached. Your cluster will be deployed into these subnets.
27+
28+
- A cluster AAD application (client ID and secret) and service principal, or sufficient AAD permissions for `az aro create` to create an AAD application and service principal for you automatically.
29+
30+
- The RP service principal and cluster service principal must each have the Contributor role on the cluster virtual network. If you have the "User Access Administrator" role on the virtual network, `az aro create` will set up the role assignments for you automatically.
31+
32+
### Install the 'az aro' extension
33+
The `az aro` extension allows you to create, access, and delete Azure Red Hat OpenShift clusters directly from the command line using the Azure CLI.
34+
35+
> [!Note]
36+
> The `az aro` extension is currenty in preview. It may be changed or removed in a future release.
37+
> To opt-in for the `az aro` extension preview you need to register the `Microsoft.RedHatOpenShift` resource provider.
38+
>
39+
> ```console
40+
> az provider register -n Microsoft.RedHatOpenShift --wait
41+
> ```
42+
43+
1. Log in to Azure.
44+
45+
```console
46+
az login
47+
```
48+
49+
2. Run the following command to install the `az aro` extension:
50+
51+
```console
52+
az extension add --source https://arosvc.blob.core.windows.net/az-preview/aro-0.1.0-py2.py3-none-any.whl
53+
```
54+
55+
3. Verify the ARO extension is registered.
56+
57+
```console
58+
az -v
59+
...
60+
Extensions:
61+
aro 0.1.0
62+
...
63+
```
64+
65+
### Create a virtual network containing two empty subnets
66+
67+
Follow these steps to create a virtual network containing two empty subnets.
68+
69+
1. Set the following variables.
70+
71+
```console
72+
LOCATION=eastus #the location of your cluster
73+
RESOURCEGROUP="v4-$LOCATION" #the name of the resource group where you want to create your cluster
74+
CLUSTER=cluster #the name of your cluster
75+
```
76+
77+
2. Create a resource group for your cluster.
78+
79+
```console
80+
az group create -g "$RESOURCEGROUP" -l $LOCATION
81+
```
82+
83+
3. Create the virtual network.
84+
85+
```console
86+
az network vnet create \
87+
-g "$RESOURCEGROUP" \
88+
-n vnet \
89+
--address-prefixes 10.0.0.0/9 \
90+
>/dev/null
91+
```
92+
93+
4. Add two empty subnets to your virtual network.
94+
95+
```console
96+
for subnet in "$CLUSTER-master" "$CLUSTER-worker"; do
97+
az network vnet subnet create \
98+
-g "$RESOURCEGROUP" \
99+
--vnet-name vnet \
100+
-n "$subnet" \
101+
--address-prefixes 10.$((RANDOM & 127)).$((RANDOM & 255)).0/24 \
102+
--service-endpoints Microsoft.ContainerRegistry \
103+
>/dev/null
104+
done
105+
```
106+
107+
5. Disable network policies for Private Link Service on your virtual network and subnets. This is a requirement for the ARO service to access and manage the cluster.
108+
109+
```console
110+
az network vnet subnet update \
111+
-g "$RESOURCEGROUP" \
112+
--vnet-name vnet \
113+
-n "$CLUSTER-master" \
114+
--disable-private-link-service-network-policies true \
115+
>/dev/null
116+
```
117+
118+
## Create a cluster
119+
120+
Run the following command to create a cluster.
121+
122+
```console
123+
az aro create \
124+
-g "$RESOURCEGROUP" \
125+
-n "$CLUSTER" \
126+
--vnet vnet \
127+
--master-subnet "$CLUSTER-master" \
128+
--worker-subnet "$CLUSTER-worker"
129+
```
130+
131+
>[!NOTE]
132+
> It normally takes about 35 minutes to create a cluster.
133+
134+
## Access the cluster console
135+
136+
You can find the cluster console URL (of the form `https://console-openshift-console.apps.<random>.<location>.aroapp.io/`) under the Azure Red Hat OpenShift 4.3 cluster resource. Run the following command to view the resource:
137+
138+
```console
139+
az aro list -o table
140+
```
141+
142+
You can log into the cluster using the `kubeadmin` user. Run the following command to find the password for the `kubeadmin` user:
143+
144+
```dotnetcli
145+
az aro list-credentials -g "$RESOURCEGROUP" -n "$CLUSTER"
146+
```
147+
148+
## Delete a cluster
149+
150+
Run the following command to delete a cluster.
151+
152+
```console
153+
az aro delete -g "$RESOURCEGROUP" -n "$CLUSTER"
154+
155+
# (optional)
156+
for subnet in "$CLUSTER-master" "$CLUSTER-worker"; do
157+
az network vnet subnet delete -g "$RESOURCEGROUP" --vnet-name vnet -n "$subnet"
158+
done
159+
```

articles/openshift/toc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
href: howto-create-tenant.md
3636
- name: Create an Azure AD app object and user
3737
href: howto-aad-app-configuration.md
38+
- name: Azure Red Hat OpenShift 4.3 (preview)
39+
items:
40+
- name: Create an Azure Red Hat OpenShift 4.3 cluster
41+
href: howto-using-azure-redhat-openshift.md
42+
- name: Set up Azure Monitor for Azure Red Hat OpenShift 4.3
43+
href: howto-azure-monitor-v4.md
3844
- name: Deploy a standalone prometheus in an Azure Red Hat OpenShift cluster
3945
href: howto-deploy-prometheus.md
4046
- name: Manage projects in an Azure Red Hat OpenShift cluster

0 commit comments

Comments
 (0)