cockroachdb

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

neckbeards

neckbeards

4,786 downloads

1,425 latest version

5.0 quality score

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
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
  • Debian
    ,
    Ubuntu
Tasks:
  • cockroachdb
  • node_decommission
  • node_ls
  • node_status
  • quit
  • restart_service
  • sql

Start using this module

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