Closed aschaeffer closed 7 years ago
Just to clearify my confusion: A single Flex instance can run several Core instances. But without implementing all the stuff from this issues, all of the Core instances from a single Flex instance would be feed with the exact same configuration?
I was under the impression that a single Flex instance can already manage several Core instances with different configs.
It's about the configuration of Flex in the first place. You can have a completely other configuration for Flex in another profile, including another configuration of the instances. There is a config folder for each profile: {configFolder}/inexor/{profilename}
where to put the configuration files. The combination of core instances and profiles makes it very powerful.
For example:
$ ls /home/user/.config/inexor/default
profile.toml
instances.toml
$ cat /home/user/.config/inexor/default/profile.toml
port = 31416
hostname = localhost
loglevel = warning
logtoconsole = false
logtofile = true
$ cat /home/user/.config/inexor/default/instances.toml
[instances]
[instances.31414]
type = "server"
name = "Default Inexor Server"
description = "Badly Configurated Server Inc. proudly presents your first Inexor Server"
autostart = false
[instances.31417]
type = "client"
name = "Default Inexor Client"
description = "The default Inexor Client"
autostart = false
$ ls /home/user/.config/inexor/devenv
profile.toml
instances.toml
$ cat /home/user/.config/inexor/devenv/profile.toml
port = 31416
hostname = localhost
loglevel = debug
logtoconsole = true
logtofile = false
$ cat /home/user/.config/inexor/devenv/instances.toml
[instances]
[instances.31414]
type = "server"
name = "Dev Server"
autostart = true
[instances.31417]
type = "client"
name = "Dev Client"
description = "The Dev Client"
autostart = true
Just as a little note: the game client will also want to create a new local game server if it wants to play offline (the listenserver will be removed in one of the next PRs)
Done.
If something is not working => reopen.
Profiles greatly improves the startup procedure of Inexor Flex, makes the Inexor Shell able to control other instances of Inexor Flex and makes the development process more effective.
Goals
User Stories
npm start
npm run dev
Inexor Tree
/flex/profiles/default
= "client"/flex/profiles/current
= "devenv"/flex/profiles/{profilename}
{configFolder}/inexor/{profilename}
Profiles we deliver by default
Logging
client
server
devenv
Instances
client
server
devenv
Config files
Inexor Shell
profilename@hostname:port > _
default@localhost:31416 > _
remote1
remote1@remotehostname.com:31416 > _
inexor shell --profile=devenv
inexor shell --profile=remoteprofile
default@localhost:31416 > use devenv
devenv@localhost:31416 > use remote1
remote1@remotehostname.com:31416 > _
profile create <name> <hostname> <port>
profile remove <name>
profile switch <name>
Inexor Flex
npm start
npm run inexor --profile default
npm run inexor --profile devenv
node server/index.js --profile=devenv
getConfigPath(profile, 'instances.toml')
getConfigPath(currentProfile, 'instances.toml')
to start the Inexor Core instancesNotice(s)