fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shreyaank Byadagi <shreya...@confluxtechnologies.com>
Subject Re: multi-tenant processes (how to run scripts manually)
Date Wed, 09 Nov 2016 06:57:57 GMT
Thynn,

Hope these links will help you in understanding scheduler jobs:
*Link 1: *
http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/
*Link 2: *
https://mifosforge.jira.com/wiki/display/docs/Manage+Scheduler+Jobs

Regards
Shreyaank



 Sent with Mailtrack
<https://mailtrack.io/install?source=signature&lang=en&referral=shreyaank@confluxtechnologies.com&idSignature=22>

On Wed, Nov 9, 2016 at 12:20 PM, Thynn Win <thynn.win@thitsaworks.com>
wrote:

> Hi Shreyaank,
>
>
>
> Thank you for the explanation about the script and scheduler jobs. It was
> exactly what I was hoping to find out – the location of the script and the
> impact (if run manually bypassing the reboot).
>
>
>
> We appreciate your raising the ticket to help reduce the service
> interruption on Prod server.
>
>
>
> I’ll try to read up on what Scheduler Jobs do. If you have info on it,
> could you give us some pointers?
>
>
>
> Thank you again,
> Thynn
>
>
>
>
>
>
>
>
>
> *From:* Shreyaank Byadagi [mailto:shreyaank@confluxtechnologies.com]
> *Sent:* Wednesday, 9 November, 2016 01:34
> *To:* dev@fineract.incubator.apache.org
> *Cc:* Thynn Win <thynn.win@thitsaworks.com>
> *Subject:* Re: multi-tenant processes (how to run scripts manually)
>
>
>
> Hello Thynn,
>
>
>
> 1.The reason to restart the server is whenever you add a new tenant, it
> requires *migration scripts* to be applied to tenants database and *Scheduler
> Jobs * to be activated to that particular tenant.
>
> If you don't want to restart the server you can run *barebones_db.sql*
> manually to create database schema. But the problem with this approach is
> scheduler jobs for newly created tenant will not be active.
>
> I am raising an enhancement ticket to allow users to add new tenants with
> active scheduler jobs without restarting the server.
>
>
>
> 2. You need to wait until server is restarted completely.
>
>
>
> Regards
>
> Shreyaank
>
>
>
>
> [image: Image removed by sender.] Sent with Mailtrack
> <https://mailtrack.io/install?source=signature&lang=en&referral=shreyaank@confluxtechnologies.com&idSignature=22>
>
> [image: Image removed by sender.]
>
>
>
> On Wed, Nov 9, 2016 at 6:33 AM, Nikhil Pawar <nickrp89@gmail.com> wrote:
>
> Hello Thynn,
>
>
> Experts from our community would reply to your queries.
>
> In the mean time, let me give you my naive understanding on your issue.
>
> The reason we restart the server each time when we create a new tenant is
> that:
>
> Restart runs the migration(flyway) scripts under resource folder
> *fineract-provider\src\main\resources\sql\migrations\core_db.*
>
> This makes your new tenant aligned with the current version of the Fineract
> running.
>
>
> I once tried the approach of creating a new tenant, applying these scripts
> manually and then update *tenant* table and *tenants_server_connections *
> under *mifosplatform-tenants schema.  *
>
> * This approach worked for me but yours is production so hold on for expert
> review.*
>
>
> Regarding the other issue of timeout, I am not sure as to what might be the
> root cause.
>
> The possibilities might be:
>
> 1) The fineract server is yet to start because migration scripts are
> running.Community App will not respond until the back end is completely
> started.
>
> 2) Or in the case  wherein your fineract application ,community app and
> database are all running on the same box,
>
>  it might be a over kill ( of course based on your box hardware
> configuration). You might want to debug this further checking you database
> health and memory stats.
>
> The second point may not be valid if you are running them on different box/
> box with higher configuration/ you are running them on cloud on different
> instance.
>
>
> Hope these pointers would give you heads up for your debugging until expert
> analysis from our community arrives.
>
>
> Kind Regards,
>
> Nikhil
>
>
>
>
>
>
>
>
>
> On Tue, Nov 8, 2016 at 3:37 PM, Thynn Win <thynn.win@thitsaworks.com>
> wrote:
>
> > Hello all,
> >
> > I was able to create a multi-tenant environment following the
> > documentation. Thank you!
> > http://mifos.cloud.answerhub.com/questions/704/how-to-
> > create-multi-tenant-and-access-it.html.
> >
> > We understand the process is that we create entries in tenants and Mifos
> > tables (supporting mifos app) in a new tenant database will be created
> upon
> > restarting the server.
> >
> > We are concerned about two issues -
> >
> >
> > 1)      The need to restart the server each time we add a new tenant.
> > Could you please let us know the rationale behind this? Could we run the
> > scripts manually somehow? We are concerned about the service interruption
> > on the production box every time we need to add a new tenant.
> >
> >
> > 2)      We are also experiencing time-out issue when loading mifos page
> > (after restarting the server). We found out that db scripts were running
> in
> > the background and the page cannot load until all these scripts were
> > completed. In our case, it took about 15 minutes for one tenant. We don't
> > wish to impact other tenants' access to Mifos app while new tenant
> database
> > is being created/populated.
> >
> > We'd like to better understand which scripts are run as part of new
> tenant
> > creation process and whether we really need to reboot the server. If you
> > have suggestions, we would highly appreciate it. If need be we can run
> > stuff manually instead of triggering them on page load or server reboot.
> >
> > Thank you for all your help.
> >
> > Sincerely,
> > Thynn
> >
> >
> >
>
>
>
>
>
> --
>
> Thanks and Regards
>
> Shreyaank
>
> E-mail:shreyaank@confluxtechnologies.com
>
>
>



-- 
Thanks and Regards
Shreyaank
E-mail:shreyaank@confluxtechnologies.com

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message