summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/playbooks/preconfigure-cmk.yml
diff options
context:
space:
mode:
authorLiang Ding <liang.ding@intel.com>2019-10-30 23:47:35 -0700
committerLiang Ding <liang.ding@intel.com>2020-05-05 15:41:48 +0000
commitcc10b9aff3fd16df62c0655ec1626624ad2e2fc0 (patch)
tree506a942430b6eca7058b5549e445125b98f1e5ab /kud/deployment_infra/playbooks/preconfigure-cmk.yml
parent501d62d194a42c5c85f22d8208a4e1dd6d985492 (diff)
add cmk in KuD
- deploy cmk related pods - untaint compute nodes if necessary - run cmk unit tests: allocate CPUs from exclusive and shared pools - deploy a testing nginx pod along with cmk testing pods - preset 1/2 CPUs for shared/exlusive pools to fit CI server machines users can adjust the parameters to meet their own requirements Test Results: - many rounds of vagrant/5 VMs(controller01/02/03 and compute01/02) based test are all OK - 14 rounds tests on my local server (S2600WFQ (36C/72T) )and PC(HP Z228 (4C/4T)) with all-in-one bare metal deployment are all OK - CI(a 4C/4T machine) results of latest patch set also show that the test of bare metal deployment is OK - NOTE: both my local test and CI use the same testing method of calling aio.sh after applying the latest patch set. Change-Id: I046a4a63b94f92f23347ab76c21a661521e01119 Issue-ID: MULTICLOUD-879 Signed-off-by: Liang Ding <liang.ding@intel.com>
Diffstat (limited to 'kud/deployment_infra/playbooks/preconfigure-cmk.yml')
-rw-r--r--kud/deployment_infra/playbooks/preconfigure-cmk.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/kud/deployment_infra/playbooks/preconfigure-cmk.yml b/kud/deployment_infra/playbooks/preconfigure-cmk.yml
new file mode 100644
index 00000000..7aab4e2e
--- /dev/null
+++ b/kud/deployment_infra/playbooks/preconfigure-cmk.yml
@@ -0,0 +1,62 @@
+---
+- hosts: kube-node
+ become: yes
+ pre_tasks:
+ - name: Load kud variables
+ include_vars:
+ file: kud-vars.yml
+ tasks:
+ - name: install cmk required packges
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items: "{{ cmk_pkgs }}"
+
+ - name: clean CMK directory
+ file:
+ path: "{{ cmk_dir }}"
+ state: absent
+
+ - name: create CMK directory
+ file:
+ path: "{{ cmk_dir }}"
+ state: directory
+
+ - name: clone CMK repository
+ command: git clone {{ cmk_git_url }} -b {{ cmk_version }}
+ args:
+ chdir: "{{ cmk_dir }}"
+
+ - name: read current CMK version
+ command: echo v1.4.1
+ args:
+ chdir: "{{ cmk_dir }}"
+ register: cmk_img_version
+
+ - name: build CMK image
+ command: make
+ args:
+ chdir: "{{ cmk_dir }}/CPU-Manager-for-Kubernetes"
+
+ - name: tag CMK image
+ command: docker tag cmk:{{ cmk_img_version.stdout }} {{ registry_local_address }}/cmk:{{ cmk_img_version.stdout }}
+
+ - name: build list of CMK hosts
+ set_fact:
+ cmk_hosts_list: "{{ groups['kube-node'] | join(',') }}"
+ when:
+ - cmk_use_all_hosts != true
+ - (cmk_hosts_list is undefined) or (cmk_hosts_list | length == 0)
+
+- hosts: kube-master[0]
+ become: yes
+ pre_tasks:
+ - name: Load kud variables
+ include_vars:
+ file: kud-vars.yml
+ tasks:
+ - name: install cmk required packges
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items: "{{ cmk_pkgs }}"