1

In software project I am working in, we will have a management server and hundreds of clients. That management server will define policies and send clients(or clients will take that). I think, that structure is like group policy. Is there an API or something useful for my C++ program.

I came across Netconf named thing but I haven't succeed to run it. I am considering to write my configuration management system with RPC protocol, if I can't find anything useful but I don't know if is it easy to implement with C++.

Or I think I can use web service to update clients configuration files.

By the way I am not sure to call that thing "configuration manager" or not.

Yavuz
  • 1,257
  • 1
  • 16
  • 32

2 Answers2

3

Let's consider case if your config files are huge. If you have file with list of users and just added new one then you do not want copy whole file to all boxes in your cluster. That was main reason why I had to use version control system as such configs management program.

To implement that it's just enough setup one of popular VCS (I used Mercurial), put configs to repository and clone then on client's boxes. If you need update configs then you are pushing change to VCS and execute something like following for each client/host

ssh -q user@host "cd $VCS_root && hg pull -u"
Nikolay Viskov
  • 1,016
  • 6
  • 9
0

If the server can connect to clients via SSH, Ansible (http://ansible.cc) might do the job. It is a command-line tool but you ought to be able to invoke it from C++.

Essentially you would create a playbook that would be run to update the clients' policies. If the number of clients varies and their policies differ, you could place that info in dynamic inventory "scripts": http://ansible.cc/docs/api.html#external-inventory-scripts.

We use this approach so that we invoke ansible playbooks from a Java web app and ansible GETs inventory data during playbook runs from that very same web app (a RESTful web service).

Jukka
  • 4,583
  • 18
  • 14