kdeploy 0.4.0 → 0.6.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: e4f616b19f975f2dd2c092c929917abef3ffb8692868a94e11eb817c10ff9047
4
+ data.tar.gz: 16177a298947b32df45fde284312d693dde19403d53356058c7297aa1b99c693
5
5
  SHA512:
6
- metadata.gz: 3bb78e52644c736b6d9f6a18e506de11e2c331e464a19f9d09c7f4da334d7efb464a8875bac9375717b9cec7a3ed5a42fe68e968d68fb30c2c40ceea9a4aa20e
7
- data.tar.gz: 6654fae1a9d1eb08b45a790bb12d08050350148069080a848e48cdb921f7b593a5d77d5f5cb50e8605c9a55417aaacc596eb21f3a96ec1369167bcb00aed2af5
6
+ metadata.gz: fdfd65082400f89565ff0387cce6cf22d8a69d16138bd8e3b3b6e70bdc7d2597735edc6f06575287c163d942f6bdb29d5a9df69db6746408b95225c14db0b6e9
7
+ data.tar.gz: 562dcdcff3008e15d637fbecb1fde2459c0275b37396989f74cb582f62e40168e9309691b4b9c2c75af21fc8ce4c23438236e7f61268a81f1d0b4d367fc5318b
data/README.md CHANGED
@@ -1,4 +1,18 @@
1
1
  # Kdeploy
2
+ ```
3
+ _ _
4
+ /\ /\__| | ___ _ __ | | ___ _ _
5
+ / //_/ _` |/ _ \ '_ \| |/ _ \| | | |
6
+ / __ \ (_| | __/ |_) | | (_) | |_| |
7
+ \/ \/\__,_|\___| .__/|_|\___/ \__, |
8
+ |_| |___/
9
+
10
+
11
+ ⚡ Lightweight Agentless Deployment Tool
12
+ 🚀 Deploy with confidence, scale with ease
13
+
14
+ =====================================================================================================
15
+ ```
2
16
 
3
17
  A lightweight agentless deployment automation tool written in Ruby.
4
18
 
@@ -12,6 +26,7 @@ A lightweight agentless deployment automation tool written in Ruby.
12
26
  - 🔄 **ERB Template Support**: Dynamic configuration generation
13
27
  - 🎯 **Role-based Deployment**: Target specific server roles
14
28
  - 🔍 **Dry Run Mode**: Preview tasks before execution
29
+ - 🎨 **Color-coded Output**: Green for success, Red for errors, Yellow for warnings
15
30
 
16
31
  ## 📦 Installation
17
32
 
@@ -66,11 +81,43 @@ end
66
81
  3. Run the deployment:
67
82
 
68
83
  ```bash
84
+ # Execute all tasks in deploy.rb
69
85
  $ kdeploy execute deploy.rb
86
+
87
+ # Execute a specific task
88
+ $ kdeploy execute deploy.rb deploy_web
70
89
  ```
71
90
 
72
91
  ## 📖 Usage Guide
73
92
 
93
+ ### Task Execution
94
+
95
+ ```bash
96
+ # Execute all tasks in the file
97
+ kdeploy execute deploy.rb
98
+
99
+ # Execute a specific task
100
+ kdeploy execute deploy.rb deploy_web
101
+
102
+ # Execute with dry run (preview mode)
103
+ kdeploy execute deploy.rb --dry-run
104
+
105
+ # Execute on specific hosts
106
+ kdeploy execute deploy.rb --limit web01,web02
107
+
108
+ # Execute with custom parallel count
109
+ kdeploy execute deploy.rb --parallel 5
110
+ ```
111
+
112
+ When executing without specifying a task name (`kdeploy execute deploy.rb`), Kdeploy will:
113
+ 1. Execute all defined tasks in the file
114
+ 2. Run tasks in the order they were defined
115
+ 3. Show task name before each task execution
116
+ 4. Display color-coded output for better readability:
117
+ - 🟢 Green: Normal output and success messages
118
+ - 🔴 Red: Errors and failure messages
119
+ - 🟡 Yellow: Warnings and notices
120
+
74
121
  ### Host Definition
75
122
 
76
123
  ```ruby
@@ -156,22 +203,6 @@ task :deploy_config do
156
203
  end
157
204
  ```
158
205
 
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
206
  ## 🔧 Development
176
207
 
177
208
  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.
@@ -156,10 +156,24 @@ module Kdeploy
156
156
  def create_readme
157
157
  File.write(File.join(@target_dir, 'README.md'), <<~MD)
158
158
  # Deployment Project
159
+ ```
160
+ _ _
161
+ /\ /\__| | ___ _ __ | | ___ _ _
162
+ / //_/ _` |/ _ \ '_ \| |/ _ \| | | |
163
+ / __ \ (_| | __/ |_) | | (_) | |_| |
164
+ \/ \/\__,_|\___| .__/|_|\___/ \__, |
165
+ |_| |___/
166
+
167
+
168
+ ⚡ Lightweight Agentless Deployment Tool
169
+ 🚀 Deploy with confidence, scale with ease
170
+
171
+ =====================================================================================================
172
+ ```
159
173
 
160
174
  This is a deployment project created with Kdeploy.
161
175
 
162
- ## Structure
176
+ ## 📁 Structure
163
177
 
164
178
  ```
165
179
  .
@@ -170,7 +184,7 @@ module Kdeploy
170
184
  └── README.md # This file
171
185
  ```
172
186
 
173
- ## Configuration Templates
187
+ ## 🔧 Configuration Templates
174
188
 
175
189
  The project uses ERB templates for dynamic configuration. For example, in `nginx.conf.erb`:
176
190
 
@@ -187,27 +201,57 @@ module Kdeploy
187
201
  worker_processes: 4
188
202
  ```
189
203
 
190
- ## Usage
204
+ ## 🚀 Usage
205
+
206
+ ### Task Execution
191
207
 
192
208
  ```bash
193
- # Show what would be done
194
- kdeploy execute deploy.rb --dry-run
209
+ # Execute all tasks in the file
210
+ kdeploy execute deploy.rb
195
211
 
196
- # Deploy to web servers
212
+ # Execute a specific task
197
213
  kdeploy execute deploy.rb deploy_web
198
214
 
199
- # Backup database
200
- kdeploy execute deploy.rb backup_db
201
-
202
- # Run maintenance on web01
203
- kdeploy execute deploy.rb maintenance
215
+ # Execute with dry run (preview mode)
216
+ kdeploy execute deploy.rb --dry-run
204
217
 
205
- # Update all hosts
206
- kdeploy execute deploy.rb update
218
+ # Execute on specific hosts
219
+ kdeploy execute deploy.rb --limit web01,web02
207
220
 
208
- # Deploy to specific hosts
209
- kdeploy execute deploy.rb deploy_web --limit web01,web02
221
+ # Execute with custom parallel count
222
+ kdeploy execute deploy.rb --parallel 5
210
223
  ```
224
+
225
+ When executing without specifying a task name (`kdeploy execute deploy.rb`), Kdeploy will:
226
+ 1. Execute all defined tasks in the file
227
+ 2. Run tasks in the order they were defined
228
+ 3. Show task name before each task execution
229
+ 4. Display color-coded output for better readability:
230
+ - 🟢 Green: Normal output and success messages
231
+ - 🔴 Red: Errors and failure messages
232
+ - 🟡 Yellow: Warnings and notices
233
+
234
+ ### Available Tasks
235
+
236
+ - **deploy_web**: Deploy and configure Nginx web servers
237
+ ```bash
238
+ kdeploy execute deploy.rb deploy_web
239
+ ```
240
+
241
+ - **backup_db**: Backup database to S3
242
+ ```bash
243
+ kdeploy execute deploy.rb backup_db
244
+ ```
245
+
246
+ - **maintenance**: Run maintenance on specific host
247
+ ```bash
248
+ kdeploy execute deploy.rb maintenance
249
+ ```
250
+
251
+ - **update**: Update all hosts
252
+ ```bash
253
+ kdeploy execute deploy.rb update
254
+ ```
211
255
  MD
212
256
  end
213
257
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kdeploy
4
- VERSION = '0.4.0'
4
+ VERSION = '0.6.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.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norton