xetys / hetzner-kube

A CLI tool for provisioning kubernetes clusters on Hetzner Cloud
Apache License 2.0
745 stars 116 forks source link

cluster create failed - Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'. #338

Open chris2k20 opened 4 years ago

chris2k20 commented 4 years ago

Can not create a kubernetes cluster with 1 Master and 1 Worker. I got the following error:

$ hetzner-kube cluster create --name my-cluster --ssh-key id_rsa_kube
...
worker-01    : prepare packages                   23.5% [=>------------]
run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 12020/10/13 20:53:30 run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1

Latest Release installed:

$ hetzner-kube version                                            
0.5.1

But all in all very nice project.

wethinkagile commented 4 years ago

The reason for this is that Ubuntu removed this in https://github.com/trailofbits/algo/pull/1857. I fixed this in: https://github.com/stevek-pro/hetzner-kube/commit/dd1151e5c4824cf6d4ca36ba87add6d4943e1768#diff-05ccfec64e35da719893752165973807b38513a9ba1563416ea61bc0ad7a0918

But then running into missing unit file wg-quick thus I tried above fix with https://github.com/xetys/hetzner-kube/issues/329 ubuntu-20-04 branch hitting same error. Got it then to run with my fix and the ubuntu version and with krzko's cloud-config https://github.com/xetys/hetzner-kube/issues/329#issuecomment-651561356

I will merge this all together and can do a PR if anybody wants it.

eugene-chernyshenko commented 4 years ago

I fixed this issue in https://github.com/xetys/hetzner-kube/pull/339

wethinkagile commented 4 years ago

The HWE Kernel Patch is missing in https://github.com/xetys/hetzner-kube/pull/339 and therefore not working for me.

I incorporated the lessons from the cloud-config workaround mentioned in https://github.com/xetys/hetzner-kube/issues/329#issuecomment-651561356 into the source code of my latest fix.

So with my fix, you can just do a minimal: hetzner-kube cluster create --name <name> --ssh-key <key> to successfully provision your cluster.

Here's my PR: https://github.com/xetys/hetzner-kube/pull/340

Shleif91 commented 3 years ago
hetzner-kube cluster create --name k8s --ssh-key k8s --master-count 1 --master-server-type cpx11 --worker-count 1 --worker-server-type cpx11
2021/09/08 21:55:18 Creating new cluster

NAME:k8s
MASTERS: 1
WORKERS: 1
ETCD NODES: 0
HA: false
ISOLATED ETCD: false
2021/09/08 21:55:18 creating server 'k8s-master-01'...
  --- [======================================] 100%
2021/09/08 21:55:23 Created node 'k8s-master-01' with IP 135.181.96.193
2021/09/08 21:55:23 creating server 'k8s-worker-01'...
  --- [======================================] 100%
2021/09/08 21:55:29 Created node 'k8s-worker-01' with IP 135.181.96.196
2021/09/08 21:55:29 sleep for 10s...
k8s-master-01        : prepare packages                   15.4% [>-------------]
k8s-worker-01        : installing transport tools         17.6% [>-------------]
run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 12021/09/08 21:58:00 run failed
command:add-apt-repository ppa:wireguard/wireguard -y
stdout:Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
The team named '~wireguard' has no PPA named 'ubuntu/wireguard'
Please choose from the following available PPAs:

err:Process exited with status 1

hetzner-kube version 0.5.1

Has someone fixed this?

tmemenga commented 3 years ago

@Shleif91 last release version 0.5.1 is quite old and does not work anymore. I would suggest to build the binary yourself using master and try again.

Shleif91 commented 3 years ago

@syscrest, thanks for your reply!

My stepts (ubuntu 20.04.3)

  1. sudo apt install golang
  2. git clone https://github.com/xetys/hetzner-kube.git
  3. cd hetzner-kube/
  4. go build -o hetzner-kube
  5. ./hetzner-kube cluster create --name k8s --ssh-key k8s --master-count 1 --master-server-type cpx11 --worker-count 1 --worker-server-type cpx11
2021/09/08 22:43:55 Creating new cluster

NAME:k8s
MASTERS: 1
WORKERS: 1
ETCD NODES: 0
HA: false
ISOLATED ETCD: false
2021/09/08 22:43:55 creating server 'k8s-master-01'...
  --- [======================================] 100%
2021/09/08 22:44:00 Created node 'k8s-master-01' with IP 49.12.45.125
2021/09/08 22:44:00 creating server 'k8s-worker-01'...
  --- [======================================] 100%
2021/09/08 22:44:06 Created node 'k8s-worker-01' with IP 49.12.65.25
2021/09/08 22:44:06 sleep for 10s...
k8s-worker-01: install packages (1)
k8s-master-01: install packages (1)
k8s-master-01: waiting for cloud-init completion (2)
k8s-worker-01: waiting for cloud-init completion (2)
k8s-master-01: installing transport tools (3)
k8s-worker-01: installing transport tools (3)
k8s-worker-01: prepare packages (4)
k8s-master-01: prepare packages (4)
k8s-worker-01: updating packages (5)
k8s-master-01: updating packages (5)
k8s-worker-01: installing packages (6)
k8s-master-01: installing packages (6)
k8s-worker-01: set environment variables (7)
k8s-worker-01: packages installed (8)
k8s-worker-01: disabling swap (9)
k8s-master-01: set environment variables (7)
k8s-worker-01: packages installed (10)
k8s-master-01: packages installed (8)
k8s-master-01: disabling swap (9)
k8s-master-01: packages installed (10)
k8s-worker-01: configure wireguard (11)
k8s-master-01: configure wireguard (11)
k8s-master-01: wireguard configured (12)
k8s-worker-01: wireguard configured (12)
k8s-master-01: sysctl settings (13)
k8s-master-01: kubeadm init (14)
k8s-master-01: configure kubectl (15)
k8s-master-01: install canal (16)
k8s-master-01: complete! (17)
k8s-worker-01: registering node (13)
k8s-worker-01: sysctl settings (14)
k8s-worker-01: complete! (15)
2021/09/08 22:49:11 Cluster successfully created!
wethinkagile commented 3 years ago

Without https://github.com/xetys/hetzner-kube/issues/329#issuecomment-651561356 you get above success results?

Shleif91 commented 3 years ago

Without #329 (comment) you get above success results?

I didn't do anything, just downloaded and build