{"action":"created","issue":{"url":"https://api.github.com/repos/ystia/yorc/issues/17","repository_url":"https://api.github.com/repos/ystia/yorc","labels_url":"https://api.github.com/repos/ystia/yorc/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/ystia/yorc/issues/17/comments","events_url":"https://api.github.com/repos/ystia/yorc/issues/17/events","html_url":"https://github.com/ystia/yorc/pull/17","id":311504091,"number":17,"title":"Feature/brbdcf 1142 shared hostpool","user":{"login":"stebenoist","id":29753229,"avatar_url":"https://avatars0.githubusercontent.com/u/29753229?v=4","gravatar_id":"","url":"https://api.github.com/users/stebenoist","html_url":"https://github.com/stebenoist","followers_url":"https://api.github.com/users/stebenoist/followers","following_url":"https://api.github.com/users/stebenoist/following{/other_user}","gists_url":"https://api.github.com/users/stebenoist/gists{/gist_id}","starred_url":"https://api.github.com/users/stebenoist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebenoist/subscriptions","organizations_url":"https://api.github.com/users/stebenoist/orgs","repos_url":"https://api.github.com/users/stebenoist/repos","events_url":"https://api.github.com/users/stebenoist/events{/privacy}","received_events_url":"https://api.github.com/users/stebenoist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-05T07:43:36Z","updated_at":"2018-04-05T16:11:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ystia/yorc/pulls/17","html_url":"https://github.com/ystia/yorc/pull/17","diff_url":"https://github.com/ystia/yorc/pull/17.diff","patch_url":"https://github.com/ystia/yorc/pull/17.patch"},"body":"## Description of the change\r\n\r\n**New host pool property:**\r\n- An allocations slice prop has been added to describe the related host pool allocations.\r\nAn allocation is defined by a node name, an instance and is related deploymentID.\r\n\r\n**New Tosca Compute property:**\r\n- A \"**shareable**\" Tosca property has been added to the compute\r\n\r\nWhen Tosca host capabilities resources properties (**host.num_cpus, host.mem_size, host.disk_size**) are specified in the deployed application and in host pool labels too, these values are respectively **decreased** and **increased** when host is allocated and released for the application.\r\n\r\nThe shareable host pool status is allocated as long as it has at least one allocation.\r\nThe shareable host pool status is free when it has no allocations.\r\n\r\n\r\n## How to verify it\r\n\r\n### Create a hostpool with the following template:\r\n`hosts:\r\n- name: host1\r\n  connection:\r\n    user: ubuntu\r\n    private_key: ***********************\r\n    host: **********\r\n    port: 22\r\n  labels:\r\n    environment: dev\r\n    host.disk_size: 50 GB\r\n    host.mem_size: 8GB\r\n    host.num_cpus: \"8\"\r\n    os.architecture: x86_64\r\n    os.distribution: ubuntu\r\n    os.type: linux\r\n    os.version: \"16.04\"`\r\n\r\n### Apply this config:\r\n`$ ./yorc hp apply host_pool.yaml`\r\n\r\n### Deploy a 2 compute-instances application with a simple component as Python\r\n[https://github.com/ystia/yorc-a4c-plugin/tree/develop/tosca-samples/org/ystia/yorc/samples/python](url)\r\n\r\n### Specify the **shareable** property to **true**\r\n\r\n### Specify the following host capabilities properties:\r\n- host.num_cpus = 4\r\n- host.mem_size = 4 GB\r\n- host.disk_size = 20 GB\r\n\r\n### Check the deployment is correctly done\r\nCheck the hostpool CLI informations: \r\n`$ ./yorc hp list`\r\n- 2 allocations must be set with nodename, instance and deployment ID\r\n- host.num_cpus = 0\r\n- host.mem_size = 0 B\r\n- host.disk_size = 0 B\r\n\r\n### Undeploy the application:\r\n- Check the undeployment is correctly done\r\n- Check the host pool informations \r\n`$ ./yorc hp list`\r\n- no allocations\r\n- host.num_cpus = 8\r\n- host.mem_size = 8 GB\r\n- host.disk_size = 40 GB\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ystia/yorc/issues/comments/378990680","html_url":"https://github.com/ystia/yorc/pull/17#issuecomment-378990680","issue_url":"https://api.github.com/repos/ystia/yorc/issues/17","id":378990680,"user":{"login":"laurentganne","id":33217305,"avatar_url":"https://avatars3.githubusercontent.com/u/33217305?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentganne","html_url":"https://github.com/laurentganne","followers_url":"https://api.github.com/users/laurentganne/followers","following_url":"https://api.github.com/users/laurentganne/following{/other_user}","gists_url":"https://api.github.com/users/laurentganne/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentganne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentganne/subscriptions","organizations_url":"https://api.github.com/users/laurentganne/orgs","repos_url":"https://api.github.com/users/laurentganne/repos","events_url":"https://api.github.com/users/laurentganne/events{/privacy}","received_events_url":"https://api.github.com/users/laurentganne/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T16:11:40Z","updated_at":"2018-04-05T16:11:40Z","author_association":"CONTRIBUTOR","body":"For the verification step, we have to patch the alien4cloud yorc plugin to have the new property shareable appear in the Compute node, right ?"}}
{"actor":{"display_login":"laurentganne"}}