Dumping the installation wizard and configuring admin from the command line

I am writing unattended install script for hub. After unpacking the tarball, I configure the service as folows:

./hub.sh configure \
"--base-url={{ hub_base_url }}" \
"--listen-port=8082" \
"--data-dir={{ data_dir }}/hub" \
"--logs-dir={{ logs_dir }}/hub" \
"--temp-dir={{ temp_dir }}/hub" \
"--backups-dir={{ backup_dir }}/hub"

./hub.sh start \
--J-Djetbrains.jetpass.admin.restore=true \
 --J-Djetbrains.jetpass.admin.name=Administrator \
--J-Djetbrains.jetpass.admin.login={{ hub_admin_user }} \
--J-Djetbrains.jetpass.admin.password={{ hub_admin_pass }} \
--J-Djetbrains.jetpass.admin.email={{ hub_admin_email }}

sleep 60

curl -X POST http://localhost:8082/api/wizard/wait/dump

sleep 60

./hub.sh stop

 

This works, but it has the downside that we are starting the service and relying on arbitrary timeouts.

  1. Is there a way to set up the admin user without starting the service (ideally through 'configure' command).
  2. Is there a way to dump the wizard and enable the HUB bundle without starting the service and posting a HTTP request?

Thanks,

Dimitar

 

P.S. no, we can't use the docker image because it requires root access and access to the public docker registry.

2 comments
Comment actions Permalink
Official comment

In your case, before the first start (i.e., the folder conf/internal doesn't exist yet) the following configure command should be run

./hub.sh configure \
--base-url={{ hub_base_url }} \
--listen-port=8082 \
--data-dir={{ data_dir }}/hub \
--logs-dir={{ logs_dir }}/hub \
--temp-dir={{ temp_dir }}/hub \
--backups-dir={{ backup_dir }}/hub \
--root-user={{ hub_admin_user }} \
--root-password={{ hub_admin_pass }}

start-command (skipping Configuration Wizard) is

./hub.sh start \  
--J-Ddisable.configuration.wizard.on.clean.install=true

Sincerely,
Alexey Barsov
JetBrains Developer

Please sign in to leave a comment.