Repository: stolostron/rhacm-docs
Pull request #7739: Swope auto register edge
Author: login: swopebe
Created: 2025-04-17T20:38:50Z | Merged: 2025-04-22T20:39:05Z



Diff:
diff --git a/edge_manager/edge_mgr_arch.adoc b/edge_manager/edge_mgr_arch.adoc
index 41781309a8..dc65a0c2e4 100644
--- a/edge_manager/edge_mgr_arch.adoc
+++ b/edge_manager/edge_mgr_arch.adoc
@@ -1,7 +1,7 @@
 [#rhem-architecture]
 = {rhem} architecture
 
-You can manage individual devices or an entire fleet by using the {rhem}. The {rhem} uses an agent-based architecture that allows for a scalable and robust device management, even with limited network conditions.
+*Technology Preview:* You can manage individual devices or an entire fleet by using the {rhem}. The {rhem} uses an agent-based architecture that allows for a scalable and robust device management, even with limited network conditions.
 
 By deploying a {rhem} agent to a device, the agent autonomously manages and monitors the device while periodically communicating with the {rhem} service to check for new configurations and to report device status.
 
diff --git a/edge_manager/edge_mgr_auto_register.adoc b/edge_manager/edge_mgr_auto_register.adoc
new file mode 100644
index 0000000000..cceb3f2504
--- /dev/null
+++ b/edge_manager/edge_mgr_auto_register.adoc
@@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+*Technology Preview:* If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. Complete the following steps:
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. *Optional:* If your MicroShift cluster did not pull the {acm-short} images, add the `pull-secret` resource, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add the `apply-acm-manifests` resource with the following conditional `if` requirements to run `kubectl apply -f` on your `crd.yaml` file, and your `import.yaml` file:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. In the console, label the device `fleet:acm` and click *Approve*, which automatically selects the `fleet-acm` fleet. See xref:../edge_manager/edge_mgr_fleets.adoc#device-fleets[Managing device fleets] for information about managing devices with labels.
diff --git a/edge_manager/edge_mgr_manage_devices_intro.adoc b/edge_manager/edge_mgr_manage_devices_intro.adoc
index 8db5d55b3f..90eb992ae9 100644
--- a/edge_manager/edge_mgr_manage_devices_intro.adoc
+++ b/edge_manager/edge_mgr_manage_devices_intro.adoc
@@ -23,5 +23,6 @@ The following documentation focuses on managing individual devices:
 * xref:../edge_manager/edge_mgr_using_labels_on_devices.adoc#update-labels-cli[Updating labels using the CLI]
 * xref:../edge_manager/edge_mgr_update_os_devices.adoc#update-os[Updating the operating system]
 * xref:../edge_manager/edge_mgr_manage_os_config.adoc#manage-os-config[Managing the operating system configuration]
+* xref:../edge_manager/edge_mgr_manage_auto_register.adoc#config-auto-register[Configuring fleets to auto-register MicroShift clusters]
 
 To learn more about managing your devices in a fleet, see xref:../edge_manager/edge_mgr_fleets.adoc#device-fleets[Managing device fleets].


Reviews:
user: login: hchenxa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T01:56:33Z
user: login: hchenxa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T02:44:41Z
user: login: hchenxa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T02:46:43Z
user: login: swopebe
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T11:07:26Z
user: login: swopebe
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T11:12:04Z
user: login: hchenxa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-21T08:43:59Z
user: login: hchenxa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-21T08:50:19Z
user: login: xuezhaojun
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-21T09:28:43Z
user: login: swopebe
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T00:00:20Z
user: login: swopebe
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T00:18:40Z
user: login: xuezhaojun
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-22T02:35:01Z
user: login: swopebe
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T12:25:02Z
user: login: oafischer
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T14:58:48Z
user: login: oafischer
body: Just one suggestion, otherwise looks good!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T15:15:55Z

Review comments:
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. Add the `pull-secret`, as you see in the following addition to the template:
path: edge_manager/edge_mgr_auto_register.adoc
user: login: hchenxa
body: prefer to add this as optional since if the microshift cluster was able to pull ACM images, it will not need this configuration
created_at: 2025-04-18T01:56:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. Add the `pull-secret`, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests`, with the conditional requirements to run `kubectl apply -f` on your `crd.yaml` and your `import.yaml`:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: hchenxa
body: When you approve the device, label the device with `fleet:acm` and select the fleet `fleet-acm`.
created_at: 2025-04-18T02:44:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
path: edge_manager/edge_mgr_auto_register.adoc
user: login: hchenxa
body: should we remove the `import.yaml` here since no `import.yaml` in the acm fleet configuration
created_at: 2025-04-18T02:46:42Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. Add the `pull-secret`, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests`, with the conditional requirements to run `kubectl apply -f` on your `crd.yaml` and your `import.yaml`:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: swopebe
body: Thanks for this @hchenxa --I was gonna ask you if they need any other directions here -- how to label and where to label, or is that already clear?
created_at: 2025-04-18T11:07:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
path: edge_manager/edge_mgr_auto_register.adoc
user: login: swopebe
body: Yes, and we already say filePath anyway.

I have a question, is filePath, repository, suffix always going to be the same or could they have used their own? Should we make these variables or leave as-is? @hchenxa?
created_at: 2025-04-18T11:12:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
path: edge_manager/edge_mgr_auto_register.adoc
user: login: hchenxa
body: it will be same, the repository `acm-registration` is created by default in ACM after we enable the fleet-manager, but I am not sure if end user want to rename the `acm-registrion` with the different name. 
created_at: 2025-04-21T08:43:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. Add the `pull-secret`, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests`, with the conditional requirements to run `kubectl apply -f` on your `crd.yaml` and your `import.yaml`:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: hchenxa
body: hmm, may be we can add a reference https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/edge_manager/edge-mgr-intro#device-fleets here to let them know more about the manage the devices with fleet via label
created_at: 2025-04-21T08:50:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. Add the `pull-secret`, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests`, with the conditional requirements to run `kubectl apply -f` on your `crd.yaml` and your `import.yaml`:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: xuezhaojun
body: Adding the `fleet: acm` will automatically select the fleet for the device. No need for extra steps.
created_at: 2025-04-21T09:28:39Z
author_association: NONE
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `import.yaml` `filePath`, `repository`, and `suffix`, as you see in the following example:
path: edge_manager/edge_mgr_auto_register.adoc
user: login: swopebe
body: Leaving the values as-is then. TY.
created_at: 2025-04-22T00:00:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+*Technology Preview:* If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. *Optional:* If your MicroShift cluster did not pull the {acm-short} images, add the `pull-secret` resource, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests` with the following conditional requirements to run `kubectl apply -f` on your `crd.yaml` file and your `import.yaml`file:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`, which automatically selects the `fleet-acm` fleet. See xref:../edge_manager/edge_mgr_fleets.adoc#device-fleets[Managing device fleets] for information about managing devices with labels.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: swopebe
body: @xuezhaojun @hchenxa I addressed everything and I am sending up for peer review. One more question:

Do we mean "When you approve the device" -- or when you **apply**? The draft says **approve.** Then my question is: what do they need to do to approve? (We don't tell them how to approve)
created_at: 2025-04-22T00:18:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+*Technology Preview:* If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. *Optional:* If your MicroShift cluster did not pull the {acm-short} images, add the `pull-secret` resource, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests` with the following conditional requirements to run `kubectl apply -f` on your `crd.yaml` file and your `import.yaml`file:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`, which automatically selects the `fleet-acm` fleet. See xref:../edge_manager/edge_mgr_fleets.adoc#device-fleets[Managing device fleets] for information about managing devices with labels.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: xuezhaojun
body: There will be a Approve button shows in UI. It's part of the flow of flightctl.
![image](https://github.com/user-attachments/assets/bec74fac-88f1-4293-a43e-96be06b748b7)

created_at: 2025-04-22T02:35:01Z
author_association: NONE
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+*Technology Preview:* If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
+
+. Add the `acm-crd` resource configuration, which includes the `filePath` for your `crd.yaml` file, your `repository`, and `suffix` to your `Fleet` resource. See the following example:
+
++
+[source,yaml]
+----
+apiVersion: flightctl.io/v1alpha1
+kind: Fleet
+metadata:
+ name: fleet-acm
+spec:
+ selector:
+  matchLabels:
+   fleet: acm
+ template:
+  spec:
+   os:
+    image: <your os image>
+config:
+   - name: acm-crd
+    httpRef:
+     filePath: /var/local/acm-import/crd.yaml
+     repository: acm-registration
+     suffix: /agent-registration/crds/v1
+----
+
+. Add the `acm-import` resource configuration with the `filePath`, `repository`, and `suffix`, as you see in the following example:
+
++
+[source,yaml]
+----
+- name: acm-import
+    httpRef:
+     filePath: /var/local/acm-import/import.yaml
+     repository: acm-registration
+     suffix: /agent-registration/manifests/{{.metadata.name}}
+----
+
+. *Optional:* If your MicroShift cluster did not pull the {acm-short} images, add the `pull-secret` resource, as you see in the following addition to the template:
+
++
+[source,yaml]
+----
+- name: pull-secret
+    inline:
+    - path: "/etc/crio/openshift-pull-secret"
+     content: "{\"auths\":{...}}"
+----
+
+. Add `apply-acm-manifests` with the following conditional requirements to run `kubectl apply -f` on your `crd.yaml` file and your `import.yaml`file:
+
++
+[source,yaml]
+----
+- name: apply-acm-manifests
+    inline:
+    - path: "/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml"
+     content: |
+      - if:
+       - path: /var/local/acm-import/crd.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/crd.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+      - if:
+       - path: /var/local/acm-import/import.yaml
+        op: [created]
+       run: kubectl apply -f /var/local/acm-import/import.yaml
+       envVars:
+        KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
+----
+
+. When you approve the device, label the device with `fleet:acm`, which automatically selects the `fleet-acm` fleet. See xref:../edge_manager/edge_mgr_fleets.adoc#device-fleets[Managing device fleets] for information about managing devices with labels.
path: edge_manager/edge_mgr_auto_register.adoc
user: login: swopebe
body: Ok, we should say: Add the label and approve.
@xuezhaojun 
created_at: 2025-04-22T12:25:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,82 @@
+[#edge-config-auto-register]
+= Configuring fleets to auto-register MicroShift clusters
+
+*Technology Preview:* If you have fleets of devices that are running an operating system image that includes MicroShift, you can configure your fleets to auto-register MicroShift clusters with {acm-short}.
+
+[#edge-config-device-template]
+== Configuring your device template
+
+To enable auto-registration in a fleet, add configuration to the device template. 
path: edge_manager/edge_mgr_auto_register.adoc
user: login: oafischer
body: ```suggestion
To enable auto-registration in a fleet, add configuration to the device template. Complete the following steps:
```
created_at: 2025-04-22T14:58:48Z
author_association: CONTRIBUTOR

PR comments:
user: login: xuezhaojun
created_at: 2025-04-21T09:26:31Z
body: /lgtm
author_association: NONE
user: login: xuezhaojun
created_at: 2025-04-21T09:26:40Z
body: The PR looks good to me!
author_association: NONE
user: login: openshift-ci[bot]
created_at: 2025-04-22T15:16:02Z
body: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/stolostron/rhacm-docs/pull/7739#pullrequestreview-2784483251" title="Approved">oafischer</a>*, *<a href="https://github.com/stolostron/rhacm-docs/pull/7739#" title="Author self-approved">swopebe</a>*, *<a href="https://github.com/stolostron/rhacm-docs/pull/7739#issuecomment-2818027252" title="LGTM">xuezhaojun</a>*


The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=stolostron%2Frhacm-docs).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/stolostron/rhacm-docs/blob/2.13_stage/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
author_association: NONE
user: login: openshift-ci[bot]
created_at: 2025-04-22T18:11:25Z
body: New changes are detected. LGTM label has been removed.
author_association: NONE