Forge Home

harbor

Install and configure the Harbor registry server (https://goharbor.io)

5,830 downloads

2,545 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 3.0.0 (latest)
  • 2.1.0
  • 2.0.0
  • 1.0.0
  • 0.1.0
released Dec 13th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'walkamongus-harbor', '3.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add walkamongus-harbor
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install walkamongus-harbor --version 3.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

walkamongus/harbor — version 3.0.0 Dec 13th 2019

Build Status

harbor

Table of Contents

  1. Description
  2. Setup - The basics of getting started with harbor
  3. Usage - Configuration options and additional functionality
  4. Advanced features
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

Puppet module for installing, configuring, and running Harbor container registry project: https://goharbor.io/

Setup

What harbor affects

This module will install Docker and run Harbor through docker-compose as this is the method used by Harbor's install.sh script.

Beginning with harbor

include harbor

This will set up and start harbor with the completely default harbor.cfg configuration.

Make sure your target system meets the Harbor prerequisites outlined at https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md#prerequisites-for-the-target-host

Usage

Include usage examples for common use cases in the Usage section. Show your users how to use your module to solve problems, and be sure to include code examples. Include three to five examples of the most important or common tasks a user can accomplish with your module. Show users how to accomplish more complex tasks that involve different types, classes, and functions working in tandem.

Advanced features

This module comes with types and providers to manage harbor user setttings (https://github.com/goharbor/harbor/blob/master/docs/configure_user_settings.md#harbor-user-settings) and harbor projects via Harbor's swagger API.

To use these features you must install the harbor-swagger-client gem (https://github.com/bt-lemery/harbor-swagger-client) and create the file '/etc/puppetlabs/swagger.yaml' on your Harbor server with the following (minimum) content:

---
username: 'admin'
password: '<admin_default_password>'

If using Harbor with SSL enabled you should also include:

scheme: 'https'

If using Harbor with a self-signed SSL certificate you should also include:

verify_ssl: false
verify_ssl_host: false

User settings

The module currently supports the ability to provide user authentication via your own LDAP store. To enable this create a 'harbor_user_settings' resource like:

  harbor_user_settings { 'ldap_settings':
    auth_mode      => 'ldap_auth',
    ldap_url       => 'ldap://example.org',
    ldap_base_dn   => 'dc=example,dc=org',
    ldap_search_dn => '<ldap_bind_user>',
  }

See 'Limitations' below.

Projects

It is possible to create projects using the 'harbor_project' resource. You can also manage user membership in projects, and control whether projects are public or private at creation time:

  harbor_project { 'my-project':
    ensure  => present,
    public  => 'true',
    members => ['bob', 'alice'],
  }

All members will be created as 'Developers' giving them full Read and Write access to the project and its associated repositories.

See 'Limitations' below.

Limitations

If you wish to enable ldap auth you must do so before adding any local user accounts. If you have created any local user accounts it is not possible to modify the auth_mode from the default 'db_auth'.

The Harbor API currently provides no facility for passing the password for the ldap user passed in the above harbor_user_settings resource. You will need to login to the U I to set the user password.

It is currently not possible to modify whether a project is 'public' or 'private' after creation via this module.

Adding group membership to harbor projects is a work-in-progress.

This module supports:

Centos 7.0
RedHat 7.0
Debian 9.0

For an extensive list of supported operating systems, see metadata.json.

Development

If you would like to contribute to this module, see the guidelines in CONTRIBUTING.MD.