keptn-sandbox / keptn-on-k3s

Instructions and scripts how to deploy Keptn on K3s
Apache License 2.0
29 stars 23 forks source link

Installation failed for helm #18

Open checkelmann opened 4 years ago

checkelmann commented 4 years ago

Hi,

When running the installer on a naked EC2 Instance, I'm getting this error while installing:

#######################################>
# Installing Helm
#######################################>
Downloading https://get.helm.sh/helm-v3.3.4-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
helm not found. Is /usr/local/bin on your $PATH?
Failed to install helm
        For support, go to https://github.com/helm/helm.
[root@ip-10-54-32-26 ~]# which helm
/usr/bin/which: no helm in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@ip-10-54-32-26 ~]# echo $PATH
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@ip-10-54-32-26 ~]#

So helm is getting installed in /usr/local/bin but this is not within the PATH on a fresh ec2 with amazon linux on it.

A possible workaround would be adding the path variable before running the installation

PATH=/usr/local/bin:$PATH

grabnerandi commented 4 years ago

Hey Christian. I am doing all of my tests on EC2 - using an Amazon Linux 2 OS. Can you tell me which EC2 image you are using?

checkelmann commented 4 years ago

Hi Andi,

the default Amazon Linux ami-0947d2ba12ee1ff75 amzn2-ami-hvm-2.0.20200917.0-x86_64-gp2

As ec-user the $PATH Variable for /usr/local/bin is set, but not for root. It should work when running the installer with sudo but if you switch to user root with sudo -i and running the installer, it will fail like described above.


       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-10-54-32-52 ~]$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin
[ec2-user@ip-10-54-32-52 ~]$ sudo -i
[root@ip-10-54-32-52 ~]# echo $PATH
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@ip-10-54-32-52 ~]#