Projects tigase _server tigase-http-api Issues #44
Adjust Setup module to properly generate DSL instead of properties file (#44)
Closed
Andrzej Wójcik (Tigase) opened 7 years ago
Due Date
2017-04-20

Adjust Setup module to properly generate DSL instead of properties file

Andrzej Wójcik (Tigase) commented 7 years ago

I've moved code responsible for setup logic from groovy-html files into java classes inside setup module, which will make it easier to control flow of a setup. Now logic code of groovy-html files is limited.

Due to that it was possible to create configuration object (map/tree of beans and settings) and use ConfigWriter to generate DSL from it.

wojciech.kapcia@tigase.net commented 7 years ago
  • admin account is not created:
Adding XMPP Admin Account, URI: jdbc:mysql://localhost/tigaseinst?user=root&password=root
RepositoryFactory.getAuthRepository(null, jdbc:mysql://localhost/tigaseinst?user=root&password=root,{data-repo-pool-size=1})
Error initializing DBtigase.db.TigaseDBException: Problem accessing repository for user: admin@localhost
  • configuration is not saved:
--cluster-mode = true
--debug = server
--virtual-hosts = 
admin = [ 'admin@localhost' ]
'config-type' = 'default'
amp (active: false) {}
bosh (active: false) {}
eventbus (active: false) {}
'message-archive' (active: false) {}
monitor (active: false) {}
muc (active: false) {}
pubsub (active: false) {}
s2s (active: false) {}
'sess-man' () {
    disco (active: false) {}
    'domain-filter' (active: false) {}
    'http://jabber.org/protocol/stats' (active: false) {}
    'message-archive-xep-0136' (active: false) {}
    pep (active: false) {}
    'urn:xmpp:mam:1' (active: false) {}
}
ws2s (active: false) {}
Installation of Tigase XMPP Server is finished.

etc/init.properties configuration file is updated with new configuration. Please restart server to apply new configuration.
wojtek@atlantiscity.local tigase-server-7.2.0-SNAPSHOT-b4759 $ cat etc/init.properties
'config-type' = 'setup'

http () {
    setup () {
        'admin-user' = 'admin'
        'admin-password' = 'tigase'
    }
}
Andrzej Wójcik (Tigase) commented 7 years ago

I've fixed issue with adding admin user. This issue was caused by fact that I've not set version of schema which I wanted to load and DBSchemaLoader reported that it loaded schema. It should throw exception when there is no such file as in other case Setup is not aware of this fact.

I've also fixed issue with saving generated configuration.

wojciech.kapcia@tigase.net commented 7 years ago

tigase-server-7.2.0-SNAPSHOT-b4778

Above issues are fixed - thanks.

A couple minute things:

  • I think we can update main page and change: If you notice any problems please report them to address: artur.hefczyc@tigase.org to point to our forums? or at least put there support email?

  • It looks that DBSchemaLoader is missing ssl for MySQL - not a big issue as now it only generates warning in the log, but in the future it may stop working:

2017-04-18 14:31:09.278 [http-server-pool-4]  DBSchemaLoader.validateDBConnection()  INFO:   Validating DBConnection, URI: jdbc:mysql://localhost/?user=root&password=root
Tue Apr 18 14:31:09 CLT 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Artur Hefczyc commented 7 years ago

Wojciech Kapcia wrote:

  • I think we can update main page and change: If you notice any problems please report them to address: artur.hefczyc@tigase.org to point to our forums? or at least put

Yes, definitely remove my email and put a link to our forums and bugs reporting, new ticket link.

Andrzej Wójcik (Tigase) commented 7 years ago

I've updated information about place where issues should be reported - links to forum and issue creation in Tigase XMPP Server project.

I added support for enabling/disabling SSL on database connection and dropped custom code responsible for DB uri generation used later for generation of config file and replaced it with implementation which already exists in @DBSchemaLoader@.

wojciech.kapcia@tigase.net commented 7 years ago

Works ok now.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
5168
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-http-api#44
Please wait...
Page is in error, reload to recover