-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add ability to set vm instance name #514
Comments
Two things:
Correct me if this is wrong, but the workflow would be:
Ideally we just solve this automatically which still allowing the custom My proposal:
Then once we've generated it the first time, it's stable regardless of any future config changes? |
That does sound like a better approach. It's almost like you know what you're talking about! 🤪 So finding the instance name would then be, in order of priority:
If either option 2 or 3 is used, the config file is written and can then be used from then on. Putting my time management hat on: Are you happy for these to be split out? As in, do you see the ability to set an instance name as being dependent on it being written and fetched from a config file, or would two PRs be acceptable, one as a progression of the other? |
I think we could roll 1 and 2 together? So even if Since the Separate PRs is good 👍 |
Summary
Currently when adding a new site to Trellis with Lima, if the new site is higher in the alphabet then Lima treats this as a new instance. This seems to be because Trellis CLI looks for the first name in the list of sites in development and this list is sorted alphabetically when it's created.
As a result, if you add a site beginning with 'a' to a Trellis setup that has sites beginning with 'b' or lower, you get a message:
and the CLI proceeds to create a new instance.
Two options:
I'm advocating for the latter because
This would probably be good as an option in
trellis.cli.local.yml
so that you don't always have to specify it in a flag.Additional context
If for example you're using Trellis for multiple sites and you're naming your production servers, even if it's server1, server2 etc, it would make more sense to be able to refer to each instance by the server name rather than by whichever site is highest alphabetically on it. It would also help in instances where you have to have the instance name hardcoded, see Discourse for one example.
The text was updated successfully, but these errors were encountered: