Skip to main content

Hi all,


Looking at the way in which we do our development in my area and I feel there should be better ways of doing this.


Right now is every developer has their own K2 server setup for their own development. They use Visual Studio 2010, and everything is stored in TFS.


The issues I have have is that things that are environment specific do not get saved within the project, and if one developer gets another developers solution they are not automatically ready to run with the development without first setting up their development first.


Now, there are a few ways to do this. The ones I have thought of so far are.


1) Create a deployment package after the last completed check-in, and store that in the solution. Then the developer can use this deployment package every time they need a new environment setup. Issue with this is every time that changes are made, the last developer has to build the package each time and store in the solution.


2) PowerShell script. Not really sure on the validity of this yet but it might be possible to build a PowerShell script that is run on every development machine when they first download, or need to update. The Powershell script would be kept within the VS2010 solution and updated as required. Certainly in my opinion this would be better than building a deployment package each time. Big issue I see here is making sure that all Dev Environments are in sync.


3) Single K2 Dev Environment Server. Everyone would point to a single Dev server, which would have anyone able to use the same Environment settings. We do not typically have more than one person working on a single K2 workflow at a time, so there would be little risk of dev's tripping over each other's feet. Also we would only be hosting the K2 Environment on the machine, nothing else - so little risk of IISReset etc.


So these are things I have thought about, however I realize I am probably missing something, or might not be seeing better ways of dealing with this problem (or maybe there isn't a problem - we are doing things wrong.)


So was hoping for any feedback from you guys who have more experience.


Thanks a lot.


Cheers,


Matthew Powell

Hi Matthew - long time no see. Hope you're well?


We've used a number of scenarios in the past and they all have pros and cons. I'll suggest 2 options here...


The first is to have shared K2 servers, like your option 3 from above. A single shared K2 server won't work though because the non-K2 developers need a stable K2 server to target, and of course the K2 developer on the project will need to be deploying and testing constantly. 2 development K2 servers would work here - one for the K2 developer to break whenever he/she wants to, and another one which is only deployed to when the workflow is in a stable, tested state.


The other option is to keep the environment variables in a single location (like a SharePoint list) and then use the API to read these values and create them on your K2 servers for you. I'd probably write a module which took in the target K2 server as a variable and I'd also make it delete all existing ones and recreate them. Your devs could then run this whenever they wanted to and their environment fields would be synced.


Hope that helps?


Please pass my regards on to your team...


Trent.


Hey Trent,


Yes long time no talk - and yes things are good here. Have a new role (they got me to work through all the K2 issues and put together best practices.... fun and challenging at the same time). Lots to learn and lots of reading and playing. How are things work you? Keeping busy?


Thank you for your information above. The points you have raised are correct, so I am not sold now on the idea of one K2 server. There are ways around it, but your SharePoint idea does in fact make more sense.


When you are suggesting scripting, are you suggesting direct calls to the K2 Database, or there is API functionality in K2 to allow us to automatically add the string tables?


Cheers,


 


 


Sounds like a great role - congrats :)


There are API calls to edit environment fields - here are 2 quick links to get you started:


http://www.deonsmit.com/2009/04/creating-k2-environment-fields-with.html


and


http://www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCMQFjAA&url=http%3A%2F%2Fhelp.k2.com%2Ffiles%2F2606&ei=GnJzUJ2OHdCciAe20YBo&usg=AFQjCNF6DNtyZwgydRTizn-nU66yaE4iiA&cad=rja


I haven't done this myself, but if you run into any issues let me know and I'll pop online with you for a bit.


Reply