Client-server authentication and upgrade source code versions


Hello everyone! I will be very thankful if you can help me with an issue.

I have to develop the method to communicate on a distributed infrastructure for a server - client. The clients have to connect to the console (server) and if the console accepts the connection, it will send some source code to run on the client. The source code basically is written in python and it scans some ports. All the results have to be sent back to the console and they will be stored in a database. Only the console works with the database! It is also necessary a mechanism for heartbeat to know if there are some communication problems.
On other connections, the client must check its current version of the source code and if it is older it has to take the newest version.

I have to implement this mechanism using Chef (this is the preference) or Puppet. Can you give me some suggestions how to do that? Please.

I have started doing some tutorials with Chef, but I don’t know how to apply in my case.


This is not what Chef (or Puppet, or any other CM) is for. They are basically robots that run some commands which you would otherwise run by hand (package installs, editing files, starting services, etc). Building an actual application is still up to you, Chef would just install it.


@coderanger: I know that I have to build the application without Chef, but I have seen that I can use Chef push jobs to manage the heartbeat part. I have to develop also the process of synchronization the versions from clients with the one from server…


I assume the deploy resource is what you’re after, but the client-server hearbeat part is on your hand, the best chef can do is give to the chef-server the last time it did run, based on how you configure the nodes (your console or your clients here) this has a a relatively low interest as application heartbeat.

TL;DR: Application state is to be done on application scope, chef can help deploying the application on the nodes but it won’t magically give you an heartbeat.