On Wed, Jul 24, 2013 at 4:34 PM, Shamika Ariyawansa <sham...@wso2.com>wrote:
> HI, > > As we discussed so fa,r we tried/trying following approaches for the > $subject. > > 1. Deploying Jenkins web app in AS per tenant. - Solution was not scalable > due to the size of the Jenkins Web-app (61MB - without plugins) and its not > practicable to deploy this as the tenant count gets increased. > If the content of the war duplicated for tenants you can put the common libs into $CARBON_HOME/repository/components/lib(in parent classloader) and make minimal war file that contains tenant specific stuffs. > > 2. Use one Jenkins server and make it possible to make it multi-tenant > by introducing a role-based plugin (an extension to Role-Strategy Plugin). > > Here all the tenants related jobs are stored in one space > (no operation between tenant) and the multi-tenancy is achieved by having a > filtering mechanism based on the logged users tenant. Problem here is > everything will be done in one workspace so it will be difficult to manage > when the the tenant count gets increased with the job count. > > 3. Patch the Jenkins to set the JENKINS_HOME directory on the fly so > that separate HOME directory will be used for the different tenants. > > By looking at the Jenkins code we found that the Jenkins Home is set to a > singleton class (jenkins.model.Jenkins) and the whole system uses that > class to obtain JENKINS HOME. As a solution we can update this class to > return JENKINS_HOME based on logged users tenant. > > Main risk for this is that in the in above class has a public variable to > store the JENKINS_HOME (variable - root). Also there is also an > encapsulated method to get this too.( getRootDir() ). We are not sure the > how the other plugins have referred this. I am trying to do an hard-coded > test whether this works or not? > This will not work unless you reload all the configurations from disk after returning the JENKINS_HOME.In jenkins on start up all the config files are loaded from disk(job configs also).We change JENKINS_HOME at the middle but still in the memory there are configs(job configs) from previous JENKINS_HOME. > > WDYT? > > -- > Shamika Ariyawansa > Senior Software Engineer > > Mob:+ 94 772929486 > -- ajanthan -- Ajanthan Balachandiran Senior Software Engineer; Solutions Technologies Team ;WSO2, Inc.; http://wso2.com/ email: ajanthan <http://goog_595075977>@wso2.com; cell: +94775581497 blog: http://bkayts.blogspot.com/ Lean . Enterprise . Middleware
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture