{"id":67,"date":"2018-06-21T10:00:17","date_gmt":"2018-06-21T08:00:17","guid":{"rendered":"https:\/\/blog.tests-performance.fr\/?p=67"},"modified":"2018-07-25T13:52:58","modified_gmt":"2018-07-25T11:52:58","slug":"how-to-utilize-elastic-provisioning-of-performance-center-load-generators-using-kubernetes","status":"publish","type":"post","link":"https:\/\/www.tests-performance.fr\/?p=67","title":{"rendered":"How to utilize elastic provisioning of Performance Center Load Generators using Kubernetes"},"content":{"rendered":"<p>Micro Focus Performance Center 12.56 <a href=\"https:\/\/software.microfocus.com\/en-us\/products\/performance-center\/overview\" target=\"_blank\" rel=\"noopener noreferrer\">performance testing<\/a> software introduces the power of Docker for elastic provisioning and de-provisioning of containerized Linux load generator resources using <a href=\"https:\/\/kubernetes.io\/docs\/admin\/authentication\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Kubernetes<\/a> container orchestrators.<\/p>\n<p>This approach allows you to automate and increase efficiency of your testing process by allocating resources on-demand\u2014without needing to define or reserve load generators in advance.<\/p>\n<p><span style=\"color: #3366ff; font-size: large;\">Docker, containers, and orchestrators in a nutshell:<\/span><\/p>\n<p><a href=\"https:\/\/www.docker.com\/what-docker\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Docker<\/a> is a tool designed to make it easier to create, deploy, and run applications by using containers. A container consists of an entire runtime environment: an application, plus all of its dependencies, libraries and other binaries. It also contains all configuration files needed to run it\u2014neatly bundled into one package.<\/p>\n<p>Over the past few years, Docker containers have become increasingly popular. As a result, the need for automated management of hundreds of containers has led to orchestration solutions such as Docker swarm, Kubernetes and others. Container orchestration refers to the automated arrangement, coordination, and management of software containers.<\/p>\n<p><a href=\"https:\/\/kubernetes.io\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Kubernetes<\/a> is an open source system for automating deployment, scaling, and management of containerized applications. It was originally designed by Google and is now maintained by the <a href=\"https:\/\/www.cncf.io\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Cloud Native Computing Foundation<\/a>.<\/p>\n<p>The following diagram shows Kubernetes high-level architecture:<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"K8sArchitect.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8470iB2137703BD7E59A8\/image-size\/large?v=1.0&amp;px=999\" alt=\"K8sArchitect.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p>Let\u2019s see how we configure and run elastic load generators in <a href=\"https:\/\/software.microfocus.com\/en-us\/products\/performance-center\/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Performance Center<\/a> with Kubernetes\u2026<\/p>\n<p><span style=\"font-size: large;\"><span style=\"color: #3366ff;\">Prerequisites:<\/span><\/span><\/p>\n<ul>\n<li>A configured Kubernetes server. For details, see how to <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/configuration\/overview\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">configure Kubernetes<\/a>.\u00a0Performance Center supports Kubernetes version 1.7 and later. Earlier versions might also be compatible but were not tested.<\/li>\n<\/ul>\n<ul>\n<li>A load generator Dockerfile image. It is recommended that you download the image from the Docker hub to a\u00a0<strong>local<\/strong>\u00a0shared repository for better performance. If your environment has no internet access, then it is a must.<\/li>\n<\/ul>\n<p><span style=\"font-size: large;\"><span style=\"color: #3366ff;\">How to configure a Kubernetes orchestrator in Performance Center Administration:<\/span><\/span><\/p>\n<ol>\n<li>Log onto Performance Center Administration. &lt; http:\/\/&lt;pc_server_name&gt;\/admin&gt;<\/li>\n<li>Navigate to <strong>Management -&gt; Orchestration<\/strong> tab<\/li>\n<li>Click\u00a0<strong>Add Orchestrator<\/strong>\u00a0from the tool bar.<\/li>\n<li>Enter the <strong>New Orchestrator<\/strong> details:<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Full URL<\/strong>: Select the connection type (http\/https), and enter the full URL of the Kubernetes server including\u00a0 \u00a0 \u00a0 port .&lt;Https:\/\/Server:port&gt;<\/li>\n<li><strong>Type<\/strong>: By default it is set to kubernetes (this is the only orchestrator type that is currently supported).<\/li>\n<li><strong>Namespace<\/strong>: Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual\u00a0 \u00a0 \u00a0 \u00a0clusters are called <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/overview\/working-with-objects\/namespaces\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">namespaces<\/a>.\u00a0 In this field you need to specify the Namespace where your containers will be created.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Token<\/strong>: Kubernetes uses <a href=\"https:\/\/kubernetes.io\/docs\/admin\/authentication\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">bearer tokens<\/a> to authenticate API requests through authentication plugins.<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"Main.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8473i4725A6493523AE9D\/image-size\/large?v=1.0&amp;px=999\" alt=\"Main.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span>\n<ul>\n<li><strong>Assign Images<\/strong>: Associate one or more elastic load generator images to be used during the test with the orchestrator. You can use the default image provided in the Docker hub, or can create a custom image.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Click the + button to open the Assign Images to the Orchestrator dialog box, and select the images you want toassociate to the orchestrator. Click \u201cAssign\u201d.<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"AssignImage.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8474i0560977A35CBC5F1\/image-size\/large?v=1.0&amp;px=999\" alt=\"AssignImage.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p><span style=\"color: #993300;\"><strong>Note:<\/strong><\/span> If no image is assigned, Performance Center uses the default <a href=\"https:\/\/hub.docker.com\/r\/performancetesting\/load_generator_linux\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">performancetesting\/load_generator_linux\/<\/a> image from the Docker hub.<\/p>\n<ul>\n<li><strong>Use Monitoring<\/strong>: Select this option to enable collecting metrics on Kubernetes container clusters using the\u00a0<a href=\"https:\/\/github.com\/kubernetes\/heapster\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Heapster monitoring solution<\/a>. Enter the Heapster server URL, including the port, in the format: &lt;server_name&gt;:&lt;port&gt;\u00a0<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"monitor.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8475i16FD5878DD9AB99B\/image-size\/large?v=1.0&amp;px=999\" alt=\"monitor.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Resource Limits:<\/strong> You can limit the available memory and CPU resources per container.\u00a0 These limits are displayed when assigning LG\u2019s in the Performance Test Designer, and the user cannot exceed these limits.<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"Resource.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8490i0A4F8653BD5D094A\/image-size\/large?v=1.0&amp;px=999\" alt=\"Resource.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/li>\n<li>\u00a0<strong>Use External Storage<\/strong>: Specify an external shared alternative location to store runtime files. This should be a mount path on each physical Linux node.While this setting is not mandatory, we recommended using it to prevent the loss of, or inaccessibility to results in case the result collation fails (since containers are automatically de-provisioned after the run).<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"ExternalPath.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8491i62185788088AA4B8\/image-size\/large?v=1.0&amp;px=999\" alt=\"ExternalPath.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>5. Assign Projects<\/p>\n<p>In the Linked Projects area, click\u00a0 \u00a0\u201cAssign Projects\u201d to open the Assign Projects to the Orchestrator dialog box.<\/p>\n<p>Select the projects you want to assign to the orchestrator, and click \u201cAssign\u201d. The selected projects are added to the Linked Projects grid.<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"AssignProj.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8477i01CE1A648CCFC780\/image-size\/large?v=1.0&amp;px=999\" alt=\"AssignProj.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p>6. Click Save<\/p>\n<p><span style=\"color: #3366ff; font-size: large;\">\u00a0Assign containers to groups:<\/span><\/p>\n<ol>\n<li>Log onto a Performance Center project that was assigned a Kubernetes orchestrator.<\/li>\n<li>Open a load test designer and click the \u201cAssign LG\u201d button from the toolbar.\u00a0 \u00a0 <span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"AssignLG.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8482iD526C248B3AD24B5\/image-size\/small?v=1.0&amp;px=200\" alt=\"AssignLG.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/li>\n<li>Expand the \u201cElastic\u201d tab to display the list of elastic load generators<\/li>\n<\/ol>\n<p><strong><span style=\"color: #993300;\">Notes:<\/span><\/strong><\/p>\n<p>These are only logical names. The actual load generator containers are created on test execution, and are automatically terminated once the test finishes.<\/p>\n<p>If you defined different image types or set Memory\/CPU limits, you can see your selections here, and these selections will affect all containers.<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"Type_Res.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8484iD6E1A885DB6CEEC2\/image-size\/large?v=1.0&amp;px=999\" alt=\"Type_Res.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Select elastic load generators, and the groups to which you want to assign them.<\/li>\n<li>Click the \u201cAssign\u201d button. The load generators are assigned to the selected groups. You can expand them to view more information, or to unassign.<span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"AssinDocker.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8485iD80006E7E20DAD02\/image-size\/large?v=1.0&amp;px=999\" alt=\"AssinDocker.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Click \u201cOK\u201d. The load generators are updated in the Groups &amp; Workload tab of the Performance Load Test Designer.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"Group_Docker.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8486i8BF39D75DD86E42A\/image-size\/large?v=1.0&amp;px=999\" alt=\"Group_Docker.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p><span style=\"color: #3366ff; font-size: large;\">Run the performance test:<\/span><\/p>\n<p>When you start the performance test, the elastic load generators are provisioned:<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"rov2.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8487i9BB5B857035DB0CA\/image-size\/large?v=1.0&amp;px=999\" alt=\"rov2.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p>During the test run, you can see a graph for the Heapster server that was defined for the orchestrator:<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"heapsterGraph.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8488i33B2BDE72AE6B3DB\/image-size\/large?v=1.0&amp;px=999\" alt=\"heapsterGraph.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><\/p>\n<p>When the test finishes, the results are collated and the elastic load generators are automatically terminated.<\/p>\n<p>After the data has been analysed, all the information is visible in the Summary report including the Heapster graph:<\/p>\n<p><span class=\"lia-inline-image-display-wrapper lia-image-align-center\"><span class=\"lia-message-image-wrapper\"><img decoding=\"async\" class=\"lia-media-image\" tabindex=\"0\" title=\"HTML.png\" src=\"https:\/\/dcvta86296.i.lithium.com\/t5\/image\/serverpage\/image-id\/8489iFB3E87116CAB00AA\/image-size\/large?v=1.0&amp;px=999\" alt=\"HTML.png\" \/><span class=\"lia-messages-message-image lia-not-ready\"><!-- ngIf: link --> <i class=\"lia-fa lia-fa-search-plus lia-media-lightbox-trigger\" tabindex=\"0\" aria-label=\"li.messages.message-image.controls.enlarge-img.aria-label\"><\/i> <\/span><\/span><\/span><br \/>\nYou can alos view <a href=\"https:\/\/youtu.be\/qCKO4zKxjyo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Performance Center and Kubernetes integration video<\/a> for the full flow.<\/p>\n<p>To learn more about elastic provisioning and de-provisioning of load generators using Kubernetes, see <a href=\"https:\/\/admhelp.microfocus.com\/pc\/en\/latest\/online_help\/Content\/PC\/Elastic-Load-Generators.htm#Set_up_elastic_load_generator_provisioning\" target=\"_blank\" rel=\"noopener noreferrer\">Manage Elastic Load Generators<\/a> in the Performance Center Help. You can also learn more about <a href=\"https:\/\/software.microfocus.com\/en-us\/products\/performance-center\/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Performance Center<\/a> at the product page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Micro Focus Performance Center 12.56 performance testing software introduces the power of Docker for elastic provisioning and de-provisioning of containerized Linux load generator resources using Kubernetes container orchestrators. This approach allows you to automate and increase efficiency of your testing process by allocating resources on-demand\u2014without needing to define or reserve load generators in advance. Docker, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[27],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-performance-center","tag-tests-de-performance"],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=67"}],"version-history":[{"count":21,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":1016,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions\/1016"}],"wp:attachment":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}