EOEPCA+ Container Registry Deployment Guide⚓︎
The Container Registry stores and distributes container images for application development and deployment.
Introduction⚓︎
The Container Registry is a key part of the EOEPCA+ ecosystem. It stores and distributes container images for application development and deployment. We use Harbor, an open-source container registry, to efficiently manage images for applications on the platform, including those from the Application Hub or running within the Processing building block.
Key features of Harbor include:
- Role-Based Access Control (RBAC): Control access to images based on user roles.
- Vulnerability Scanning: Detect vulnerabilities in images.
- Image Signing: Verify the authenticity of images.
- Audit Logs: Track operations for compliance.
- Replication: Sync images across multiple Harbor instances.
Scripted Deployment⚓︎
The Harbor deployment in this guide follows the same Scripted Deployment Approach, as for the EOEPCA building blocks.
Architecture Overview⚓︎
Harbor is made up of several components:
- Core Services: Manage images and users.
- Registry: Stores images and handles pull/push operations.
- Database: Stores metadata for projects, users, and roles.
- Job Service: Manages tasks like replication and garbage collection.
- Trivy: Scans images for vulnerabilities.
Optional components (can be disabled if not needed):
- Notary: Provides image signing and verification.
- ChartMuseum: Hosts Helm charts.
Prerequisites⚓︎
Before deploying the Container Registry, make sure you have:
Component | Requirement | Documentation Link |
---|---|---|
Kubernetes | Cluster (tested on v1.28) | Deployment Guide |
Helm | Version 3.5 or newer | Installation Guide |
kubectl | Configured for cluster access | Installation Guide |
Ingress | Properly installed | Documentation |
TLS Certificates | Managed via cert-manager or manually |
TLS Certificate Management Guide |
Clone the Deployment Guide Repository:
Validate your environment:
Run the validation script to ensure all prerequisites are met:
Deployment⚓︎
Deploying Harbor involves configuring the Helm chart with appropriate values and installing it into your Kubernetes cluster.
-
Run the Configuration Script:
Run the configuration script:
The script will prompt you for configuration values and generate a
generated-values.yaml
file for the Helm deployment:INGRESS_HOST
: Base domain for ingress hosts.- Example:
example.com
- Example:
CLUSTER_ISSUER
: Cert-manager Cluster Issuer for TLS certificates.- Example:
letsencrypt-http01-apisix
- Example:
STORAGE_CLASS
: Storage class for persistent volumes.- Example:
standard
- Example:
Additionally, the following keys are generated by the script and should be securely stored:
- Harbor Admin Password: The administrative password for the Container Registry.
-
Deploy Container Registry
-
Log In
Navigate to
https://harbor.your-domain
in your browser.- Username:
admin
- Password: The password that was generated during configuration
Check the~/.eoepca/state
file
- Username:
Enabling Optional Components⚓︎
-
Trivy (Vulnerability Scanning):
-
ChartMuseum (Helm Chart Repository):
-
Notary (Image Signing):
Validation⚓︎
Automated Validation:
Manual Validation:
-
Check Kubernetes Resources:
-
Access Container Registry Dashboard:
-
Log In:
- Username:
admin
- Password: The password you set during configuration.
- Username:
-
Test Harbor:
- Create a project.
- Push and pull images.
- Optionally, test vulnerability scanning if Trivy is enabled.
Operation⚓︎
Configure Docker Client:
To interact with Harbor using Docker commands, you need to configure your Docker client to trust the Harbor registry.
-
Login to Harbor:
Enter the admin username and password when prompted.
-
Push an Image:
Tag an image and push it to Harbor.
-
Pull an Image:
Note: If you’re using self-signed certificates or an untrusted CA, you may need to configure Docker to trust the registry’s certificate.
Configure Kubernetes to Pull Images from Harbor:
-
Create an image pull secret:
-
Reference the Secret in your Deployment:
Alternatively, you may configure cluster-wide registry credentials - as mentioned under Kubernetes Additional Guidance.
Uninstallation⚓︎
To uninstall Harbor and clean up associated resources:
helm -n harbor uninstall harbor
Further Reading⚓︎
Feedback⚓︎
If you encounter any issues or have suggestions for improvement, please open an issue on the EOEPCA+ Deployment Guide GitHub Repository.