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

✨ Add install script #188

Merged
merged 3 commits into from
Feb 9, 2024
Merged

Conversation

francostellari
Copy link
Contributor

Summary

Provide a convenience script to install kflex, Kubeflex CLI, without using brew.

Usage: ./install-kubeflex.sh [--version release] [--os linux|darwin] [--arch amd64|arm64] [--ensure-folder name] [--strip-bin] [-V|--verbose] [-X]

--version  can  select a specific version, e.g. v0.4.1, default is the latest version
--os can select a specific OS type, default is the host OS type
--arch can select a specific OS architecture, default is the host OS architecture
--ensure-folder can specify an installation folder, default is $PWD/kubeflex
--strip-bin will remove the bin subfolder
--verbose will print installation progress

Related issue(s)

Fixes #

Signed-off-by: francostellari <[email protected]>

update sudo

Signed-off-by: francostellari <[email protected]>

update sudo

Signed-off-by: francostellari <[email protected]>
Copy link
Collaborator

@pdettori pdettori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but need some adjustment to make it work on macOS - see comment

fi

if [ $strip_bin == "true" ]; then
tar -C $folder -zxf kubeflex.tar.gz --wildcards --strip-components=1 bin/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that --wildcards option is not supported on macOS. I am getting the error:

$ bash <(curl -s -L https://raw.githubusercontent.com/kubestellar/kubeflex/0bb3db7f20b2c98d1d057bc7fa03132330da6dc0/scripts/install-kubeflex.sh) --ensure-folder /usr/local/bin --strip-bin
tar: Option --wildcards is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help


```shell
sudo su <<EOF
bash <(curl -s https://raw.githubusercontent.com/kubestellar/kubeflex/main/scripts/install-kubeflex.sh) --ensure-folder /usr/local/bin --strip-bin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be best to add -L as well to curl to follow redirects

Copy link
Collaborator

@pdettori pdettori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@pdettori pdettori merged commit 489fc3f into kubestellar:main Feb 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants