The Cloudsmith Developer Hub

Welcome to the Cloudsmith Developer Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Puppet

How to integrate Puppet with Cloudsmith

Puppet is open-core software for provisioning, configuration management, and application deployment. Puppet declaratively manages the configuration of Unix-like, macOS and Microsoft Windows systems.

In the following examples:

Identifier

Description

OWNER

Your Cloudsmith account name or organisation name (namespace)

REPOSITORY

Your Cloudsmith Repository name (also called "slug")

DISTRO

Your distribution (i.e el, fedora, debian etc)

VERSION

Your version name (i.e 7, 29, hardy, buster etc)

FINGERPRINT-LONG

The 20 Byte fingerprint of the Public GPG key for the repository

FINGERPRINT

The 8 Byte fingerprint of the Public GPG key for the repository

TOKEN

Your Cloudsmith Entitlement Token (see Entitlements for more details)

USERNAME

Your Cloudsmith username

PASSWORD

Your Cloudsmith password

API-KEY

Your Cloudsmith API Key

PACKAGE

The name of the package

Debian repository

Configuration

To add a Cloudsmith repository for Debian packages using Puppet, you would use the Puppet apt module .

Example Puppet Class using apt module:

Public Repository

class cloudsmith_repo {

  include apt

  apt::key { 'cloudsmith':
    id      => 'FINGERPRINT-LONG,
    source  => 'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key',
  }

  apt::source { 'cloudsmith':
    comment  => 'A Description added to repo config in /etc/apt/sources.list.d/',
    location => 'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/deb/DISTRO',
    release  => 'VERSION',
    repos    => 'main',
    pin      => 500,
    include  => {
      'src' => true,
      'deb' => true,
    },
  }
}

Private Repository

class cloudsmith_repo {

  include apt

  apt::key { 'cloudsmith':
    id      => 'FINGERPRINT-LONG,
    source  => 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key',
  }

  apt::source { 'cloudsmith':
    comment  => 'A Description added to repo config in /etc/apt/sources.list.d/',
    location => 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/deb/DISTRO',
    release  => 'VERSION',
    repos    => 'main',
    pin      => 500,
    include  => {
      'src' => true,
      'deb' => true,
    },
  }
}
class cloudsmith_repo {

  include apt

  apt::key { 'cloudsmith':
    id      => 'FINGERPRINT-LONG,
    source  => 'https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key',
  }

  apt::source { 'cloudsmith':
    comment  => 'A Description added to repo config in /etc/apt/sources.list.d/',
    location => 'https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/deb/DISTRO',
    release  => 'VERSION',
    repos    => 'main',
    pin      => 500,
    include  => {
      'src' => true,
      'deb' => true,
    },
  }

}
class cloudsmith_repo {

  include apt

  apt::key { 'cloudsmith':
    id      => 'FINGERPRINT-LONG,
    source  => 'https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key',
  }

  apt::source { 'cloudsmith':
    comment  => 'A Description added to repo config in /etc/apt/sources.list.d/',
    location => 'https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/deb/DISTRO',
    release  => 'VERSION',
    repos    => 'main',
    pin      => 500,
    include  => {
      'src' => true,
      'deb' => true,
    },
  }
}
class cloudsmith_repo {

  include apt

  apt::key { 'cloudsmith':
    id      => 'FINGERPRINT-LONG,
    source  => 'https://token:[email protected]/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key',
  }

  apt::source { 'cloudsmith':
    comment  => 'A Description added to repo config in /etc/apt/sources.list.d/',
    location => 'https://token:[email protected]/basic/OWNER/REPOSITORY/deb/DISTRO',
    release  => 'VERSION',
    repos    => 'main',
    pin      => 500,
    include  => {
      'src' => true,
      'deb' => true,
    },
  }
}

Package Installation

After you have configured the repository, you can then install a package using:

package { 'PACKAGE':
    ensure  => 'latest',
  }

Updated about a month ago


Puppet


How to integrate Puppet with Cloudsmith

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.