Compare commits
26 Commits
Author | SHA1 | Date |
---|---|---|
|
9f36304f0d | |
|
3ce353dcfc | |
|
9c4c3351ac | |
|
094d1ec037 | |
|
b1dba98cfb | |
|
f06f4f9d52 | |
|
734ea7dcb3 | |
|
902cab3da2 | |
|
1780d64f2f | |
|
32f32320d6 | |
|
ff915a9b2e | |
|
0980230d37 | |
|
4f498493a6 | |
|
5b4f3cd6c8 | |
|
327ffaa710 | |
|
86377b15a1 | |
|
ca5e75b3df | |
|
a422a8a7a5 | |
|
fd531ae0e0 | |
|
06bfd1a21c | |
|
f8426a7006 | |
|
c34fbbc134 | |
|
34a2702e07 | |
|
d5b1d839cd | |
|
a6b5157f7e | |
|
5d8e1be588 |
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
|
@ -0,0 +1,23 @@
|
|||
name: release-pipeline
|
||||
on:
|
||||
create:
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
homebrew:
|
||||
name: Bump Homebrew formula
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Extract version
|
||||
id: extract-version
|
||||
run: |
|
||||
echo "tag-name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: mislav/bump-homebrew-formula-action@v3
|
||||
with:
|
||||
formula-name: litmusctl
|
||||
tag-name: ${{ steps.extract-version.outputs.tag-name }}
|
||||
download-url: https://github.com/litmuschaos/litmusctl/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz
|
||||
env:
|
||||
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
|
214
README.md
214
README.md
|
@ -30,6 +30,61 @@ To check compatibility of litmusctl with Chaos Center
|
|||
<th>litmusctl version</th>
|
||||
<th>Lowest Chaos Center supported version</th>
|
||||
<th>Highest Chaos Center supported version</th>
|
||||
<tr>
|
||||
<td>1.16.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.19.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.15.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.18.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.14.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.15.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.13.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.14.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.12.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.13.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.11.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.12.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.10.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.11.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.9.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.10.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.8.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.9.1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.7.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.8.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.6.0</td>
|
||||
<td>3.0.0</td>
|
||||
<td>3.7.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.5.0</td>
|
||||
<td>3.0.0</td>
|
||||
|
@ -60,21 +115,6 @@ To check compatibility of litmusctl with Chaos Center
|
|||
<td>3.0.0</td>
|
||||
<td>3.1.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.24.0</td>
|
||||
<td>3.0.0-beta9</td>
|
||||
<td>3.0.0-beta12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.23.0</td>
|
||||
<td>3.0.0-beta9</td>
|
||||
<td>3.0.0-beta12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.22.0</td>
|
||||
<td>2.9.0</td>
|
||||
<td>3.0.0-beta8</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Installation
|
||||
|
@ -83,109 +123,109 @@ To install the latest version of litmusctl follow the below steps:
|
|||
|
||||
<table>
|
||||
<th>Platforms</th>
|
||||
<th>1.5.0</th>
|
||||
<th>1.4.0</th>
|
||||
<th>1.3.0</th>
|
||||
<th>1.2.0</th>
|
||||
<th>1.1.0</th>
|
||||
<th>1.0.0</th>
|
||||
<th>0.24.0</th>
|
||||
<th>0.23.0</th>
|
||||
<th>1.16.0</th>
|
||||
<th>1.15.0</th>
|
||||
<th>1.14.0</th>
|
||||
<th>1.13.0</th>
|
||||
<th>1.12.0</th>
|
||||
<th>1.11.0</th>
|
||||
<th>1.10.0</th>
|
||||
<th>1.9.0</th>
|
||||
<th>master(Unreleased)</th>
|
||||
<tr>
|
||||
<td>litmusctl-darwin-amd64 (MacOS)</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-linux-386</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-linux-amd64</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-linux-arm</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-linux-arm64</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-windows-386</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-windows-amd64</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>litmusctl-windows-arm</td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.5.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.4.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.3.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.2.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.1.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.0.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-0.24.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-0.23.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.16.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.15.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.14.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.13.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.12.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.11.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.10.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-1.9.0.tar.gz">Click here</a></td>
|
||||
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-master.tar.gz">Click here</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -174,14 +174,11 @@ Installation Mode: cluster
|
|||
|
||||
🤷 Do you want to continue with the above details? [Y/N]: Y
|
||||
👍 Continuing Chaos Infrastructure connection!!
|
||||
Applying YAML:
|
||||
https://preview.litmuschaos.io/api/file/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiMDUyZmFlN2UtZGM0MS00YmU4LWJiYTgtMmM4ZTYyNDFkN2I0In0.i31QQDG92X5nD6P_-7TfeAAarZqLvUTFfnAghJYXPiM.yaml
|
||||
|
||||
💡 Connecting Chaos Infrastructure to ChaosCenter.
|
||||
🏃 Chaos Infrastructure is running!!
|
||||
|
||||
🚀 Chaos Infrastructure Connection Successful!! 🎉
|
||||
👉 Litmus Chaos Infrastructure can be accessed here: https://preview.litmuschaos.io/targets
|
||||
```
|
||||
|
||||
#### Verify the new Chaos Infrastructure Connection\*\*
|
||||
|
@ -240,6 +237,18 @@ Enter the Chaos Experiment ID: test_exp
|
|||
|
||||
### Additional commands
|
||||
|
||||
- To change the ChaosCenter account's password use the `update password` command:
|
||||
|
||||
```shell
|
||||
litmusctl update password
|
||||
✓ Username: admin
|
||||
✓ Old Password: ********
|
||||
✓ New Password: ********
|
||||
✓ Confirm Password: ********
|
||||
|
||||
Password updated successfully!
|
||||
```
|
||||
|
||||
- To view the current configuration of `.litmusconfig`, type:
|
||||
|
||||
```shell
|
||||
|
|
|
@ -167,15 +167,12 @@ Service Account: litmus (new)
|
|||
Installation Mode: cluster
|
||||
|
||||
🤷 Do you want to continue with the above details? [Y/N]: Y
|
||||
👍 Continuing Chaos Delegate connection!!
|
||||
Applying YAML:
|
||||
https://preview.litmuschaos.io/api/file/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiMDUyZmFlN2UtZGM0MS00YmU4LWJiYTgtMmM4ZTYyNDFkN2I0In0.i31QQDG92X5nD6P_-7TfeAAarZqLvUTFfnAghJYXPiM.yaml
|
||||
👍 Continuing Chaos Infrastructure connection!!
|
||||
|
||||
💡 Connecting Chaos Delegate to ChaosCenter.
|
||||
💡 Connecting Chaos Infrastructure to ChaosCenter.
|
||||
🏃 Chaos Delegate is running!!
|
||||
|
||||
🚀 Chaos Delegate Connection Successful!! 🎉
|
||||
👉 Litmus Chaos Delegates can be accessed here: https://preview.litmuschaos.io/targets
|
||||
🚀 Chaos Infrastructure Connection Successful!! 🎉
|
||||
```
|
||||
|
||||
#### Verify the new Chaos Delegate Connection\*\*
|
||||
|
@ -203,6 +200,18 @@ litmusctl create chaos-scenario -f custom-chaos-scenario.yml --project-id="" --c
|
|||
|
||||
### Additional commands
|
||||
|
||||
- To change the ChaosCenter account's password use the `update password` command:
|
||||
|
||||
```shell
|
||||
litmusctl update password
|
||||
✓ Username: admin
|
||||
✓ Old Password: ********
|
||||
✓ New Password: ********
|
||||
✓ Confirm Password: ********
|
||||
|
||||
Password updated successfully!
|
||||
```
|
||||
|
||||
- To view the current configuration of `.litmusconfig`, type:
|
||||
|
||||
```shell
|
||||
|
|
17
go.mod
17
go.mod
|
@ -2,10 +2,9 @@ module github.com/litmuschaos/litmusctl
|
|||
|
||||
go 1.21
|
||||
|
||||
|
||||
require (
|
||||
github.com/argoproj/argo-workflows/v3 v3.5.5
|
||||
github.com/fatih/color v1.14.1
|
||||
github.com/fatih/color v1.17.0
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
|
||||
github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4
|
||||
|
@ -13,8 +12,8 @@ require (
|
|||
github.com/manifoldco/promptui v0.9.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/viper v1.17.0
|
||||
github.com/spf13/cobra v1.8.0
|
||||
github.com/spf13/viper v1.18.2
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
k8s.io/api v0.29.2
|
||||
k8s.io/apimachinery v0.29.2
|
||||
|
@ -26,7 +25,7 @@ require (
|
|||
github.com/chzyer/readline v1.5.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
|
@ -46,17 +45,17 @@ require (
|
|||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spf13/afero v1.10.0 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/afero v1.11.0 // indirect
|
||||
github.com/spf13/cast v1.6.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
|
|
41
go.sum
41
go.sum
|
@ -640,7 +640,7 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH
|
|||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -665,15 +665,15 @@ github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J
|
|||
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
|
||||
github.com/evanphx/json-patch v5.8.0+incompatible h1:1Av9pn2FyxPdvrWNQszj1g6D6YthSmvCfcN6SYclTJg=
|
||||
github.com/evanphx/json-patch v5.8.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
||||
github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
|
||||
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g=
|
||||
github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks=
|
||||
|
@ -867,8 +867,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec
|
|||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
|
||||
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
|
||||
|
@ -918,8 +918,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
|
|||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
|
||||
github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ=
|
||||
github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U=
|
||||
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
|
||||
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
|
@ -930,16 +930,16 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
|
|||
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
|
||||
github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
|
||||
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
|
||||
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
|
||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
||||
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
|
||||
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
|
||||
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
|
||||
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
|
||||
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
|
||||
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
|
||||
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
|
||||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
|
@ -993,7 +993,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
|||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
|
@ -1091,7 +1090,6 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
|
@ -1231,7 +1229,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
|
|
@ -16,6 +16,7 @@ const (
|
|||
infraID
|
||||
name
|
||||
token
|
||||
manifest
|
||||
}
|
||||
}
|
||||
`
|
||||
|
|
|
@ -151,3 +151,47 @@ func DeleteProbeRequest(pid string, probeid string, cred types.Credentials) (Del
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
func GetProbeYAMLRequest(pid string, request models.GetProbeYAMLRequest, cred types.Credentials) (GetProbeYAMLResponse, error) {
|
||||
var gqlReq GetProbeYAMLGQLRequest
|
||||
gqlReq.Query = GetProbeYAMLQuery
|
||||
gqlReq.Variables.ProjectID = pid
|
||||
gqlReq.Variables.Request = request
|
||||
|
||||
query, err := json.Marshal(gqlReq)
|
||||
if err != nil {
|
||||
return GetProbeYAMLResponse{}, errors.New("Error in getting probe details" + err.Error())
|
||||
}
|
||||
resp, err := apis.SendRequest(
|
||||
apis.SendRequestParams{
|
||||
Endpoint: cred.ServerEndpoint + utils.GQLAPIPath,
|
||||
Token: cred.Token,
|
||||
},
|
||||
query,
|
||||
string(types.Post),
|
||||
)
|
||||
if err != nil {
|
||||
return GetProbeYAMLResponse{}, errors.New("Error in getting probe details" + err.Error())
|
||||
}
|
||||
|
||||
bodyBytes, err := io.ReadAll(resp.Body)
|
||||
defer resp.Body.Close()
|
||||
if err != nil {
|
||||
return GetProbeYAMLResponse{}, errors.New("Error in getting probe details" + err.Error())
|
||||
}
|
||||
|
||||
if resp.StatusCode == http.StatusOK {
|
||||
var getProbeYAMLResponse GetProbeYAMLResponse
|
||||
err = json.Unmarshal(bodyBytes, &getProbeYAMLResponse)
|
||||
if err != nil {
|
||||
return GetProbeYAMLResponse{}, errors.New("Error in getting probes details" + err.Error())
|
||||
}
|
||||
if len(getProbeYAMLResponse.Errors) > 0 {
|
||||
return GetProbeYAMLResponse{}, errors.New(getProbeYAMLResponse.Errors[0].Message)
|
||||
}
|
||||
return getProbeYAMLResponse, nil
|
||||
|
||||
} else {
|
||||
return GetProbeYAMLResponse{}, errors.New("Unmatched status code:" + string(bodyBytes))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,6 +70,11 @@ const (
|
|||
}
|
||||
}
|
||||
`
|
||||
GetProbeYAMLQuery = `query getProbeYAML($projectID: ID!, $request: GetProbeYAMLRequest!) {
|
||||
getProbeYAML(projectID: $projectID, request: $request)
|
||||
}
|
||||
`
|
||||
|
||||
DeleteProbeQuery = `mutation deleteProbe($probeName: ID!, $projectID: ID!) {
|
||||
deleteProbe(probeName: $probeName, projectID: $projectID)
|
||||
}
|
||||
|
|
|
@ -60,3 +60,23 @@ type DeleteProbeResponse struct {
|
|||
type DeleteProbeResponseData struct {
|
||||
DeleteProbe bool `json:"deleteProbe"`
|
||||
}
|
||||
|
||||
type GetProbeYAMLGQLRequest struct {
|
||||
Query string `json:"query"`
|
||||
Variables struct {
|
||||
ProjectID string `json:"projectID"`
|
||||
Request model.GetProbeYAMLRequest `json:"request"`
|
||||
} `json:"variables"`
|
||||
}
|
||||
|
||||
type GetProbeYAMLResponse struct {
|
||||
Errors []struct {
|
||||
Message string `json:"message"`
|
||||
Path []string `json:"path"`
|
||||
} `json:"errors"`
|
||||
Data GetProbeYAMLResponseData `json:"data"`
|
||||
}
|
||||
|
||||
type GetProbeYAMLResponseData struct {
|
||||
GetProbeYAML string `json:"getProbeYAML"`
|
||||
}
|
||||
|
|
|
@ -82,10 +82,14 @@ func CreateProjectRequest(projectName string, cred types.Credentials) (CreatePro
|
|||
}
|
||||
|
||||
type listProjectResponse struct {
|
||||
Data []struct {
|
||||
ID string `json:"ProjectID"`
|
||||
Name string `json:"Name"`
|
||||
CreatedAt int64 `json:"CreatedAt"`
|
||||
Message string `json:"message"`
|
||||
Data struct {
|
||||
Projects []struct {
|
||||
ID string `json:"projectID"` // Adjusted field name
|
||||
Name string `json:"name"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
} `json:"projects"`
|
||||
TotalNumberOfProjects int `json:"totalNumberOfProjects"`
|
||||
} `json:"data"`
|
||||
Errors []struct {
|
||||
Message string `json:"message"`
|
||||
|
@ -104,7 +108,6 @@ func ListProject(cred types.Credentials) (listProjectResponse, error) {
|
|||
if err != nil {
|
||||
return listProjectResponse{}, err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode == http.StatusOK {
|
||||
|
@ -112,6 +115,7 @@ func ListProject(cred types.Credentials) (listProjectResponse, error) {
|
|||
err = json.Unmarshal(bodyBytes, &data)
|
||||
if err != nil {
|
||||
return listProjectResponse{}, err
|
||||
|
||||
}
|
||||
|
||||
if len(data.Errors) > 0 {
|
||||
|
|
|
@ -32,6 +32,7 @@ func SendRequest(params SendRequestParams, payload []byte, method string) (*http
|
|||
}
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Authorization", params.Token)
|
||||
req.Header.Set("Referer", params.Endpoint)
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -125,11 +126,12 @@ func UpgradeInfra(c context.Context, cred types.Credentials, projectID string, i
|
|||
|
||||
}
|
||||
|
||||
yamlOutput, err := k8s.UpgradeInfra([]byte(manifest.Data.GetManifest), kubeconfig)
|
||||
|
||||
yamlOutput, err := k8s.ApplyManifest([]byte(manifest.Data.GetManifest), kubeconfig)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
logrus.Println("🚀 Successfully Upgraded Chaos Infrastructure")
|
||||
|
||||
utils.White.Print("\n", yamlOutput)
|
||||
|
||||
// Creating a backup for current subscriber-config in the SUBSCRIBER
|
||||
|
|
|
@ -16,7 +16,9 @@ limitations under the License.
|
|||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
@ -173,6 +175,37 @@ var setAccountCmd = &cobra.Command{
|
|||
utils.PrintError(err)
|
||||
}
|
||||
utils.White_B.Printf("\naccount.username/%s configured", claims["username"].(string))
|
||||
credentials, err := utils.GetCredentials(cmd)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
endpoint := credentials.Endpoint + utils.AuthAPIPath + "/get_user/" + claims["uid"].(string)
|
||||
userResp, err := apis.SendRequest(
|
||||
apis.SendRequestParams{
|
||||
Endpoint: endpoint,
|
||||
Token: "Bearer " + credentials.Token,
|
||||
},
|
||||
nil,
|
||||
string(types.Get),
|
||||
)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
bodyBytes, err := io.ReadAll(userResp.Body)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
var userResponse map[string]interface{}
|
||||
err = json.Unmarshal(bodyBytes, &userResponse)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
isInitialLogin := userResponse["isInitialLogin"].(bool)
|
||||
if isInitialLogin {
|
||||
utils.White_B.Println("\n❗ This is your first time login. Update your default password to perform further operations.")
|
||||
utils.White.Println(fmt.Sprintf("Use '%s' to update your password.", utils.White_B.Sprint("litmusctl update password")))
|
||||
}
|
||||
} else {
|
||||
utils.Red.Println("\nError: some flags are missing. Run 'litmusctl config set-account --help' for usage. ")
|
||||
}
|
||||
|
|
|
@ -16,9 +16,10 @@ limitations under the License.
|
|||
package connect
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/litmuschaos/litmusctl/pkg/apis/environment"
|
||||
"github.com/litmuschaos/litmusctl/pkg/apis/infrastructure"
|
||||
|
||||
|
@ -235,34 +236,25 @@ var infraCmd = &cobra.Command{
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
path := fmt.Sprintf("%s%s/%s.yaml", credentials.Endpoint, utils.ChaosYamlPath, infra.Data.RegisterInfraDetails.Token)
|
||||
utils.White_B.Print("Applying YAML:\n", path)
|
||||
|
||||
// Print error message in case Data field is null in response
|
||||
if (infra.Data == infrastructure.RegisterInfra{}) {
|
||||
utils.White_B.Print("\n🚫 Chaos new infrastructure connection failed: " + infra.Errors[0].Message + "\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
//Apply infra connection yaml
|
||||
yamlOutput, err := k8s.ApplyYaml(k8s.ApplyYamlParams{
|
||||
Token: infra.Data.RegisterInfraDetails.Token,
|
||||
Endpoint: credentials.Endpoint,
|
||||
YamlPath: utils.ChaosYamlPath,
|
||||
}, kubeconfig, false)
|
||||
yamlOutput, err := k8s.ApplyManifest([]byte(infra.Data.RegisterInfraDetails.Manifest), kubeconfig)
|
||||
if err != nil {
|
||||
utils.Red.Print("\n❌ Failed to apply connection yaml: \n" + err.Error() + "\n")
|
||||
utils.White_B.Print("\n Error: \n" + err.Error())
|
||||
utils.Red.Println("\n❌ failed to apply infra manifest, error: " + err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
logrus.Println("🚀 Successfully Connected Chaos Infrastructure")
|
||||
|
||||
utils.White_B.Print("\n", yamlOutput)
|
||||
utils.White.Print("\n", yamlOutput)
|
||||
|
||||
// Watch subscriber pod status
|
||||
k8s.WatchPod(k8s.WatchPodParams{Namespace: newInfra.Namespace, Label: utils.ChaosInfraLabel}, &kubeconfig)
|
||||
|
||||
utils.White_B.Println("\n🚀 Chaos new infrastructure connection successful!! 🎉")
|
||||
utils.White_B.Println("👉 Litmus Chaos Infrastructure can be accessed here: " + fmt.Sprintf("%s/%s", credentials.Endpoint, utils.ChaosInfraPath))
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ var DescribeCmd = &cobra.Command{
|
|||
#describe a Chaos Experiment
|
||||
litmusctl describe chaos-experiment d861b650-1549-4574-b2ba-ab754058dd04 --project-id="d861b650-1549-4574-b2ba-ab754058dd04"
|
||||
|
||||
#describe a Probe
|
||||
litmusctl describe probe --project-id="d861b650-1549-4574-b2ba-ab754058dd04" --probe-id="exampleProbe"
|
||||
|
||||
Note: The default location of the config file is $HOME/.litmusconfig, and can be overridden by a --config flag
|
||||
`,
|
||||
}
|
||||
|
|
|
@ -102,22 +102,27 @@ var experimentCmd = &cobra.Command{
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
expOutput, err := cmd.Flags().GetString("output")
|
||||
utils.PrintError(err)
|
||||
// Add an output format prompt
|
||||
prompt := promptui.Select{
|
||||
Label: "Select an output format",
|
||||
Items: []string{"YAML", "JSON"},
|
||||
}
|
||||
i, _, err := prompt.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
os.Exit(1)
|
||||
if expOutput == "" {
|
||||
prompt := promptui.Select{
|
||||
Label: "Select an output format",
|
||||
Items: []string{"yaml", "json"},
|
||||
}
|
||||
_, value, err := prompt.Run()
|
||||
expOutput = value
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
switch i {
|
||||
case 0:
|
||||
switch expOutput {
|
||||
case "yaml":
|
||||
// Output as YAML (default)
|
||||
utils.PrintInYamlFormat(string(yamlManifest))
|
||||
case 1:
|
||||
case "json":
|
||||
// Output as JSON
|
||||
jsonData, err := yaml.YAMLToJSON(yamlManifest)
|
||||
if err != nil {
|
||||
|
@ -144,4 +149,5 @@ func init() {
|
|||
DescribeCmd.AddCommand(experimentCmd)
|
||||
|
||||
experimentCmd.Flags().String("project-id", "", "Set the project-id to list Chaos Experiments from the particular project. To see the projects, apply litmusctl get projects")
|
||||
experimentCmd.Flags().String("output", "", "Set the output format for the experiment")
|
||||
}
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
// /*
|
||||
// Copyright © 2021 The LitmusChaos Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// */
|
||||
|
||||
package describe
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
apis "github.com/litmuschaos/litmusctl/pkg/apis/probe"
|
||||
"github.com/litmuschaos/litmusctl/pkg/utils"
|
||||
"github.com/manifoldco/promptui"
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
var probeCmd = &cobra.Command{
|
||||
Use: "probe",
|
||||
Short: "Describe a Probe within the project",
|
||||
Long: `Describe a Probe within the project`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
credentials, err := utils.GetCredentials(cmd)
|
||||
utils.PrintError(err)
|
||||
|
||||
var getProbeYAMLRequest model.GetProbeYAMLRequest
|
||||
|
||||
pid, err := cmd.Flags().GetString("project-id")
|
||||
utils.PrintError(err)
|
||||
|
||||
if pid == "" {
|
||||
prompt := promptui.Prompt{
|
||||
Label: "Enter the Project ID",
|
||||
}
|
||||
result, err := prompt.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
pid = result
|
||||
}
|
||||
|
||||
var probeID string
|
||||
probeID, err = cmd.Flags().GetString("probe-id")
|
||||
utils.PrintError(err)
|
||||
// Handle blank input for Probe ID
|
||||
|
||||
if probeID == "" {
|
||||
utils.White_B.Print("\nEnter the Probe ID: ")
|
||||
fmt.Scanln(&probeID)
|
||||
|
||||
if probeID == "" {
|
||||
utils.Red.Println("⛔ Probe ID can't be empty!!")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
getProbeYAMLRequest.ProbeName = probeID
|
||||
|
||||
probeMode, err := cmd.Flags().GetString("mode")
|
||||
utils.PrintError(err)
|
||||
|
||||
if probeMode == "" {
|
||||
prompt := promptui.Select{
|
||||
Label: "Please select the probe mode ?",
|
||||
Items: []string{"SOT", "EOT", "Edge", "Continuous", "OnChaos"},
|
||||
}
|
||||
_, option, err := prompt.Run()
|
||||
if err != nil {
|
||||
fmt.Printf("Prompt failed %v\n", err)
|
||||
return
|
||||
}
|
||||
probeMode = option
|
||||
fmt.Printf("You chose %q\n", option)
|
||||
}
|
||||
getProbeYAMLRequest.Mode = model.Mode(probeMode)
|
||||
getProbeYAML, err := apis.GetProbeYAMLRequest(pid, getProbeYAMLRequest, credentials)
|
||||
if err != nil {
|
||||
utils.Red.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
getProbeYAMLData := getProbeYAML.Data.GetProbeYAML
|
||||
|
||||
probeOutput, err := cmd.Flags().GetString("output")
|
||||
utils.PrintError(err)
|
||||
|
||||
switch probeOutput {
|
||||
case "json":
|
||||
jsonData, _ := yaml.YAMLToJSON([]byte(getProbeYAMLData))
|
||||
var prettyJSON bytes.Buffer
|
||||
err = json.Indent(&prettyJSON, jsonData, "", " ")
|
||||
if err != nil {
|
||||
utils.Red.Println("❌ Error formatting JSON: " + err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Println(prettyJSON.String())
|
||||
|
||||
default:
|
||||
utils.PrintInYamlFormat(getProbeYAMLData)
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
DescribeCmd.AddCommand(probeCmd)
|
||||
probeCmd.Flags().String("project-id", "", "Set the project-id to get Probe details from the particular project. To see the projects, apply litmusctl get projects")
|
||||
probeCmd.Flags().String("probe-id", "", "Set the probe-id to get the Probe details in Yaml format")
|
||||
probeCmd.Flags().String("mode", "", "Set the mode for the probes from SOT/EOT/Edge/Continuous/OnChaos ")
|
||||
probeCmd.Flags().String("output", "", "Set the output format for the probe")
|
||||
}
|
|
@ -77,14 +77,16 @@ var experimentsCmd = &cobra.Command{
|
|||
}
|
||||
}
|
||||
|
||||
outputFormat := ""
|
||||
outputPrompt := promptui.Select{
|
||||
Label: "Select an output format",
|
||||
Items: []string{"table", "json", "yaml"},
|
||||
}
|
||||
_, outputFormat, err = outputPrompt.Run()
|
||||
outputFormat, err := cmd.Flags().GetString("output")
|
||||
utils.PrintError(err)
|
||||
|
||||
if outputFormat == "" {
|
||||
outputPrompt := promptui.Select{
|
||||
Label: "Select an output format",
|
||||
Items: []string{"table", "json", "yaml"},
|
||||
}
|
||||
_, outputFormat, err = outputPrompt.Run()
|
||||
utils.PrintError(err)
|
||||
}
|
||||
switch outputFormat {
|
||||
case "json":
|
||||
utils.PrintInJsonFormat(experiments.Data)
|
||||
|
|
|
@ -45,12 +45,12 @@ var projectsCmd = &cobra.Command{
|
|||
utils.PrintInJsonFormat(projects.Data)
|
||||
|
||||
case "yaml":
|
||||
utils.PrintInYamlFormat(projects.Data)
|
||||
utils.PrintInYamlFormat(projects.Data.Projects)
|
||||
|
||||
case "":
|
||||
itemsPerPage := 5
|
||||
page := 1
|
||||
totalProjects := len(projects.Data)
|
||||
totalProjects := len(projects.Data.Projects)
|
||||
|
||||
for {
|
||||
// calculating the start and end indices for the current page
|
||||
|
@ -69,9 +69,9 @@ var projectsCmd = &cobra.Command{
|
|||
// displaying the projects for the current page
|
||||
writer := tabwriter.NewWriter(os.Stdout, 8, 8, 8, '\t', tabwriter.AlignRight)
|
||||
utils.White_B.Fprintln(writer, "PROJECT ID\tPROJECT NAME\tCREATED AT")
|
||||
for _, project := range projects.Data[start:end] {
|
||||
for _, project := range projects.Data.Projects[start:end] {
|
||||
intTime := project.CreatedAt
|
||||
humanTime := time.Unix(intTime, 0)
|
||||
humanTime := time.Unix(intTime/1000, 0) // Convert milliseconds to second
|
||||
utils.White.Fprintln(writer, project.ID+"\t"+project.Name+"\t"+humanTime.String()+"\t")
|
||||
}
|
||||
writer.Flush()
|
||||
|
|
|
@ -24,6 +24,7 @@ import (
|
|||
|
||||
"github.com/litmuschaos/litmusctl/pkg/cmd/run"
|
||||
"github.com/litmuschaos/litmusctl/pkg/cmd/save"
|
||||
"github.com/litmuschaos/litmusctl/pkg/cmd/update"
|
||||
|
||||
"github.com/litmuschaos/litmusctl/pkg/cmd/connect"
|
||||
"github.com/litmuschaos/litmusctl/pkg/cmd/delete"
|
||||
|
@ -74,6 +75,7 @@ func init() {
|
|||
rootCmd.AddCommand(upgrade.UpgradeCmd)
|
||||
rootCmd.AddCommand(save.SaveCmd)
|
||||
rootCmd.AddCommand(run.RunCmd)
|
||||
rootCmd.AddCommand(update.UpdateCmd)
|
||||
|
||||
// Here you will define your flags and configuration settings.
|
||||
// Cobra supports persistent flags, which, if defined here,
|
||||
|
|
|
@ -23,9 +23,6 @@ import (
|
|||
models "github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmusctl/pkg/apis/experiment"
|
||||
|
||||
//"time"
|
||||
|
||||
//"github.com/gorhill/cronexpr"
|
||||
"github.com/litmuschaos/litmusctl/pkg/apis"
|
||||
"github.com/litmuschaos/litmusctl/pkg/utils"
|
||||
|
||||
|
@ -123,21 +120,22 @@ var experimentCmd = &cobra.Command{
|
|||
if (saveExperiment.Data == experiment.SavedExperimentDetails{}) {
|
||||
|
||||
if strings.Contains(err.Error(), "multiple write errors") {
|
||||
utils.Red.Println("\n❌ Chaos Experiment/" + chaosExperimentRequest.Name + " already exists")
|
||||
utils.Red.Println("\n❌ Chaos Experiment " + chaosExperimentRequest.Name + " already exists")
|
||||
os.Exit(1)
|
||||
}
|
||||
if strings.Contains(err.Error(), "no documents in result") {
|
||||
utils.Red.Println("❌ The specified Project ID or Chaos Infrastructure ID doesn't exist.")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
utils.White_B.Print("\n❌ Chaos Experiment/" + chaosExperimentRequest.Name + " failed to be created: " + err.Error())
|
||||
utils.White_B.Print("\n❌ Chaos Experiment " + chaosExperimentRequest.Name + " failed to be created: " + err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Successful creation
|
||||
utils.White_B.Println("\n🚀 Chaos Experiment/" + chaosExperimentRequest.Name + " successfully saved 🎉")
|
||||
utils.White_B.Println("\n🚀 Chaos Experiment " + chaosExperimentRequest.Name + " successfully saved 🎉")
|
||||
utils.White_B.Println("\nChaos Experiment ID: " + chaosExperimentRequest.ID)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package update
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/litmuschaos/litmusctl/pkg/apis"
|
||||
"github.com/litmuschaos/litmusctl/pkg/types"
|
||||
"github.com/litmuschaos/litmusctl/pkg/utils"
|
||||
"github.com/manifoldco/promptui"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var PasswordCmd = &cobra.Command{
|
||||
Use: "password",
|
||||
Short: `Updates an account's password.
|
||||
Examples(s)
|
||||
#update a user's password
|
||||
litmusctl update password
|
||||
`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
var (
|
||||
updatePasswordRequest types.UpdatePasswordInput
|
||||
)
|
||||
|
||||
credentials, err := utils.GetCredentials(cmd)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
promptUsername := promptui.Prompt{
|
||||
Label: "Username",
|
||||
}
|
||||
updatePasswordRequest.Username, err = promptUsername.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
promptOldPassword := promptui.Prompt{
|
||||
Label: "Old Password",
|
||||
Mask: '*',
|
||||
}
|
||||
updatePasswordRequest.OldPassword, err = promptOldPassword.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
NEW_PASSWORD:
|
||||
|
||||
promptNewPassword := promptui.Prompt{
|
||||
Label: "New Password",
|
||||
Mask: '*',
|
||||
}
|
||||
updatePasswordRequest.NewPassword, err = promptNewPassword.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
promptConfirmPassword := promptui.Prompt{
|
||||
Label: "Confirm New Password",
|
||||
Mask: '*',
|
||||
}
|
||||
confirmPassword, err := promptConfirmPassword.Run()
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
}
|
||||
|
||||
if updatePasswordRequest.NewPassword != confirmPassword {
|
||||
utils.Red.Println("\nPasswords do not match. Please try again.")
|
||||
goto NEW_PASSWORD
|
||||
}
|
||||
payloadBytes, _ := json.Marshal(updatePasswordRequest)
|
||||
|
||||
resp, err := apis.SendRequest(
|
||||
apis.SendRequestParams{
|
||||
Endpoint: credentials.Endpoint + utils.AuthAPIPath + "/update/password",
|
||||
Token: "Bearer " + credentials.Token,
|
||||
},
|
||||
payloadBytes,
|
||||
string(types.Post),
|
||||
)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
bodyBytes, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
utils.PrintError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if resp.StatusCode == http.StatusOK {
|
||||
utils.White_B.Println("\nPassword updated successfully!")
|
||||
} else {
|
||||
err := errors.New("Unmatched status code: " + string(bodyBytes))
|
||||
if err != nil {
|
||||
utils.Red.Println("\nError updating password: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
UpdateCmd.AddCommand(PasswordCmd)
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package update
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var UpdateCmd = &cobra.Command{
|
||||
Use: "update",
|
||||
Short: `It updates ChaosCenter account's details.
|
||||
Examples
|
||||
|
||||
#update password
|
||||
litmusctl update password
|
||||
`,
|
||||
}
|
|
@ -21,11 +21,8 @@ import (
|
|||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"k8s.io/client-go/discovery/cached/memory"
|
||||
|
@ -282,70 +279,8 @@ func ValidSA(namespace string, kubeconfig *string) (string, bool) {
|
|||
return sa, false
|
||||
}
|
||||
|
||||
// Token: Authorization token
|
||||
// EndPoint: Endpoint in .litmusconfig
|
||||
// YamlPath: Path of yaml file
|
||||
type ApplyYamlParams struct {
|
||||
Token string
|
||||
Endpoint string
|
||||
YamlPath string
|
||||
}
|
||||
|
||||
func ApplyYaml(params ApplyYamlParams, kubeconfig string, isLocal bool) (output string, err error) {
|
||||
path := params.YamlPath
|
||||
if !isLocal {
|
||||
path = fmt.Sprintf("%s%s/%s.yaml", params.Endpoint, params.YamlPath, params.Token)
|
||||
req, err := http.NewRequest("GET", path, nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
resp_body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
err = os.WriteFile("chaos-infra-manifest.yaml", resp_body, 0644)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
path = "chaos-infra-manifest.yaml"
|
||||
}
|
||||
|
||||
args := []string{"kubectl", "apply", "-f", path}
|
||||
if kubeconfig != "" {
|
||||
args = append(args, []string{"--kubeconfig", kubeconfig}...)
|
||||
} else {
|
||||
args = []string{"kubectl", "apply", "-f", path}
|
||||
}
|
||||
|
||||
cmd := exec.Command(args[0], args[1:]...)
|
||||
var stdout, stderr bytes.Buffer
|
||||
cmd.Stdout = &stdout
|
||||
cmd.Stderr = &stderr
|
||||
err = cmd.Run()
|
||||
outStr, errStr := stdout.String(), stderr.String()
|
||||
|
||||
// err, can have exit status 1
|
||||
if err != nil {
|
||||
// if we get standard error then, return the same
|
||||
if errStr != "" {
|
||||
return "", fmt.Errorf(errStr)
|
||||
}
|
||||
|
||||
// if not standard error found, return error
|
||||
return "", err
|
||||
}
|
||||
|
||||
// If no error found, return standard output
|
||||
return outStr, nil
|
||||
}
|
||||
|
||||
// UpgradeInfra upgrades the Chaos Infrastructure using the provided manifest and kubeconfig with the help of client-go library.
|
||||
func UpgradeInfra(manifest []byte, kubeconfig string) (string, error) {
|
||||
// ApplyManifest applies the provided manifest and kubeconfig with the help of client-go library.
|
||||
func ApplyManifest(manifest []byte, kubeconfig string) (string, error) {
|
||||
|
||||
// Get Kubernetes and dynamic clients along with the configuration.
|
||||
_, kubeClient, dynamicClient, err := getClientAndConfig(kubeconfig)
|
||||
|
@ -365,10 +300,7 @@ func UpgradeInfra(manifest []byte, kubeconfig string) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
logrus.Println("🚀 Successfully Upgraded Chaos Infra")
|
||||
|
||||
return "Success", nil
|
||||
|
||||
}
|
||||
|
||||
// retrieves the Kubernetes and dynamic clients along with the configuration.
|
||||
|
|
|
@ -41,3 +41,9 @@ type Credentials struct {
|
|||
Endpoint string
|
||||
ServerEndpoint string
|
||||
}
|
||||
|
||||
type UpdatePasswordInput struct {
|
||||
Username string `json:"username,omitempty"`
|
||||
OldPassword string
|
||||
NewPassword string
|
||||
}
|
||||
|
|
|
@ -28,5 +28,16 @@ var (
|
|||
"1.3.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0"},
|
||||
"1.4.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0"},
|
||||
"1.5.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0"},
|
||||
"1.6.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0"},
|
||||
"1.7.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0"},
|
||||
"1.8.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1"},
|
||||
"1.9.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0"},
|
||||
"1.10.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0"},
|
||||
"1.11.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0"},
|
||||
"1.12.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0"},
|
||||
"1.13.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0", "3.14.0"},
|
||||
"1.14.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0", "3.14.0", "3.15.0"},
|
||||
"1.15.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0", "3.14.0", "3.15.0", "3.16.0", "3.17.0", "3.18.0"},
|
||||
"1.16.0": {"3.0.0", "3.1.0", "3.2.0", "3.3.0", "3.4.0", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.0", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0", "3.14.0", "3.15.0", "3.16.0", "3.17.0", "3.18.0", "3.19.0"},
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue