Giter VIP home page Giter VIP logo

deploy's Introduction

#puppet-deploy Build Status ##Overview

This module downloads and extracts compressed files to a specific directory.

The following archives are supported:

  • .tar.gz
  • .tgz
  • .tar.bz2
  • .tar.xz

###Setup Requirements

##Usage

    # Set the default temp directory to use
    class { 'deploy':
      tempdir => '/opt/deploy'
    }

    # Deploy Java tar file
    deploy::file { 'jdk-7u21-linux-x64.tar.gz':
      target  => '/opt/development-tools/java/jdk1.7.0_21',
      url     => 'http://mywebsite.co.za/development-tools/java',
      strip   => true,
    }
  
    # Deploy another tar file
    deploy::file { 'jdk-8-ea-bin-b90-linux-x64-16_may_2013.tar.gz':
      target  => '/opt/development-tools/java/jdk1.8.0_b90',
      url     => 'http://server.co.za/development-tools/java/',
      strip   => true,
    }

    deploy::file { 'apache-maven-3.0.5-bin.tar.gz':
      target  => '/opt/development-tools/apache-maven',
      url     => 'http://server/pub/apache-maven/',
      strip   => true
      version => '1',
      package => 'maven'
    }

###Classes:

  • deploy - set the default working directory.

###Definitions:

  • deploy::file - Deploy a compressed file to a target directory.

Common Parameters

target

  • The target directory to decompress the archive file too.
  • This parameter is required

url

  • The URL where the file can be downloaded from.
  • This parameter is required. Do no specify the file name in the URL.
  • For testing purpose, the module can handle URLs in from file:///... and puppet:///... style. You must not specify the file name with this URLs either.

owner

  • Define which user will owner deployed files. You need to declare this user.

group

  • Define which group will owner deployed files. You need to declare this group.
  • Defaults to undefined

strip

  • Strip root directory from archive file
  • Defaults to 'false'

strip_level

  • Levels to strip from root directory from archive file
  • Defaults to '1'

version

  • Define an arbitrary version number for the tar file. Must be an integer.
  • WARNING: Incrementing this version number removes target directory and and redeploys tar file. Both version and package must be defined.
  • Defaults to undefined

package

  • define an arbitrary package name for the tar file.
  • creates a static fact [package]_version in /etc/facter/facts.d/ with file name [package].yaml. Both version and package must be defined.
  • Defaults to undefined
  • requires facter 1.7.x
  • requires the /etc/facter/facts.d/ directory structure to be in place.

If you decide to use the version and package parameters you get to keep both pieces if it breaks. I certainly don't recommend managing packages this way.

##Limitations

  • I'm sure there are many

###Supported Operating Systems:

  • Ubuntu (12.04 LTS tested)
  • Red Hat family (RHEL 5 and 6 tested)

##Testing Using puppetlabs_spec_helper. Simply run:

bundle install && bundle exec rake spec

to get results.

/usr/bin/ruby1.9.1 -S rspec spec/defines/deploy_files_spec.rb --color
ldapname is deprecated and will be removed in a future version
.

Finished in 0.16558 seconds
1 example, 0 failures

##Development

  • Copyright (C) 2013 Merritt Krakowitzer - [email protected]
  • Distributed under the terms of the Apache License, Version 2.0.
  • Please submit a pull request or issue on GitHub

Contributors

  • Jonathan Johnson
  • Andreyev Dias de Melo

deploy's People

Contributors

mkrakowitzer avatar jrjohnson avatar awegmann avatar

Watchers

Christopher Caldwell avatar

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.