WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Kubernetes / Packer reference for VMware Harbor Virtual Appliance

Packer reference for VMware Harbor Virtual Appliance

07.08.2021 by William Lam // 2 Comments

I recently had a need to setup a container registry for a project that I was working on and Harbor was of course my default choice. Although Harbor is pretty easy to setup, I did not want to manually go through the installation each time I needed Harbor and I figured it was time to build my own Harbor Virtual Appliance (OVA), just like I have shown in the past with these reference implementations here and here.

For those interested, you can find the reference implementation for building a Harbor Virtual Appliance at https://github.com/lamw/harbor-appliance

Note: For internal VMware Employees, if you prefer not to build the appliance yourself, drop me an email or DM and I can provide you with the link to the Harbor Appliance OVA.

When deploying the Harbor Appliance, you will find the basic OVF properties that I have encoded including networking, credentials, debugging and advanced settings. Hopefully should be pretty straight forward for anyone who has deployed an OVA before to vSphere.

The Harbor installation and configuration is performed as part of the first boot script and this will take several minutes to complete


To access Harbor UI, open a browser to the FQDN of the Harbor appliance and login with the username admin and the password that you had configured during the OVA deployment.


By default, the Harbor installation generates a self-signed TLS certificate and configures HTTPS access. To be able to connect and push images to the Harbor appliance, you will need to SCP the trusted root certificate which is located on the Harbor appliance at /etc/docker/certs.d/[HARBOR-FQDN]/ca.crt and copy that to a local system and trust the certificate which has a Docker client installed.

For MacOS - Simply open up the Keychain Access and trust the imported root certificate

For PhotonOS - Append the root certificate to its certificate trust store by running the following command:

cat ca.crt >> /etc/pki/tls/certs/ca-bundle.crt

For instructions with other operating systems, you can refer to this blog post.

Once the root certificate is trusted, you will be able to perform docker login [HARBOR-FQDN] using either the admin credential or another account which you have created.

More from my site

  • Tanzu Kubernetes Grid (TKG) Demo Appliance for VMC and vSphere
  • Configure non-secure Harbor registry with Tanzu Kubernetes Grid (TKG)
  • How to deploy Knative to a Tanzu Kubernetes Grid (TKG) Cluster on both vSphere with Tanzu and TKG Multi-Cloud?
  • Using Terraform to deploy a Tanzu Kubernetes Grid (TKG) Cluster in vSphere with Tanzu 
  • Customizing Kubernetes cluster template (Dev/Prod) plans in Tanzu Kubernetes Grid 1.2
Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Categories // Kubernetes, VMware Tanzu Tags // Harbor, Kubernetes, Tanzu Kubernetes Grid, vSphere with Kubernetes

Comments

  1. Russell E Hamker III says

    02/17/2022 at 9:50 am

    What OS did you build the scripting/automation on? Any other requirements for setting this up?

    Reply
    • William Lam says

      02/18/2022 at 8:44 am

      I use MacOS, so thats what this has been tested on but it should also work on Linux system. You of course will need Arm system to build the appliance

      Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Support

Recent

  • ESXi running in unexpected places ... 05/20/2022
  • Quick Tip - Adding a vTPM (Virtual Trusted Platform Module) to a Nested ESXi VM 05/13/2022
  • vSphere Event-Driven Automation using VMware Event Router on VMware Cloud on AWS with Knative or AWS EventBridge 05/10/2022
  • Integrating VMware Event Broker Appliance (VEBA) with Zapier 04/28/2022
  • Using Terraform to activate Tanzu Kubernetes Grid Service on VMware Cloud on AWS 04/27/2022

Advertisment

Copyright WilliamLam.com © 2022

 

Loading Comments...