Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add note to change Longhorn images to reference harbor #2497

Merged
merged 6 commits into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions docs/docs-content/integrations/longhorn.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ The following known issues exist in the Longhorn 1.5.X release.
[known issue](https://github.com/longhorn/longhorn/issues/6962) in the Longhorn GitHub repository and a fix is on the
roadmap.

- Using Longhorn together in airgap environments with an external registry requires you to update the Longhorn pack
image references to use the base URL of the Harbor registry. For more information, refer to
[Longhorn Deployer Stuck in Init State in Airgap Environments](#using-longhorn-with-harbor-registry-in-airgap-environments).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'Deployer'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'airgap' instead of 'Airgap'.


</TabItem>

<TabItem label="1.4.x" value="1.4.x">
Expand Down Expand Up @@ -136,6 +140,72 @@ when learning how to use Longhorn.
We also recommend you check out the [Examples](https://longhorn.io/docs/1.4.4/references/examples/) section of the
Longhorn documentation. The examples section contains several use cases of how to configure Longhorn.

### Using Longhorn with Harbor Registry in Airgap Environments
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'airgap' instead of 'Airgap'.


When you use the Longhorn pack in an airgapped environment, the Harbor Edge-Native Config pack is required for your
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'config' instead of 'Config'.

cluster to function. However, you must change the image references in the Longhorn pack to use the base URL of the local
Harbor registry. Otherwise, the cluster will fail to deploy, with the `longhorn-driver-deployer` pod stuck in the `Init`
state.

1. Log in to Palette.

2. From the left **Main Menu**, select **Profiles**.

3. Select the cluster profile you use to deploy the cluster with Longhorn.

4. In the pack YAML for the Longhorn pack, replace the base URL of each image referenced in the pack with the Harbor
registry.

For example, the following is a snippet of the Longhorn pack's YAML before and after you replace the base URL.

<Tabs>

<TabItem label="Before Replacement" value="before">

```yaml
pack:
namespace: "longhorn-system"
namespaceLabels:
"longhorn-system":
"pod-security.kubernetes.io/enforce=privileged,pod-security.kubernetes.io/enforce-version=v{{
.spectro.system.kubernetes.version | substr 0 4 }}"
content:
images:
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-engine:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-manager:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-ui:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-instance-manager:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-share-manager:v1.5.3
```

</TabItem>

<TabItem label="After Replacement" value="after">

```yaml
pack:
namespace: "longhorn-system"
namespaceLabels:
"longhorn-system":
"pod-security.kubernetes.io/enforce=privileged,pod-security.kubernetes.io/enforce-version=v{{
.spectro.system.kubernetes.version | substr 0 4 }}"
content:
images:
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-engine:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-manager:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-ui:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-instance-manager:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-share-manager:v1.5.3
```

</TabItem>

</Tabs>

Refer to [Harbor Edge-Native Config](./harbor-edge.md#log-in-to-harbor-web-ui) pack documentation to learn how to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'config' instead of 'Config'.

find the node IP and port of the Harbor registry. If you have given the registry a domain name, you can use the
domain name instead of the node IP.

</TabItem>

<TabItem label="1.3.x" value="1.3.x">
Expand Down Expand Up @@ -188,6 +258,72 @@ when learning how to use Longhorn.
We also recommend you check out the [Examples](https://longhorn.io/docs/1.4.4/references/examples/) section of the
Longhorn documentation. The examples section contains several use cases of how to configure Longhorn.

### Using Longhorn with Harbor Registry in Airgap Environments
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'airgap' instead of 'Airgap'.


When you use the Longhorn pack in an airgapped environment, the Harbor Edge-Native Config pack is required for your
lennessyy marked this conversation as resolved.
Show resolved Hide resolved
cluster to function. However, you must change the image references in the Longhorn pack to use the base URL of the local
Harbor registry. Otherwise, the cluster will fail to deploy, with the `longhorn-driver-deployer` pod stuck in the `Init`
state.

1. Log in to Palette.

2. From the left **Main Menu**, select **Profiles**.

3. Select the cluster profile you use to deploy the cluster with Longhorn.

4. In the pack YAML for the Longhorn pack, replace the base URL of each image referenced in the pack with the Harbor
registry.

For example, the following is a snipped of the Longhorn pack's YAML before and after you replace the base URL:
lennessyy marked this conversation as resolved.
Show resolved Hide resolved
lennessyy marked this conversation as resolved.
Show resolved Hide resolved

<Tabs>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to use the highlight feature, just to help draw attention to the proper part of the YAMl. I caught myself looking at the label, thinking you were doing magic there 🙈


<TabItem label="Before Replacement" value="before">

```yaml
pack:
namespace: "longhorn-system"
namespaceLabels:
"longhorn-system":
"pod-security.kubernetes.io/enforce=privileged,pod-security.kubernetes.io/enforce-version=v{{
.spectro.system.kubernetes.version | substr 0 4 }}"
content:
images:
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-engine:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-manager:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-ui:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-instance-manager:v1.5.3
- image: gcr.io/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-share-manager:v1.5.3
```

</TabItem>

<TabItem label="After Replacement" value="after">

```yaml
pack:
namespace: "longhorn-system"
namespaceLabels:
"longhorn-system":
"pod-security.kubernetes.io/enforce=privileged,pod-security.kubernetes.io/enforce-version=v{{
.spectro.system.kubernetes.version | substr 0 4 }}"
content:
images:
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-engine:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-manager:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-ui:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-instance-manager:v1.5.3
- image: 10.10.137.220:30003/spectro-images-public/packs/csi-longhorn/1.5.3/longhorn-share-manager:v1.5.3
```

</TabItem>

</Tabs>

Refer to [Harbor Edge-Native Config](./harbor-edge.md#log-in-to-harbor-web-ui) pack documentation to learn how to
lennessyy marked this conversation as resolved.
Show resolved Hide resolved
find the node IP and port of the Harbor registry. If you have given the registry a domain name, you can use the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I use a domain. Would I prefix with HTTPS/HTTP?

domain name instead of the node IP.

</TabItem>
</Tabs>

Expand Down
Loading