This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#10804) add puppet manifest to install cfn client tools
This module should be able to install its required cfn client tools. The installation should be implemented in puppet. Adds cloudformation installation manifests. Add dependency get_module_path function (this will need to be removed if it gets accepted into stdlib) Add templates used to create cfn installation bashrc and credential file. add local aws-credentials to .gitignore update README with new installation instructions
- Loading branch information
Dan Bode
committed
Nov 14, 2011
1 parent
df8fd23
commit a8715e4
Showing
10 changed files
with
127 additions
and
522 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
AWSCloudFormation-* | ||
bashrc_cfn | ||
aws_credentials |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class { 'cloudformation': | ||
aws_access_key => '< your key here >', | ||
aws_secret_key => '< your secret key here >' | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Puppet::Parser::Functions | ||
newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT | ||
Given the name of a module as the argument, returns the path | ||
of the module for the current environment. | ||
EOT | ||
) do |args| | ||
raise(Puppet::ParseError, "get_module_name(): Wrong number of arguments, expects one") unless args.size == 1 | ||
if module_path = Puppet::Module.find(args[0], compiler.environment.to_s) | ||
module_path.path | ||
else | ||
raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}") | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
class cloudformation( | ||
$aws_access_key, | ||
$aws_secret_key, | ||
$base_dir = get_module_path($module_name), | ||
$aws_credential_file = "${base_dir}/aws_credentials", | ||
$java_home = '/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home', | ||
$cfn_version = '1.0.9' | ||
) { | ||
exec { 'download_cloudformation_client': | ||
command => '/usr/bin/curl -o AWSCloudFormation-cli.zip https://s3.amazonaws.com/cloudformation-cli/AWSCloudFormation-cli.zip', | ||
cwd => $base_dir, | ||
creates => "${base_dir}/AWSCloudFormation-cli.zip", | ||
}~> | ||
exec { 'unzip_cfn_client': | ||
command => '/usr/bin/unzip AWSCloudFormation-cli.zip', | ||
cwd => $base_dir, | ||
refreshonly => true, | ||
creates => "${base_dir}/AWSCloudFormation-#{cfn_version}", | ||
} | ||
file { $aws_credential_file: | ||
content => template('cloudformation/credential-file.erb'), | ||
} | ||
file { "${base_dir}/bashrc_cfn": | ||
content => template('cloudformation/bashrc_cfn.erb'), | ||
} | ||
} |
Oops, something went wrong.