[Closed] Consult/edit server configs by rails console


#1

Hello,

there is any CLI option to consult and edit server configuration options (rails console for example)?

The idea is to automatize new appliances configuration.

(by “server configuration options” I wan’t to mean the options at “Settings > Configuration > Settings > Region > Zones > Zone > Server > Advanced”)

Thanks!


#2

@gtanzillo please review this question from @manel and forward to a SME if necessary.


#3

files files files

/var/www/miq/vmdb/config/

for example:

vmdb.yml.db
database.yml

#4

Finally: /var/www/miq/vmdb/config/settings.yml
Thanks!


#5

I can’t see that file in my build. Can you tell us more about where you got this file from, and how you are using it ?

Thanks,
David


#6

It was implemented on Darga, look here. Are you in Capablanca?

Whatever, changing /var/www/miq/vmdb/config/settings.yml apparently doesn’t change the configuration automatically.

So, I’m using:

File.write('/tmp/vmdb_conf.yml', VMDB::Config.get_file)

To get the active configurations, then I make my changes on file, and:

VMDB::Config.save_file(File.read('/tmp/vmdb_conf.yml'))

To save the configurations.