Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Itamaecheck #725

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem 'octokit'
gem 'pg'
gem 'puma'
gem 'pundit'
gem 'rails', '~> 5.2.4.6'
gem 'rails', '~> 5.2.7.1'
gem 'sqlite3'
gem 'thor', require: false
gem 'vault'
Expand Down
114 changes: 55 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.6)
actionpack (= 5.2.4.6)
actioncable (5.2.7.1)
actionpack (= 5.2.7.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.6)
actionpack (= 5.2.4.6)
actionview (= 5.2.4.6)
activejob (= 5.2.4.6)
actionmailer (5.2.7.1)
actionpack (= 5.2.7.1)
actionview (= 5.2.7.1)
activejob (= 5.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.6)
actionview (= 5.2.4.6)
activesupport (= 5.2.4.6)
actionpack (5.2.7.1)
actionview (= 5.2.7.1)
activesupport (= 5.2.7.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.6)
activesupport (= 5.2.4.6)
actionview (5.2.7.1)
activesupport (= 5.2.7.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -29,20 +29,20 @@ GEM
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.4.6)
activesupport (= 5.2.4.6)
activejob (5.2.7.1)
activesupport (= 5.2.7.1)
globalid (>= 0.3.6)
activemodel (5.2.4.6)
activesupport (= 5.2.4.6)
activerecord (5.2.4.6)
activemodel (= 5.2.4.6)
activesupport (= 5.2.4.6)
activemodel (5.2.7.1)
activesupport (= 5.2.7.1)
activerecord (5.2.7.1)
activemodel (= 5.2.7.1)
activesupport (= 5.2.7.1)
arel (>= 9.0)
activestorage (5.2.4.6)
actionpack (= 5.2.4.6)
activerecord (= 5.2.4.6)
marcel (~> 0.3.1)
activesupport (5.2.4.6)
activestorage (5.2.7.1)
actionpack (= 5.2.7.1)
activerecord (= 5.2.7.1)
marcel (~> 1.0.0)
activesupport (5.2.7.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand Down Expand Up @@ -107,7 +107,7 @@ GEM
case_transform (0.2)
activesupport
coderay (1.1.2)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.10)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.6)
Expand Down Expand Up @@ -147,11 +147,11 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
gibberish (2.1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalid (1.0.0)
activesupport (>= 5.0)
hashdiff (0.3.8)
honeybadger (4.7.2)
i18n (1.8.10)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jbuilder (2.8.0)
Expand All @@ -164,26 +164,22 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.9.1)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
marcel (1.0.2)
maruku (0.7.3)
method_source (0.9.2)
mimemagic (0.3.10)
nokogiri (~> 1)
rake
mini_mime (1.1.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.14.4)
minitest (5.15.0)
multi_json (1.13.1)
multipart-post (2.1.1)
net-ssh (5.2.0)
nio4r (2.5.8)
nokogiri (1.13.4)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (4.21.0)
Expand All @@ -210,32 +206,32 @@ GEM
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.6)
actioncable (= 5.2.4.6)
actionmailer (= 5.2.4.6)
actionpack (= 5.2.4.6)
actionview (= 5.2.4.6)
activejob (= 5.2.4.6)
activemodel (= 5.2.4.6)
activerecord (= 5.2.4.6)
activestorage (= 5.2.4.6)
activesupport (= 5.2.4.6)
rails (5.2.7.1)
actioncable (= 5.2.7.1)
actionmailer (= 5.2.7.1)
actionpack (= 5.2.7.1)
actionview (= 5.2.7.1)
activejob (= 5.2.7.1)
activemodel (= 5.2.7.1)
activerecord (= 5.2.7.1)
activestorage (= 5.2.7.1)
activesupport (= 5.2.7.1)
bundler (>= 1.3.0)
railties (= 5.2.4.6)
railties (= 5.2.7.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (5.2.4.6)
actionpack (= 5.2.4.6)
activesupport (= 5.2.4.6)
railties (5.2.7.1)
actionpack (= 5.2.7.1)
activesupport (= 5.2.7.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (13.0.3)
rake (13.0.6)
regexp_parser (1.7.1)
request_store (1.4.1)
rack (>= 1.4)
Expand Down Expand Up @@ -307,17 +303,17 @@ GEM
activesupport (>= 4.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (4.0.2)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.0)
stub_env (1.0.4)
rspec (>= 2.0, < 4.0)
thor (1.1.0)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
Expand All @@ -329,7 +325,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yard (0.9.25)
Expand Down Expand Up @@ -366,7 +362,7 @@ DEPENDENCIES
puma
pundit
rack-test
rails (~> 5.2.4.6)
rails (~> 5.2.7.1)
rspec-collection_matchers
rspec-its
rspec-rails
Expand Down
4 changes: 3 additions & 1 deletion lib/barcelona/plugins/itamae_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ def on_container_instance_user_data(_instance, user_data)
def on_network_stack_template(_stack, template)
bastion_lc = template["BastionLaunchConfiguration"]
return template if bastion_lc.nil?
return template unless attributes['recipe_url'] =~ URI::regexp

user_data = InstanceUserData.load_or_initialize(bastion_lc["Properties"]["UserData"])

install_itamae(user_data)
apply_itamae_recipe(user_data, attributes['recipe_url'], 'barcelona_bastion')
bastion_lc["Properties"]["UserData"] = user_data.build
Expand All @@ -30,7 +32,7 @@ def install_itamae(user_data)
redhat-rpm-config
)
user_data.run_commands += <<~EOS.split("\n")
amazon-linux-extras install ruby2.4
amazon-linux-extras install ruby2.6
yum install -y ruby-devel
gem install itamae -v '1.10.6' -N
gem install io-console -N
Expand Down