- Install Java 8
- Install Brew
- Install PostgreSQL
- Install leiningen
- To run tests:
- Create test databases and users (follow doc in PuppetDB repo,
grep
forpdb_test_admin
) lein test
- Create test databases and users (follow doc in PuppetDB repo,
- To run PuppetDB:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2018 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code-manager : { | |
file-sync : { | |
repo-id : "puppet-code" | |
} | |
environmentdir : "/etc/puppetlabs/code-staging/environments" | |
datadir : "/opt/puppetlabs/server/data/code-manager/" | |
cachedir : "/opt/puppetlabs/server/data/code-manager/cache" | |
authenticate-webhook : true | |
deploy-pool-size : 2 | |
timeouts : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code-manager : { | |
file-sync : { | |
repo-id : "puppet-code" | |
} | |
environmentdir : "/etc/puppetlabs/code-staging/environments" | |
datadir : "/opt/puppetlabs/server/data/code-manager/" | |
cachedir : "/opt/puppetlabs/server/data/code-manager/cache" | |
authenticate-webhook : true | |
deploy-pool-size : 2 | |
timeouts : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*[2016.4.x][~/Projects/code-manager/test]$ bundle update rvm:ruby-2.3.0 | |
Fetching source index from http://rubygems.delivery.puppetlabs.net/ | |
Resolving dependencies... | |
Using rake 12.0.0 | |
Using CFPropertyList 2.3.5 | |
Using addressable 2.4.0 | |
Using json 1.8.6 | |
Using mini_portile2 2.1.0 | |
Using hocon 1.2.4 | |
Using require_all 1.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"----------------------------------------------------------------------- | |
"Andrew's vimrc based on Hunner, BaSS & ciaran | |
"----------------------------------------------------------------------- | |
"----------------------------------------------------------------------- | |
" terminal setup | |
"----------------------------------------------------------------------- | |
" {{{1 | |
" Add path for windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns foo | |
(:require [clojure.java.io :as io] | |
[puppetlabs.puppetdb.reports :as reports] | |
[puppetlabs.puppetdb.cheshire :as json])) | |
(defn update-file-contents [file] | |
[(.getName file) | |
(json/generate-string | |
(reports/wire-v5->wire-v6 | |
(json/parse-string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ur | |
(:require [puppetlabs.puppetdb.examples.reports :as example-reports] | |
[puppetlabs.kitchensink.core :as kitchensink] | |
[puppetlabs.puppetdb.scf.storage-utils :as scf-utils] | |
[clojure.java.jdbc :as jdbc] | |
[puppetlabs.puppetdb.cheshire :as json])) | |
(def skeleton-unchanged-resource | |
{:title "/etc/sysconfig/iptables" | |
:file "/etc/puppetlabs/code/environments/production/modules/firewall/manifests/linux/redhat.pp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT (CASE WHEN certnames.latest_report_id IS NULL THEN 'unreported' | |
/* NOW() would instead be a parameterized value */ | |
WHEN reports.end_time < NOW() - interval '1 hour' THEN 'unresponsive' | |
WHEN reports.noop = TRUE THEN 'noop' | |
ELSE resport_statuses.status | |
END) AS latest_report_status, | |
certnames.certname | |
FROM certnames | |
LEFT JOIN reports ON certnames.latest_report_id = reports.id | |
LEFT JOIN report_statuses ON reports.status_id = report_statuses.id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<<<<<< HEAD | |
def get_package_version(host, version = nil) | |
version = PuppetDBExtensions.config[:package_build_version].to_s | |
# version can look like: | |
# 3.0.0 | |
# 3.0.0.SNAPSHOT.2015.07.08T0945 | |
# Rewrite version if its a SNAPSHOT in rc form | |
if version.include?("SNAPSHOT") |
NewerOlder