opsicle 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.markdown +19 -4
- data/bin/opsicle +12 -2
- data/lib/opsicle/commands/deploy.rb +3 -1
- data/lib/opsicle/commands/ssh.rb +1 -1
- data/lib/opsicle/version.rb +1 -1
- data/opsicle.gemspec +1 -1
- data/spec/opsicle/commands/deploy_spec.rb +5 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTQxYzNhNDc2ODIzNjhiZjBjMTZjZmE4M2EwZmYxOGIyMDQ0YTY2Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGU2ODEzNzlkODk2MzI5NzljMTQyOTAxYzE4YThkMjgzY2I3YmY4NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDAwMDQ2Y2FkZGY0NjcwZGQ5MzQ1NGYwYTg5MjI3MDVjOGYxMjMzYTViMWVi
|
10
|
+
ZDVhYWEzOGE3NWQ1NzcxNGUxZTE5OTZhNmFlNDc2Y2ViNTQzMGI3MGZmNjEy
|
11
|
+
N2EyMDZmNjA5MDkxOGNkNmFmNGU2N2Y5MmY1MjBjMDI5ZWFkYjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGNlYjBhYzQ1YmI2MGU1NjNhMTNmYTliMGEzZTEzYzI4MjIyOWU5MTc5MjE2
|
14
|
+
M2FlOTkyNDdkMjRlOGIyN2Y5ZTM2NjM1NjUxNDAxNWNhNjJjNmY0NDU5ODkz
|
15
|
+
NmZkNjA0MDcxY2YwYmZjYzVjYmVlYWU5ZTE4YzhmNTEwNmYxNTQ=
|
data/README.markdown
CHANGED
@@ -5,15 +5,17 @@ A gem bringing the glory of OpsWorks to your command line.
|
|
5
5
|
[![Build Status](https://travis-ci.org/sportngin/opsicle.png?branch=master)](https://travis-ci.org/sportngin/opsicle)
|
6
6
|
|
7
7
|
## Installation
|
8
|
-
Add this line to your project's Gemfile:
|
8
|
+
Add this line to your project's Gemfile:
|
9
|
+
|
10
|
+
**For Ruby >=2.1.0**
|
9
11
|
|
10
|
-
**For Ruby >=2.1.0**
|
11
12
|
```ruby
|
12
13
|
gem 'opsicle'
|
13
14
|
gem 'curses'
|
14
15
|
```
|
15
16
|
|
16
|
-
**For Ruby <2.1.0, 1.9.3**
|
17
|
+
**For Ruby <2.1.0, 1.9.3**
|
18
|
+
|
17
19
|
```ruby
|
18
20
|
gem 'opsicle'
|
19
21
|
```
|
@@ -57,6 +59,7 @@ production:
|
|
57
59
|
Run `opsicle help` for a full list of commands and their uses.
|
58
60
|
Some common commands:
|
59
61
|
|
62
|
+
### Deployments
|
60
63
|
```bash
|
61
64
|
|
62
65
|
# Run a basic deploy for the current app
|
@@ -65,15 +68,27 @@ opsicle deploy staging
|
|
65
68
|
# Run the deploy for production
|
66
69
|
opsicle deploy production
|
67
70
|
|
71
|
+
```
|
72
|
+
You may also use `-m or --monitor` to open the Opsicle Stack Monitor, or
|
73
|
+
`-b or --browser` to open the OpsWorks deployments screen for that app when deploying.
|
74
|
+
|
75
|
+
### SSH
|
76
|
+
```bash
|
68
77
|
# SSH to a server instance in the given environment stack
|
69
78
|
opsicle ssh staging
|
70
79
|
|
71
80
|
# Set your user SSH key (PUBLIC KEY) for OpsWorks
|
72
81
|
opsicle ssh-key staging <key-file>
|
73
82
|
|
83
|
+
```
|
84
|
+
|
85
|
+
### Stack Monitor
|
86
|
+
```bash
|
74
87
|
# Launch the Opsicle Stack Monitor for the given environment stack
|
75
88
|
opsicle monitor staging
|
76
89
|
|
77
90
|
```
|
78
91
|
|
79
|
-
Opsicle accepts a `--verbose` flag to show additional information as commands are run.
|
92
|
+
Opsicle accepts a `--verbose` flag or the VERBOSE environment variable to show additional information as commands are run.
|
93
|
+
|
94
|
+
Opsicle accepts a DEBUG environment variable to show additional logging such as stack traces for failed commands.
|
data/bin/opsicle
CHANGED
@@ -10,14 +10,24 @@ program :description, 'Opsworks Command Line Utility Belt'
|
|
10
10
|
program :help, 'Documentation', 'For documentation and help in setting up your configuration files, '\
|
11
11
|
'see Opsicle\'s GitHub repo: https://github.com/sportngin/opsicle'
|
12
12
|
|
13
|
-
global_option
|
13
|
+
global_option('--verbose'){ $verbose = true }
|
14
|
+
|
15
|
+
if ENV['DEBUG']
|
16
|
+
always_trace!
|
17
|
+
$debug = true
|
18
|
+
else
|
19
|
+
never_trace!
|
20
|
+
end
|
21
|
+
$verbose = true if ENV['VERBOSE']
|
22
|
+
|
14
23
|
|
15
24
|
default_command :help
|
16
25
|
|
17
26
|
command :deploy do |c|
|
18
27
|
c.syntax = "opsicle deploy <environment>"
|
19
28
|
c.description = "Deploy your current app to the given environment stack"
|
20
|
-
c.option "--browser", "Open OpsWorks deployments screen
|
29
|
+
c.option "-b", "--browser", "Open the OpsWorks deployments screen for this stack on deploy"
|
30
|
+
c.option "-m", "--monitor", "Open the Opsicle Stack Monitor for this stack on deploy"
|
21
31
|
c.action do |args, options|
|
22
32
|
raise ArgumentError, "Environment is required" unless args.first
|
23
33
|
Opsicle::Deploy.new(args.first).execute(options.__hash__)
|
data/lib/opsicle/commands/ssh.rb
CHANGED
@@ -20,7 +20,7 @@ module Opsicle
|
|
20
20
|
instance_ip = instances[choice-1][:elastic_ip] || instances[choice-1][:public_ip]
|
21
21
|
|
22
22
|
command = "ssh #{ssh_username}@#{instance_ip}"
|
23
|
-
say "<%= color('Executing shell command: #{command}', YELLOW) %>" if
|
23
|
+
say "<%= color('Executing shell command: #{command}', YELLOW) %>" if $verbose
|
24
24
|
system(command)
|
25
25
|
end
|
26
26
|
|
data/lib/opsicle/version.rb
CHANGED
data/opsicle.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "aws-sdk", "~> 1.30"
|
22
|
-
spec.add_dependency "commander"
|
22
|
+
spec.add_dependency "commander", "~> 4.1.6"
|
23
23
|
spec.add_dependency "terminal-table"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -19,23 +19,25 @@ module Opsicle
|
|
19
19
|
|
20
20
|
it "creates a new deployment" do
|
21
21
|
expect(client).to receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
|
22
|
+
expect(subject).to_not receive(:open_deploy)
|
23
|
+
expect(Monitor::App).to_not receive(:new)
|
22
24
|
|
23
25
|
subject.execute
|
24
26
|
end
|
25
27
|
|
26
|
-
it "runs the Opsicle Stack Monitor
|
28
|
+
it "runs the Opsicle Stack Monitor if monitor option is given" do
|
27
29
|
expect(Monitor::App).to receive(:new).and_return(monitor)
|
28
30
|
expect(monitor).to receive(:start)
|
29
31
|
expect(subject).to_not receive(:open_deploy)
|
30
32
|
|
31
|
-
subject.execute
|
33
|
+
subject.execute({ monitor: true })
|
32
34
|
end
|
33
35
|
|
34
36
|
it "opens the OpsWorks deployments screen if browser option is given" do
|
35
37
|
expect(subject).to receive(:open_deploy)
|
36
38
|
expect(Monitor::App).to_not receive(:new)
|
37
39
|
|
38
|
-
subject.execute({browser: true})
|
40
|
+
subject.execute({ browser: true })
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsicle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Fleener
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: commander
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.1.6
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 4.1.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: terminal-table
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|