Noninteractive installation


#1

Hi guys,

I’m curious about, is it possible to perform unattended installation with previously configured parameters?
Has anyone tried to create docker container with current RhodeCode version?


#2

Hi,

Installer has an option to take an JSON input to set some parameters as default. For example:

        rccontrol install VCSServer '{"host":"127.0.0.1"}'
        rccontrol install Enterprise '{"password":"qweqwe", "email":"marcin@rhodecode.com", "username":"admin", "host":"0.0.0.0", "repo_dir":"/path/to/repos"}'
        rccontrol install Community '{"password":"qweqwe", "email":"marcin@rhodecode.com", "username":"admin", "host":"0.0.0.0", "repo_dir":"/path/to/repos"}'

However you still have to manually agree to license prompts.


#3

Big thanks for the answer!

Agreement can be applied with ‘yes’ command

yes | rccontrol install VCSServer '{"host":"127.0.0.1", "port":"10001"}'


#4

Are there any option for Database type ?
Database type - [s]qlite, [m]ysql, [p]ostresql:

Where can I get full option list?


#5

Hmm, i just realized in case of database it would only support “database”:“sqlite” with automated mode, else it would trigger additional questions.

we’ll make an extension to the installer:

  • add --accept-licenses flag
  • allow to specify database: type/host/port/name/user/password

#6

But I can change DB options later with config file and restart RhodeCode instance, am I right?


#7

Yes, DB configuration is only to initially write to .ini file. So pickingin sqlite would be fully automatic.


#8

I have made docker container, if somebody interested.
https://hub.docker.com/r/fragpit/rhodecodece/


#9

Thanks for the docker image !

Ps, from version 1.9.0+ of Control here are full examples of automated installations

$ rccontrol install --accept-license VCSServer  '{"host":"127.0.0.1", "port":10202}'
$ rccontrol install --accept-license Enterprise '{"host":"127.0.0.1", "port":10101, "password":"qweqwe", "email":"support@rhodecode.com", "username":"admin", , "repo_dir":"/tmp", "database": "sqlite"}'
$ rccontrol install --accept-license Community  '{"host":"127.0.0.1", "port":10101, "password":"qweqwe", "email":"support@rhodecode.com", "username":"admin", , "repo_dir":"/tmp", "database": "postgresql://postgres:secret@localhost/rhodecode"}'
$ rccontrol install --accept-license Community  '{"host":"127.0.0.1", "port":10101, "password":"qweqwe", "email":"support@rhodecode.com", "username":"admin", , "repo_dir":"/tmp", "database": "mysql://root:secret@localhost/rhodecode”}'