Private Distribution Server

Poster Content
nk4um User
Posts: 89
February 5, 2009 16:01
Thanks, I''ll have a look at Maven.

In the meantime I also found this old thread:

http://www.1060.org/forum/topic/129/2

which indicates that the ext-introspect module (doesn''t seem to be hooked into NK''s documentation system) should give me some of the functionality to actually install the module (the steps you described at the end of your last post) ... still it does seem to bypass the Module Management Wizard ... but maybe it forms a good basis to push module updates to the mirrors instead of requiring them to pull them in ...

I hope to find time soon to play with these alternatives ... thanks for your input :-)
nk4um User
Posts: 79
February 5, 2009 15:41NK Module Deployment
Pay no attention to that man behind the curtain
  ;)

So our NK Modules are available for download from a Shared Repository. But we still manually deploy a new module using the following steps:

1. Copy the NK Module from our Shared Repository to a directory separate from the NetKernel installation.

e.g /opt/deployments/{module}/{version}

2. Expand the JAR

3. Update the deployedModules.xml to reference the deployed module''s directory

3. Finally we update the front-end fulcrum to import the module

Some of the steps above we could automate by modifying the deployment phase of the Maven build but ultimately we would still need to manually update the deployedModules.xml and front-end fulcrum module.xml

You could also use Maven for building & dependency management but still use the NK deployment wizard.

My main point is that Maven is a great foundation for a build and deployment framework. And because it is extensible you could use it to accomplish the goals outlined in your original post.
nk4um User
Posts: 89
February 5, 2009 15:23
Thanks for your reply!

Do I understand correctly that this is a separate solution for NK module deployment, which won''t use the NK''s Module Management Wizard? And it will require me to switch my build process to Maven?
nk4um User
Posts: 79
February 5, 2009 15:13Distribution & Maven Shared Repository
We have a build server that deploys our NK modules to a Maven Shared Repository. Distribution is defined in the POM. I am sure you could alter the DEPLOY phase of the Maven life-cycle to replicate the NK modules to your mirror sites.



<distributionManagement>
    <repository>
        <id>share-repo-id</id>
        <name>NK Module Repository</name>
        <url>file:///opt/app/somehttpserver/deployment-directory</url>
    </repository>
</distributionManagement>



BTW, one of the key benefits of Maven is dependency management.


<!-- ==========================Dependencies============================= -->
<dependencies>
    <!-- External Dependencies -->
    <dependency>
        <groupId>itext</groupId>
        <artifactId>itext</artifactId>
        <version>1.3.1</version>
    </dependency>
   
    <!-- Internal Dependencies -->
    <dependency>
        <groupId>foo.org.infrastructure</groupId>
        <artifactId>common-utilities</artifactId>
        <version>1.1.3</version>
        <type>jar</type>
        <scope>provided</scope>
    </dependency>
   
    <!-- NetKernel Development Environment Dependencies -->
        <dependency>
        <groupId>org.1060</groupId>
        <artifactId>1060netkernel</artifactId>
        <version>2.8.4</version>
        <scope>provided</scope>
    </dependency>
</dependencies>



In the case above the external dependency gets packaged up with the NK Module JAR file (the result of the maven build cycle). The internal dependency is available in the classpath for building and working in an IDE but it is not included with the NK Module JAR. The same is true for the NK environment dependency.

All dependencies that are NK Modules map to the module imports in the module.xml. So we can keep them in sync (we also keep the module & pom version numbers in sync as well)

You can also use Maven to generate a project web site which will contain reports detailing the modules project/module dependencies.

For an example, please see the beta version of the NK3 Maven Archetype:

http://www.1060.org/forum/topic/472/1
nk4um User
Posts: 89
February 5, 2009 10:11also need a private distribution server
Hi, Shane and Jeremy and all other NK admins,

For our application we also envision the need to setup a distribution server to propagate updated modules to various mirror sites. Did any of you find some documentation on how to setup such a server?

Or do we need to inspect the implementation of NK''s Module Management Wizard to find out what is needed on the side of the distribution server? Can you just put the JARs there and does the installer figure out all dependencies, or is some additional catalog file needed?

Thanks in advance,

Menzo
nk4um User
Posts: 79
December 3, 2008 18:02Maven & NetKernel
Shane,
I would be happy to chat sometime on this subject. We use Maven to build and deploy to NK3.

Here is recent post:
http://www.1060.org/forum/topic/459/1

Jeremy Deane
Technical Architect
Collaborative Consulting
Skype: jeremy.deane
Email: jdeane@collaborative.com
nk4um User
Posts: 12
December 3, 2008 17:55Private Distribution Server
We are now starting to run multiple NetKernel servers and are looking to simplify our deployment process.  Today we are actively working on Mavenizing our Java based NetKernel modules.  In this way we hope to use TeamCity to do automated builds.  In addition we are deploying release modules to our Maven Repository with the concept of building once and deploying many.  The last step is to figure out how to deploy to NetKernel itself. 

As opposed to starting out writing some custom solution I wanted to research what it would take to create our own Distribution Server and how it could possibly fit in our process.  Any input or assistance would be greatly appreciated especially since I''m having a tough time finding documentation on the subject.