From 2d12b72b8a4ec89a93efa471999c74cb588d24d0 Mon Sep 17 00:00:00 2001 From: Nico Wunder Date: Fri, 2 Apr 2021 13:06:43 +0200 Subject: [PATCH 1/4] advising users to enable ssh-agent first --- examples/hcloud-k3s/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/hcloud-k3s/README.md b/examples/hcloud-k3s/README.md index 9e8f636..f45b43d 100644 --- a/examples/hcloud-k3s/README.md +++ b/examples/hcloud-k3s/README.md @@ -2,10 +2,27 @@ Configuration in this directory creates a k3s cluster resources including network, subnet and instances. + ## Usage To run this example you need to execute: +make sure your SSH-Agent is running, and if not, start it and add your ssh-key: + +```bash +# example, with active ssh-agent +ssh-add -L +ssh-rsa AAAAB4NzaC4Xc2FA2A...Me3IABDICy+WANsg5Mc= /home/user/.ssh/id_rsa +ssh-rsa AAAAB4NzaC4Xc2FA2A...VpJaZ5EawNpQaPvqEw== /home/user/.ssh/another_user_key +# if nothing is loaded +# start the ssh-agent in the background +$ eval `ssh-agent -s` +> Agent pid 59566 +# add your SSH private key to the ssh-agent +ssh-add ~./ssh/path-to-sshkey +``` + +then you can simply set up a k3s cluster by running ```bash $ terraform init $ terraform plan From 1d45bfda28f15df2ebc9fb6258eb0a8223502e31 Mon Sep 17 00:00:00 2001 From: Nico Wunder Date: Fri, 2 Apr 2021 13:09:18 +0200 Subject: [PATCH 2/4] added preparation section, reordered text --- examples/hcloud-k3s/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/hcloud-k3s/README.md b/examples/hcloud-k3s/README.md index f45b43d..150b1ef 100644 --- a/examples/hcloud-k3s/README.md +++ b/examples/hcloud-k3s/README.md @@ -2,12 +2,9 @@ Configuration in this directory creates a k3s cluster resources including network, subnet and instances. +## Preparations -## Usage - -To run this example you need to execute: - -make sure your SSH-Agent is running, and if not, start it and add your ssh-key: +Make sure your SSH-Agent is running, and if not, start it and add your ssh-key: ```bash # example, with active ssh-agent @@ -18,11 +15,14 @@ ssh-rsa AAAAB4NzaC4Xc2FA2A...VpJaZ5EawNpQaPvqEw== /home/user/.ssh/another_user_k # start the ssh-agent in the background $ eval `ssh-agent -s` > Agent pid 59566 -# add your SSH private key to the ssh-agent +# add your SSH private key to the ssh-agent ssh-add ~./ssh/path-to-sshkey ``` -then you can simply set up a k3s cluster by running +## Usage + +After checking/enabling ssh-agent, to run this example you need to execute: + ```bash $ terraform init $ terraform plan From 67c59bfc14a3ed0f9f795fda310e83fe99af76d4 Mon Sep 17 00:00:00 2001 From: Nico Wunder Date: Fri, 2 Apr 2021 13:11:56 +0200 Subject: [PATCH 3/4] added URL to further docs, and commented the need --- examples/hcloud-k3s/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hcloud-k3s/README.md b/examples/hcloud-k3s/README.md index 150b1ef..62bed1c 100644 --- a/examples/hcloud-k3s/README.md +++ b/examples/hcloud-k3s/README.md @@ -4,7 +4,7 @@ Configuration in this directory creates a k3s cluster resources including networ ## Preparations -Make sure your SSH-Agent is running, and if not, start it and add your ssh-key: +Make sure your [SSH-Agent](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent) is running (it is neccessary for Terraform), and if not, start it and add your ssh-key: ```bash # example, with active ssh-agent From c83c02e02872e835ee509fafa891041e0615ced4 Mon Sep 17 00:00:00 2001 From: Nico Wunder Date: Fri, 2 Apr 2021 13:14:13 +0200 Subject: [PATCH 4/4] fixed styling for bash --- examples/hcloud-k3s/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/hcloud-k3s/README.md b/examples/hcloud-k3s/README.md index 62bed1c..97347d7 100644 --- a/examples/hcloud-k3s/README.md +++ b/examples/hcloud-k3s/README.md @@ -8,15 +8,16 @@ Make sure your [SSH-Agent](https://docs.github.com/en/github/authenticating-to-g ```bash # example, with active ssh-agent -ssh-add -L -ssh-rsa AAAAB4NzaC4Xc2FA2A...Me3IABDICy+WANsg5Mc= /home/user/.ssh/id_rsa -ssh-rsa AAAAB4NzaC4Xc2FA2A...VpJaZ5EawNpQaPvqEw== /home/user/.ssh/another_user_key +$ ssh-add -L +> ssh-rsa AAAAB4NzaC4Xc2FA2A...Me3IABDICy+WANsg5Mc= /home/user/.ssh/id_rsa +> ssh-rsa AAAAB4NzaC4Xc2FA2A...VpJaZ5EawNpQaPvqEw== /home/user/.ssh/another_user_key # if nothing is loaded # start the ssh-agent in the background $ eval `ssh-agent -s` > Agent pid 59566 # add your SSH private key to the ssh-agent -ssh-add ~./ssh/path-to-sshkey +$ ssh-add ~./ssh/path-to-sshkey +> Identity added: ~./ssh/path-to-sshkey (~./ssh/path-to-sshkey) ``` ## Usage