How to install a particular version of helm? - shell

I am installing helm through a script which uses these commands to install the latest version -
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3.2.0
chmod 700 get_helm.sh
./get_helm.sh
however , i don't want it to install the latest versions always. how can i install the version v3.2.4 always?

You can find all the versions of helm binaries on Helm Releases page
If you want to install v3.2.4
$ wget https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz
$ tar -zxvf helm-v3.2.4-linux-amd64.tar.gz
$ sudo mv linux-amd64/helm /usr/local/bin/helm
$ helm version
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"clean", GoVersion:"go1.13.12"}
Documentation

It is possible to use the DESIRED_VERSION environment variable to specify the version (by github tag) that should be installed by the get_helm.sh script.
curl -fsSL -o get_helm.sh \
https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
DESIRED_VERSION=v3.2.4 ./get_helm.sh
helm version
console output:
Helm v3.2.4 is available. Changing from version v3.5.0.
Downloading https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
...
version.BuildInfo{Version:"v3.2.4",
GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688",
GitTreeState:"clean", GoVersion:"go1.13.12"}

Use --version option to specify desired version
$ ./get_helm.sh -h
Accepted cli arguments are:
[--help|-h ] ->> prints this help
[--version|-v <desired_version>] . When not defined it fetches the latest release from GitHub e.g. --version v3.0.0 or -v canary
[--no-sudo] ->> install without sudo

Related

Homebrew specific version of sshuttle

While I was trying to install the older version of Sshutle,
I am trying to install sshuttle version 0.78.5 and using this command:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb
I am getting this error:
Calling Installation of sshuttle from a GitHub commit URL is disabled!
Use 'brew extract sshuttle' to stable tap on GitHub instead.
How do I enable the command?
Use of brew extract is not trivial. I think simplest solution for you is to execute:
curl --silent \
https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb \
--output sshuttle.rb
brew install ./sshuttle.rb

How to install elasticsearch5.6 in macos?

Now I am not able to install elasticsearch5.6 in my macos.
brew can't find the formula elasticsearch#5.6.
I executed following command line.
brew install elasticsearch#5.6
but it shows following result.
enter image description here
Please help me to solve this issue.
You can install Elasticsearch version 5.6 as a .tar.gz archive for MacOS using the following link :
https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-0
After downloading, run the command tar -xzvf myfile.tar.gz, you can also refer to these other methods for compressing and uncompressing tar files in macOS
To download elastic search 5.6 an install on a simple command you can use:
wget
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz
&& tar -xzvf elasticsearch-5.6.0.tar.gz
note: if you don't have wget, to install it just run brew install wget
Otherwise if you don't want to install this version of elasticsearch you can use a docker image:
Install Docker.
Run this command:
docker run -it --rm -p 9200:9200 elasticsearch:5.6-alpine

How to install helm in travis pipeline

I am doing this to install helm in my travis job
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
And when the command helm init --client-only runs in the travis, it says
Not Really a helm install
Can someone help me out in this?
This command is the correct way to install helm in the Travis pipeline:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
And then you can check by using
helm version
As Installing Helm chapter from the official Helm guide says:
Download your desired version from here
Unpack it (tar -zxvf helm-v3.0.0-linux-amd64.tar.gz)
Find the helm binary in the unpacked directory, and move it to its desired destination (mv Linux-amd64/helm /usr/local/bin/helm).
From there, you should be able to run the client and add the stable repo : helm help

How to update golang on codeanywhere.com with Ubuntu

How to update golang on codeanywhere.com with Ubuntu 14.04?
The default container uses the version from Ubuntu repos, instead of golang PPA.
As of writing it's 1.6 and the newest version is 1.9.
(can't comment yet) Just an additional information, the steps in Paweł Prażak's answer work when you run on a Blank Container. If you run them on a Go predefined stack it won't update.
I also recommend to change the GOPATH value to your workspace, running
export GOPATH=$HOME/go
Then run go env to check if the values are correctly updated.
Thanks for the answer by the way, Paweł!
You can easily install the latest golang release in the container by using this script:
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
Full details: https://github.com/udhos/update-golang
Create and new Blank Container with Ubuntu:
Connect to the container with SSH.
Follow the instructions on the official wiki.
First install the add-apt-repository support:
sudo apt-get update
sudo apt-get install -y software-properties-common
Now install the recent version of golang (refer to the wiki for up to date instructions):
sudo add-apt-repository ppa:gophers/archive
sudo apt-get update
sudo apt-get install golang-1.9-go
Make sure to put the binary on PATH, e.g.:
sudo ln -s /usr/lib/go-1.9/bin/go /usr/local/bin/go
Now the newer version should be available:
$ go version
go version go1.9.2 linux/amd64
Add $GOPATH pointing to the workspace and add $GOPATH/bin to $PATH in ~/.profile:
cat << EOF >> ~/.profile
export GOPATH="\$HOME/workspace"
export PATH="\$GOPATH/bin:\$PATH"
EOF
Apply the new ~/.profile:
. ~/.profile
Also make is missing, if you need it:
sudo apt-get install build-essential

can not install mvn 3.3.3 on ubuntu 14.04

I am using Ubuntu 14.04. I need to run mvn 3.3.3. Currently, the installed mvn version 3.0.5. When I enter
sudo apt-get install maven
it says
maven is already the newest version
is there a way to force install mvn 3.3.3?
Add a ppa containing maven 3.3.3, for example this one by executing these instructions on the command-line:
sudo apt-get purge maven maven2 maven3
sudo add-apt-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
If you are not comfortable with a PPA (personal package archive) where you have no assurance of the provenance this is an alternative.
From a security perspective if you don't know where it came from don't install it.
In my linked article I retrieve the latest file from apache which is a known and trusted source. You can get the latest version
\#identify the latest version of maven
latest=$(curl http://www-us.apache.org/dist/maven/maven-3/ | tac | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,3\}[0-9]\).*/\1/p' | head -1)
\#download it
wget http://www-us.apache.org/dist/maven/maven-3/$latest/binaries/apache-maven-$latest-bin.tar.gz
then install it from
\#Unpack it
sudo tar -zxf apache-maven-$latest-bin.tar.gz -C /usr/local/
\#create a sym link to it
sudo ln -s /usr/local/apache-maven-$latest/bin/mvn /usr/bin/mvn
as outlined in the link above.
I just installed maven 3.2.5.
To do that I downloaded the version I wanted as noted.
Unzipped using: tar -xvf apache-maven-3.2.5-bin.tar.gz
to: /opt/ and let p7zip do its thing.
Then in the terminal I did the following:
Check environment variable value:
echo $JAVA_HOME
Adding to PATH:
export PATH=/opt/apache-maven-3.2.5/bin:$PATH
typed: mvn -v
reviewed the output
For me the above worked fine.

Resources