tinkerbell / playground

Example deployments of the Tinkerbell Stack for use as playground environments
Apache License 2.0
127 stars 85 forks source link

Lots of refactors and cleanups #124

Closed mmlb closed 2 years ago

mmlb commented 2 years ago

Description

A bunch of QoL fixes for compose and vagrant.

Why is this needed

I was having trouble following some of the things done in compose especially when comparing vagrant vs terraform. I had a hunch that somethings weren't necessary and set about to check and started unraveling some threads.

How Has This Been Tested?

Lots of:

vagrant destroy -f; vagrant up provisioner; ... wait ...; vagrant up machine1; reboot

throughout deving and at the end.

How are existing users impacted? What migration steps/scripts do we need?

Should be easier to contribute to sandbox as there's even less special-case-stuff in vagrant and in the compose dirs. The "one-off-services" directories being named after the services themselves was nice to be able to go back and forth easily without having to a mental-map-lookup.

Checklist:

I have:

jacobweinstock commented 2 years ago

Hmm....there's a lot in this PR. step 4 in the vagrant-virtualbox quickstart failed for me with the following:

Every 2.0s: tink workflow events ; tink workflow state                                                                                                                              2022-03-15 16:38:19

Error: tink workflow events [id] takes an arguments
Usage:
  tink workflow events [id]

Examples:
tink workflow events [id]

Flags:
  -h, --help   help for events

Global Flags:
  -f, --facility string   used to build grpc and http urls

tink workflow events [id] takes an arguments
Error: tink workflow state [id] [flags] requires an argument
Usage:
  tink workflow state [id] [flags]

Examples:
tink workflow state [id]

Flags:
  -h, --help   help for state

Global Flags:
  -f, --facility string   used to build grpc and http urls

tink workflow state [id] [flags] requires an argument

A little further investigation shows:

$ cat /vagrant/compose/create-tink-records/workflow/workflow_id.txt
cat: /vagrant/compose/create-tink-records/workflow/workflow_id.txt: No such file or directory

I am still working through more of this PR.

mmlb commented 2 years ago

Hmm....there's a lot in this PR. step 4 in the vagrant-virtualbox quickstart failed for me with the following:

Thanks for linking this, I have not gone through that file top-to-bottom, so not surprised something isn't working. I'll see what else is wrong.

I am still working through more of this PR.

Thanks for looking :smile:

jacobweinstock commented 2 years ago

the machine1 vm, in the vagrant-virtualbox quickstart, is successfully booting into Hook, but failing to pull container images and therefore failing to run any workflows on the machine1.

image
mmlb commented 2 years ago

the machine1 vm, in the vagrant-virtualbox quickstart, is successfully booting into Hook, but failing to pull container images and therefore failing to run any workflows on the machine1.

image

bummer, guess I'll have to dust off a machine and fire up virtualbox to debug.

mmlb commented 2 years ago

the machine1 vm, in the vagrant-virtualbox quickstart, is successfully booting into Hook, but failing to pull container images and therefore failing to run any workflows on the machine1.

bummer, guess I'll have to dust off a machine and fire up virtualbox to debug.

@jacobweinstock can you fetch and try again? I had a typo before that I've fixed. I don't think that would explain what you saw though. I was able to try with virtualbox on mac just now and the workflow completed successfully. Happy to report the ubuntu virtualbox VM still has networking and did in fact grow its partition.

mmlb commented 2 years ago

Code keeps changing but I was trying to use it just now and the terraform code is throwing null_resource.setup (remote-exec): bash: generate-tls-certs/trust.sh: No such file or directory which make me wonder if this is pulling in some of the no more tls stuff, but in an incomplete way?

I figured out the trust.sh wasn't actually necessary so dropped it, but missed the ref in main.tf. Should be fixed now.