Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The zone(), pod(), cluster(), host() are plain objects that carry just attributes. For instance a zone consists of the attributes - name, dns entries, network type etc. Within a zone I create pod()s and append them to my zone object, further down creating cluster()s in those pods and appending them to the pod and within the clusters finally my host()s that get appended to my cluster object. Once I have defined all that is necessary to create my cloud I pass on the described configuration to the generate_setup_config() method which gives me my resultant configuration in JSON format.

Deploying the configuration

You can then run your json configuration through mvn by:

Code Block
mvn -Pdeveloper,marvin -pl :cloud-marvin -Dmarvin.config=/path/to/config

This will deploy your cloud as given in the configuration file. Provided you have marvin installed on your machine from where you are running the above command and it can reach the required infrastructure

Sandbox Scripts

You don't always want to describe one hosts configurations in python files so we've included some common examples in the Marvin tarball under the sandbox directory. In the sandbox are configurations of a single host advanced and a single host basic zone that can be tailored to your environment using a simple properties file. The property file, setup.properties is contains editable name, value (name=value) pairs that you can change to the IPs, hostnames etc that you have in your environment. The properties file when passed to the python script will generate the JSON configuration for you.

...