zeployment 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a17028b39f3ea949fe18cb3cbc58924d1661a82a58bbe378d7a40f7038f51247
4
- data.tar.gz: a7fdee6ae2bdb7bbe50fa4f7abb8e7120b73b0393d8710d3e77f0cfd15297941
3
+ metadata.gz: 4383c69c912d79777bc6ed60172434a69d7a9b88e9355e42e54e5991daffb954
4
+ data.tar.gz: 5541a55a524e697eee3845b201937b14c22eab881936417b4432d3d38ef003a9
5
5
  SHA512:
6
- metadata.gz: 471e482be69272cf163e570b9ff39766ea83a32936990910123a160bb305dee2254bdf3757adfc44aac8a3fbcd522ef797ad13b4317689ef5e71b6a468f28dc0
7
- data.tar.gz: c1ccfa49d5fcb86e1b8125fecfa3a66c85e0d1d0350686ca7b2c0b0be4cbfcaa1f1314b6ebcc1d8fbdc11fb7b9c9ca0227ed3446bb467d7bccd9b2c43d2ad6ea
6
+ metadata.gz: d6f6a67ea15d12e72c36c5e2916566350b1e82f315790135711498299d4b1f3bc5f1e52a48d646c0f8c9ec0050f7e30c2ac52dd73f67ae871f1a22fcc8738fae
7
+ data.tar.gz: 4fff1b74d7a22e3356e368ee2301727f43e01fd63c1fce495339037e16a6a64b234d5f3db6e6a912d66e0a0935868f1161c5d36d0998c5a351bbbf16131dad4d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zeployment (0.3.0)
4
+ zeployment (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Zeployment
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/zeployment`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Zeployment is a gem that provides functions to easily use aws and also to perform zero downtime deployment which includes deregistering-deploying-registering of instances from load balancers.
6
4
 
7
5
  ## Installation
8
6
 
@@ -20,9 +18,55 @@ Or install it yourself as:
20
18
 
21
19
  $ gem install zeployment
22
20
 
21
+ ## Getting Started
22
+ 1. Install aws-cli on the system [Click here for Docs](https://docs.aws.amazon.com/cli/latest/userguide/installing.html "Click here for Docs")
23
+ 2. Set aws configuration [Docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html "Docs")
24
+ (Now you are good to go)
25
+
23
26
  ## Usage
27
+ - To get the number of registered instance to the loadbalancer just use the method `number_of_registered_instances_to_loadbalancer` and pass the load balancer name as argument name and output will be the number of instances registered to the loadbalancer.
28
+ ```ruby
29
+ Zeployment::Aws.number_of_registered_instances_to_loadbalancer (name_of_load_balancer)
30
+ ```
31
+
32
+ - To Get the load balancer instances description i.e the description of each instances registered with the load balancer use the following method.
33
+ ```ruby
34
+ Zeployment::Aws.get_load_balancer_instances_description (name_of_load_balancer)
35
+ ```
24
36
 
25
- TODO: Write usage instructions here
37
+ - To get the number of instances regsitered with loadbalancer that is in service use the method name `number_of_instances_in_service` with the `load balancer name` as argument
38
+ ```ruby
39
+ Zeployment::Aws.number_of_instances_in_service (name_of_load_balancer)
40
+ ```
41
+ - To get the number of instances regsitered with loadbalancer that is not in service use the method name `number_of_instances_not_in_service` with the `load balancer name` as argument
42
+ ```ruby
43
+ Zeployment::Aws.number_of_instances_not_in_service (name_of_load_balancer)
44
+ ```
45
+ - To get the public ip address of the aws ec2 machine using the `instance id` use the method name `get_ip_address_of_ec2_from_id` and pass instance id as argument.
46
+ ```ruby
47
+ Zeployment::Aws.get_ip_address_of_ec2_from_id (instance_id)
48
+ ```
49
+
50
+ - To deregister ec2 instance from load balancer use the method `deregister_instance_from_load_balancer` and pass `name of load balancer` as first argument and `instance id` as second argument.
51
+ ```ruby
52
+ Zeployment::Aws.deregister_instance_from_load_balancer (name_of_load_balancer, instance_id)
53
+ ```
54
+ - To register ec2 instance with the load balancer use the method `register_instance_with_load_balancer` and pass `name of load balancer` as first argument and `instance id` as second argument.
55
+ ```ruby
56
+ Zeployment::Aws.register_instance_with_load_balancer (name_of_load_balancer, instance_id)
57
+ ```
58
+ - To get the particular instance status related to loadbalancer use the method `get_load_balancer_particular_instance_data` and pass `name of load balancer` as first argument and `instance id` as second argument.
59
+ ```ruby
60
+ Zeployment::Aws.get_load_balancer_particular_instance_data (name_of_load_balancer, instance_id)
61
+ ```
62
+ - To check if the instance is in service use the method `instance_is_in_service?` and pass `name of load balancer` as first argument and `instane id` as second argument.
63
+ ```ruby
64
+ Zeployment::Aws.instance_is_in_service? (name_of_load_balancer, instance_id)
65
+ ```
66
+ - To perform zero downtime deployment use the method `deploy` and pass the `name of load balancer` as first argument and `login command before ip address` as second argument and also the commands to run for performing deployment after logging in into the machine.
67
+ ```ruby
68
+ Zeployment::Aws.deploy (name_of_load_balancer, login_command_without_ip, commands_to_run)
69
+ ```
26
70
 
27
71
  ## Development
28
72
 
@@ -41,3 +85,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
41
85
  ## Code of Conduct
42
86
 
43
87
  Everyone interacting in the Zeployment project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/zeployment/blob/master/CODE_OF_CONDUCT.md).
88
+
@@ -1,3 +1,3 @@
1
1
  module Zeployment
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naman Gupta