Projects tigase _server server-core Issues #1401
Unable to initialize tigase in docker (#1401)
Open
Unknown opened 4 years ago

We are setting Tigase within Docker container. However, we are unable to perform initialization activities such as setting predefined API KEY for tigase in docker without accessing GUI. With GUI, means we need to restart other application servers which consumes this API key. Hence GUI is not an option. Please advice how this can be accomplished .. for instance is there any way such as REST api or DB scripts or file property update that can be performed during the docker start up.

Unknown commented 4 years ago

We do have a REST API however it's not possible to manage API Keys before creating just one (for example using installer).

If your case, where the aim is to have unattended setup, you have following options:

  • connect using XMPP client and execute ad-hoc command (see XEP-0050: Ad-Hoc Commands) on REST module of HTTP-API component to add API key (same ad-hocs are used in Web AdminUI)
  • in the repository add user rest@http and for that user add (in tig_pairs bridged via tig_nodes as explained in Tigase Schema documentation property with key = api-keys and value being XML representation, e.g.: <api-key owner="admin@awesome-tigase.org" key="a2751e90-178b-461c-adf4-39c6315a52e4"/>
  • create your own implementation of ApiKeyRepository (tigase.http.modules.rest.ApiKeyRepository) that would retrieve API keys from desired source (file storage or other database/repository)
Unknown commented 4 years ago

You can also use Tigase Command Line Management Tool which internally is an XMPP client, but allows you to manage Tigase from the command line.

Unknown commented 4 years ago

Hello @woj-tek ,

I encounter similar issue. I tried to run this script in the docker https://github.com/tigase/tigase-docker-support/blob/master/8.0.0/scripts/start.sh. It performs upgade-schema operation, but adminJID is not created in the schema. So I am not able to login into admin page after the server is started.

Can you please advise why adminJID is not created?

Thanks

Unknown commented 4 years ago

@agustino-lim I assume you don't want to to use WebInstaller (as described in QuickStart guide)?

And you do provide your configuration config.tdsl so that the schema is correctly created? In that case, after you start the server you can simply use jabber:iq:register and register account with JID matching one configured in config.tdsl file.

issue 1 of 1
Type
Bug
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1401
Please wait...
Page is in error, reload to recover