add a Cattle Catalog for Puppet (#198)
This commit is contained in:
committed by
Bill Maxwell
parent
24d80f79b7
commit
b670afa361
@@ -0,0 +1,54 @@
|
||||
# Puppet 4 .x (standalone)
|
||||
|
||||
### Info
|
||||
|
||||
A Rancher Cattle Catalog entry for deploying a Puppet 4.x Open Source-only master. The Catalog entry is suitable for development
|
||||
and testing of Puppet codebases.
|
||||
|
||||
### Usage
|
||||
|
||||
Launch the Catalog entry. If no Puppet control repo is specified in the Rancher console no attempt will be made to sync
|
||||
a Puppet control repo. Catalog compiles will be against a default Puppet code base in the 'production' environment.
|
||||
|
||||
If a Puppet control repo is specified during launch of the Catalog entry r10k will run a full branch sync of the control
|
||||
repo during Puppet container provisioning. A manual resync post-launch can be performed by restarting the Puppet container
|
||||
however the full cycle of container restart, r10k sync, and load-balancer registration + availability is on the order of seconds
|
||||
to minutes so this is of limited use for rapid iteration of Puppte codebases. This is a known issue (see TODO).
|
||||
|
||||
The puppetserver process in the Puppet container is configured for autosigning of Puppet agent certificates('*').
|
||||
|
||||
### Notes
|
||||
|
||||
The Puppet master configuration in this Catalog entry is, by design, minimal in functionality:
|
||||
|
||||
* currently no management consoles
|
||||
* currently not PuppetDB integrated
|
||||
* lacking in any other community add-ons/bells-and-whistles
|
||||
|
||||
See the TODO.
|
||||
|
||||
### Development / Bug Reports / Feedback
|
||||
|
||||
The Puppet 4.x (standalone) Catalog entry resides in a repo alongside other Rancher community Catalog entries at:
|
||||
|
||||
* [https://github.com/rancher/community-catalog](https://github.com/rancher/community-catalog)
|
||||
|
||||
however development happens via the following repo:
|
||||
|
||||
* [https://github.com/nrvale0/rancher-cattle-puppet](https://github.com/nrvale0/rancher-cattle-puppet)
|
||||
|
||||
For direct access to the author / maintainer it probably makes to file bug reports and file pull requests at the latter repo.
|
||||
|
||||
### TODO
|
||||
* add ability to configure r10k to authenticate to private control repos using an SSH key
|
||||
* provide a method for manual resyncing of control repos using r10k which does not involve restarting the Puppet container
|
||||
* provide user a way to specify periodicity of automatic r10k syncs of the control repo
|
||||
* integrate one of the Open Source consoles for viewing Puppet Reports, Facts, and other misc node information
|
||||
* allow the user to pass custom autosinging globs
|
||||
|
||||
### Author
|
||||
|
||||
Nathan Valentine - <[nathan@rancher.com](mailto:nathan@rancher.com) | [nrvale0@gmail.com](mailto:nrvale0@gmail.com)>
|
||||
[https://www.rancher.com](https://www.rancher.com)
|
||||
[https://nrvale0.github.io](https://nrvale0.github.io)
|
||||
twitter: [@nrvale0](https://twitter.com/nrvale0)
|
||||
@@ -0,0 +1,32 @@
|
||||
puppet-lb:
|
||||
ports:
|
||||
- ${PUPPET_PORT}:8140/tcp
|
||||
labels:
|
||||
io.rancher.loadbalancer.target.puppet: 8140=${PUPPET_PORT}
|
||||
tty: true
|
||||
image: rancher/load-balancer-service
|
||||
links:
|
||||
- puppet:puppet
|
||||
stdin_open: true
|
||||
|
||||
puppet:
|
||||
hostname: puppet
|
||||
domainname: puppet.rancher.internal
|
||||
labels:
|
||||
io.rancher.sidekicks: puppet-config-volumes
|
||||
image: nrvale0/puppetserver-standalone
|
||||
environment:
|
||||
- CONTROL_REPO_GIT_URI=${CONTROL_REPO_GIT_URI}
|
||||
volumes_from:
|
||||
- puppet-config-volumes
|
||||
|
||||
puppet-config-volumes:
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.container.start_once: "true"
|
||||
volumes:
|
||||
- /etc/puppetlabs/ssl
|
||||
- /opt/puppetlabs/r10k/cache
|
||||
- /etc/puppetlabs/code
|
||||
entrypoint: /bin/true
|
||||
image: alpine
|
||||
@@ -0,0 +1,40 @@
|
||||
.catalog:
|
||||
name: Puppet Server 4.x (standalone)
|
||||
version: 1.0.0-rancher1
|
||||
description: >
|
||||
A very basic Open Source-only Puppet 4.x master for development and testing.
|
||||
questions:
|
||||
|
||||
- variable: "CONTROL_REPO_GIT_URI"
|
||||
type: "string"
|
||||
description: "The git URI for the Puppet control repo."
|
||||
label: "Puppet control repo URI"
|
||||
required: false
|
||||
|
||||
- variable: "PUPPET_PORT"
|
||||
type: "int"
|
||||
description: "TCP port for Puppet agent's to connect to Puppet master. Default(tcp/8140)"
|
||||
label: "Puppet agent port"
|
||||
required: false
|
||||
default: 8140
|
||||
|
||||
puppet-lb:
|
||||
scale: 1
|
||||
load_balancer_config:
|
||||
haproxy_config: {}
|
||||
health_check:
|
||||
port: 42
|
||||
interval: 2000
|
||||
unhealthy_threshold: 3
|
||||
healthy_threshold: 2
|
||||
response_timeout: 2000
|
||||
|
||||
puppet:
|
||||
scale: 1
|
||||
health_check:
|
||||
port: 8140
|
||||
interval: 3000
|
||||
unhealthy_threshold: 2
|
||||
strategy: recreate
|
||||
response_timeout: 2000
|
||||
healthy_threshold: 2
|
||||
Reference in New Issue
Block a user