Skip to content
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

CloudNet v4 Support #3759

Open
TheCGuyGitHub opened this issue Aug 27, 2024 · 10 comments
Open

CloudNet v4 Support #3759

TheCGuyGitHub opened this issue Aug 27, 2024 · 10 comments

Comments

@TheCGuyGitHub
Copy link

I would like to be able to..

It would be nice, if you can have an Config option, to enable CloudNet Support.

Is your feature request related to a problem? Please describe.

When it is enabled Plan would set the ServerName to the name of the CloudNet service.
This is really useful, beacuse if the services/servers aren't static you cannot change the ServerName and beacuse of this, all servers would use the same Name

@AuroraLS3
Copy link
Collaborator

Can Cloudnet set environment variables?

Plan supports environment variables for configuration.

PLAN_PLUGIN_SERVER_NAME=name
PLAN_SERVER_UUID=uuid

@TheCGuyGitHub
Copy link
Author

CloudNet supports environmentVariables, but i don't know if they can be set dynamicly, i will look if i can do that

@TheCGuyGitHub
Copy link
Author

Sadly, cloudnet does not allow to set the environmentVariables automaticly to the server name

@AuroraLS3
Copy link
Collaborator

Does it support running scripts before server starts? Doing a export PLAN_SERVER_NAME=$CLOUDNET_SERVER_NAME (Or whatever their environment variable for the name is) could be used to do this in bash.

@TheCGuyGitHub
Copy link
Author

I dont think so, the way you set the environment variables is in a json file. i have it like this right now
"environmentVariables": { "PLAN_PLUGIN_SERVER_NAME": "test-1" }

@AuroraLS3
Copy link
Collaborator

It just seems really backwards to get configuration variables by having to ask the platform rather than the platform dictating the value - usually everything is configured top down to retain control over what is happening. I'd ask Cloudnet first if they would add support for setting specific environment variables as the server name, copying your example, something like

"environmentVariables": { "PLAN_PLUGIN_SERVER_NAME": "$serverName" }

@AuroraLS3
Copy link
Collaborator

It should be way easier for them to implement change like that than me having to add their api and figure out what to call and where

@TheCGuyGitHub
Copy link
Author

I have already asked, and they said that i would have to code that myself, i will try it, and thank you for the quick response
but i still have a question, do i have to set the ServerName to nothing in the config if i use the environmentVariables?
beacuse right now, it seems like it didnt take the environmentVariable and still uses the name from the config

@AuroraLS3
Copy link
Collaborator

I probably remembered the config path wrong. Basically uppercase it and put _ between any levels, might be PLAN_SERVER_NAME instead.

If the environment variable exists the one in the file won't be read at all.

@TheCGuyGitHub
Copy link
Author

Okay, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants