|
how do i move application between two environments |
Joined: 22-April-2007 Posts: 79 Location: Belgium | Posted:
4-May-2007 21:22 Greetings,
There may/must be an obvious way of doing the below ... but I cannot find it ...
I'm currently developing at three different locations, three slightly different machines (two XP, one Vista). Of course I'd like to "carry" my applications with me, so I can develop wherever I am.
So I went looking for the "package application" and "deploy packaged application" options ... But either I'm overlooking them completely or they are not there (or there is another obvious system to do this that I don't know of).
Is there a way to do this ? How do I bring an application from a test-environment to a production-environment ? Or what obvious point am I missing here (this is very likely the correct question) ? | Moving modules |
Joined: 15-February-2005 Posts: 127 Location: Fort Collins, CO | Posted:
6-May-2007 15:06 It is very easy to transfer modules from one installation to another.
The [install]/etc/deployedModules.xml file contains a reference to all modules known to the NetKernel installation.
All you have to do is copy that file and your modules from one machine to the other.
Note: It would be best to do this when both instances are not running.
Note: If you put all of your modules in the [install]/modules directory, then you could probably automate this transfer with a script file, creating a ZIP of the modules directory. | single module promotion |
Joined: 22-April-2007 Posts: 79 Location: Belgium | Posted:
7-May-2007 05:01 Greetings,
Thank you for the information. I was thinking more along the lines of "promoting" one module to a different netkernel instance. So there's : - an entry in [install]/etc/deployedModules.xml - an entry (multiple entries ?) in the Fulcrum's - the [module] directory itself underneath [install]/modules - ??? dependencies ???
I was also thinking of an "organised" way of promotion (sorry if this is not the correct English expression for this), where a developer can "promote" from his own instance to the test environment, but promotion from test to production is done by a different person/group (that does not even have to know how the module is build).
Regards, Tom | Use Case? |
Joined: 15-February-2005 Posts: 127 Location: Fort Collins, CO | Posted:
7-May-2007 13:28 Tom,
This sounds interesting and I may want to write this up as a use case for the next version of NetKernel.
Are you suggesting that there is a workflow with multiple roles involved? Let's use this:
* Developer creates a module and needs to test it. Developer installs module in a test instance of NetKernel, runs tests, debugs, and then reaches the point where the module is ready for release.
* System Tester then gets the module and tests it against the whole system in another instance of NetKernel. Once the whole system passes tests, the module is ready for release in the production instance of NetKernel.
* System Administration then gets the module and is responsible for release into the full production system.
Is this close to your scenario? If not, please help me get this right before we move on to how this would be done in NetKernel 3.2 and if there are deficiencies, we'll figure out how to make this work better in the next release.
Randy | Exactly |
Joined: 22-April-2007 Posts: 79 Location: Belgium | Posted:
7-May-2007 19:20 Randy,
You've very accurately described our environment (how we roll out java applications today) :
- A developer works on his own workstation. Very little in the way of data input available there. - Once the application has passed testing it is then given in the hands of our Application Infrastructure group. They typically modify the datasources, determine the application server to be used, and off we go to the test environment. Still not a lot of data there, but this is where database-access is tested. - Once the application has again passed testing, it goes off to the system test environment (this is automated, operations does it). Here the application is stresstested. Production load of data, production load of users (simulated at least), interaction with other application. Typically also the first decent batchtests. - If the responsible System Architect gives the green light, the application then goes to production. Again, this is an automated process, invoked by operations.
The above may be a bit overkill in the way of explanation, but the point I'm trying to make is that I need to know how to move/promote one application : - The module itself (easy enough I guess) - The fulcrum files need to be altered - The deployedmodules needs to be altered - ... Still doable I guess ... but now it gets murky - Does the module depend on other modules Or lets make it harder ... - Does the module(version) depend on other module(version)s
What if we loaded a couple of extra modules in the test environment (typically for database access) ... that we then "forget" in production.
Deployment is hard. I do not have experience in java deployment (although I have worked with our Application Infrastructure group, hence the explanation above), but I have extensive experience in rpm packaging and deployment ... and that's no piece of cake.
For myself I'd be happy to have an automated way to move an application and update the necessary files. But ... if you want the "promotion" process fully automated (and in big environments you do) you'll have to go further than that.
All of this is my personal opinion on the matter of course, I'd love to hear your feedback on it.
Regards, Tom | dependencies |
Joined: 22-April-2007 Posts: 79 Location: Belgium | Posted:
7-May-2007 19:34 Randy,
I believe the expression for the above reply is "I went completely overboard". My apologies for that.
Lets state it in a simple way what I would like for Christmas :-) : 1) I want to be able to "export" a module/application, with its dependencies. Not only "I" want to be able to do that, an operator should be able to do so with a press of a button/ simple script. This should not impact the module itself. 2) I want to be able to "import" that export in another NetKernel environment. If the dependencies are not fullfilled, it should not load (so that the environment does not have a disfunctional module in it). If the dependencies are fullfilled, it should load and be active with the next boot (preferably hot, possibly cold).
Ok, much beter ...
Regards, Tom | Meta data |
Joined: 15-February-2005 Posts: 127 Location: Fort Collins, CO | Posted:
7-May-2007 23:56 Tom,
Thank you for your replies and the details in your messages.
The short answer is that we can guide you towards a deployment process that will work for you and your company. As you either know or may have guessed, NetKernel is built on NetKernel - so we have the interesting task of creating a version, testing it, and deploying it - in an installable set of JAR or TGZ files.
I want to make sure I answer your question with sufficient detail so I am taking a little extra time to check all of my facts.
Randy
|  |
Joined: 15-February-2005 Posts: 127 Location: Fort Collins, CO | Posted:
9-May-2007 18:48 Tom,
Sorry for the delay - I was checking the details to give you the most accurate answer possible.
NetKernel has very good grip on the meta information related to a module. In fact the Module Wizard and the XUnit testing tools use this to do their work. The Module Wizard and XUnit are written in NetKernel using standard code, which means these and similar tools can be written by a NetKernel developer.
If having a module-level facility that would move one or more modules from one running instance of NetKernel to another is something that is critical for your adoption of NetKernel, please let us know and we will add this capability.
I also want to be clear about your question(s) as they relate to the notion of an application. By application I mean a set of related modules which constitute a complete running functional process. NetKernel does not currently have meta data that understands this. Since you have raised this as a question, it is now on my list of desirable features for a future release of NetKernel.
Randy | dependency |
Joined: 22-April-2007 Posts: 79 Location: Belgium | Posted:
9-May-2007 21:58 Hello Randy,
No worries about the delay, it's very kind of you to take time to look into this. I'll try to answer both of your questions :
1) The notion of "split" environments and "split" roles is deeply ingrained in my company. So obviously when I look at a <trying to find one word that describes Netkernel ... and failed> like Netkernel, ease of deployment of applications, of moving applications between instances is always in front of my mind. Would this block adaptation ? No, we've written deployment systems before, and we could do so again. But it would be a very nice to have.
2) If we take Netkernel itself as an application, it has dependencies - It requires a Java runtime (and that must be higher than a certain level) - It requires ... So in order to "deploy" Netkernel (which comes in a nicely packaged form, I installed it on a RedHat 4 update 4 VM earlier today in less than 20 seconds, had it running in another 5), those dependencies have to be fullfilled.
I see two major points in this : -> The application (autoinstall/autoconfiguration) package. Preferably one file for easy transport. Installs itself in the correct directories (creates these if not there), registers itself where needed (fulcrum, deployedmodules) ... BUT -> It only does the install if the dependencies of the package are fullfilled. You may laugh at this, but that RedHat system I mentioned above did not have a JRE. So I first had to push the rpm's that installed the JRE and only then would Netkernel "talk" to me. When/if I re-package Netkernel for RedHat 4 in rpm form, I will therefore add the JRE requirement, so a System Engineer that does not know Netkernel in detail, will not have to search why the application does not work.
The keyword ... dependencies. Yes, I agree with your definition of application. A dependency can be something in the Netkernel system (I need the ruby 0.9.9 module to execute Ruby scripts for example), or another self made module (my shop-application does not work unless the atm-module is there).
Whether or not the shop-application package should include the atm-module is of course another debate. Possibly yes (if you would sell the shop-application as standalone for example), possibly no.
Hopefully I'm not boring you to death with these "musings" of mine, I just found it strange (reason for that, see 1.) that I couldn't find it in Netkernel.
Regards, Tom | Package Capability | 
Joined: 7-February-2005 Posts: 397 Location: UK | Posted:
10-May-2007 17:59 Hi Tom,
Thanks for the detailed insight into your business processes - this is very very helpful. I added the first 50% of what you want to the installer application. Please take try this update out...
http://1060.org/upload/ext-install-1.1.2.jar
You can this update installer using the existing installer:
http://localhost:1060/install/add
Select "Install a new module from a URL" and paste the URL in. Once you've restarted try the updated installer:
http://localhost:1060/ep+name@app_install_installer
You will see a new "Package Manager" option. I've added a tool to create an exportable package. This creates a zip containing the modules you want to package and a manifest.xml that shows the dependencies and fulcrum attachments. When I get chance I will add a deployment tool that will take this package structure and do an install/update with rollback.
I hope this is along the lines of what you were looking for. If you're curious about the code the source very small and is in /org/ten60/netkernel/ext_install/packager.
You'll see from the code that NK has all the infrastructure to do what you want. It is all exposed as services and resources so you can quite easily manage and adapt NK using the regular tools.
All feedback very welcome.
Cheers,
Peter
|
|
|
|