Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVOPS-3141 Fix tsh not found issue after installation #119

Merged
merged 7 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,24 @@ For a full list of functionalities, run `ridectl --help`
### Manual Installation
You can find pre-compiled macOS and Linux binaries for `ridectl` [on the GitHub releases page](https://github.com/Ridecell/ridectl/releases/latest).

Download the one appropriate to your platform, unzip it, and copy it to `/usr/local/bin/ridectl` or similar. Run `ridectl -h` to confirm it is installed correctly.
Download the one appropriate to your platform, unzip it, and copy it to `/usr/local/bin/ridectl` or similar. Run `ridectl status` for further configutation.

# Mac-os
```
curl -L "https://github.com/Ridecell/ridectl/releases/latest/download/ridectl_macos.zip" -o ./ridectl_macos.zip
unzip ridectl_macos.zip
chmod 0755 ridectl
cp ridectl /usr/local/bin/ridectl
ridectl -h
sudo cp ridectl /usr/local/bin/ridectl
# Follow instructions for further configuration
ridectl status
```
When running ridectl for first time, mac os will not allow the binary to execute. So solve this issue, navigate to System Prefrences > Security & Privacy and in General section, allow ridectl to open.
**Note:** When running `ridectl` for first time, Mac OS will not allow the binary to execute. So, to solve this issue, navigate to `System Prefrences` > `Security & Privacy` and in `General` section, allow `ridectl` to open.
# Linux
```
curl -L "https://github.com/Ridecell/ridectl/releases/latest/download/ridectl_linux.zip" -o ./ridectl_linux.zip
unzip ridectl_linux.zip
chmod 0755 ridectl
cp ridectl /usr/local/bin/ridectl
ridectl -h
sudo cp ridectl /usr/local/bin/ridectl
# Follow instructions for further configuration
ridectl status
```

# Add kubernetes contexts
You can follow the quip doc [here](https://ridecell.quip.com/O8W1AaqtWWAH/Ridectl)

Note:
Old ridectl code is still present [here](https://github.com/Ridecell/ridectl/tree/ridectl-v0.0.0). Ref:- ridectl-v0.0.0
2 changes: 2 additions & 0 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func init() {
shouldUpdate, _ := updatePrompt.Run()
if shouldUpdate == "y" {
selfUpdate()
pterm.Info.Println("Ridectl update is completed. Please re-run the command.")
os.Exit(0)
}
}
// Register all types from summon-operator and ridecell-controllers secrets
Expand Down
2 changes: 2 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func CheckTshLogin() {
if !installed {
pterm.Info.Println("Tsh cli not found, installing using sudo...")
installTsh()
// Get binPath after installing tsh
binPath, _ = exec.CheckBinary("tsh")
}

//Generate MD5 hash of installed tsh binary
Expand Down