forger 1.6.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +30 -38
- data/README.md +49 -53
- data/docs/example/app/{user-data → user_data}/bootstrap.sh +0 -0
- data/forger.gemspec +1 -1
- data/lib/forger.rb +16 -12
- data/lib/forger/cli.rb +10 -4
- data/lib/forger/core.rb +8 -0
- data/lib/forger/create.rb +3 -1
- data/lib/forger/create/error_messages.rb +2 -2
- data/lib/forger/create/info.rb +18 -3
- data/lib/forger/create/waiter.rb +20 -4
- data/lib/forger/help/compile.md +1 -1
- data/lib/forger/help/create.md +6 -0
- data/lib/forger/help/new.md +33 -0
- data/lib/forger/help/upload.md +1 -1
- data/lib/forger/hook.rb +1 -1
- data/lib/forger/network.rb +48 -0
- data/lib/forger/new.rb +75 -0
- data/lib/forger/script.rb +1 -1
- data/lib/forger/script/compress.rb +1 -1
- data/lib/forger/script/templates/extract_forger_scripts.sh +20 -0
- data/lib/forger/script/upload.rb +15 -1
- data/lib/forger/scripts/auto_terminate/functions.sh +2 -1
- data/lib/forger/scripts/auto_terminate/functions/{amazonlinux2.sh → amzn.sh} +0 -0
- data/lib/forger/scripts/auto_terminate/functions/amzn2.sh +10 -0
- data/lib/forger/scripts/cloudwatch/install/{amazonlinux2.sh → amzn.sh} +0 -0
- data/lib/forger/scripts/cloudwatch/install/amzn2.sh +4 -0
- data/lib/forger/scripts/cloudwatch/service/amzn.sh +16 -0
- data/lib/forger/scripts/cloudwatch/service/{amazonlinux2.sh → amzn2.sh} +0 -0
- data/lib/forger/scripts/shared/functions.sh +1 -1
- data/lib/forger/sequence.rb +25 -0
- data/lib/forger/template/helper/core_helper.rb +21 -12
- data/lib/forger/template/helper/script_helper.rb +1 -1
- data/lib/forger/version.rb +1 -1
- data/lib/templates/default/.env.example +1 -0
- data/lib/templates/default/.gitignore +2 -0
- data/lib/templates/default/Gemfile +3 -0
- data/lib/templates/default/README.md +61 -0
- data/lib/templates/default/app/helpers/application_helper.rb +12 -0
- data/lib/templates/default/app/scripts/install/common.sh +14 -0
- data/lib/templates/default/app/scripts/personalize/tung.sh +3 -0
- data/lib/templates/default/app/scripts/shared/functions.sh +22 -0
- data/lib/templates/default/app/user_data/bootstrap.sh.tt +12 -0
- data/lib/templates/default/app/user_data/layouts/default.sh.tt +17 -0
- data/lib/templates/default/config/development.yml.tt +6 -0
- data/lib/templates/default/config/settings.yml.tt +25 -0
- data/lib/templates/default/profiles/default.yml.tt +41 -0
- data/spec/fixtures/demo_project/app/{user-data → user_data}/bootstrap.sh +0 -0
- data/spec/lib/core_helper_spec.rb +19 -0
- data/spec/spec_helper.rb +0 -4
- metadata +34 -12
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash -exu
|
2
|
+
|
3
|
+
cat > /etc/init/awslogs.conf <<- EOL
|
4
|
+
#upstart-job
|
5
|
+
description "Configure and start CloudWatch Logs agent on Amazon instance"
|
6
|
+
author "BoltOps"
|
7
|
+
start on runlevel [2345]
|
8
|
+
|
9
|
+
script
|
10
|
+
exec 2>>/var/log/cloudwatch-logs-start.log
|
11
|
+
set -x
|
12
|
+
|
13
|
+
service awslogs start
|
14
|
+
chkconfig awslogs on
|
15
|
+
end script
|
16
|
+
EOL
|
File without changes
|
@@ -56,7 +56,7 @@ function os_name() {
|
|
56
56
|
# https://askubuntu.com/questions/459402/how-to-know-if-the-running-platform-is-ubuntu-or-centos-with-help-of-a-bash-scri
|
57
57
|
# Method 1 works for amazonlinux and ubuntu
|
58
58
|
# Method 3 the complex script, did not work for amazonlinux
|
59
|
-
OS=$(gawk -F= '/^
|
59
|
+
OS=$(gawk -F= '/^ID=/{print $2}' /etc/os-release)
|
60
60
|
fi
|
61
61
|
|
62
62
|
OS="${OS// /}" # remove spaces
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'colorize'
|
3
|
+
require 'active_support/core_ext/string'
|
4
|
+
require 'thor'
|
5
|
+
require 'bundler'
|
6
|
+
|
7
|
+
class Forger::Sequence < Thor::Group
|
8
|
+
include Thor::Actions
|
9
|
+
# include Forger::Helper
|
10
|
+
|
11
|
+
def self.source_root
|
12
|
+
template = ENV['TEMPLATE'] || 'default'
|
13
|
+
File.expand_path("../../templates/#{template}", __FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def copy_project
|
18
|
+
puts "Creating new forger project called #{project_name}."
|
19
|
+
directory ".", project_name
|
20
|
+
end
|
21
|
+
|
22
|
+
def git_installed?
|
23
|
+
system("type git > /dev/null")
|
24
|
+
end
|
25
|
+
end
|
@@ -4,16 +4,14 @@ require "erb"
|
|
4
4
|
module Forger::Template::Helper::CoreHelper
|
5
5
|
# assuming user-data script is a bash script for simplicity for now
|
6
6
|
def user_data(name, base64:true, layout:"default")
|
7
|
-
|
8
|
-
if File.exist?(name)
|
9
|
-
name = File.basename(name) # normalize name, change path to name
|
10
|
-
end
|
11
|
-
name = File.basename(name, '.sh')
|
12
|
-
|
7
|
+
name = normalize_user_data_name_input(name)
|
13
8
|
layout_path = layout_path(layout)
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
|
10
|
+
path = "#{Forger.root}/app/user_data/#{name}"
|
11
|
+
unless File.exist?(path)
|
12
|
+
puts "ERROR: user-data script #{path.colorize(:red)} does not exist"
|
13
|
+
exit
|
14
|
+
end
|
17
15
|
result = RenderMePretty.result(path, context: self, layout: layout_path)
|
18
16
|
# Must prepend and append scripts in user_data here because we need to
|
19
17
|
# encode the user_data script for valid yaml to load in the profile.
|
@@ -43,7 +41,7 @@ module Forger::Template::Helper::CoreHelper
|
|
43
41
|
|
44
42
|
ext = File.extname(name)
|
45
43
|
name += ".sh" if ext.empty?
|
46
|
-
layout_path = "#{Forger.root}/app/
|
44
|
+
layout_path = "#{Forger.root}/app/user_data/layouts/#{name}"
|
47
45
|
|
48
46
|
# special rule for default in case there's no default layout
|
49
47
|
if name.include?("default") and !File.exist?(layout_path)
|
@@ -78,9 +76,13 @@ module Forger::Template::Helper::CoreHelper
|
|
78
76
|
end
|
79
77
|
|
80
78
|
private
|
79
|
+
def cloudwatch_enabled?
|
80
|
+
Forger.cloudwatch_enabled?(@options)
|
81
|
+
end
|
82
|
+
|
81
83
|
# TODO: move script combining logic into class
|
82
84
|
def prepend_scripts(scripts)
|
83
|
-
scripts.unshift(script.cloudwatch) if
|
85
|
+
scripts.unshift(script.cloudwatch) if cloudwatch_enabled?
|
84
86
|
scripts.unshift(script.auto_terminate_after_timeout) if @options[:auto_terminate]
|
85
87
|
add_setup_script(scripts, :prepend)
|
86
88
|
scripts
|
@@ -97,7 +99,7 @@ private
|
|
97
99
|
return if @already_setup
|
98
100
|
@already_setup = true
|
99
101
|
|
100
|
-
requires_setup =
|
102
|
+
requires_setup = cloudwatch_enabled? ||
|
101
103
|
@options[:auto_terminate] ||
|
102
104
|
@options[:ami_name]
|
103
105
|
|
@@ -126,4 +128,11 @@ private
|
|
126
128
|
self.class.send :include, module_name.constantize
|
127
129
|
end
|
128
130
|
end
|
131
|
+
|
132
|
+
private
|
133
|
+
def normalize_user_data_name_input(name)
|
134
|
+
ext = File.extname(name)
|
135
|
+
name += ".sh" if ext.empty?
|
136
|
+
name
|
137
|
+
end
|
129
138
|
end
|
@@ -34,7 +34,7 @@ private
|
|
34
34
|
def check_s3_folder_settings!
|
35
35
|
return if settings["s3_folder"]
|
36
36
|
|
37
|
-
puts "
|
37
|
+
puts "The extract_scripts helper method aws called. It requires the s3_folder to be set at:"
|
38
38
|
lines = caller.reject { |l| l =~ %r{lib/forger} } # hide internal forger trace
|
39
39
|
puts " #{lines[0]}"
|
40
40
|
|
data/lib/forger/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
KEY1=examplevalue1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# EC2 Profiles
|
2
|
+
|
3
|
+
This folder contains EC2 profile files that can be used with the [forger](https://github.com/tongueroo/forger) tool to quickly launch EC2 instances consistently with some pre-configured settings.
|
4
|
+
|
5
|
+
## Generate a Forger Project
|
6
|
+
|
7
|
+
forger new ec2 # project name is ec2
|
8
|
+
cd ec2
|
9
|
+
|
10
|
+
## EC2 Box
|
11
|
+
|
12
|
+
To create an AWS EC2 instance you can run:
|
13
|
+
|
14
|
+
forger create box
|
15
|
+
|
16
|
+
This launches an instance.
|
17
|
+
|
18
|
+
Note, you can run forger with `--noop` mode to preview the user-data script that the instance will launch with:
|
19
|
+
|
20
|
+
forger create box --noop
|
21
|
+
|
22
|
+
## S3 App Scripts
|
23
|
+
|
24
|
+
The generated starter project creates some example `app/scripts` files. The `app/scripts` are disabled until you configure the `s3_folder` setting `config/settings.yml` the `s3_folder` setting.
|
25
|
+
|
26
|
+
The `app/scripts` files get uploaded to s3 as part of the `forger create` command. You can use it in conjunction with the `extract_scripts` helper method in your user-data file. The `extract_scripts` helper generates a snippet of bash code that downloads and untars the files so user-data has access to the scripts. The scripts are extracted to `/opt/scripts` by default. Be sure to add extract_scripts to your user-data script.
|
27
|
+
|
28
|
+
You can also specify the `--s3-folder` option as part of the `forger new` command to spare you from manually editing all the necessary files like `config/settings.yml` and the user-data scripts.
|
29
|
+
|
30
|
+
### CloudWatch Support
|
31
|
+
|
32
|
+
You can also have forger insert a script to the generated user-data script that sends logs to CloudWatch with the `--cloudwatch` option.
|
33
|
+
|
34
|
+
forger create box
|
35
|
+
|
36
|
+
It is useful to verify that the instance has launched and completed its bootstrapping scripting successfully with cloudwatch. The command above should show you a cloudwatch log url to visit. Here's an example with the output filtered to put the focus on the cloudwatch log message:
|
37
|
+
|
38
|
+
$ forger create box --cloudwatch
|
39
|
+
...
|
40
|
+
Spot instance request id: sir-sb5r4e1j
|
41
|
+
EC2 instance box created: i-03f3c96eaec8ea359 🎉
|
42
|
+
Visit https://console.aws.amazon.com/ec2/home to check on the status
|
43
|
+
To view instance's cloudwatch logs visit:
|
44
|
+
https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=ec2;stream=i-03f3c96eaec8ea359/var/log/cloud-init-output.log
|
45
|
+
cw tail -f ec2 i-03f3c96eaec8ea359/var/log/cloud-init-output.log
|
46
|
+
Note: It takes a little time for the instance to launch and report logs.
|
47
|
+
Pro tip: The CloudWatch Console Link has been added to your copy-and-paste clipboard.
|
48
|
+
$
|
49
|
+
|
50
|
+
Note, it is detected that the [cw](https://github.com/lucagrulla/cw) tool installed on your machine it will also add that message. The cw is a command line tool that allows you to tail the cloudwatch log from the terminal instead of the AWS console website.
|
51
|
+
|
52
|
+
## Setup .env File
|
53
|
+
|
54
|
+
There are some settings that are environment specific. To configure these, copy the [.env.example](.env.example) file to `.env` and update them with your specific values.
|
55
|
+
|
56
|
+
You can have multiple .env files. The load in this order of precedence. You are able to reference these values in the `config/[FORGER_ENV].yml` files with ERB.
|
57
|
+
|
58
|
+
1. .env.[FORGER_ENV].local
|
59
|
+
2. .env.local
|
60
|
+
3. .env.[FORGER_ENV]
|
61
|
+
4. .env
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ApplicationHelper
|
2
|
+
def personalize_script
|
3
|
+
path = File.expand_path("../../scripts/personalize/#{ENV['USER']}.sh", __FILE__)
|
4
|
+
if File.exist?(path)
|
5
|
+
script =<<EOL
|
6
|
+
#######################################
|
7
|
+
# personalize script added by ApplicationHelper#personalize_script for #{ENV['USER']}
|
8
|
+
/opt/scripts/personalize/tung.sh
|
9
|
+
EOL
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash -exu
|
2
|
+
|
3
|
+
# https://forums.aws.amazon.com/thread.jspa?threadID=270511
|
4
|
+
(
|
5
|
+
cd /tmp
|
6
|
+
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
7
|
+
yum install -y ./epel-release-latest-7.noarch.rpm
|
8
|
+
)
|
9
|
+
|
10
|
+
source /opt/scripts/shared/functions.sh
|
11
|
+
install_jq
|
12
|
+
|
13
|
+
# Some useful tools
|
14
|
+
yum install -y tree vim less
|
@@ -0,0 +1,22 @@
|
|
1
|
+
function install_jq() {
|
2
|
+
if ! type jq > /dev/null ; then
|
3
|
+
wget "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64"
|
4
|
+
mv jq-linux64 /usr/local/bin/jq
|
5
|
+
chmod a+x /usr/local/bin/jq
|
6
|
+
fi
|
7
|
+
}
|
8
|
+
|
9
|
+
function configure_aws_cli() {
|
10
|
+
local home_dir=$1
|
11
|
+
# Configure aws cli in case it is not yet configured
|
12
|
+
mkdir -p "$home_dir/.aws"
|
13
|
+
if [ ! -f "$home_dir/.aws/config" ]; then
|
14
|
+
EC2_AVAIL_ZONE=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
15
|
+
EC2_REGION=${EC2_AVAIL_ZONE::-1}
|
16
|
+
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
17
|
+
[default]
|
18
|
+
region = $EC2_REGION
|
19
|
+
output = json
|
20
|
+
CONFIGURE_AWS_CLI
|
21
|
+
fi
|
22
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if @options[:s3_folder] -%>
|
2
|
+
# setup: shared functions, path, awscli, etc
|
3
|
+
source /opt/scripts/shared/functions.sh
|
4
|
+
export PATH=/usr/local/bin/:$PATH
|
5
|
+
configure_aws_cli /root
|
6
|
+
configure_aws_cli /home/ec2-user
|
7
|
+
|
8
|
+
# install software
|
9
|
+
/opt/scripts/install/common.sh
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%%= personalize_script %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash -exu
|
2
|
+
|
3
|
+
export HOME=/root # In user-data env USER=root but HOME is not set
|
4
|
+
cd ~ # user-data starts off in / so go to $HOME
|
5
|
+
|
6
|
+
<%%= add_ssh_key %>
|
7
|
+
|
8
|
+
<% if options[:s3_folder] -%>
|
9
|
+
<%%= extract_scripts(to: "/opt") %>
|
10
|
+
<% else -%>
|
11
|
+
# Uncomment to use extract_scripts and use app/scripts
|
12
|
+
<%%# extract_scripts(to: "/opt") %>
|
13
|
+
<% end -%>
|
14
|
+
|
15
|
+
<%%= yield %>
|
16
|
+
|
17
|
+
uptime | tee /var/log/boot-time.log
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
base:
|
3
|
+
# cloudwatch: true # forger create --cloudwatch # TODO: add to docs
|
4
|
+
|
5
|
+
# Settings control internal forger behavior.
|
6
|
+
# Settings are different from the config files. The config files are meant to
|
7
|
+
# expose config variables that you can use in your ERB code.
|
8
|
+
# There are separate files to separate user defined variables and internal
|
9
|
+
# setting configs.
|
10
|
+
development:
|
11
|
+
# By setting s3_folder, forger will automatically tarball and upload your scripts
|
12
|
+
# to set. You then can then use the extract_scripts helper method to download
|
13
|
+
# the scripts onto the server.
|
14
|
+
# s3_folder: mybucket/path/to/folder # simple string
|
15
|
+
# compile_clean: true # uncomment to clean
|
16
|
+
# extract_scripts:
|
17
|
+
# to: "/opt"
|
18
|
+
# as: "ec2-user"
|
19
|
+
aws_profiles:
|
20
|
+
- my-aws-profile
|
21
|
+
<% if @options[:s3_folder] -%>
|
22
|
+
s3_folder: <%= @options[:s3_folder] %>
|
23
|
+
<% else -%>
|
24
|
+
# s3_folder: my-s3-bucket/ec2
|
25
|
+
<% end -%>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
image_id: ami-6cd6f714 # Amazon Linux 2 AMI (HVM), SSD Volume Type
|
3
|
+
instance_type: t3.small
|
4
|
+
<% if @options[:key_name] -%>
|
5
|
+
key_name: <%= @options[:key_name] %>
|
6
|
+
<% else -%>
|
7
|
+
# key_name: default # make sure that the "default" keypair exist in the region
|
8
|
+
<% end -%>
|
9
|
+
max_count: 1
|
10
|
+
min_count: 1
|
11
|
+
user_data: "<%%= user_data("bootstrap") %>"
|
12
|
+
<% if @options[:iam] -%>
|
13
|
+
iam_instance_profile:
|
14
|
+
name: <%= @options[:iam] %>
|
15
|
+
<% else -%>
|
16
|
+
# iam_instance_profile:
|
17
|
+
# name: ExampleIamProfile
|
18
|
+
<% end -%>
|
19
|
+
# public network settings
|
20
|
+
security_group_ids: <%%= config["security_group_ids"] %>
|
21
|
+
subnet_id: <%%= config["subnets"].shuffle.first %>
|
22
|
+
# block_device_mappings:
|
23
|
+
# - device_name: /dev/xvda
|
24
|
+
# ebs:
|
25
|
+
# volume_size: 100 # in GB
|
26
|
+
<%% if ENV['SPOT'] %>
|
27
|
+
instance_market_options:
|
28
|
+
market_type: spot
|
29
|
+
# https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateSpotMarketOptionsRequest.html
|
30
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/EC2/Types/SpotMarketOptions.html
|
31
|
+
spot_options:
|
32
|
+
max_price: "0.018" # $0.020/hr = $14.40/mo
|
33
|
+
# $0.018/hr = $12.96/mo
|
34
|
+
# valid combinations:
|
35
|
+
# spot_instance_type: persistent
|
36
|
+
# instance_interruption_behavior: hibernate
|
37
|
+
# or
|
38
|
+
# spot_instance_type: one-time
|
39
|
+
# More info: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html
|
40
|
+
spot_instance_type: one-time
|
41
|
+
<%% end %>
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe Forger::Template::Helper::CoreHelper do
|
2
|
+
let(:thing) do
|
3
|
+
thing = Class.new
|
4
|
+
Forger::Template::Helper::CoreHelper.send :public, :normalize_user_data_name_input
|
5
|
+
thing.extend(Forger::Template::Helper::CoreHelper)
|
6
|
+
thing
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'normalize user_data name input' do
|
10
|
+
result = thing.normalize_user_data_name_input("ecs.sh")
|
11
|
+
expect(result).to eq "ecs.sh"
|
12
|
+
|
13
|
+
result = thing.normalize_user_data_name_input("ecs")
|
14
|
+
expect(result).to eq "ecs.sh"
|
15
|
+
|
16
|
+
result = thing.normalize_user_data_name_input("test/ecs")
|
17
|
+
expect(result).to eq "test/ecs.sh"
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,10 +4,6 @@ ENV["FORGER_ROOT"] = "spec/fixtures/demo_project"
|
|
4
4
|
# Ensures aws api never called. Fixture home folder does not contain ~/.aws/credentails
|
5
5
|
ENV['HOME'] = "spec/fixtures/home"
|
6
6
|
|
7
|
-
# CodeClimate test coverage: https://docs.codeclimate.com/docs/configuring-test-coverage
|
8
|
-
# require 'simplecov'
|
9
|
-
# SimpleCov.start
|
10
|
-
|
11
7
|
require "pp"
|
12
8
|
require "byebug"
|
13
9
|
root = File.expand_path("../", File.dirname(__FILE__))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: memoist
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: render_me_pretty
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: thor
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -256,7 +256,7 @@ files:
|
|
256
256
|
- docs/example/.env.development
|
257
257
|
- docs/example/.env.production
|
258
258
|
- docs/example/app/scripts/hello.sh
|
259
|
-
- docs/example/app/
|
259
|
+
- docs/example/app/user_data/bootstrap.sh
|
260
260
|
- docs/example/config/development.yml
|
261
261
|
- docs/example/profiles/default.yml
|
262
262
|
- docs/example/profiles/spot.yml
|
@@ -291,9 +291,12 @@ files:
|
|
291
291
|
- lib/forger/help/completion_script.md
|
292
292
|
- lib/forger/help/create.md
|
293
293
|
- lib/forger/help/destroy.md
|
294
|
+
- lib/forger/help/new.md
|
294
295
|
- lib/forger/help/upload.md
|
295
296
|
- lib/forger/help/wait/ami.md
|
296
297
|
- lib/forger/hook.rb
|
298
|
+
- lib/forger/network.rb
|
299
|
+
- lib/forger/new.rb
|
297
300
|
- lib/forger/profile.rb
|
298
301
|
- lib/forger/script.rb
|
299
302
|
- lib/forger/script/compile.rb
|
@@ -307,18 +310,22 @@ files:
|
|
307
310
|
- lib/forger/scripts/auto_terminate.sh
|
308
311
|
- lib/forger/scripts/auto_terminate/after_timeout.sh
|
309
312
|
- lib/forger/scripts/auto_terminate/functions.sh
|
310
|
-
- lib/forger/scripts/auto_terminate/functions/
|
313
|
+
- lib/forger/scripts/auto_terminate/functions/amzn.sh
|
314
|
+
- lib/forger/scripts/auto_terminate/functions/amzn2.sh
|
311
315
|
- lib/forger/scripts/auto_terminate/functions/ubuntu.sh
|
312
316
|
- lib/forger/scripts/auto_terminate/setup.sh
|
313
317
|
- lib/forger/scripts/cloudwatch.sh
|
314
318
|
- lib/forger/scripts/cloudwatch/configure.sh
|
315
319
|
- lib/forger/scripts/cloudwatch/install.sh
|
316
|
-
- lib/forger/scripts/cloudwatch/install/
|
320
|
+
- lib/forger/scripts/cloudwatch/install/amzn.sh
|
321
|
+
- lib/forger/scripts/cloudwatch/install/amzn2.sh
|
317
322
|
- lib/forger/scripts/cloudwatch/install/ubuntu.sh
|
318
323
|
- lib/forger/scripts/cloudwatch/service.sh
|
319
|
-
- lib/forger/scripts/cloudwatch/service/
|
324
|
+
- lib/forger/scripts/cloudwatch/service/amzn.sh
|
325
|
+
- lib/forger/scripts/cloudwatch/service/amzn2.sh
|
320
326
|
- lib/forger/scripts/cloudwatch/service/ubuntu.sh
|
321
327
|
- lib/forger/scripts/shared/functions.sh
|
328
|
+
- lib/forger/sequence.rb
|
322
329
|
- lib/forger/setting.rb
|
323
330
|
- lib/forger/template.rb
|
324
331
|
- lib/forger/template/context.rb
|
@@ -332,12 +339,26 @@ files:
|
|
332
339
|
- lib/forger/wait.rb
|
333
340
|
- lib/forger/waiter.rb
|
334
341
|
- lib/forger/waiter/ami.rb
|
342
|
+
- lib/templates/default/.env.example
|
343
|
+
- lib/templates/default/.gitignore
|
344
|
+
- lib/templates/default/Gemfile
|
345
|
+
- lib/templates/default/README.md
|
346
|
+
- lib/templates/default/app/helpers/application_helper.rb
|
347
|
+
- lib/templates/default/app/scripts/install/common.sh
|
348
|
+
- lib/templates/default/app/scripts/personalize/tung.sh
|
349
|
+
- lib/templates/default/app/scripts/shared/functions.sh
|
350
|
+
- lib/templates/default/app/user_data/bootstrap.sh.tt
|
351
|
+
- lib/templates/default/app/user_data/layouts/default.sh.tt
|
352
|
+
- lib/templates/default/config/development.yml.tt
|
353
|
+
- lib/templates/default/config/settings.yml.tt
|
354
|
+
- lib/templates/default/profiles/default.yml.tt
|
335
355
|
- spec/fixtures/demo_project/.env.test
|
336
|
-
- spec/fixtures/demo_project/app/
|
356
|
+
- spec/fixtures/demo_project/app/user_data/bootstrap.sh
|
337
357
|
- spec/fixtures/demo_project/config/settings.yml
|
338
358
|
- spec/fixtures/demo_project/config/test.yml
|
339
359
|
- spec/fixtures/demo_project/profiles/default.yml
|
340
360
|
- spec/lib/cli_spec.rb
|
361
|
+
- spec/lib/core_helper_spec.rb
|
341
362
|
- spec/lib/params_spec.rb
|
342
363
|
- spec/spec_helper.rb
|
343
364
|
homepage: https://github.com/tongueroo/forger
|
@@ -360,16 +381,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
360
381
|
version: '0'
|
361
382
|
requirements: []
|
362
383
|
rubyforge_project:
|
363
|
-
rubygems_version: 2.7.
|
384
|
+
rubygems_version: 2.7.6
|
364
385
|
signing_key:
|
365
386
|
specification_version: 4
|
366
387
|
summary: Tool to create AWS ec2 instances
|
367
388
|
test_files:
|
368
389
|
- spec/fixtures/demo_project/.env.test
|
369
|
-
- spec/fixtures/demo_project/app/
|
390
|
+
- spec/fixtures/demo_project/app/user_data/bootstrap.sh
|
370
391
|
- spec/fixtures/demo_project/config/settings.yml
|
371
392
|
- spec/fixtures/demo_project/config/test.yml
|
372
393
|
- spec/fixtures/demo_project/profiles/default.yml
|
373
394
|
- spec/lib/cli_spec.rb
|
395
|
+
- spec/lib/core_helper_spec.rb
|
374
396
|
- spec/lib/params_spec.rb
|
375
397
|
- spec/spec_helper.rb
|