-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.txt
More file actions
352 lines (298 loc) · 13.4 KB
/
Copy pathoutput.txt
File metadata and controls
352 lines (298 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
[sudo] password for toor:
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
18 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.12.3-0ubuntu2).
python3 set to manually installed.
The following additional packages will be installed:
libjs-sphinxdoc libjs-underscore libpython3-dev libpython3.12-dev
python3-dev python3-pkg-resources python3-setuptools python3-wheel
python3.12-dev
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
libjs-sphinxdoc libjs-underscore libpython3-dev libpython3.12-dev
python3-dev python3-pip python3-setuptools python3-venv python3-wheel
python3.12-dev
The following packages will be upgraded:
python3-pkg-resources
1 upgraded, 10 newly installed, 0 to remove and 18 not upgraded.
Need to get 11.4 MB of archives.
After this operation, 43.7 MB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 libjs-sphinxdoc all 7.2.6-3 [132 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 libpython3.12-dev amd64 3.12.3-1ubuntu0.2 [5,672 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 libpython3-dev amd64 3.12.3-0ubuntu2 [10.6 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 python3.12-dev amd64 3.12.3-1ubuntu0.2 [498 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 python3-dev amd64 3.12.3-0ubuntu2 [26.7 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-pkg-resources all 68.1.2-2ubuntu1.2 [168 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 python3-setuptools all 68.1.2-2ubuntu1 [388 kB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 python3-wheel all 0.42.0-2 [53.1 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/universe amd64 python3-pip all 24.0+dfsg-1ubuntu1 [1,337 kB]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu noble/main amd64 python3-venv amd64 3.12.3-0ubuntu2 [1,216 B]
Fetched 11.4 MB in 2s (5,953 kB/s)
Selecting previously unselected package libjs-underscore.
(Reading database ... 118946 files and directories currently installed.)
Preparing to unpack .../00-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ...
Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../01-libjs-sphinxdoc_7.2.6-3_all.deb ...
Unpacking libjs-sphinxdoc (7.2.6-3) ...
Selecting previously unselected package libpython3.12-dev:amd64.
Preparing to unpack .../02-libpython3.12-dev_3.12.3-1ubuntu0.2_amd64.deb ...
Unpacking libpython3.12-dev:amd64 (3.12.3-1ubuntu0.2) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../03-libpython3-dev_3.12.3-0ubuntu2_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.12.3-0ubuntu2) ...
Selecting previously unselected package python3.12-dev.
Preparing to unpack .../04-python3.12-dev_3.12.3-1ubuntu0.2_amd64.deb ...
Unpacking python3.12-dev (3.12.3-1ubuntu0.2) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../05-python3-dev_3.12.3-0ubuntu2_amd64.deb ...
Unpacking python3-dev (3.12.3-0ubuntu2) ...
Preparing to unpack .../06-python3-pkg-resources_68.1.2-2ubuntu1.2_all.deb ...
Unpacking python3-pkg-resources (68.1.2-2ubuntu1.2) over (68.1.2-2ubuntu1) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../07-python3-setuptools_68.1.2-2ubuntu1_all.deb ...
Unpacking python3-setuptools (68.1.2-2ubuntu1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../08-python3-wheel_0.42.0-2_all.deb ...
Unpacking python3-wheel (0.42.0-2) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../09-python3-pip_24.0+dfsg-1ubuntu1_all.deb ...
Unpacking python3-pip (24.0+dfsg-1ubuntu1) ...
Selecting previously unselected package python3-venv.
Preparing to unpack .../10-python3-venv_3.12.3-0ubuntu2_amd64.deb ...
Unpacking python3-venv (3.12.3-0ubuntu2) ...
Setting up python3-pkg-resources (68.1.2-2ubuntu1.2) ...
Setting up python3-setuptools (68.1.2-2ubuntu1) ...
Setting up python3-wheel (0.42.0-2) ...
Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
Setting up libpython3.12-dev:amd64 (3.12.3-1ubuntu0.2) ...
Setting up python3-pip (24.0+dfsg-1ubuntu1) ...
Setting up python3-venv (3.12.3-0ubuntu2) ...
Setting up libpython3-dev:amd64 (3.12.3-0ubuntu2) ...
Setting up python3.12-dev (3.12.3-1ubuntu0.2) ...
Setting up python3-dev (3.12.3-0ubuntu2) ...
Setting up libjs-sphinxdoc (7.2.6-3) ...
Processing triggers for man-db (2.12.0-4build2) ...
Python 3.12.3
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
Obtaining file:///home/toor/opsctl-project
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: opsctl
Building editable for opsctl (pyproject.toml) ... done
Created wheel for opsctl: filename=opsctl-0.1.0-0.editable-py3-none-any.whl size=3078 sha256=4e0f62f0df9aa5d71f3b4432f73fa8865f7f3ea94479d0f155f17f7db6b4609a
Stored in directory: /tmp/pip-ephem-wheel-cache-k9qf0x0j/wheels/ba/32/51/8a42dc23a15c4db75578d17a95ae1039ea38db9ef0ec615f0c
Successfully built opsctl
Installing collected packages: opsctl
Successfully installed opsctl-0.1.0
opsctl 0.1.0
usage: opsctl [-h] [--version] [--verbose] {status,deploy,config} ...
Operational CLI tool for system management
positional arguments:
{status,deploy,config}
Available commands
status Show system status information
deploy Deploy an application
config Manage configuration values
options:
-h, --help show this help message and exit
--version show program's version number and exit
--verbose Enable verbose output
usage: opsctl status [-h] [--service SERVICE] [--format {text,json}]
Display system, resource, service, and deployment status information.
options:
-h, --help show this help message and exit
--service SERVICE Optional systemd service name to check
--format {text,json} Output format
usage: opsctl deploy [-h] --app APP --env {dev,staging,prod}
[--version VERSION]
Deploy an application to a selected environment.
options:
-h, --help show this help message and exit
--app APP Application name to deploy
--env {dev,staging,prod}
Deployment environment
--version VERSION Application version to deploy
usage: opsctl config [-h] {get,set} ...
Get and set persisted configuration values for opsctl.
positional arguments:
{get,set} Configuration actions
get Get a configuration value
set Set a configuration value
options:
-h, --help show this help message and exit
System Status
=============
Timestamp: 2026-04-12T09:14:21.486392+00:00
Hostname: ip-172-31-10-241
Platform: Linux-6.8.0-1021-aws-x86_64-with-glibc2.39
Python Version: 3.12.3
Uptime (seconds): 18432.79
Load Average: 0.04, 0.07, 0.03
Memory Usage: 1218.61 MB / 3851.62 MB (31.64%)
Disk Usage (/): 10.91 GB / 29.79 GB (36.62%)
Service Health (all): healthy
Last Deployment: No deployment record found
{
"timestamp": "2026-04-12T09:14:27.112938+00:00",
"system": {
"hostname": "ip-172-31-10-241",
"platform": "Linux-6.8.0-1021-aws-x86_64-with-glibc2.39",
"python_version": "3.12.3",
"uptime_seconds": 18438.43,
"load_average": {
"1min": 0.03,
"5min": 0.06,
"15min": 0.03
}
},
"memory": {
"total_mb": 3851.62,
"available_mb": 2621.48,
"used_mb": 1230.14,
"usage_percent": 31.94
},
"disk": {
"path": "/",
"total_gb": 29.79,
"used_gb": 10.91,
"free_gb": 17.64,
"usage_percent": 36.62
},
"service": {
"name": "all",
"status": "healthy"
},
"last_deployment": "No deployment record found"
}
Set configuration 'api_endpoint'
Saved to /home/toor/.opsctl/config.json
https://api.example.com
Starting deployment for application: myapp
Target environment: dev
Version: latest
[1/5] Validating deployment manifest...
[2/5] Building release artifact...
[3/5] Uploading package...
[4/5] Applying deployment changes...
[5/5] Running post-deployment checks...
Deployment completed successfully
Recorded last deployment in configuration store
Starting deployment for application: webapp
Target environment: prod
Version: 1.2.3
[1/5] Validating deployment manifest...
[2/5] Building release artifact...
[3/5] Uploading package...
[4/5] Applying deployment changes...
[5/5] Running post-deployment checks...
Deployment completed successfully
Recorded last deployment in configuration store
usage: opsctl deploy [-h] --app APP --env {dev,staging,prod} [--version VERSION]
opsctl deploy: error: argument --env: invalid choice: 'invalid' (choose from 'dev', 'staging', 'prod')
usage: opsctl deploy [-h] --app APP --env {dev,staging,prod} [--version VERSION]
opsctl deploy: error: the following arguments are required: --env
Configuration key 'nonexistent_key' not found
/home/toor/opsctl-project/venv/bin/opsctl
opsctl 0.1.0
usage: opsctl [-h] [--version] [--verbose] {status,deploy,config} ...
{status,deploy,config}
status Show system status information
deploy Deploy an application
config Manage configuration values
usage: opsctl status [-h] [--service SERVICE] [--format {text,json}]
Display system, resource, service, and deployment status information.
options:
-h, --help show this help message and exit
--service SERVICE Optional systemd service name to check
--format {text,json} Output format
usage: opsctl deploy [-h] --app APP --env {dev,staging,prod}
[--version VERSION]
Deploy an application to a selected environment.
options:
-h, --help show this help message and exit
--app APP Application name to deploy
--env {dev,staging,prod}
Deployment environment
--version VERSION Application version to deploy
usage: opsctl config [-h] {get,set} ...
Get and set persisted configuration values for opsctl.
positional arguments:
{get,set} Configuration actions
get Get a configuration value
set Set a configuration value
options:
-h, --help show this help message and exit
Set configuration 'test_key'
Saved to /home/toor/.opsctl/config.json
test_value
-rw-r--r-- 1 toor toor 234 Apr 12 09:15 /home/toor/.opsctl/config.json
{
"api_endpoint": "https://api.example.com",
"last_deployment": {
"app": "webapp",
"env": "prod",
"version": "1.2.3",
"status": "success",
"timestamp": "2026-04-12T09:14:40.661820+00:00"
},
"test_key": "test_value"
}
System Status
=============
Timestamp: 2026-04-12T09:15:06.028473+00:00
Hostname: ip-172-31-10-241
Platform: Linux-6.8.0-1021-aws-x86_64-with-glibc2.39
Python Version: 3.12.3
Uptime (seconds): 18477.34
Load Average: 0.01, 0.03, 0.02
Memory Usage: 1197.82 MB / 3851.62 MB (31.1%)
Disk Usage (/): 10.92 GB / 29.79 GB (36.66%)
Service Health (all): healthy
Last Deployment: {'app': 'webapp', 'env': 'prod', 'version': '1.2.3', 'status': 'success', 'timestamp': '2026-04-12T09:14:40.661820+00:00'}
0
Starting deployment for application: testapp
Target environment: dev
Version: latest
[1/5] Validating deployment manifest...
[2/5] Building release artifact...
[3/5] Uploading package...
[4/5] Applying deployment changes...
[5/5] Running post-deployment checks...
Deployment completed successfully
Recorded last deployment in configuration store
0
opsctl: error: argument command: invalid choice: 'invalid_command' (choose from 'status', 'deploy', 'config')
opsctl deploy: error: the following arguments are required: --app, --env
Obtaining file:///home/toor/opsctl-project
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: opsctl
Building editable for opsctl (pyproject.toml) ... done
Created wheel for opsctl: filename=opsctl-0.1.0-0.editable-py3-none-any.whl size=3078 sha256=5dca63529df2d251f6c73c44ef1ec0f3ac7d1a8586fd97cb22f5bc85fe33c269
Successfully built opsctl
Installing collected packages: opsctl
Attempting uninstall: opsctl
Found existing installation: opsctl 0.1.0
Uninstalling opsctl-0.1.0:
Successfully uninstalled opsctl-0.1.0
Successfully installed opsctl-0.1.0
['', '/usr/lib/python312.zip', '/usr/lib/python3.12', '/usr/lib/python3.12/lib-dynload', '/home/toor/opsctl-project/venv/lib/python3.12/site-packages']
total 12
drwxr-xr-x 2 toor toor 4096 Apr 12 09:14 .
drwxr-x--- 11 toor toor 4096 Apr 12 09:14 ..
-rw-r--r-- 1 toor toor 234 Apr 12 09:15 config.json