You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/setting-up-harbor-as-a-local-container-registry-in-hpe-private-cloud-ai.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,21 @@ disable: false
7
7
---
8
8
A container registry serves as a centralized system for storing and managing container images. In today’s fast-paced containerized application development landscape, speed, security and control over container workflows using a robust container registry are critical. While both cloud-based container registries, such as Google Container Registry (*GCR*), Azure Container Registry (*ACR*), and Amazon Elastic Container Registry (*ECR*), and third-party services like *DockerHub*, *GitHub* / *GitLab* Container Registry, and *JFrog* Container Registry, offer convenience, organizations often face challenges with latency, external dependencies, and security compliance constraints.
9
9
10
-
This blog post describes the process of deploying *Harbor* and setting it up as a local container registry within *HPE Private Cloud AI*. By using *Harbor* as a local registry, organizations gain faster image access, reduced reliance on external networks, enhanced security posture, and a tailored environment that aligns with compliance and governance needs.
10
+
This blog post describes the process of deploying *Harbor* and setting it up as a local container registry within *HPE Private Cloud AI*. By using *Harbor* as a local container registry, organizations gain faster image access, reduced dependence on external networks, improved security, and a tailored registry environment that aligns with internal compliance and governance needs.
11
11
12
12
## HPE Private Cloud AI
13
13
14
-
[HPE Private Cloud AI (PCAI)](https://www.hpe.com/us/en/private-cloud-ai.html) offers a comprehensive, turnkey AI solution designed to address key enterprise challenges, from selecting the appropriate large language models (LLMs) to efficiently hosting and deploying them. Beyond these core functions, PCAI empowers organizations to take full control of their AI adoption journey by offering a curated set of pre-integrated NVIDIA NIM LLMs, along with a powerful suite of AI tools and frameworks for *Data Engineering*, *Analytics*, and *Data Science*.
14
+
[HPE Private Cloud AI (PCAI)](https://www.hpe.com/us/en/private-cloud-ai.html) offers a comprehensive, turnkey AI solution designed to address key enterprise challenges, from selecting the appropriate large language models (LLMs) to efficiently hosting and deploying them. Beyond these core functions, PCAI empowers organizations to take full control of their AI adoption journey by offering a curated set of pre-integrated *NVIDIA NIM* LLMs, along with a powerful suite of AI tools and frameworks for *Data Engineering*, *Analytics*, and *Data Science*.
15
15
16
-
The *Import Framework* in PCAI further enhances flexibility by enabling customers to integrate their own applications or third-party solutions alongside pre-installed components, accommodating a wide range of enterprise-specific use cases.
16
+
The *Import Framework* in PCAI further enhances flexibility by enabling organizations to integrate their own applications or third-party solutions alongside pre-installed components, accommodating a wide range of enterprise-specific use cases.
17
17
18
18

19
19
20
20
This blog post guides you through the step-by-step process of deploying the open-source *Harbor* into PCAI using the *Import Framework*. Once deployed and configured, *Harbor* can serve as a local container registry within PCAI. With key features such as policy management, role-based access control (RBAC), security scanning, and image signing, *Harbor* strengthens container lifecycle security and governance.
21
21
22
22
## Prerequisites
23
23
24
-
Before starting, make sure that [Docker Engine](https://docs.docker.com/engine/install/), version *28.1.1* or later, is installed, including the default *docker* CLI, which will used for building and pushing images.
24
+
Before starting, make sure that [Docker Engine](https://docs.docker.com/engine/install/), version *28.1.1* or later, is installed, including the default *docker* CLI, which will be used for building and pushing images.
25
25
26
26
The following sections show application deployment details using the *kubectl* CLI and *kubeconfig* to access the PCAI Kubernetes (K8s) cluster. However, direct cluster access via *kubectl* is generally not required.
27
27
@@ -80,11 +80,9 @@ From there, you can log into *Harbor* projects page using the default *admin* us
80
80
81
81

82
82
83
-
For security, it's recommended to create *private* projects to restrict unauthorized images pulls. In this blog post, a private project named *demo* is created with an unlimited quota (**-1**). In production environments, setting a defined quota, e.g., *500G*, can help manage registry storage usage.
83
+
To enhance security, it's recommended to create *private* projects in *Harbor*to prevent unauthorized images pulls. In this blog post, a private project named *demo* is created with an unlimited quota (**-1**). For production environments, applying a defined quota, e.g., *200G*, can help manage registry storage capacity more effectively.
84
84
85
-
Next, users can be created and assigned to projects using role-based access control (RBAC).
86
-
87
-
Two users, *pcai-developer*, & *pcai-admin*, are created:
85
+
After creating the project, users can be created and assigned to projects using role-based access control (RBAC). In this blog post, two sample users, *pcai-developer*, & *pcai-admin*, are created:
88
86
89
87

90
88
@@ -96,7 +94,7 @@ These users, along with the default *admin* user, are added to the project *demo
96
94
97
95
For a detailed breakdown of each role's capabilities, refer to the official [Harbor Managing Users page](https://goharbor.io/docs/2.13.0/administration/managing-users/). As a best practice, production deployments should enforce role separation to maintain security and operational clarity in *Harbor*.
98
96
99
-
### Pushing Images to Harbor Registry
97
+
### Pushing images to Harbor registry
100
98
101
99
With the project and users set up, you're ready to push the container images to *Harbor* by following these steps:
102
100
@@ -106,7 +104,7 @@ Use the Docker client to authenticate with the *Harbor* registry using the *pcai
From the *Harbor* UI, the image *cfe-nginx* appears under *Repositories* tab of the *demo* project:
171
169
172
170

173
171
174
-
Log in to the *Harbor* registry as the *pcai-developer* user, then pull the image *cfe-nginx* from the registry. The image downloads successfully, confirming that the user has appropriate access and the *Harbor* registry is functioning as expected.
172
+
From the Docker client, log in to the *Harbor* registry as the *pcai-developer* user, then pull the image *cfe-nginx* from the registry. The image downloads successfully, confirming that the user has appropriate access and the *Harbor* registry is functioning as expected.
With the container images pushed to the *Harbor* registry, the next step is to deploy the application to PCAI using the same *Import Framework*, demonstrating how to pull images from *Harbor*.
210
208
211
-
The Helm charts of the sample Nginx application are available from GitHub repository [pcai-helm-examples](https://github.com/GuopingJia/pcai-helm-examples/tree/main/nginx-chart). Alongside the required *virtualService* and Kyverno *ClusterPolicy* YAML files, the *values.yaml* file includes the *imageCredentials* section that specifies the *Harbor* access credentials for the *pcai-developer* user. It also references the *imagePullSecrets* field that uses the Secret resource *harbor*, which is created during deployment, to securely pull container images from the *Harbor* registry.
209
+
The Helm charts of the sample *CFE Nginx* application are available from *GitHub* repository [pcai-helm-examples](https://github.com/GuopingJia/pcai-helm-examples/tree/main/nginx-chart). Alongside the required *virtualService* and Kyverno *ClusterPolicy* YAML files, the *values.yaml* file includes the *imageCredentials* section that specifies the *Harbor* access credentials for the *pcai-developer* user. It also references the *imagePullSecrets* field that uses the Secret resource *harbor*, which is created during deployment, to securely pull container images from the *Harbor* registry.
Using the provided sample Helm charts, the CFE Nginx application can be easily deployed to PCAI via the *Import Framework*. After deployment, an **Imported***Nginx* tile appears under *Tools & Framework*, along with its configured virtual service endpoint:
228
+
Using the provided sample Helm charts, the *CFE Nginx* application can be easily deployed to PCAI via the *Import Framework*. After deployment, an **Imported***Nginx* tile appears under *Tools & Framework*, along with its configured service endpoint:
231
229
232
230

233
231
234
-
Clicking the *Open* button launches the CFE Nginx main page:
232
+
Clicking the *Open* button launches the *CFE Nginx* main page:
235
233
236
234

237
235
238
-
The CFE Nginx application is deployed to the namespace *nginx* in the K8s cluster. If you have access to the cluster, you can verify the deployment by running the following command:
236
+
The *CFE Nginx* application is deployed to the namespace *'nginx'* in the K8s cluster. If you have access to the cluster, you can verify the deployment by running the following command:
239
237
240
238
```shell
241
239
# kubectl get all -n nginx
@@ -252,14 +250,14 @@ NAME DESIRED CURRENT READY AGE
252
250
replicaset.apps/nginx-chart-546476cd99 1 1 1 6s
253
251
```
254
252
255
-
Within the *nginx* namespace , a Secret named *harbor* of type *dockerconfigjson* is created. This secret is used to authenticate and pull images from the *demo* private project in the *Harbor* registry during the deployment of the CFE Nginx application:
253
+
Within the *'nginx'* namespace , a Secret named *'harbor'*, of type *dockerconfigjson*, is created. This secret is used to authenticate and pull images from the *Harbor* registry during the deployment of the *CFE Nginx* application:
256
254
257
255
```shell
258
256
# kubectl get secret harbor -n nginx
259
257
NAME TYPE DATA AGE
260
258
harbor kubernetes.io/dockerconfigjson 1 3m41s
261
259
```
262
-
Type the following command to observe the *cfe-nginx* image, tagged *v0.1.0*, being pulled from the *Harbor* registry:
260
+
Type the following command to observe the *cfe-nginx* image, tagged *v0.1.0*, being pulled from the *demo* private project in *Harbor* registry:
263
261
264
262
```shell
265
263
[root@ez-master01 ~]# k describe pod/nginx-chart-546476cd99-2nqzz -n nginx
0 commit comments