Skip to content
Gary Hale edited this page Jul 29, 2013 · 31 revisions

Gradle Glu Plugin

This is a plugin for programmatically controlling glu deployment servers using gradle. This plugin allows you to store your glu json model in source control and apply it to the fabric as a gradle task. The model can be stored as a json file or generated using Maps or JsonBuilder closures. It also provides a simple templating function where an "application" is defined that can generate entries for multiple agents with agent-specific overrides.

Examples

The following example shows a basic configuration where the model is stored in the project as a file and applied to the server without changes.

apply plugin: "glu"

glu {
        servers {
                test {
                        url "http://localhost:8080/console"
                        username "admin"
                        password "admin"
                }
        }

        fabrics {
                "glu-test-1" {
                        server servers.test
                        zookeeper "localhost:2181"
                        model file("model.json")
                }
        }
}

task("loadModel", type: GluLoadModelTask) {
        fabric glu.fabrics."glu-test-1"
}

Clone this wiki locally