Skip to content

Commit

Permalink
(PDB-663) Convert PuppetDB to Ezbake build system
Browse files Browse the repository at this point in the history
This significant patch introduces Ezbake to PuppetDB, providing all the
required changes and some cleanups as well to make this possible:

* Of note, the old system is still around, until we work out how to do source
  based installations of PuppetDB in this new world. This will be done as
  another piece of work separately.
* CONTRIBUTING.md has been updated to the latest version from Puppet
* ERRATA.md has been removed, we have a ticket tracker
* Some changes we did on the old system:
 * Dependencies on latest Puppet & Facter have been changed in older system
 * Pathing updated to reflect closer to ezbake
* Debian 6 & Ubuntu 10.04 have been retired. We made this decision due to the
  reluctance to transfer the java lookup code in /etc/default/puppetdb into
  ezbake. Since this code is required to support Oracle JDK installation of
  Java 7, retirement was inevitable. Since these versions of the distros are
  nearly end of life anyway, we gave our users a stepping stone, by providing
  this in the first place, we feel this was an okay move.
* All beaker tests have been modified to work in an ezbake world.
* We've decided to use the nrepl trapperkeeper service now, to avoid conflicts
  and to finally shed that old code. We have updated the code and documentation
  to reflect this, and we provide a warning if users use the old [repl] block.
  Instead users must define the [nrepl] block, and it is no longer possible to
  choose a `type` of repl service.
* The package `puppetdb-terminus` is now called `puppetdb-terminii` and we've
  changed the references in code and docs to use this now. A module change will
  be required at some point, but this work is separate.
* Beaker tests are now in a script shipped with the project for Jenkins to use.
* Binaries are now installed in /usr/bin instead of /usr/sbin as per the ezbake
  standards.
* Lots of template files were transferred into resource/ext, this is what ezbake
  expects.
* Documentation has moved inside /usr/share/puppetdb/docs to a new location
  depending on the distribution. This is to follow the ezbake standards.
* project.clj was updated to make ezbake work, and to fix some warnings from lein
  deploy.
* A lot of softlinks were removed from /usr/share/puppetdb, that were pointing
  at the /var/lib/puppetdb & /etc/puppetdb/ spaces, I believe this was a partially
  completed migration from the past. The module for example had to be updated, so
  only the puppetdb module 4.1.0 will even work once we ship this.

Signed-off-by: Ken Barber <ken@bob.sh>
  • Loading branch information
kbarber committed Nov 18, 2014
1 parent e5ad4d6 commit 39dc9b7
Show file tree
Hide file tree
Showing 68 changed files with 989 additions and 470 deletions.
84 changes: 58 additions & 26 deletions CONTRIBUTING.md
@@ -1,7 +1,15 @@
# How to contribute

* Visit the [PuppetDB board on Trello](http://links.puppetlabs.com/puppetdb-trello)
* Make sure you have a [Redmine account](http://projects.puppetlabs.com)
Third-party patches are essential for keeping puppet great. We simply can't
access the huge number of platforms and myriad configurations for running
puppet. We want to keep it as easy as possible to contribute changes that
get things working in your environment. There are a few guidelines that we
need contributors to follow so that we can have a chance of keeping on
top of things.

## Getting Started

* Make sure you have a [Jira account](http://tickets.puppetlabs.com)
* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
Expand All @@ -10,47 +18,71 @@

## Making Changes

* Create a branch off of the branch you want to base off of.
* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master; `git checkout -b
fix/master/my_contribution master`. Please avoid working directly on the
`master` branch.
* Make commits of logical units.
* Check for unnecessary whitespace with "git diff --check" before committing.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format.

````
(#Ticket Number) What you are changing with this commit
(PUP-1234) Make the example in CONTRIBUTING imperative and concrete
Describe what happened before. Describe the change in behavior that this
commit makes.
Without this patch applied the example commit message in the CONTRIBUTING
document is not a concrete example. This is a problem because the
contributor is left to imagine what the commit message should look like
based on a description rather than an example. This patch fixes the
problem by making the example concrete and imperative.
The first line is a real life imperative statement with a ticket number
from our issue tracker. The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
````

* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.

## Making Trivial Changes

### Documentation

For changes of a trivial nature to comments and documentation, it is not
always necessary to create a new ticket in Jira. In this case, it is
appropriate to start the first line of a commit with '(doc)' instead of
a ticket number.

````
(doc) Add documentation commit example to CONTRIBUTING
There is no example for contributing a documentation commit
to the Puppet repository. This is a problem because the contributor
is left to assume how a commit of this nature may appear.
The first line is a real life imperative statement with '(doc)' in
place of what would have been the ticket number in a
non-documentation related commit. The body describes the nature of
the new documentation or comments added.
````

## Submitting Changes

* Sign the [Contributor License Agreement](https://cla.puppetlabs.com/).
* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).
* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository in the puppetlabs organization.
* Update your Redmine ticket to mark that you have submitted code.

## Database Schema Changes

* When making any changes that will modify the schema of the underlying database,
great caution should be exercised.
* Except in very rare circumstances (crucial bug fixes or performance improvements),
these types of changes should only be made in the master branch. Older release
branches should not introduce database schema changes unless absolutely
necessary.
* In these rare circumstances where a schema change must be made against more
than one branch of the code, see the notes at the beginning of the file
`src/puppetlabs/puppetdb/scf/migrate.clj` on this subject. Exercise extreme
caution to make sure that you are adhering to the guidelines therein.
* Update your Jira ticket to mark that you have submitted code and are ready for it to be reviewed (Status: Ready for Merge).
* Include a link to the pull request in the ticket.
* After feedback has been given we expect responses within two weeks. After two
weeks will may close the pull request if it isn't showing any activity.

# Additional Resources

* [More information on contributing](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Lifecycle)
* [Bug tracker (Redmine)](http://projects.puppetlabs.com)
* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet)
* [Bug tracker (Jira)](http://tickets.puppetlabs.com)
* [Contributor License Agreement](http://links.puppetlabs.com/cla)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* #puppet-dev IRC channel on freenode.org
9 changes: 0 additions & 9 deletions ERRATA.md

This file was deleted.

62 changes: 25 additions & 37 deletions Rakefile
Expand Up @@ -44,16 +44,10 @@ if defined?(Pkg) and defined?(Pkg::Config)
end
@version = Pkg::Config.version
else
begin
%x{which git >/dev/null 2>&1}
if $?.success?
@version = %x{git describe --always --dirty}
if $?.success?
@version.chomp!
end
end
@version = begin
%x{lein with-profile ci pprint :version | tail -n 1 | cut -d\" -f2}.chomp
rescue
@version = "0.0-dev-build"
"0.0-dev-build"
end
if ENV['PE_BUILD'] and ENV['PE_BUILD'].downcase == 'true'
@pe = TRUE
Expand All @@ -65,8 +59,8 @@ ENV['PATH'] = "/opt/puppet/bin:" + ENV['PATH'] if @pe
@osfamily = (Facter.value(:osfamily) || "").downcase

# Specific minimum pinning for Puppet & Facter versions
@puppetminversion = "3.5.1"
@facterminversion = "1.7.0"
@puppetminversion = "3.7.3"
@facterminversion = "2.3.0"

if @pe
@install_dir = "/opt/puppet/share/puppetdb"
Expand All @@ -79,31 +73,26 @@ if @pe
@pe_version = ENV['PE_VER'] || '3.0'
@java_bin = "/opt/puppet/bin/java"
else
@install_dir = case @osfamily
when /openbsd/
"/usr/local/share/puppetdb"
else
"/usr/share/puppetdb"
end
@etc_dir = "/etc/puppetdb"
@config_dir = "/etc/puppetdb/conf.d"
@lib_dir = "/var/lib/puppetdb"
@libexec_dir = case @osfamily
when /openbsd/
"/usr/local/libexec/puppetdb"
when /redhat/, /suse/, /darwin/, /bsd/
"/usr/libexec/puppetdb"
else
"/usr/lib/puppetdb"
end
@link = "/usr/share/puppetdb"
@name = "puppetdb"
@sbin_dir = case @osfamily
when /archlinux/
"/usr/bin"
else
"/usr/sbin"
end
@install_dir = case @osfamily
when /openbsd/
"/usr/local/share/puppetdb"
else
"/usr/share/puppetdb"
end
@etc_dir = "/etc/puppetdb"
@config_dir = "/etc/puppetdb/conf.d"
@lib_dir = "/var/lib/puppetdb"
@libexec_dir = case @osfamily
when /openbsd/
"/usr/local/libexec/puppetdb"
when /redhat/, /suse/, /darwin/, /bsd/
"/usr/libexec/puppetdb"
else
"/usr/lib/puppetdb"
end
@link = "/usr/share/puppetdb"
@name = "puppetdb"
@sbin_dir = "/usr/bin"
end

@initscriptname = "/etc/init.d/#{@name}"
Expand All @@ -116,7 +105,6 @@ PATH = ENV['PATH']
DESTDIR= ENV['DESTDIR'] || ''
PE_SITELIBDIR = "/opt/puppet/lib/ruby/site_ruby/1.9.1"


case @osfamily
when /debian/
@plibdir = @pe ? PE_SITELIBDIR : '/usr/lib/ruby/vendor_ruby'
Expand Down
23 changes: 0 additions & 23 deletions acceptance/config/ec2-west-debian6-64mda-64a.cfg

This file was deleted.

23 changes: 0 additions & 23 deletions acceptance/config/ec2-west-ubuntu1004-64mda-64a.cfg

This file was deleted.

22 changes: 0 additions & 22 deletions acceptance/config/vbox-debian6-64mda-64a.cfg

This file was deleted.

22 changes: 0 additions & 22 deletions acceptance/config/vbox-ubuntu1004-64mda-64a.cfg

This file was deleted.

0 comments on commit 39dc9b7

Please sign in to comment.