aliyun-ess 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +74 -0
- data/Rakefile +1 -0
- data/lib/aliyun/ess/version.rb +1 -1
- metadata +19 -2
- data/INSTALL +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025f758c3035ddf7daae931fed705da8fccbbbb2
|
4
|
+
data.tar.gz: 1890e4f10e57d42d4b8f6c22e4564e1d7ee07311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2237322e9210316219024599d42dcb460117607d76ff42c6ec72cfa8641f784f117b23bd478b299d2d7fb283284044bc9fd1835fbb5499296388acad523dbf32
|
7
|
+
data.tar.gz: 9914fa384832da5fd7a5c04d1fbba0be4f02360f8e631d6a34ec782ea3f3b0e62c5fe6476b619a0e23be8147892ef98bc306727479398d5fbea58cd02d6a692a
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 sunrisela
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Ess::Ruby::Sdk
|
2
|
+
|
3
|
+
Aliyun::ESS is a Ruby library for Aliyun's Elastic Scaling Service API (http://www.aliyun.com/product/ess).
|
4
|
+
Full documentation of the currently supported API can be found at http://www.aliyun.com/product/ess#resources.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'ess-ruby-sdk'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install ess-ruby-sdk
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
#### Getting started
|
23
|
+
|
24
|
+
To get started you need to require 'aliyun/ess':
|
25
|
+
|
26
|
+
% irb -rubygems
|
27
|
+
irb(main):001:0> require 'aliyun/ess'
|
28
|
+
# => true
|
29
|
+
|
30
|
+
The Aliyun::ESS library ships with an interactive shell called <tt>ess</tt>. From within it, you have access to all the operations the library exposes from the command line.
|
31
|
+
|
32
|
+
% ess
|
33
|
+
>> Version
|
34
|
+
|
35
|
+
Before you can do anything, you must establish a connection using Base.establish_connection!. A basic connection would look something like this:
|
36
|
+
|
37
|
+
Aliyun::ESS::Base.establish_connection!(
|
38
|
+
:access_key_id => 'abc',
|
39
|
+
:secret_access_key => '123'
|
40
|
+
)
|
41
|
+
|
42
|
+
The minimum connection options that you must specify are your access key id and your secret access key.
|
43
|
+
|
44
|
+
(If you don't already have your access keys, all you need to sign up for the ESS service is an account at Aliyun. You can sign up for ESS and get access keys by visiting http://aliyun.aliyun.com/ess.)
|
45
|
+
|
46
|
+
For convenience, if you set two special environment variables with the value of your access keys, the console will automatically create a default connection for you. For example:
|
47
|
+
|
48
|
+
% cat .aliyun_access_keys
|
49
|
+
export ACCESS_KEY_ID='abcdefghijklmnop'
|
50
|
+
export SECRET_ACCESS_KEY='1234567891012345'
|
51
|
+
|
52
|
+
Then load it in your shell's rc file.
|
53
|
+
|
54
|
+
% cat .zshrc
|
55
|
+
if [[ -f "$HOME/.aliyun_access_keys" ]]; then
|
56
|
+
source "$HOME/.aliyun_access_keys";
|
57
|
+
fi
|
58
|
+
|
59
|
+
See more connection details at Aliyun::ESS::Connection::Management::ClassMethods.
|
60
|
+
|
61
|
+
#### Aliyun::ESS Basics
|
62
|
+
|
63
|
+
group_collections = Aliyun::ESS::ScalingGroup.find
|
64
|
+
scaling_group = group_collections.items.first
|
65
|
+
scaling_rule = scaling_group.scaling_rules.first
|
66
|
+
scaling_rule.execute
|
67
|
+
|
68
|
+
## Contributing
|
69
|
+
|
70
|
+
1. Fork it
|
71
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
72
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
73
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
74
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/aliyun/ess/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aliyun-ess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Li
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: yajl-ruby
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,7 +74,10 @@ extensions: []
|
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
62
76
|
- CHANGELOG
|
63
|
-
-
|
77
|
+
- Gemfile
|
78
|
+
- LICENSE.txt
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
64
81
|
- bin/ess
|
65
82
|
- bin/setup.rb
|
66
83
|
- lib/aliyun/ess.rb
|
data/INSTALL
DELETED