1) Public source code 2) Arbitrary metadata (could be JSON or just a blob) like /Node/get/?key=blah&metadata=<base64 encoded json> Then a new /InventoryExt verb that returns JSON like:
[ { "name": "n49.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" }, { "name": "a29.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" } ]
3) Also add a new option to /get/ named "longpoll" which means the machine is automatically deallocated when the requester's TCP connection closes. This would help ensure that e.g. cancelling the job or a Jenkins restart etc. automatically deallocated the machine
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
On Wed, May 18, 2016 at 10:40 AM, Colin Walters walters@verbum.org wrote:
- Public source code
- Arbitrary metadata (could be JSON or just a blob) like
/Node/get/?key=blah&metadata=<base64 encoded json> Then a new /InventoryExt verb that returns JSON like:
[ { "name": "n49.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" }, { "name": "a29.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" } ]
- Also add a new option to /get/ named "longpoll" which means the
machine is automatically deallocated when the requester's TCP connection closes. This would help ensure that e.g. cancelling the job or a Jenkins restart etc. automatically deallocated the machine _______________________________________________ Ci-users mailing list Ci-users@centos.org https://lists.centos.org/mailman/listinfo/ci-users
It would be great if this could be generated as dynamic ansible inventory. We do this with the output of the node creation. This way it becomes very easy to use ansible to do any follow on tasks once you have the resources.
On Wed, May 18, 2016 at 1:04 PM, Clint Savage herlo@redhat.com wrote:
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
On Wed, May 18, 2016 at 10:40 AM, Colin Walters walters@verbum.org wrote:
- Public source code
- Arbitrary metadata (could be JSON or just a blob) like
/Node/get/?key=blah&metadata=<base64 encoded json> Then a new /InventoryExt verb that returns JSON like:
[ { "name": "n49.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" }, { "name": "a29.pufty", "ssid": "abcde", "metadata": "<base64 encoded json>" } ]
- Also add a new option to /get/ named "longpoll" which means the
machine is automatically deallocated when the requester's TCP connection closes. This would help ensure that e.g. cancelling the job or a Jenkins restart etc. automatically deallocated the machine _______________________________________________ Ci-users mailing list Ci-users@centos.org https://lists.centos.org/mailman/listinfo/ci-users
Ci-users mailing list Ci-users@centos.org https://lists.centos.org/mailman/listinfo/ci-users
On Wed, May 18, 2016 at 11:11 AM, Ari LiVigni ari@redhat.com wrote:
It would be great if this could be generated as dynamic ansible inventory. We do this with the output of the node creation. This way it becomes very easy to use ansible to do any follow on tasks once you have the resources.
+1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 18/05/16 18:15, Clint Savage wrote:
On Wed, May 18, 2016 at 11:11 AM, Ari LiVigni <ari@redhat.com mailto:ari@redhat.com> wrote:
It would be great if this could be generated as dynamic ansible inventory. We do this with the output of the node creation. This way it becomes very easy to use ansible to do any follow on tasks once you have the resources.
+1
what might that actually look like ?
- -- Karanbir Singh, Project Lead, The CentOS Project +44-207-0999389 | http://www.centos.org/ | twitter.com/CentOS GnuPG Key : http://www.karan.org/publickey.asc
*The input is the file that Clint provided which is called a topology file:* https://paste.fedoraproject.org/368077/35929591/
*Our tools generates output:* resources.json https://paste.fedoraproject.org/368075/46359285/
*Then we use this script to use as an inventory file to ansible:* https://paste.fedoraproject.org/368080/46359306/
*We run the this command to get the inventory:* python ci-factory/utils/central_ci_dynamic_hosts.py | python -m json.tool
*Inventory looks like:* https://paste.fedoraproject.org/368081/63593258/
Then you can run: ansible-playbook -i ci-factory/utils/central_ci_dynamic_hosts.py --private-key <ssh-key> <playbook-you-want-to-run>
Sounds like from Brian's demo that this could be done after you get the resources as well by the user, but it may be nice to have this as an infrastructure toolset.
On Wed, May 18, 2016 at 1:22 PM, Karanbir Singh kbsingh@centos.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 18/05/16 18:15, Clint Savage wrote:
On Wed, May 18, 2016 at 11:11 AM, Ari LiVigni <ari@redhat.com mailto:ari@redhat.com> wrote:
It would be great if this could be generated as dynamic ansible inventory. We do this with the output of the node creation. This way it becomes very easy to use ansible to do any follow on tasks once you have the resources.
+1
what might that actually look like ?
Karanbir Singh, Project Lead, The CentOS Project +44-207-0999389 | http://www.centos.org/ | twitter.com/CentOS GnuPG Key : http://www.karan.org/publickey.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJXPKTFAAoJEI3Oi2Mx7xbt7DIH/iQ2dc/OaW60cH21dEnt6WuL aqB6rnoBLjws3v0AbYKFzoFjYtA3xd/UNTERa4CjIPWkcdkz/QlUAxRVuuuvC3A1 h29WFnSWhxnEIbRQROAI8dv+qkBum5KjN85ZyVN66mllXPPlLLC1A7w0x+29V8Zo Keq7+UPPbIQItzyUrJjzRVXIhy456GtUoco+BvmUkESG7eBRyGePjyHH8iFzdArY jAkNrakPr/CSmXunoYThRDx6I0mAiGnNqXTPoBH2T6bRWWFFfbQdJc0App9uqNa6 gxHGEPLQ7Bt+gCyqgQ8ViGH3U8Rury0kXT83pVYJl7Y4wyowiQEy7Ld/8zRt2oA= =4ADD -----END PGP SIGNATURE----- _______________________________________________ Ci-users mailing list Ci-users@centos.org https://lists.centos.org/mailman/listinfo/ci-users