harbor_quick - OpenNebula/one-apps GitHub Wiki

Quick Start

You can easily create a container registry for your cloud with the Harbor Appliance. Once you have downloaded from the marketplace, simply instantiate the associated template. The following code includes an example with the minimum VM Template attributes needed to run a Harbor instance:

NAME   = "service_Harbor"
CPU    = "1.0"
VCPU   = "1"
MEMORY = "1536"

NIC  = [ NETWORK="service" ]
DISK = [ IMAGE="harbor" ]

CONTEXT = [
  NETWORK        = "YES",
  SET_HOSTNAME   = "$NAME",
  SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]",
  ONEAPP_HARBOR_ADMIN_PASSWORD="opennebula"
]

With these settings the appliance will generate a self-signed certificate for the main IP address (in the NETWORK service) and a random password for the harbor database. The registry data will be placed in the appliance root filesystem in /data folder.

Note

You can check the actual values used by logging into the appliances and looking into /root/harbor/harbor.yml

Using the appliance

Once the template has been instantiated, you will be able to access the Harbor portal by reaching the VM IP through a web browser. There, you will be able to login with the admin user and the password provided in the ONEAPP_HARBOR_ADMIN_PASSWORD context variable. In the Harbor portal you will be able to create new users, registry endpoints, manage replication, distributions, etc...

Important

If the SSL certificate being used by Harbor is self-signed, you will have to add the repository to the list of insecure registries. You can do it by modifying the /etc/docker/daemon.json configuration file with the following content (replace <IP> with the IP or hostname of your Harbor registry):

{
    "insecure-registries" : [ "<IP>" ]
}
⚠️ **GitHub.com Fallback** ⚠️