Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 2.76 KB

README.md

File metadata and controls

84 lines (60 loc) · 2.76 KB

Dataloop-agent Puppet Module

This is a puppet module that installs the dataloop-agent on a host. It makes use of the puppetlabs apt module and the dataloop.io public yum and apt repositories.

Requirements

  • Tested on puppet 3.7.3
  • Puppetlabs-apt module

Platforms

  • Ubuntu 10.04, 12.04, 14.04
  • Rhel/Centos >= 6

Usage

If you don't already have it, import the puppetlabs-apt module to your puppet repository

#> puppet module install puppetlabs-apt --version 1.7.0

And import this dataloop-agent module. Since the module only exists on GitHub we manually download the source and install it to the users modulepath. The REVISION can be a commit, branch or tag.

#> cd [MODULEPATH]
#> curl -L https://github.com/dataloop/dataloop-puppet/archive/[REVISION].tar.gz | sudo tar xz
#> mv dataloop-puppet-[REVISION] dataloop_agent

Add the dataloop-agent module to your node's run list and pass in the api_key for your dataloop.io account so that your servers can communicate back.

class { 'dataloop_agent': 
  api_key => 'fa970ce7-de56-4b98-915f-bb7d828c68d2'
}

By default, in the dataloop-agent packages the init script will deregister the agent on service stop.

To override this behaviour, set the deregistration variable to 'no'. See attribute:

$deregister_onstop = 'no'

Tags

You can pass a comma separated list of tag values to the dataloop-agent module

tags => 'prod,mysql,database'

Otherwise, after the agent has run once (to generate a fingerprint) you can run the following command to add tags.

#> /usr/bin/dataloop-agent -a [api key] -s https://www.dataloop.io --add-tags [tag1,tag2,tag3]

You can sprinkle these around your various modules so that dataloop dynamically updates on puppet runs. You can also use --remove-tags to take tags away.

Testing

Testing for this module has been setup with Librarian-puppet and Test-Kitchen utilising vagrant as the machine provider.

Clone the repository, install the Gems (gem file to come), update the api_key in manifests/test_site.pp and run kitchen test.

#> bundle install
#> kitchen test

Contributing

Pull requests welcome.

License and Authors

Author: Tom Ashley [email protected]

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, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.