Skip to content

Commit b887a12

Browse files
author
Mike Ray (Microsoft)
committed
Remove commented out text
1 parent 2c92e42 commit b887a12

File tree

1 file changed

+1
-210
lines changed

1 file changed

+1
-210
lines changed

articles/azure-arc/data/create-data-controller-direct-cli.md

Lines changed: 1 addition & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@ Creating an Azure Arc data controller in direct connectivity mode involves the f
3030
1. Create a custom location.
3131
1. Create the data controller.
3232

33-
<!---
34-
You can create them individually or in a unified experience.
35-
--->
36-
37-
<!--- ## Deploy - unified experience --->
38-
39-
<!--- In the unified experience, you can ---> Create the Arc data controller extension, custom location, and Arc data controller all in one command as follows:
40-
33+
Create the Arc data controller extension, custom location, and Arc data controller all in one command as follows:
4134

4235
##### [Linux](#tab/linux)
4336

@@ -114,208 +107,6 @@ az arcdata dc create --name arc-dc1 --resource-group $ENV:resourceGroup --custom
114107

115108
---
116109

117-
<!---
118-
## Deploy - individual experience
119-
120-
### Step 1: Create an Azure Arc-enabled data services extension
121-
122-
Use the k8s-extension CLI to create a data services extension.
123-
124-
#### Set environment variables
125-
126-
Set the following environment variables, which will be then used in later steps.
127-
128-
Following are two sets of environment variables. The first set of variables identifies your Azure subscription, resource group, cluster name, location, extension, and namespace. The second defines credentials to access the metrics and logs dashboards.
129-
130-
The environment variables include passwords for log and metric services. The passwords must be at least eight characters long and contain characters from three of the following four categories: Latin uppercase letters, Latin lowercase letters, numbers, and non-alphanumeric characters.
131-
132-
133-
##### [Linux](#tab/linux)
134-
135-
```console
136-
## variables for Azure subscription, resource group, cluster name, location, extension, and namespace.
137-
export subscription=<Your subscription ID>
138-
export resourceGroup=<Your resource group>
139-
export clusterName=<name of your connected Kubernetes cluster>
140-
export location=<Azure location>
141-
export adsExtensionName="<extension name>"
142-
export namespace="<namespace>"
143-
## variables for logs and metrics dashboard credentials
144-
export AZDATA_LOGSUI_USERNAME=<username for Kibana dashboard>
145-
export AZDATA_LOGSUI_PASSWORD=<password for Kibana dashboard>
146-
export AZDATA_METRICSUI_USERNAME=<username for Grafana dashboard>
147-
export AZDATA_METRICSUI_PASSWORD=<password for Grafana dashboard>
148-
```
149-
150-
##### [Windows (PowerShell)](#tab/windows)
151-
152-
``` PowerShell
153-
## variables for Azure location, extension and namespace
154-
$ENV:subscription="<Your subscription ID>"
155-
$ENV:resourceGroup="<Your resource group>"
156-
$ENV:clusterName="<name of your connected Kubernetes cluster>"
157-
$ENV:location="<Azure location>"
158-
$ENV:adsExtensionName="<name of Data controller extension"
159-
$ENV:namespace="<namespace where you will deploy the extension and data controller>"
160-
## variables for Metrics and Monitoring dashboard credentials
161-
$ENV:AZDATA_LOGSUI_USERNAME="<username for Kibana dashboard>"
162-
$ENV:AZDATA_LOGSUI_PASSWORD="<password for Kibana dashboard>"
163-
$ENV:AZDATA_METRICSUI_USERNAME="<username for Grafana dashboard>"
164-
$ENV:AZDATA_METRICSUI_PASSWORD="<password for Grafana dashboard>"
165-
```
166-
167-
---
168-
169-
#### Create the Arc data services extension
170-
171-
The following command creates the Arc data services extension.
172-
173-
##### [Linux](#tab/linux)
174-
175-
```azurecli
176-
az k8s-extension create --cluster-name ${clusterName} --resource-group ${resourceGroup} --name ${adsExtensionName} --cluster-type connectedClusters --extension-type microsoft.arcdataservices --auto-upgrade false --auto-upgrade-minor-version false --scope cluster --release-namespace ${namespace} --config Microsoft.CustomLocation.ServiceAccount=sa-arc-bootstrapper
177-
az k8s-extension show --resource-group ${resourceGroup} --cluster-name ${resourceName} --name ${adsExtensionName} --cluster-type connectedclusters
178-
```
179-
180-
##### [Windows (PowerShell)](#tab/windows)
181-
182-
```azurecli
183-
az k8s-extension create --cluster-name $ENV:clusterName --resource-group $ENV:resourceGroup --name $ENV:adsExtensionName --cluster-type connectedClusters --extension-type microsoft.arcdataservices --auto-upgrade false --auto-upgrade-minor-version false --scope cluster --release-namespace $ENV:namespace --config Microsoft.CustomLocation.ServiceAccount=sa-arc-bootstrapper
184-
az k8s-extension show --resource-group $ENV:resourceGroup --cluster-name $ENV:clusterName --name $ENV:adsExtensionName --cluster-type connectedclusters
185-
```
186-
187-
---
188-
189-
##### Deploy Azure Arc data services extension using private container registry and credentials
190-
191-
Use the below command if you are deploying from your private repository:
192-
193-
```azurecli
194-
az k8s-extension create --cluster-name "<connected cluster name>" --resource-group "<resource group>" --name "<extension name>" --cluster-type connectedClusters -auto-upgrade false --auto-upgrade-minor-version false --extension-type microsoft.arcdataservices --scope cluster --release-namespace "<namespace>" --config Microsoft.CustomLocation.ServiceAccount=sa-arc-bootstrapper --config imageCredentials.registry=<registry info> --config imageCredentials.username=<username> --config systemDefaultValues.image=<registry/repo/arc-bootstrapper:<imagetag>> --config-protected imageCredentials.password=$ENV:DOCKER_PASSWORD --debug
195-
```
196-
197-
For example:
198-
199-
```azurecli
200-
az k8s-extension create --cluster-name "my-connected-cluster" --resource-group "my-resource-group" --name "arc-data-services" --cluster-type connectedClusters -auto-upgrade false --auto-upgrade-minor-version false --extension-type microsoft.arcdataservices --scope cluster --release-namespace "arc" --config Microsoft.CustomLocation.ServiceAccount=sa-bootstrapper --config imageCredentials.registry=mcr.microsoft.com --config imageCredentials.username=arcuser --config systemDefaultValues.image=mcr.microsoft.com/arcdata/arc-bootstrapper:latest --config-protected imageCredentials.password=$ENV:DOCKER_PASSWORD --debug
201-
```
202-
203-
204-
> [!NOTE]
205-
> The Arc data services extension install can take a few minutes to complete.
206-
207-
#### Verify the Arc data services extension is created
208-
209-
You can verify the status of the deployment of Azure Arc-enabled data services extension. Use the Azure portal or Cube
210-
211-
##### Check status from Azure portal
212-
213-
1. Log in to the Azure portal and browse to the resource group where the Kubernetes connected cluster resource is located.
214-
1. Select the Azure Arc-enabled Kubernetes cluster (Type = "Kubernetes - Azure Arc") where the extension was deployed.
215-
1. In the navigation on the left side, under **Settings**, select **Extensions**.
216-
1. The portal shows the extension that was created earlier in an installed state.
217-
218-
##### Check status using kubectl CLI
219-
220-
1. Connect to your Kubernetes cluster via a Terminal window.
221-
1. Run the below command and ensure:
222-
- The namespace mentioned above is created
223-
224-
and
225-
226-
- The `bootstrapper` pod state is **running** before proceeding to the next step.
227-
228-
``` console
229-
kubectl get pods --name <name of namespace used in the json template file above>
230-
```
231-
232-
For example, the following example gets the pods from `arc` namespace.
233-
234-
```console
235-
#Example:
236-
kubectl get pods --name arc
237-
```
238-
239-
### Retrieve the managed identity and grant roles
240-
241-
When the Arc data services extension is created, Azure creates a managed identity. You need to assign certain roles to this managed identity for usage and/or metrics to be uploaded.
242-
243-
#### Retrieve managed identity of the Arc data controller extension
244-
245-
```azurecli
246-
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group <resource group> --cluster-name <connectedclustername> --cluster-type connectedClusters --name <name of extension> | convertFrom-json).identity.principalId
247-
#Example
248-
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group myresourcegroup --cluster-name myconnectedcluster --cluster-type connectedClusters --name ads-extension | convertFrom-json).identity.principalId
249-
```
250-
251-
#### Assign role to the managed identity
252-
253-
Run the below command to assign the **Contributor** and **Monitoring Metrics Publisher** roles:
254-
255-
```azurecli
256-
az role assignment create --assignee $Env:MSI_OBJECT_ID --role "Contributor" --scope "/subscriptions/$ENV:subscription/resourceGroups/$ENV:resourceGroup"
257-
az role assignment create --assignee $Env:MSI_OBJECT_ID --role "Monitoring Metrics Publisher" --scope "/subscriptions/$ENV:subscription/resourceGroups/$ENV:resourceGroup"
258-
```
259-
260-
### Step 2: Create a custom location using `customlocation` CLI extension
261-
262-
A custom location is an Azure resource that is equivalent to a namespace in a Kubernetes cluster. Custom locations are used as a target to deploy resources to or from Azure. Learn more about custom locations in the [Custom locations on top of Azure Arc-enabled Kubernetes documentation](../kubernetes/conceptual-custom-locations.md).
263-
264-
#### Set environment variables
265-
266-
##### [Linux](#tab/linux)
267-
268-
```azurecli
269-
export clName=mycustomlocation
270-
export hostClusterId=$(az connectedk8s show --resource-group ${resourceGroup} --name ${clusterName} --query id -o tsv)
271-
export extensionId=$(az k8s-extension show --resource-group ${resourceGroup} --cluster-name ${clusterName} --cluster-type connectedClusters --name ${adsExtensionName} --query id -o tsv)
272-
az customlocation create --resource-group ${resourceGroup} --name ${clName} --namespace ${namespace} --host-resource-id ${hostClusterId} --cluster-extension-ids ${extensionId} --location ${location}
273-
```
274-
275-
##### [Windows (PowerShell)](#tab/windows)
276-
277-
```azurecli
278-
$ENV:clName="mycustomlocation"
279-
$ENV:hostClusterId=(az connectedk8s show --resource-group $ENV:resourceGroup --name $ENV:clusterName --query id -o tsv)
280-
$ENV:extensionId=(az k8s-extension show --resource-group $ENV:resourceGroup --cluster-name $ENV:clusterName --cluster-type connectedClusters --name $ENV:adsExtensionName --query id -o tsv)
281-
az customlocation create --resource-group $ENV:resourceGroup --name $ENV:clName --namespace $ENV:namespace --host-resource-id $ENV:hostClusterId --cluster-extension-ids $ENV:extensionId
282-
```
283-
284-
---
285-
286-
### Validate the custom location is created
287-
288-
From the terminal, run the below command to list the custom locations, and validate that the **Provisioning State** shows Succeeded:
289-
290-
```azurecli
291-
az customlocation list -o table
292-
```
293-
294-
### Create certificates for logs and metrics UI dashboards
295-
296-
Optionally, you can specify certificates for logs and metrics UI dashboards. See [Provide certificates for monitoring](monitor-certificates.md) for examples. The December, 2021 release introduces this option.
297-
298-
### Step 3: Create the Azure Arc data controller
299-
300-
After the extension and custom location are created, proceed to deploy the Azure Arc data controller as follows.
301-
302-
```azurecli
303-
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --profile-name <profile name> --auto-upload-metrics true --custom-location <name of custom location> --storage-class <storageclass>
304-
# Example
305-
az arcdata dc create --name arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --profile-name azure-arc-aks-premium-storage --auto-upload-metrics true --custom-location mycustomlocation --storage-class mystorageclass
306-
```
307-
308-
If you want to create the Azure Arc data controller using a custom configuration template, follow the steps described in [Create custom configuration profile](create-custom-configuration-template.md) and provide the path to the file as follows:
309-
310-
311-
```azurecli
312-
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --path ./azure-arc-custom --auto-upload-metrics true --custom-location <name of custom location>
313-
# Example
314-
az arcdata dc create --name arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --path ./azure-arc-custom --auto-upload-metrics true --custom-location mycustomlocation
315-
```
316-
317-
--->
318-
319110
## Monitor the status of Azure Arc data controller deployment
320111

321112
The deployment status of the Arc data controller on the cluster can be monitored as follows:

0 commit comments

Comments
 (0)