-
Notifications
You must be signed in to change notification settings - Fork 18
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
client: configuration rework #577
Conversation
paging @iKevinY , @rwblickhan , @brian-nguyen for thoughts π |
Does this mean we can deploy multiple projects to a single remote? |
@rwblickhan no, but it does mean that you can more easily deploy a different project to the same remote to "recycle" them so to speak. For example:
then in another project:
then, when you run that said, if multi-project remotes is something people want... this would help that too π€ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let's not switch to YAML. YAML is increasingly becoming more and more heinous in my view, and it's only major advantage right now is that there are more [mature] libraries available for working with it. TOML is definitely the better choice, although I definitely think the current structure needs some work: there's a lot of nesting β an example of what good TOML looks like would be Rust's Cargo files.
With some consideration for nesting and similar design choices, TOML should definitely remain the choice of configuration markup in my opinion. As for the question of projects needing versions, perhaps that's something that Git's hashes can handle? (I think that's how it works in other similar systems).
I am for the shift to YAML because of the uniformity with cloud providers configuration files e.g gcloud and aws. |
@yaoharry the thing is, @mRabitsky note taken about the nested properties - I've update the configuration to use lists instead of maps. We lose the uniqueness guarantees, but we have a much nicer-looking configuration now (let me know if this still isn't what you had in mind: inertia.tomlname = "test"
url = ""
[[profile]]
name = "dev"
branch = ""
[profile.build]
type = "dockerfile"
buildfile = "Dockerfile.dev"
[[profile]]
name = "staging"
branch = ""
[profile.build]
type = "dockerfile"
buildfile = "Dockerfile.staging"
inertia.global[[remote]]
version = ""
name = "dev"
ip = "0.0.0.0"
[remote.ssh]
user = "bob"
pemfile = ""
ssh-port = ""
[remote.daemon]
port = "4043"
token = ""
webhook-secret = ""
verify-ssl = false
[remote.profiles]
asdf = "asdf"
oipo = "oiup"
[[remote]]
version = ""
name = "staging"
ip = "0.0.0.0"
[remote.ssh]
user = "bob"
pemfile = ""
ssh-port = ""
[remote.daemon]
port = "4043"
token = ""
webhook-secret = ""
verify-ssl = false
[remote.profiles]
fdsa = "fdsaf"
wqrte = "erterh"
|
@mRabitsky re:
By version I was referring to Inertia version. In |
7325533
to
f56b3ca
Compare
Codecov Report
@@ Coverage Diff @@
## master #577 +/- ##
==========================================
- Coverage 56.5% 55.36% -1.13%
==========================================
Files 62 67 +5
Lines 3020 3004 -16
==========================================
- Hits 1706 1663 -43
- Misses 1105 1145 +40
+ Partials 209 196 -13
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't dove into reading any code changes, but the configuration file split looks good to me. Sticking with TOML seems fine; it's human-editable enough.
One minor nitpick: I think pemfile
should be changed to something like identityfile
(this is the terminology that SSH uses within ~/.ssh/config
to refer to a private key file); while AWS issues PEM files, chances are that other cloud providers will just have typical public-private RSA keys.
thanks @iKevinY π i've updated the references you don't have to read the code, sorry for the sinful PR π |
ποΈ Ticket(s): Closes #101
π· Changes
Many, many changes to configuration, which then caused many changes in
client
, which means a lot had to change incmd
, which meanslocal
must be updated, and I cleaned up a lot of misc stuff... therefore, huge mess of a PR.Moral of the story: fix yo shit before building too much on top of your shit
Rough tl;dr
/path/to/project/inertia.toml
inertia project
to manage configuration (replacesinertia config
)~/.inertia/inertia.global
Misc changes
Examples (updated)
inertia.toml
inertia.global
Questions
version
, to track daemon version. do projects need it?toml
still the right choice? wouldyml
be better? tomlπ¦ Testing Instructions
nothing yet (tests are all busted)