tinkerbell / tink

Workflow Engine for provisioning Bare Metal
https://tinkerbell.org
Apache License 2.0
913 stars 134 forks source link

Give known configuration for tinkerbell on a Packet host #70

Closed alexellis closed 4 years ago

alexellis commented 4 years ago

I would like to see a known configuration for the installer script in #62 which provides everything needed without any guess-work or troubleshooting.

I.e. "run these commands" and it results in Tinkerbell being up.

cc @gauravgahlot

A comment on this issue should be sufficient to get started, but the above should be in the docs eventually.

DavidZisky commented 4 years ago

Provided sample vars works fine for default Ubuntu 18.04 packet installation. The issue is in the script itself:

https://github.com/tinkerbell/tink/pull/62#issuecomment-617229081

@gauravgahlot already updated the script to use ifconfig and I just tested it so I can confirm that supplied example vars works fine. Feel free to test yourself and let me know if it works for you too

alexellis commented 4 years ago

Thanks for helping with this. Can you elaborate on what you mean by "it works fine"? When I ran through the steps and it did not? Do you mean it will work fine when #62 is merged (or now that it's been updated)?

DavidZisky commented 4 years ago

By "it works fine" I mean you no longer hit "unknown interface" error and script will fail on a later step (logging to docker registry) due to different error. And I mean when #62 gets merged of course. But I'm seeing few more issues with networking which I guess makes docker login fail, so while the example configuration is fine - it won't work until all the issues in the script get resolved.

alexellis commented 4 years ago

Thank you for clarifying, so I am not going crazy 😄

gauravgahlot commented 4 years ago

@alexellis I tested the script for CentOS 7 and Ubuntu 18.04 on:

alexellis commented 4 years ago

I'm trying it now.

alexellis commented 4 years ago

I can confirm that the script completed, but there is't a clear next action.

Creating deploy_kibana_1 ... done

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.
         Name                       Command                  State                                  Ports                            
-------------------------------------------------------------------------------------------------------------------------------------
deploy_boots_1           /boots -dhcp-addr 0.0.0.0: ...   Up                                                                         
deploy_cacher_1          /cacher                          Up             0.0.0.0:42111->42111/tcp, 0.0.0.0:42112->42112/tcp          
deploy_certs_1           /entrypoint.sh                   Exit 0                                                                     
deploy_db_1              docker-entrypoint.sh postgres    Up (healthy)   0.0.0.0:5432->5432/tcp                                      
deploy_elasticsearch_1   /usr/local/bin/docker-entr ...   Up             0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp              
deploy_fluentbit_1       /fluent-bit/bin/fluent-bit ...   Up             2020/tcp, 0.0.0.0:24224->24224/tcp, 0.0.0.0:24224->24224/udp
deploy_hegel_1           cmd/hegel                        Up                                                                         
deploy_kibana_1          /usr/local/bin/kibana-docker     Up             0.0.0.0:5601->5601/tcp                                      
deploy_nginx_1           nginx -g daemon off;             Up             192.168.1.2:80->80/tcp                                      
deploy_registry_1        /entrypoint.sh /etc/docker ...   Up                                                                         
deploy_tink-cli_1        /bin/sh -c sleep infinity        Up                                                                         
deploy_tink-server_1     tink-server                      Up (healthy)   0.0.0.0:42113->42113/tcp, 0.0.0.0:42114->42114/tcp          
INFO: tinkerbell stack setup completed successfully on ubuntu server
root@ams1-c3:~#

I see that the tink CLI's source code is downloaded under tink/cli/tink, but it's not built? Do you plan on downloading a release binary or building as part of the script so that users can make use of it after bootstrap?

A help message with what to do next would also be a good addition at the end of the script.

alexellis commented 4 years ago

This error is also confusing / unactionable. What is the value when used with compose? It's not documented here -> https://github.com/tinkerbell/tink/blob/master/docs/first-good-workflow.md or here -> https://github.com/tinkerbell/tink/blob/master/docs/setup.md

root@ams1-c3:~/tink/cli/tink# ./tink 
2020/04/23 10:01:51 undefined TINKERBELL_CERT_URL
invidian commented 4 years ago

I think you still need to use tink from tink-cli container. I was using alias for it alias tink='PACKET_API_AUTH_TOKEN="" PACKET_API_URL="" docker-compose -f /root/deploy/docker-compose.yml exec tink-cli tink'

gauravgahlot commented 4 years ago

As soon as the PR #62 is merged, I will be sending another one with changes to first-good-workflow. And accordingly will also add a "next" section at the end of setup script.

mrmrcoleman commented 4 years ago

@alexellis Could you comment on the remaining delta between this request and what you now see at https://tinkerbell.org/setup please?

We believe @kdeng3849 and others may have closed the gap but want to be sure we haven't missed anything out.

alexellis commented 4 years ago

@gauravgahlot #62 is merged now, did you have time to raise the PR you mentioned for the "next action" section at the end of the script?

gauravgahlot commented 4 years ago

@alexellis I had updated the first-good-workflow docs (PR #85). I have sent another PR #87 for updating the setup script and docs with "what's next".

@mrmrcoleman WRT https://tinkerbell.org and the issue, I have done work. Since we could not take that up in the call today, I will be sending a few details on the channel.

mrmrcoleman commented 4 years ago

Thanks @gauravgahlot I would check @jacobsmith928 's comment in Slack about that issue, as his team are already working on updating the website.

alexellis commented 4 years ago

Additional feedback given on https://github.com/tinkerbell/tinkerbell.github.io/issues/6

gauravgahlot commented 4 years ago

@alexellis Since we have other issues that describe current challenges with the setup, can we close this one now?

alexellis commented 4 years ago

This is covered now. At the moment setup.sh and the terraform both work and cover this.