AndrewChubatiuk / nomad-hcloud-autoscaler

MIT License
35 stars 5 forks source link

Error when running demo setup #8

Open arnodirlam opened 1 year ago

arnodirlam commented 1 year ago

Hi there,

I've been running into some problems running the demo setup.

Steps to reproduce

  1. Clone repo
  2. cd into demo/setup
  3. Generate new SSH key (ssh-keygen -t ed25519) without passphrase and move it to ~/.ssh/nomad
  4. Add the corresponding public SSH key in the HCloud web UI for the project, name set to nomad
  5. Set env vars TF_VAR_hcloud_token and TF_VAR_ssh_key=~/.ssh/nomad
  6. Run terraform init
  7. Run terraform apply, confirm with yes for running, and yes for storing the SSH key fingerprint to connect

Outcome

Other info


Any hints on what else I could try to fix this?

Thanks a lot for your great work with maintaining the plugin and setting up the demo! 🙏

AndrewChubatiuk commented 1 year ago

Hi @arnodirlam I've updated demo in #9 PR. SSH keys will be generated by a module and also updated achubatiuk/hcloud-autoscaler:main docker image

arnodirlam commented 1 year ago

Thanks a lot for the swift and helpful response and PR!

I've checked out the demo-update branch, removed the nomad SSH Key from Hetzner Cloud, and ran Terraform again from scratch. Unfortunately, I'm still getting the same errors in the autoscaler job logs.

Just a guess: It's saying "unable to authenticate" for two things that it needs to query from hcloud, and that's before even provisioning a server, so maybe it's related to the HCloud token?

I don't know if there's anything cached that I need to refresh. But I couldn't find anything. The docker image is forced to be pulled every time, too. 😕

leoenes commented 1 year ago

Hi! I'm facing the same error about decoding "hcloud_location"and 'hcloud_ssh_keys'. Do you know why it happens?

AndrewChubatiuk commented 1 year ago

Sorry for late reply, there was an issue in a plugin, I'll release it soon

AndrewChubatiuk commented 1 year ago

Updated image in demo and prepared a new plugin release