tinkerbell / tinkerbell.org

The code behind our website.
https://tinkerbell.org
Apache License 2.0
9 stars 31 forks source link

https://tinkerbell.org/setup should be updated to point to latest docs #6

Closed mrmrcoleman closed 4 years ago

mrmrcoleman commented 4 years ago

https://tinkerbell.org/setup currently points to Packet specific documentation.

Let's instead update this page to the latest docs.

This looks like a good start: https://github.com/tinkerbell/tink/issues/49

I'd love to embed these videos if they are up to date: https://github.com/tinkerbell/tink/pull/62 (If we do this let's make a reminder to update them whenever the instructions change)

kqdeng commented 4 years ago

Current known environments used for Tinkerbell (to take into consideration):

I use VirtualBox with the following Vagrantfile for machine running tinkerbell:

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
# config.disksize.size = '30GB'
config.vm.provider :virtualbox do |v|
v.check_guest_additions = false
v.functional_vboxsf     = false
v.cpus                  = 2
v.memory                = 2048
v.customize ['modifyvm', :id, '--paravirtprovider', 'kvm']
end
config.vm.network "private_network", ip: "192.168.50.2", auto_config: false
end

2nd machine (worker) is just manually created and assigned to the same network as controller node. Stack is set up using setup.sh script (before recent changes, I didn't update to the latest for now, as I work on something else)

mrmrcoleman commented 4 years ago

@kdeng3849 Here is Alex Ellis' request for this: https://github.com/tinkerbell/tink/issues/70

alexellis commented 4 years ago

We could do with having this updated to prevent confusion. A project-level API token is the best option for restricted permissions, however it only partially works then gives "access denied", therefore, I would suggest strongly we amend the language to:

"You must use a Packet User API Token, and not a project API token"

Screenshot 2020-04-30 at 12 47 55

And also this - a clear split with headings for both of the approaches (manual or automated server creation):

Screenshot 2020-04-30 at 12 28 55

The default location of SJC1 - West Coast is less than ideal for latency, how about using a region in the middle? Between the West Coast and Europe like EWR1?

alexellis commented 4 years ago
Screenshot 2020-04-30 at 14 20 17

@gauravgahlot we have an inconsistency now between the docs and setup.sh - if this is an "automated" install into a known configuration, then the user shouldn't have to guess what inputs to enter or be promoted at all.

I would suggest that we either:

1) Provide the sample prompts in the docs 2) Or include the sample env-vars / answer in the terraform bundle / git repo

alexellis commented 4 years ago

I set values according to this comment, however there were confusing warnings, that I think we need to silence or fix:

Screenshot 2020-04-30 at 14 24 14
alexellis commented 4 years ago
WARNING: The PACKET_API_AUTH_TOKEN variable is not set. Defaulting to a blank string.
WARNING: The PACKET_API_URL variable is not set. Defaulting to a blank string.

Should these be set? Why are we warning about that? Does it need to be added into the setup docs page to configure these or should we silence the warning?

alexellis commented 4 years ago

Glad to see the feedback was integrated @gauravgahlot, however, can you fix the \n appearing in the output? Perhaps a second echo would be easier?

Screenshot 2020-04-30 at 14 27 15
alexellis commented 4 years ago

Do we still need to run those instructions given that the image appears to have been set up already? (perhaps by setup.sh?)

Screenshot 2020-04-30 at 14 28 21 Screenshot 2020-04-30 at 14 28 18
alexellis commented 4 years ago
Pushing hardware data into database

Exec into the deploy_tink-cli_1 container.
Create a file containing the hardware data (in json format), replacing <worker_mac_addr> with the actual worker MAC.

If this is a step-by-step guide, you'll need to provide exact commands. This should be an easy fix for you.

alexellis commented 4 years ago
docker exec -ti deploy_tink-cli_1 /bin/sh

@gauravgahlot could you fix?

alexellis commented 4 years ago

Step 3.

Replace vi with something you can paste easily:

with:

export MAC="98:03:9b:30:1f:ee"
cat > /tmp/hardware.json<<EOF
{
  "id": "373324c8-7fb5-11ea-9227-0242ac120004",
  "arch": "x86_64",
  "allow_pxe": true,
  "allow_workflow": true,
  "ip_addresses": [
    {
     "address": "192.168.1.5",
     "address_family": 4,
     "enabled": true,
     "gateway": "192.168.1.1",
     "management": true,
     "netmask": "255.255.255.0",
     "public": false
    }
  ],
  "facility_code": "ewr1",
  "network_ports": [
    {
      "data": {
      "mac": "$MAC"
      },
      "name": "eth0",
      "type": "data"
    }
  ]
}
EOF
alexellis commented 4 years ago

cat > <<EOF can be used in all the other steps

It would also be better to capture the output of the CLI commands perhaps like: tink workflow create --output id so that editing isn't required and scripting is possible.

Screenshot 2020-04-30 at 14 43 32

The end of the tutorial ends abruptly after having executed the hello-world task, but I have no output to view, and the machine seems to be sat at the Alpine Linux login with no context or next step.

How can we improve on this? cc @mrmrcoleman