tnicolaysen / ConfigRemedy

1 stars 0 forks source link

Command line executor #7

Open evgenyb opened 10 years ago

evgenyb commented 10 years ago

As a developer I should be able to execute Configuratron's tasks from command line tool So it will allow me to script my configuration related tasks

@tnicolaysen: I've had this idea that the command-line tooling should be dead-simple. I'm inspired by the way UNIX tools are built. By that I mean piping and composition. I imagine something like this:

> Diff-Environments -Source DEV -Target PROD -Server http://config-server/ | Update-Environment

In this example, the response from Diff-Environments would be in JSON format and contain the properties that have been added, changed and deleted. The Update-Environment command will then take that as an input and update the target environment. I think the params can be piped to the next commandlet.

Having this philosophy with small specialized commandlets, we enable a very flexible and simple platform. These can be aggregated and simplified over time.

Many of these tools will just invoke an action on the REST API. E.g.GET http://config-server/environments/diff?source=prod&target=prod.