Open htdvisser opened 5 years ago
An alternative idea would be to have a ttn-lw-stack quickstart
or ttn-lw-cli quickstart
wizard that would generate a config file based on some detected things and some questions to users. I'll work that idea out next week.
An alternative idea would be to have a
ttn-lw-stack quickstart
orttn-lw-cli quickstart
wizard that would generate a config file based on some detected things and some questions to users. I'll work that idea out next week.
This is very complementary and also very handy, especially if we can print out a yaml and env file.
It's not entirely alternative as having a public FQDN setting also affects future config that contains a host name, and it makes configuration easy, regardless of generating it.
@neoaggelos please see what's still TODO in here.
For this, I think we should just go with the common-deployment
flag suggestion. The quickstart
command sounds useful, but would not really work well with the rest of the Getting Started guide. Also, it might cause issues in the future with new configs.
Keeping this on Next Up, because I am currently busy with higher priority issues, namely #1406.
It would be good to mention this in the configuration instructions, specifically the section at the bottom discussing deployments on localhost using the machine's static IP in place of localhost
.
An alternative idea would be to have a
ttn-lw-stack quickstart
orttn-lw-cli quickstart
wizard that would generate a config file based on some detected things and some questions to users. I'll work that idea out next week.
@neoaggelos if possible, i definitely vote for quickstart
. Prompts are great for making steps digestible. One common-deployment
option which optionally overwrites other options feels a little bit less intuitive.
Summary
I think it would be a good idea to add a
--common-deployment
(or similar) flag tottn-lw-stack
andttn-lw-cli
from which the other address/URL flags can be derived.Why do we need this?
Because right now it's a bit too much config.
What is already there? What do you see now?
If you want to configure
ttn-lw-stack
for a different host than localhost, you have to change all of:Similarly, for
ttn-lw-cli
:What is missing? What do you want to see?
Since many deployments will likely use a "common" pattern (the one we'll provide in the Getting Started), we might as well provide a flag that reduces repetition. A
--common-deployment=demo.thethingsstack.io
would configure all above settings to use thehttps://
scheme, thedemo.thethingsstack.io
host and the default ports for these "common" deployments (so HTTPS on 443, gRPC on 8884).How do you propose to implement this?
Add logic such as: "if
common-deployment
flag set, then for each of the above flags, set it to the common format"Can you do this yourself and submit a Pull Request?
I can, if this is something we want.