kdeploy 0.4.0 → 0.5.0

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: 13ad6844e1610898cc64413ee752b17e5b0c83e75b3f503abe73681c79be3bc4
4
- data.tar.gz: 2fda0c6eb62f2a2ac9a592cce564769d950a7b2f88510f1c251f0dcaceccca86
3
+ metadata.gz: 3e4e44b572cceb902d9267bfac535bceffcb116b0e5ef8f4de78aafece8dfead
4
+ data.tar.gz: c57baa1fccd958c63f60253c682c975bb993f6cc5802ac73d96ed797aea527cc
5
5
  SHA512:
6
- metadata.gz: 3bb78e52644c736b6d9f6a18e506de11e2c331e464a19f9d09c7f4da334d7efb464a8875bac9375717b9cec7a3ed5a42fe68e968d68fb30c2c40ceea9a4aa20e
7
- data.tar.gz: 6654fae1a9d1eb08b45a790bb12d08050350148069080a848e48cdb921f7b593a5d77d5f5cb50e8605c9a55417aaacc596eb21f3a96ec1369167bcb00aed2af5
6
+ metadata.gz: 9a194eb2b3b5f89853493f4ec34e0053db6c1ae25dddeca768bedc9809eb51ad138aafce09c0bcd3f80a43c5872ad02b57b98bfbc0a0f324634a7015425d037a
7
+ data.tar.gz: 97880efd10a46ac87bec1de2312d338ddb2603eac34610e4cd17cd505f7dc8648844b001a37e95633b9410b08f3f55aaa887f11e888d0ea8bf5a66a64451c730
data/README.md CHANGED
@@ -12,6 +12,7 @@ A lightweight agentless deployment automation tool written in Ruby.
12
12
  - 🔄 **ERB Template Support**: Dynamic configuration generation
13
13
  - 🎯 **Role-based Deployment**: Target specific server roles
14
14
  - 🔍 **Dry Run Mode**: Preview tasks before execution
15
+ - 🎨 **Color-coded Output**: Green for success, Red for errors, Yellow for warnings
15
16
 
16
17
  ## 📦 Installation
17
18
 
@@ -66,11 +67,43 @@ end
66
67
  3. Run the deployment:
67
68
 
68
69
  ```bash
70
+ # Execute all tasks in deploy.rb
69
71
  $ kdeploy execute deploy.rb
72
+
73
+ # Execute a specific task
74
+ $ kdeploy execute deploy.rb deploy_web
70
75
  ```
71
76
 
72
77
  ## 📖 Usage Guide
73
78
 
79
+ ### Task Execution
80
+
81
+ ```bash
82
+ # Execute all tasks in the file
83
+ kdeploy execute deploy.rb
84
+
85
+ # Execute a specific task
86
+ kdeploy execute deploy.rb deploy_web
87
+
88
+ # Execute with dry run (preview mode)
89
+ kdeploy execute deploy.rb --dry-run
90
+
91
+ # Execute on specific hosts
92
+ kdeploy execute deploy.rb --limit web01,web02
93
+
94
+ # Execute with custom parallel count
95
+ kdeploy execute deploy.rb --parallel 5
96
+ ```
97
+
98
+ When executing without specifying a task name (`kdeploy execute deploy.rb`), Kdeploy will:
99
+ 1. Execute all defined tasks in the file
100
+ 2. Run tasks in the order they were defined
101
+ 3. Show task name before each task execution
102
+ 4. Display color-coded output for better readability:
103
+ - 🟢 Green: Normal output and success messages
104
+ - 🔴 Red: Errors and failure messages
105
+ - 🟡 Yellow: Warnings and notices
106
+
74
107
  ### Host Definition
75
108
 
76
109
  ```ruby
@@ -156,22 +189,6 @@ task :deploy_config do
156
189
  end
157
190
  ```
158
191
 
159
- ### Command Line Options
160
-
161
- ```bash
162
- # Execute with dry run
163
- kdeploy execute deploy.rb --dry-run
164
-
165
- # Limit to specific hosts
166
- kdeploy execute deploy.rb --limit web01,web02
167
-
168
- # Set parallel execution count
169
- kdeploy execute deploy.rb --parallel 5
170
-
171
- # Execute specific task
172
- kdeploy execute deploy.rb deploy_web
173
- ```
174
-
175
192
  ## 🔧 Development
176
193
 
177
194
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -159,7 +159,7 @@ module Kdeploy
159
159
 
160
160
  This is a deployment project created with Kdeploy.
161
161
 
162
- ## Structure
162
+ ## 📁 Structure
163
163
 
164
164
  ```
165
165
  .
@@ -170,7 +170,7 @@ module Kdeploy
170
170
  └── README.md # This file
171
171
  ```
172
172
 
173
- ## Configuration Templates
173
+ ## 🔧 Configuration Templates
174
174
 
175
175
  The project uses ERB templates for dynamic configuration. For example, in `nginx.conf.erb`:
176
176
 
@@ -187,27 +187,57 @@ module Kdeploy
187
187
  worker_processes: 4
188
188
  ```
189
189
 
190
- ## Usage
190
+ ## 🚀 Usage
191
+
192
+ ### Task Execution
191
193
 
192
194
  ```bash
193
- # Show what would be done
194
- kdeploy execute deploy.rb --dry-run
195
+ # Execute all tasks in the file
196
+ kdeploy execute deploy.rb
195
197
 
196
- # Deploy to web servers
198
+ # Execute a specific task
197
199
  kdeploy execute deploy.rb deploy_web
198
200
 
199
- # Backup database
200
- kdeploy execute deploy.rb backup_db
201
-
202
- # Run maintenance on web01
203
- kdeploy execute deploy.rb maintenance
201
+ # Execute with dry run (preview mode)
202
+ kdeploy execute deploy.rb --dry-run
204
203
 
205
- # Update all hosts
206
- kdeploy execute deploy.rb update
204
+ # Execute on specific hosts
205
+ kdeploy execute deploy.rb --limit web01,web02
207
206
 
208
- # Deploy to specific hosts
209
- kdeploy execute deploy.rb deploy_web --limit web01,web02
207
+ # Execute with custom parallel count
208
+ kdeploy execute deploy.rb --parallel 5
210
209
  ```
210
+
211
+ When executing without specifying a task name (`kdeploy execute deploy.rb`), Kdeploy will:
212
+ 1. Execute all defined tasks in the file
213
+ 2. Run tasks in the order they were defined
214
+ 3. Show task name before each task execution
215
+ 4. Display color-coded output for better readability:
216
+ - 🟢 Green: Normal output and success messages
217
+ - 🔴 Red: Errors and failure messages
218
+ - 🟡 Yellow: Warnings and notices
219
+
220
+ ### Available Tasks
221
+
222
+ - **deploy_web**: Deploy and configure Nginx web servers
223
+ ```bash
224
+ kdeploy execute deploy.rb deploy_web
225
+ ```
226
+
227
+ - **backup_db**: Backup database to S3
228
+ ```bash
229
+ kdeploy execute deploy.rb backup_db
230
+ ```
231
+
232
+ - **maintenance**: Run maintenance on specific host
233
+ ```bash
234
+ kdeploy execute deploy.rb maintenance
235
+ ```
236
+
237
+ - **update**: Update all hosts
238
+ ```bash
239
+ kdeploy execute deploy.rb update
240
+ ```
211
241
  MD
212
242
  end
213
243
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kdeploy
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norton