Introducing Polymelia Deploy

During the last month I have created different deployment tools, as a proof of concepts. The tools have change from push deploy into pull deploy, from an own XML workflow and environment definition into using Microsoft Workflow. Finally I decided to introduce to you the Polymelia Deploy tool. The goal of the tool is to make it open source. The code I have is still in a proof of concept level, and need some more work until it will be available.

Polymelia uses agents installed on servers. By using pull deployment, no one can communicate directly to an agent. This make it much easier for to install agents on servers and no ports need to be opened. Each agents have a role. For example a role as a "Web Server", or "Application Server". When an agent is running it will ask a Controller for tasks to be executed.

 

Because agents has roles and Polymelia uses Pull deploy, we can now add a new server, put an agent on the server, specify the role, for example "Web Server". When the server is up and running the agent can ask a controller for tasks. The latest succeeded tasks will be retrieved and executed. That makes it easy to just add a new server to a load balancing environment and get it auto configured and installed when it's up and running. No need to do a push deploy, or do changes to the deploy script.

 

In a near future the agents will be able to be scheduled, when and how often it should ask for a task. The agents will also use SingalR, and by using SingalR, a controller can know when a new agent is added to the environment, and by suing Polymelia Deploy Client, we are able to approve that agent before it can ask for a tasks. Some ideas on the list to do, is to be able to specify an IP range for auto allow new agents without needing to approve them.

Polymelia have as the moment just a few activates (but will get more, maybe you will help me create them ;)), one activity is a NuGet Installation activity, it has a similar solution as Octopus Deploy. The activity will get binaries from an Artifact Repository using NuGet server.

 

 

The packages can have configuration files that can be transformed, variables that can replace connection string, appsettings keys and WCF endpoints, but will in a near future replace all kind of keys and values in the configuration file using markers in the config file:

<appSettings>
<add key="$VariableName$" Value="$variableName2"/>
</appSettings>

 

The NuGet Installation activity will also search for PowerShell scripts in the package, pass variables and execute the script. It will make it possible to use PowerShell to configure and install packages on a server. Because Polymelia is based on Microsoft Workflow, it's possible to use pre-defined activities that will reduce the use of PowerShell, like creating a MSMQ, Install a Service, Create an app Pool, Run PowerShell script and Start a Virtual Machine etc.

Polymelia Deploy Client

 

Polymelia Deploy Client is the tool to create deployable workflows, and is used to perform the deployment of a specific version.

When Polymelia Deploy Client is loaded we can create or select a project:

 

When a project is created or loaded, we are able to add environments:

 

When the environment(s) are added we can start creating our deploy tasks. The following illustrate how we can tell the Controller to start a Virtual Machine, the Virtual Machine has an agent installed with the role "Web Server". When the Virtual Machine is started a parallel activity is started and will execute two "Deploy to Agent" activities. One to the role "Web Server" and one for the role "Database". The tasks added into the "Deploy to Agent" are the tasks that the Controller will add to a queue. The "Web Server" role will read from the queue to execute the tasks added for that role. The "Web Server" will get two packages from a NuGet server and install them on the server, this is done in parallel.

 

When hitting the DEPLOY button, we need to specify the version we are going to deploy, and the deploy workflow will then be passed to the Controller for execution. When the agents is starting to install tasks, they reports back to the Controller and the client can read from the reports.

This project is still under development. If you are interested to contribute to this project, please let me know. The reason I make this tool Open Source, is to get help of the community to build it, and also give an open source option for the community to use.

If you want to know when I post a blog post, please feel free to follow me on twitter: @fredrikn

2 Comments

  • This looks interesting, do you have the code posted on GitHub/Codeplex yet?

  • @Redeemed1:

    Have in mind that the code is far from done and perfect, the code is still in a simple proof of concept. We are working with some refactoring, doing some changes, make it more thread safe etc.

Comments have been disabled for this content.