itamae-plugin-recipe-codedeploy_agent 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0afcb57c1af2e185e64fe691435c8e8c52ce6cc4f4fbc232b065446da3893789
4
+ data.tar.gz: 43db18a3ef4abc1920380ec8942aa4bf433184fa6dd0c96a0dbccdcdecaaa31e
5
+ SHA512:
6
+ metadata.gz: '088fcb70e2062fc08e4c28cfe2ecbe7ce91df2e28aeecdaed25056e88f84c093b1ffe51b85df1943d23df3153d316d049ef0e85c4d8ff2172741ad9b89e5a9a2'
7
+ data.tar.gz: d41ff949ad0d6b83c4db09fb96657bedd90b4b1c96ebd82519ee378580cf5adf43833ad0b98835bb144242c9311306ae400e0d936fe2a43eaeb108d258276bc6
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in itamae-plugin-recipe-codedeploy_agent.gemspec
6
+ gemspec
@@ -0,0 +1,10 @@
1
+ # Itamae::Plugin::Recipe::CodedeployAgent
2
+
3
+ A recipe to install aws codedeploy agent to amazon linux instance.
4
+ Follows the procedure of https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html
5
+
6
+ ## How to Use
7
+
8
+ ```
9
+ include_recipe 'codedeploy_agent'
10
+ ```
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "itamae/plugin/recipe/codedeploy_agent"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,34 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "itamae/plugin/recipe/codedeploy_agent/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "itamae-plugin-recipe-codedeploy_agent"
8
+ spec.version = Itamae::Plugin::Recipe::CodedeployAgent::VERSION
9
+ spec.authors = ["Yuki Inoue"]
10
+ spec.email = ["inoueyuworks@gmail.com"]
11
+
12
+ spec.summary = %q{Itamae recipe for installing codedeploy-agent on amazon linux}
13
+ # spec.description = %q{}
14
+ spec.homepage = "https://github.com/Yuki-Inoue/itamae-plugin-recipe-codedeploy_agent"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.16"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ end
@@ -0,0 +1,32 @@
1
+ require "itamae/plugin/recipe/codedeploy_agent/version"
2
+
3
+ execute 'install codedeploy agent' do
4
+ region = node[:aws_region]
5
+
6
+ command <<~INSTALLATION
7
+ REGION="#{region}"
8
+ if [ "$REGION" = "" ]
9
+ then
10
+ REGION=$(
11
+ curl http://169.254.169.254/latest/meta-data/placement/availability-zone |
12
+ sed -e 's/[a-z]$//' )
13
+ fi
14
+
15
+ sudo yum update
16
+ sudo yum install ruby
17
+ sudo yum install wget
18
+
19
+ cd /home/ec2-user
20
+ wget https://aws-codedeploy-"${REGION}".s3.amazonaws.com/latest/install
21
+ chmod +x ./install
22
+ sudo ./install auto
23
+ INSTALLATION
24
+
25
+ not_if <<~TEST_SHELL
26
+ if ! sudo service codedeploy-agent status
27
+ then
28
+ sudo service codedeploy-agent start &&
29
+ sudo service codedeploy-agent status
30
+ fi
31
+ TEST_SHELL
32
+ end
@@ -0,0 +1,9 @@
1
+ module Itamae
2
+ module Plugin
3
+ module Recipe
4
+ module CodedeployAgent
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itamae-plugin-recipe-codedeploy_agent
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yuki Inoue
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-05-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - inoueyuworks@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - bin/console
53
+ - bin/setup
54
+ - itamae-plugin-recipe-codedeploy_agent.gemspec
55
+ - lib/itamae/plugin/recipe/codedeploy_agent.rb
56
+ - lib/itamae/plugin/recipe/codedeploy_agent/version.rb
57
+ homepage: https://github.com/Yuki-Inoue/itamae-plugin-recipe-codedeploy_agent
58
+ licenses: []
59
+ metadata:
60
+ allowed_push_host: https://rubygems.org
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.7.6
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Itamae recipe for installing codedeploy-agent on amazon linux
81
+ test_files: []