Giter VIP home page Giter VIP logo

puppet-nexus's Introduction

Puppet Module for Nexus

This Puppet Module downloads Maven artifacts from a Nexus server. It supports:

  • artifact identification using GAV classifier and packaging
  • repository selection
  • authentication

It relies on the Nexus REST service and on curl.

Getting the module

  • Clone this repository and add it to your modulepath

Usage

# Initialize Nexus
class {'nexus':
	url => "http://edge.spree.de/nexus",
	username => "nexus",
	password => "********"
}

nexus::artifact {'commons-io':
	gav => "commons-io:commons-io:2.1",
	repository => "public",
	output => "/tmp/commons-io-2.1.jar"
}

nexus::artifact {'ipojo':
	gav => "org.apache.felix:org.apache.felix.ipojo:1.8.0",
	repository => "public",
	output => "/tmp/ipojo-1.8.jar"
}

nexus::artifact {'chameleon web distribution':
	gav => "org.ow2.chameleon:distribution-web:0.3.0-SNAPSHOT",
	classifier => 'distribution',
	packaging => 'zip',
	repository => "public-snapshots",
	output => "/tmp/distribution-web-0.3.0-SNAPSHOT.zip",
	timeout => 600,
	owner => 'myuser',
	group => 'mygroup',
	mode => 0755
}

License

This project is licensed under the Apache Software License 2.0.

puppet-nexus's People

Contributors

cescoffier avatar fatmcgav avatar ghimus avatar hseffler avatar jalkjaer avatar karmab avatar xalimar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-nexus's Issues

Unknown "includeClass" variable in artifact file

I'm receiving following error

10:32:40 Puppet::PreformattedError:
10:32:40 Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: 'includeClass'. at /var/SP/cache/jenkins/workspace/GLOBAL_MODULES_PULL_REQUEST/spec/fixtures/modules/nexus/manifests/artifact.pp:52:89 at

If you access below line, you'll see double dollar sign is used.
https://github.com/cescoffier/puppet-nexus/blob/master/manifests/artifact.pp#L52

Could you please correct it and update git.

Missing dependency of snapshots

In /manifests/artifact.pp, a nexus::artifact does run before Exec["Download ${gav}-${classifier}"].
Unfortunately, the Download-naming is different, what causes an error. I will check, if I find the time today to fix it.

Exec line-endings now marks all runs as having changed state

We're using the master branch of this plugin, but since merging 0650767 all our runs are marked as changing state on our clients:

root@snor:~# puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Caching catalog for snor
Info: Applying configuration version '1417083503'
Notice: /Stage[main]/Nexus/Exec[line-endings]/returns: executed successfully
Notice: Finished catalog run in 1.31 seconds

(We're running ubuntu/debian + CentOS clients, for servers, VMs and desktops.)

Is there something we should be doing differently, or should this something you can fix on your end?

Files always replaced on each Nexus run, not just when newer

Current versions of jar files appear to be overwritten on each puppet run in our setup. Do you, or could you, compare the installed version checksum with the checksum stored in Nexus? That'd help when rolling .wars out to Tomcat, to prevent unnecessary reloads.

Does not work in nexus 3.x

You're relying on Nexus Rest API which only support for Nexus 2.x.
Please make it support for Nexus 3.x
Thanks

Int too big to convert when running from OSX with Vagrant

When attempting to use Vagrant on OS X with this module, occasionally encounter the following error from Puppet.

Error: Failed to set group to '4294967295': integer 4294967295 too big to convert to `int'

4294967295 corresponds to my user GID on OS X.

Patch incoming to work-around.

Failure due to curl fetching a 301 code

Using the nexus script, the curl command is fetching a url that returns a 301 from nexus. This redirect points at the correct artifact and if the puppet plugin followed the 301 it would fetch the correct resource.

Does the plugin require something special of Nexus or a minimum version? We are running Nexus 2.0.4.

Otherwise we could suggest an alternative url syntax.

Thanks.

Error Handling

When nexus is down or the artifact is not present, currently the response html file is written as the "output". Maybe we could have the task not update the file in the case of a non 200 on the REST call.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.