befog 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +3 -0
- data/Readme.md +100 -0
- data/VERSION +1 -0
- data/bin/befog +1 -10
- data/lib/befog.rb +1 -0
- metadata +40 -36
data/AUTHORS
ADDED
data/Readme.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
Befog is a command line utility for cloud management. Or, put another way, it's a CLI wrapper for the `fog` gem.
|
2
|
+
|
3
|
+
Befog allows you to manage groups or clusters of servers as "banks." A bank can have one or many servers.
|
4
|
+
Features include the ability to start, stop, add to, remove, or run a command on all servers in a bank.
|
5
|
+
|
6
|
+
For example, the following command would add 3 servers to the server bank named `web-prod`:
|
7
|
+
|
8
|
+
befog add web-prod --count 3
|
9
|
+
|
10
|
+
Befog tries to be helpful whenever a command is invoked with no arguments. You can start with this:
|
11
|
+
|
12
|
+
befog
|
13
|
+
|
14
|
+
and go from there. For example, you can do:
|
15
|
+
|
16
|
+
befog add
|
17
|
+
|
18
|
+
And you'll get this:
|
19
|
+
|
20
|
+
befog add <bank> [<options>]
|
21
|
+
-c, --count COUNT The number of machines to provision (required)
|
22
|
+
-h, --help HELP Show this message
|
23
|
+
-n, --name NAME The name of this configuration (default: default)
|
24
|
+
-p, --path PATH Path to the configuration file (default: ~/.befog)
|
25
|
+
-s, --spot SPOT Provision a spot instance
|
26
|
+
-t, --type TYPE The type of machines to provision
|
27
|
+
-u, --rehearse REHEARSE Dry-run, verbose logging, but don't actually run anything
|
28
|
+
|
29
|
+
## Configuring Befog
|
30
|
+
|
31
|
+
In order to do anything interesting, you first need to tell Befog about your cloud accounts. You do this using the `configure` subcommand.
|
32
|
+
|
33
|
+
befog configure --provider aws --key <your-aws-key> --secret <your-aws-secret>
|
34
|
+
|
35
|
+
You also need to set up bank-specific configurations.
|
36
|
+
|
37
|
+
For example, the following command sets up the provider, region, image, and keypair to be used with the server bank named `web-prod` (you can also just say `config` for short):
|
38
|
+
|
39
|
+
befog config web-prod --provider aws \
|
40
|
+
--region us-east-1 --image <your-aws-image> \
|
41
|
+
--keypair <your-keypair> --group <your-aws-group-name> \
|
42
|
+
--type <your-aws-server-type>
|
43
|
+
|
44
|
+
To see the full list of configuration options, just type:
|
45
|
+
|
46
|
+
befog config
|
47
|
+
|
48
|
+
You generally don't need to set these up very often - just when setting up a new bank, typically using a different region, provider, or image. Once a bank is configured, all servers deployed using that bank will use the bank's configuration automatically.
|
49
|
+
|
50
|
+
## Provisioning Servers
|
51
|
+
|
52
|
+
Once you have a configuration set up, you can easily provision new servers:
|
53
|
+
|
54
|
+
befog add web-prod --count 3
|
55
|
+
|
56
|
+
You can also de-provision them just as easily:
|
57
|
+
|
58
|
+
befog remove web-prod --count 3
|
59
|
+
|
60
|
+
## Multiple Configurations
|
61
|
+
|
62
|
+
Sometimes you want one set of servers for a test environment and another for production or a beta environment. You can use the `--name` option to specify a named configuration different environments. For example, let's start up the `web-prod` bank of our `test` environment:
|
63
|
+
|
64
|
+
befog start web-prod --name test
|
65
|
+
|
66
|
+
Each environment must be configured separately. If you don't specify a name, the name `default` is applied. Again, once configured, you can typically use that configuration over and over.
|
67
|
+
|
68
|
+
Another option is to simply use different configuration files. You can do this with the --path command.
|
69
|
+
|
70
|
+
Finally, you can simply edit configurations directly if you want, since they are just YAML files and are fairly easy to read. Be careful, though, since this can confuse `befog` if the format get mangled somehow.
|
71
|
+
|
72
|
+
## Other Features
|
73
|
+
|
74
|
+
You can suspend a bank:
|
75
|
+
|
76
|
+
befog stop web-prod
|
77
|
+
|
78
|
+
Or start them back up:
|
79
|
+
|
80
|
+
befog start web-prod
|
81
|
+
|
82
|
+
You can even run a command on every server in a bank:
|
83
|
+
|
84
|
+
befog run web-prod --command 'apt-get install redis'
|
85
|
+
|
86
|
+
You can get a list of all the servers associated with a bank:
|
87
|
+
|
88
|
+
befog ls web-prod
|
89
|
+
|
90
|
+
or with a specific-provider:
|
91
|
+
|
92
|
+
befog ls --provider aws
|
93
|
+
|
94
|
+
or for all servers currently deployed:
|
95
|
+
|
96
|
+
befog ls
|
97
|
+
|
98
|
+
## Limitations
|
99
|
+
|
100
|
+
Befog is currently still under development and only supports basic provisioning options for Amazon EC2.
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.5.3
|
data/bin/befog
CHANGED
@@ -1,13 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require "rubygems"
|
3
|
-
|
4
|
-
# resolve bin path, ignoring symlinks
|
5
|
-
require "pathname"
|
6
|
-
bin_file = Pathname.new(__FILE__).realpath
|
7
|
-
|
8
|
-
# add self to libpath
|
9
|
-
$:.unshift File.expand_path("../../lib", bin_file)
|
10
|
-
|
11
|
-
require "befog"
|
12
2
|
|
3
|
+
require_relative "../lib/befog"
|
13
4
|
Befog::CLI.run(ARGV)
|
data/lib/befog.rb
CHANGED
metadata
CHANGED
@@ -1,81 +1,86 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: befog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 0.5.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Lance Lakey lancelakey@gmail.com
|
9
9
|
- Carlo Flores lo@js.la
|
10
10
|
- Dan Yoder danielyoder@gmail.com
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-11-
|
14
|
+
date: 2012-11-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fog
|
18
|
-
|
19
|
-
none: false
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
19
|
requirements:
|
21
20
|
- - ~>
|
22
21
|
- !ruby/object:Gem::Version
|
23
22
|
version: '1.3'
|
24
|
-
type: :runtime
|
25
|
-
prerelease: false
|
26
|
-
version_requirements: !ruby/object:Gem::Requirement
|
27
23
|
none: false
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
28
25
|
requirements:
|
29
26
|
- - ~>
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '1.3'
|
29
|
+
none: false
|
30
|
+
prerelease: false
|
31
|
+
type: :runtime
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: rspec
|
34
|
-
|
35
|
-
none: false
|
34
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
35
|
requirements:
|
37
36
|
- - ~>
|
38
37
|
- !ruby/object:Gem::Version
|
39
38
|
version: '2.7'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
39
|
none: false
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
44
41
|
requirements:
|
45
42
|
- - ~>
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: '2.7'
|
45
|
+
none: false
|
46
|
+
prerelease: false
|
47
|
+
type: :development
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: yard
|
50
|
-
|
51
|
-
none: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
51
|
requirements:
|
53
52
|
- - ~>
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: '0.7'
|
56
|
-
type: :development
|
57
|
-
prerelease: false
|
58
|
-
version_requirements: !ruby/object:Gem::Requirement
|
59
55
|
none: false
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - ~>
|
62
59
|
- !ruby/object:Gem::Version
|
63
60
|
version: '0.7'
|
64
|
-
|
65
|
-
|
61
|
+
none: false
|
62
|
+
prerelease: false
|
63
|
+
type: :development
|
64
|
+
description: ! "\t\tThe befog gem allows you to manage your cloud servers\n\t\tdirectly\
|
65
|
+
\ from the command-line. \n"
|
66
66
|
email:
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
67
|
+
-
|
68
|
+
-
|
69
|
+
-
|
70
70
|
executables:
|
71
71
|
- befog
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
75
|
- lib/befog/cli.rb
|
76
|
+
- lib/befog/commands.rb
|
76
77
|
- lib/befog/commands/add.rb
|
77
78
|
- lib/befog/commands/configure.rb
|
78
79
|
- lib/befog/commands/list.rb
|
80
|
+
- lib/befog/commands/remove.rb
|
81
|
+
- lib/befog/commands/run.rb
|
82
|
+
- lib/befog/commands/start.rb
|
83
|
+
- lib/befog/commands/stop.rb
|
79
84
|
- lib/befog/commands/mixins/command.rb
|
80
85
|
- lib/befog/commands/mixins/configurable.rb
|
81
86
|
- lib/befog/commands/mixins/help.rb
|
@@ -83,36 +88,35 @@ files:
|
|
83
88
|
- lib/befog/commands/mixins/scope.rb
|
84
89
|
- lib/befog/commands/mixins/selectable.rb
|
85
90
|
- lib/befog/commands/mixins/traceable.rb
|
86
|
-
- lib/befog/commands/remove.rb
|
87
|
-
- lib/befog/commands/run.rb
|
88
|
-
- lib/befog/commands/start.rb
|
89
|
-
- lib/befog/commands/stop.rb
|
90
|
-
- lib/befog/commands.rb
|
91
91
|
- lib/befog.rb
|
92
92
|
- bin/befog
|
93
|
+
- VERSION
|
94
|
+
- AUTHORS
|
95
|
+
- Readme.md
|
93
96
|
homepage: https://github.com/dyoder/befog
|
94
97
|
licenses: []
|
95
|
-
post_install_message:
|
98
|
+
post_install_message:
|
96
99
|
rdoc_options: []
|
97
100
|
require_paths:
|
98
101
|
- lib
|
99
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
103
|
requirements:
|
102
104
|
- - ! '>='
|
103
105
|
- !ruby/object:Gem::Version
|
104
106
|
version: '0'
|
105
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
107
|
none: false
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
109
|
requirements:
|
108
110
|
- - ! '>='
|
109
111
|
- !ruby/object:Gem::Version
|
110
112
|
version: '0'
|
113
|
+
none: false
|
111
114
|
requirements: []
|
112
|
-
rubyforge_project:
|
113
|
-
rubygems_version: 1.8.
|
114
|
-
signing_key:
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 1.8.24
|
117
|
+
signing_key:
|
115
118
|
specification_version: 3
|
116
119
|
summary: Cloud provisioning CLI
|
117
120
|
test_files: []
|
118
|
-
has_rdoc:
|
121
|
+
has_rdoc:
|
122
|
+
...
|