Skip to content

Commit a4b3d6c

Browse files
committed
Update Blog “setting-up-harbor-as-a-local-container-registry-in-hpe-private-cloud-ai”
1 parent c3d82eb commit a4b3d6c

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

content/blog/setting-up-harbor-as-a-local-container-registry-in-hpe-private-cloud-ai.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ disable: false
77
---
88
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.
99

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.
1111

1212
## HPE Private Cloud AI
1313

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*.
1515

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.
1717

1818
![](/img/pcai-import-framework.png)
1919

2020
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.
2121

2222
## Prerequisites
2323

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.
2525

2626
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.
2727

@@ -80,11 +80,9 @@ From there, you can log into *Harbor* projects page using the default *admin* us
8080

8181
![](/img/create-project.png)
8282

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.
8484

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:
8886

8987
![](/img/two-users-harbor.png)
9088

@@ -96,7 +94,7 @@ These users, along with the default *admin* user, are added to the project *demo
9694

9795
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*.
9896

99-
### Pushing Images to Harbor Registry
97+
### Pushing images to Harbor registry
10098

10199
With the project and users set up, you're ready to push the container images to *Harbor* by following these steps:
102100

@@ -106,7 +104,7 @@ Use the Docker client to authenticate with the *Harbor* registry using the *pcai
106104

107105
```shell
108106
$ docker login harbor.ingress.pcai0104.ld7.hpecolo.net
109-
Username: pcai-developer
107+
Username: pcai-admin
110108
Password:
111109

112110
WARNING! Your credentials are stored unencrypted in '/home/guoping/.docker/config.json'.
@@ -148,7 +146,7 @@ pcaidemo/cfe-nginx v0.1.0 1e5f3c5b981a
148146
harbor.ingress.pcai0104.ld7.hpecolo.net/demo/cfe-nginx v0.1.0 1e5f3c5b981a 2 months ago 192MB
149147
```
150148

151-
* *Pushing the image to Harbor registry*
149+
* *Push the image to Harbor registry*
152150

153151
Push the image to the *Harbor* registry by running the following command:
154152

@@ -165,13 +163,13 @@ The push refers to repository [harbor.ingress.pcai0104.ld7.hpecolo.net/demo/cfe-
165163
v0.1.0: digest: sha256:114dff0fc8ee3d0200c3a12c60e3e2b79d0920dd953175ecb78a0b157425b25e size: 1778
166164
```
167165

168-
* *Verifying the image from Harbor registry*
166+
* *Verify the image from Harbor registry*
169167

170168
From the *Harbor* UI, the image *cfe-nginx* appears under *Repositories* tab of the *demo* project:
171169

172170
![](/img/demo-project.png)
173171

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.
175173

176174
```shell
177175
$ docker login harbor.ingress.pcai0104.ld7.hpecolo.net
@@ -208,7 +206,7 @@ harbor.ingress.pcai0104.ld7.hpecolo.net/demo/cfe-nginx v0.1.0 1e5f3c5b981a
208206

209207
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*.
210208

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.
212210

213211
```shell
214212
image:
@@ -227,15 +225,15 @@ imageCredentials:
227225
228226
```
229227

230-
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:
231229

232230
![](/img/nginx-deployment.png)
233231

234-
Clicking the *Open* button launches the CFE Nginx main page:
232+
Clicking the *Open* button launches the *CFE Nginx* main page:
235233

236234
![](/img/nginx-ui.png)
237235

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:
239237

240238
```shell
241239
# kubectl get all -n nginx
@@ -252,14 +250,14 @@ NAME DESIRED CURRENT READY AGE
252250
replicaset.apps/nginx-chart-546476cd99 1 1 1 6s
253251
```
254252

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:
256254

257255
```shell
258256
# kubectl get secret harbor -n nginx
259257
NAME TYPE DATA AGE
260258
harbor kubernetes.io/dockerconfigjson 1 3m41s
261259
```
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:
263261

264262
```shell
265263
[root@ez-master01 ~]# k describe pod/nginx-chart-546476cd99-2nqzz -n nginx

0 commit comments

Comments
 (0)