pipely-generators 0.1.2 → 0.1.3
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/README.md +16 -1
- data/bin/pipely-generate +4 -0
- data/lib/pipely/generators/version.rb +1 -1
- data/templates/Gemfile +3 -3
- data/templates/README.md +19 -0
- data/templates/spec/spec_helper.rb +0 -1
- data/templates/steps/bootstrap_ec2.sh +1 -50
- data/templates/steps/bootstrap_emr.sh +5 -4
- data/templates/templates/pipeline.json.erb.tt +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0181698d9cdfec7e5b7f545acf3684e31533da4d
|
4
|
+
data.tar.gz: 0c169cf2c22377dc0c4189a627f642a50ecb9e41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a1fa6c39b0a8b6b215c46d8a38f7b2d84f3cd4a348ab337b52a5e7d4826674a8ee45df5b53e76d024cabe0c35ddd8a90b08538702e96535f62a143b056eeab
|
7
|
+
data.tar.gz: bbc53f42b63402be68152662e6b68c6b41a251c2f740a0c29e5cf9327653dbfceba93f7b1ed3304b7a6d4634fbd0ccec472762c59238a72803037d7e82c6cadc
|
data/README.md
CHANGED
@@ -18,7 +18,22 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
To create a minimum viable pipeline, run:
|
22
|
+
|
23
|
+
$ pipely-generate test_pipeline
|
24
|
+
|
25
|
+
This will generate a pipeline with a dummy configuration using the config.yml.tt file found in this repository's templates/config directory.
|
26
|
+
|
27
|
+
To use your own configuration for generating pipelines, copy that file into ~/.pipely-generate/config/config.yml.tt and update it to contain your site-specific settings before generating the pipeline.
|
28
|
+
|
29
|
+
## Confirmation
|
30
|
+
|
31
|
+
To ensure the pipeline was generated properly, run:
|
32
|
+
|
33
|
+
$ bundle install
|
34
|
+
$ bundle exec rake graph:open
|
35
|
+
|
36
|
+
And you should see an image with three ShellCommandActivity nodes.
|
22
37
|
|
23
38
|
## Contributing
|
24
39
|
|
data/bin/pipely-generate
CHANGED
@@ -27,6 +27,10 @@ class PipelyGenerator < Thor::Group
|
|
27
27
|
copy_file ".rspec", "#{name}/.rspec"
|
28
28
|
end
|
29
29
|
|
30
|
+
def create_readme
|
31
|
+
copy_file "README.md", "#{name}/README.md"
|
32
|
+
end
|
33
|
+
|
30
34
|
def create_template
|
31
35
|
directory "lib", "#{name}/lib"
|
32
36
|
directory "templates", "#{name}/templates"
|
data/templates/Gemfile
CHANGED
data/templates/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# TODO: Pipeline name
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
TODO: Installation instructions
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
TODO: Usage
|
12
|
+
|
13
|
+
## Contributing
|
14
|
+
|
15
|
+
1. Fork it
|
16
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
17
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
18
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
19
|
+
5. Create new Pull Request
|
@@ -2,7 +2,6 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
|
2
2
|
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'steps')
|
3
3
|
|
4
4
|
RSpec.configure do |config|
|
5
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
6
5
|
config.run_all_when_everything_filtered = true
|
7
6
|
config.filter_run :focus
|
8
7
|
|
@@ -2,53 +2,4 @@
|
|
2
2
|
|
3
3
|
set -e
|
4
4
|
|
5
|
-
# Install
|
6
|
-
curl --silent -L https://github.com/sstephenson/rbenv/archive/master.zip -o ~/rbenv.zip
|
7
|
-
unzip ~/rbenv.zip -d ~
|
8
|
-
mv ~/rbenv-master ~/rbenv
|
9
|
-
ln -s ~/rbenv ~/.rbenv
|
10
|
-
rm -rf ~/rbenv/versions
|
11
|
-
|
12
|
-
# Set up rbenv
|
13
|
-
export PATH="~/rbenv/bin:$PATH"
|
14
|
-
eval "$(rbenv init -)"
|
15
|
-
rbenv rehash
|
16
|
-
rbenv global 1.9.3-p327
|
17
|
-
|
18
|
-
# Set up rbenv for future logins
|
19
|
-
cat >> ~/.bash_profile << 'EOF'
|
20
|
-
if [ -d ~/rbenv ]; then
|
21
|
-
export PATH="~/rbenv/bin:$PATH"
|
22
|
-
eval "$(rbenv init -)"
|
23
|
-
fi
|
24
|
-
EOF
|
25
|
-
|
26
|
-
# Install bundler
|
27
|
-
gem install bundler --no-ri --no-rdoc
|
28
|
-
rbenv rehash
|
29
|
-
|
30
|
-
# Set up ssh access
|
31
|
-
if [ ! -f ~/.ssh/id_rsa ]; then
|
32
|
-
mkdir -p ~/.ssh
|
33
|
-
ssh-keygen -P '' -f ~/.ssh/id_rsa
|
34
|
-
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
35
|
-
chmod 600 ~/.ssh/authorized_keys
|
36
|
-
fi
|
37
|
-
|
38
|
-
# Use ssh to bypass the sudo "require tty" setting
|
39
|
-
ssh -o "StrictHostKeyChecking no" -t -t ec2-user@localhost <<- EOF
|
40
|
-
sudo su -;
|
41
|
-
yum -y install gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel make mysql mysql-devel;
|
42
|
-
ln -s /home/ec2-user/rbenv ~/rbenv;
|
43
|
-
ln -s /home/ec2-user/rbenv ~/.rbenv;
|
44
|
-
export PATH="/home/ec2-user/rbenv/bin:\$PATH";
|
45
|
-
eval "\$(rbenv init -)";
|
46
|
-
exit;
|
47
|
-
exit;
|
48
|
-
EOF
|
49
|
-
# ^^^ Double exit above is on purpose. (1) exit su, (2) exit ssh.
|
50
|
-
|
51
|
-
# Install fog. Has to happen after libxml2-devel
|
52
|
-
rbenv rehash
|
53
|
-
gem install fog --no-ri --no-rdoc
|
54
|
-
rbenv rehash
|
5
|
+
# TODO: Install whatever your EC2Resource will need.
|
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/bin/bash
|
2
|
-
sudo apt-get -y install rubygems
|
3
|
-
sudo gem install streamingly --no-ri --no-rdoc --source http://rubygems.org
|
4
2
|
|
5
|
-
|
3
|
+
set -e
|
6
4
|
|
7
|
-
|
5
|
+
# TODO: Install whatever your EmrCluster will need.
|
6
|
+
|
7
|
+
# sudo apt-get -y install rubygems
|
8
|
+
# sudo gem install streamingly --no-ri --no-rdoc --source http://rubygems.org
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"id": "SuccessNotify",
|
21
21
|
"type": "SnsAlarm",
|
22
22
|
"topicArn": "<%%= arn_topic %>",
|
23
|
-
"subject": "
|
23
|
+
"subject": "<%%= environment %> pipelines SUCCESS: <%= name.camelize %> pipeline step #{node.name}",
|
24
24
|
"message": "<%= name.camelize %> pipeline step SUCCESS\n\nScheduled start: #{node.@scheduledStartTime}\nActual start: #{node.@actualStartTime}\nActual end:\n#{node.@actualEndTime}"
|
25
25
|
},
|
26
26
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"id": "FailureNotify",
|
29
29
|
"type": "SnsAlarm",
|
30
30
|
"topicArn": "<%%= arn_topic %>",
|
31
|
-
"subject": "
|
31
|
+
"subject": "<%%= environment %> pipelines FAILURE: <%= name.camelize %> pipeline step #{node.name}",
|
32
32
|
"message": "<%= name.camelize %> pipeline step FAILED #{node.name}\n\nScheduled start: #{node.@scheduledStartTime}\nError message:\n#{node.errorMessage}\nError stack trace:\n#{node.errorStackTrace}"
|
33
33
|
},
|
34
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipely-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Gillooly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- templates/.gitignore
|
101
101
|
- templates/.rspec
|
102
102
|
- templates/Gemfile
|
103
|
+
- templates/README.md
|
103
104
|
- templates/Rakefile
|
104
105
|
- templates/config/config.yml.tt
|
105
106
|
- templates/lib/template.rb
|