I like this concept. I wonder if the base64 encoding is really necessary.
Here's what our internal tool reads. I would love to see something that could work in both environments with very little adjustment.
This example uses openstack, thus the 'user-data-files' is unnecessary, and the main resources might look different also.
{
"resources": [
{
"name": "openshift-node1",
"count": "1",
"flavor": "m1.medium",
"image": "rhel-guest-image-7.1-20150224.0.x86_64",
"metadata": {
"product_type": "openshift",
"deployment_type": "openshift-enterprise",
"ansible_sudo": "false",
"ansible_ssh_user": "root",
"openshift_override_hostname_check": "true",
"openshift_node_labels": "{'region': 'primary', 'zone': 'east'}",
"openshift_hostname": "__IP__",
"openshift_public_hostname": "__IP__",
"openshift_set_hostname": "true",
"openshift_docker_additional_registries": "
my.dockerregistry.com:8888",
"openshift_docker_insecure_registries": "
my.dockerregistry.com:8888",
"ansible-group": ["nodes", "OSEv3"]
}
},
{
"name": "openshift-node2",
"count": "1",
"flavor": "m1.medium",
"image": "rhel-guest-image-7.1-20150224.0.x86_64",
"metadata": {
"product_type": "openshift",
"deployment_type": "openshift-enterprise",
"ansible_sudo": "false",
"ansible_ssh_user": "root",
"openshift_override_hostname_check": "true",
"openshift_node_labels": "{'region': 'primary', 'zone': 'west'}",
"openshift_hostname": "__IP__",
"openshift_public_hostname": "__IP__",
"openshift_set_hostname": "true",
"openshift_docker_additional_registries": "
my.dockerregistry.com:8888",
"openshift_docker_insecure_registries": "
my.dockerregistry.com:8888",
"ansible-group": ["nodes", "OSEv3", "repo_host"]
}
},
{
"name": "openshift-master",
"count": "1",
"flavor": "m1.large",
"image": "rhel-guest-image-7.1-20150224.0.x86_64",
"metadata": {
"product_type": "openshift",
"deployment_type": "openshift-enterprise",
"ansible_sudo": "false",
"ansible_ssh_user": "root",
"openshift_override_hostname_check": "true",
"openshift_node_labels": "{'region': 'infra', 'zone': 'default'}",
"openshift_hostname": "__IP__",
"openshift_public_hostname": "__IP__",
"openshift_set_hostname": "true",
"openshift_docker_additional_registries": "
my.dockerregistry.com:8888",
"openshift_docker_insecure_registries": "
my.dockerregistry.com:8888",
"ansible-group": ["masters", "nodes", "OSEv3"]
}
}
]
}
Cheers,
herlo