Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Guide for Talos #133

Open
paulwollgast opened this issue Mar 25, 2022 · 11 comments
Open

How to Guide for Talos #133

paulwollgast opened this issue Mar 25, 2022 · 11 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@paulwollgast
Copy link

/kind feature

Describe the solution you'd like
First and foremost thank you very much for this great work!

I'd like to ask for a Guideline / How to Guide to bootstrap the cluster with Talos as I'm sure many people would appreciate and favor it over standard linux distros like e.g. ubuntu.

@batistein
Copy link
Contributor

good point! I will see if we could add one. right now I'm a little bit limited in time...
Here a short description how to use talos with caph.

export HCLOUD_TOKEN=<your-token>
packer build templates/node-image/talos-image/image.json

This will build the node-image more information could be found here

Then you could create a cluster as usual but with the talos flavor. Of course you need to start the talos bootstrap and control-plane controller as well.

So right now the easiest way would be to use the tilt setup.

Adding a tilt-settings.json with the following content.

{
  "kustomize_substitutions": {
      "HCLOUD_TOKEN": "<your-token>",
      "HCLOUD_SSH_KEY": "<ssh-name-in-hcloud>",
      "HCLOUD_REGION": "fsn1",
      "CONTROL_PLANE_MACHINE_COUNT": "3",
      "WORKER_MACHINE_COUNT": "3",
      "KUBERNETES_VERSION": "v1.23.4",
      "HCLOUD_IMAGE_NAME": "talos-image",
      "HCLOUD_CONTROL_PLANE_MACHINE_TYPE": "cpx31",
      "HCLOUD_WORKER_MACHINE_TYPE": "cpx31",
      "CLUSTER_NAME": "testing"
  },
  "talos-bootstrap": "true"
}

And then:

make tilt-up

Maybe you need to install the prerequisites listet in the developer docs or alternatively make install-dev-prerequisites

In the tilt UI under http://localhost:10350/
you should see some buttons. One have a description with talos, after clicking it a workload cluster should be bootstrapped.

Feel free to enhance the docs with a PR in the meantime ;)

@paulwollgast
Copy link
Author

Thank you very much for the guideline @batistein
Currently I'm also a little short on time, I'll however try it out asap and see how I can update the docs accordingly!

@batistein batistein added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Aug 22, 2022
@madnight
Copy link

@batistein

Could you also write a comment on how to setup Talos on hetzner dedicated machines? I successfully provisioned my bare-metal server HetznerBareMetalHost with the HetznerBareMetalMachineTemplate (currently Ubuntu 20.04) + bootstrap cluster template KubeadmConfigTemplate, but i would like to use Talos instead of Ubuntu + kubeadm. I guess I need something like the cluster-template-hcloud-talos-packer.yaml but for dedicated servers (cluster-template-hetzner-baremetal-talos-control-planes.yaml or so).

Thanks in advance.

@batistein
Copy link
Contributor

@madnight unfortunately that's not possible. The baremetal provider integration uses heavily ssh commands. So you could only use OS Images which supports SSH and you can only use the Kubeadm Bootstrap/Control Plane Provider for Baremetal.

@madnight
Copy link

@batistein Thanks for your fast response. Talos also provides OS Images https://github.com/siderolabs/talos/releases/download/v1.2.3/metal-amd64.tar.gz wouldn't it be possible to download the OS Image in Hetzner Resuce Mode. Something like

    installImage:
      image: 
        url: https://github.com/siderolabs/talos/releases/download/v1.2.3/metal-amd64.tar.gz
#        path: >-
#          /root/.oldroot/nfs/install/../images/Ubuntu-2004-focal-64-minimal-hwe.tar.gz
      partitions:
        - fileSystem: ext4
          mount: /boot
          size: 1024M
        - fileSystem: ext4
          mount: /
          size: all

According to the Hetzner Docs https://docs.hetzner.com/robot/dedicated-server/operating-systems/installimage/ allows custom OS images.

After installation the dedicated server could just reboot and the bootstrapping of the server would be done. The rest (creating a k8s cluster) could either configured manually with talosctl or with a talosctl script that runs inside the bootstrap cluster.

@Preisschild
Copy link
Contributor

@madnight unfortunately that's not possible. The baremetal provider integration uses heavily ssh commands. So you could only use OS Images which supports SSH and you can only use the Kubeadm Bootstrap/Control Plane Provider for Baremetal.

Would a merge request be accepted that uses the Talos API instead of SSH when using the Talos CAPI providers?

@batistein
Copy link
Contributor

For sure! We are happy to see a PR which adds this functionality ;) It's only relevant that it doesn't break the current cabpk implementation.
If you are interested in contributing we can also find a timeslot for doing a planning, QA session.
You can find me also in the kubernetes slack workspace.

@a5r0n
Copy link
Contributor

a5r0n commented Feb 20, 2023

Would a merge request be accepted that uses the Talos API instead of SSH when using the Talos CAPI providers?

@Preisschild do u have any plans to work on this?

@Preisschild
Copy link
Contributor

Would a merge request be accepted that uses the Talos API instead of SSH when using the Talos CAPI providers?

@Preisschild do u have any plans to work on this?

Not currently, I decided to go another route for now.

@a5r0n
Copy link
Contributor

a5r0n commented Feb 23, 2023 via email

@lieberlois
Copy link

@paulwollgast Did you get this working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants