Forge Home

cockroachdb

Puppet module for CockroachDB. Created as part of a project in the subject Infrastructure as Code (IMT3005) at NTNU Gjøvik.

7,388 downloads

1,924 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.1.0 (latest)
  • 1.0.1
  • 1.0.0
  • 0.3.0
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.20
  • 0.1.19
  • 0.1.18
  • 0.1.17
  • 0.1.15
  • 0.1.14
  • 0.1.13
  • 0.1.12
  • 0.1.11
  • 0.1.10
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.2
  • 0.1.1
  • 0.1.0 (deleted)
released Oct 31st 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • ,
Tasks:
  • cockroachdb
  • node_decommission
  • node_ls
  • node_status
  • quit
  • restart_service
  • sql

Start using this module

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

Add this module to your Puppetfile:

mod 'neckbeards-cockroachdb', '1.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add neckbeards-cockroachdb
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install neckbeards-cockroachdb --version 1.1.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

neckbeards/cockroachdb — version 1.1.0 Oct 31st 2019

cockroachdb

Build Status CodeFactor

Table of Contents

  1. Description
  2. Setup - Getting started with cockroachdb
  3. Example Usage
  4. Limitations and Known Issues
  5. Development - Guide for contributing to the module

Description

This is a CockroachDB module for Puppet. It will help you set up a database cluster quickly and provides basic functionality for managing it using Bolt tasks. The module is created using PDK for Open Source Puppet and using the Open Source version of CockroachDB.

The module was initially created as part of a project in the subject Infrastructure as Code (IMT3005) at NTNU Gjøvik.

Setup

What cockroachdb affects

Dependencies installed by cockroachdb by default:

Setup Requirements

At the moment the module requires that database nodes are identified by FQDNs, so DNS should be configured prior to use.

To use secure mode, you need to handle the certificates either manually, or using other modules/programs.

Beginning with cockroachdb

First add the module to your Puppetfile, see the Forge instructions. Then all you need in your manifest to get started is:

Insecure mode

class { 'cockroachdb':
  node1ip     => 'db0',
  node2ip     => 'db1',
  node3ip     => 'db2',
  secure_mode => false,
}

Secure mode

class { 'cockroachdb':
  node1ip     => 'db0',
  node2ip     => 'db1',
  node3ip     => 'db2',
  secure_mode => true,
  certs_dir   => '/root/certs',
}

Client To just install the cockroach client and not run it as a server, just add include cockroachdb::client to your Puppet manifest.

Usage

Specifying different cockroachdb version:

class { 'cockroachdb':
  node1ip        => 'db0',
  node2ip        => 'db1',
  node3ip        => 'db2',
  package_ensure => 'v19.1.0.linux-amd64',
  secure_mode    => false,
}

Adding additional parameters to cockroachdb that are not directly supported in the module:

class { 'cockroachdb':
  node1ip           => 'db0',
  node2ip           => 'db1',
  node3ip           => 'db2',
  secure_mode       => false,
  additional_params => '--store=/mnt/ssd01',
}

Initializing a cluster using bolt tasks:

To then initialize the database cluster, use:

bolt task run cockroachdb -n db0 insecure=true

Verify that the cluster is online:

bolt task run cockroachdb::node_ls -n db0 insecure=true

Limitations

Limitations:

  • Only a three node initial cluster is supported. But still works with more nodes joining later
  • Can not switch from secure to insecure mode

Known Issues:

Warnings:

Development

Contribution guidelines for this project

Changelog

Changelog