Use drush to sync module configurations, not entire DB? - drupal-7

I just learned of the awesome power of sites aliases and drush sql-sync. This is great. Is there a way to sync not the entire DB, but rather just the module configuration settings for one module?
The reason that I ask is because I have a default/master site and a number of multisites. These sites all use the modules of the default/master site, but some of them have custom configurations of those modules (so they do not share the same database).
When I add a new module and configure it to the master site, this means repeating that work for the multisites. It would be nice to do something like drush sql-sync #default.dev moduleName #multi1.dev moduleName
Then I would not have to repeat the work to add the module to each multisite, but I could then go into the multisites and tweak off of the copied-over settings.
Sorry if this is confusing, I'm a drush newb.

It is apparently possible with drush aliases. I suggest you to take a look at these three topics related to your configuration:
https://drupal.stackexchange.com/questions/71361/drush-sql-sync-not-working-on-multisite
http://eporama.com/ramblings/drush-aliases
https://drupal.org/node/1316378
I hope you will find a way to solve your problem :o)

Related

What is the best strategy to externalise database properties in a multi-module maven project?

I have a multi-module maven based project which has a number of Spring Boot applications, a couple of which (lets call them A and B) connect to a database (I have a separate module with the database related code on which both applications depend.) I am also using Flyway to maintain the database versioning and maintain the database structure.
What is the best approach to maintain the database properties? At the moment I have 3 places where I am repeating the same thing. I have the application.yml of module A and application.yml of module B, since both are separate Spring Boot applications. Then I have the Flyway plugin configuration again which needs the properties in the pom.xml to be able to perform its tasks, like clean, repair and migrate.
What is the proper approach to centralise and externalise this information, like the database URL, username and password? I am also facing the issue that each time I pull the new code onto the test system I have to update the same data again because it gets overwritten, and the database configuration on the test system is different from my local development environment.
What is the best strategy to manage this?
Externalize your configuration into a configuration module. This, of course, depends on how flexible Flyway / Spring Boot are from using classpath based properties.
Look at something like archaius and make your configuration truly externalized, centralized and dynamic by having it backed by, say, an external datastore. More work involved here but gives you additional benefits, like being able to change config in one place and have them dynamically picked up in running applications everywhere.
It's not an easy problem to solve and definitely involves some work to make your tools cooperate by hooking into their lifecycle.
For your flyway you could use the maven-properties-plugin. In that way you can externalize the credential to a properties file. An example is described here.
For the spring-boot application I will recommend the spring cloud config . With the spring cloud config you can externalize your config to a git repository which can be discovered over an Eureka Service, e.g. like here. I will consider to restructure the modules to independent microservices. A good infrastructure for a microservice based architecture provides the JHipster project.

Manual configuration of 2sxc Content module

I installed the 2sxc Content and App modules on a DNN8.0.3 environment. I could not run the auto-configure as the file it attempts to download contains some keywords blocked by our network. I obtained the file from outside the network and am trying to configure the module manually. This is all of the instructions the module provides.
This is how the admin section looks.
It may be obvious to the developers, but not intuitive for the users how to install this file - http://autoinstall.2sexycontent.org/Packages/2SexyContent-GettingStarted-01.00.04.zip in any of those sections. I couldn't find any documentation on this either.
I hope the details above conform to StackOverflow requirements. I had to post a question here since the support team will not help me through email.
Basically if you check your screenshot http://i.stack.imgur.com/h5ku3.jpg you'll see the app-tab, in there you'll find the import buttons.

CakePHP create folder in controller? [Need Expert Advice]

How is it possible to have folder in controller?
For example this scenario: We have multiples clients and each clients might have different package that share the common controller or different controller based on their own request. So I was thinking to separate them by directory in the controller.
Any Expert in Architecture can help this?
This is probably possible, but is certainly not the way you should do things with Cake (or MVC in general, probably).
I suggest that you have a separate app for each client. If you have any specific questions regarding this, or would like to add more information to your question about what you're trying to do, I can try to give you a more in-depth answer.
Without knowing more it is hard to say.
I assume you have one app that is used by multiple clients through subdomains or something else to make a difference between who is using it.
You can have a plugin per client that extends the base apps controllers as needed. You also can have different models and views then. Use routes to make the different named controllers match always the same URLno matter what client is logged in.
I would prefer a one app solution over multiple applications because it reduces the maintenance overhead a lot. But if you want to for multiple apps I would build the core of the application that is shared by all sites as a plugin itself. Using git and submodules you can then even control what version of the core module each site is using.

Scripting responses for use in the Maven Release Plugin

We are a SVN/Maven/Hudson shop. We are experimenting with using the Maven Release Plugin to help automate our very laborious tagging and releasing process. We are happy with what we are seeing and have researched thus far in regards to this plugin.
Our question is - if we need to have different tags for some of the modules / applications being built, is there a way to script the responses?
We have waded through the interactive dry runs successfully, however we are looking to script these out to further our automation.
Has anyone tried this or know if it is possible?
Does the "Batch Mode" allow this functionality?
Thanks
Joe R
You can -B but it will use default version names (removing -SNAPSHOT at the end).
regarding tags per module you can have a look at the parameter : autoVersionSubmodules 1
/Olivier

Can an Apache module inject configuration in runtime?

I wonder if it's possible for an Apache module to change global config structures.
What I want to achieve is injecting new vhosts without Apache restart. Of course I'm aware that the changes would fully take effect after all workers have recycled, but for me - it's still better than a restart.
I've written an Apache module before, but the configuration is an unknown land to me. While reading config.c, I noticed that a function called ap_build_config() could be helpful, but how do I call it to do what I need? Is it at all possible?
The mailing list guys have answered this question quite well.
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/201006.mbox/%3cAANLkTin0pST2aEpfhNJBXVwMG7stzi7JDPEMSLftADth#mail.gmail.com%3e

Resources