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 +4 -4
- data/README.md +33 -16
- data/lib/kdeploy/initializer.rb +45 -15
- data/lib/kdeploy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e4e44b572cceb902d9267bfac535bceffcb116b0e5ef8f4de78aafece8dfead
|
4
|
+
data.tar.gz: c57baa1fccd958c63f60253c682c975bb993f6cc5802ac73d96ed797aea527cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/kdeploy/initializer.rb
CHANGED
@@ -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
|
-
#
|
194
|
-
kdeploy execute deploy.rb
|
195
|
+
# Execute all tasks in the file
|
196
|
+
kdeploy execute deploy.rb
|
195
197
|
|
196
|
-
#
|
198
|
+
# Execute a specific task
|
197
199
|
kdeploy execute deploy.rb deploy_web
|
198
200
|
|
199
|
-
#
|
200
|
-
kdeploy execute deploy.rb
|
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
|
-
#
|
206
|
-
kdeploy execute deploy.rb
|
204
|
+
# Execute on specific hosts
|
205
|
+
kdeploy execute deploy.rb --limit web01,web02
|
207
206
|
|
208
|
-
#
|
209
|
-
kdeploy execute deploy.rb
|
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
|
|
data/lib/kdeploy/version.rb
CHANGED