Skip to content

Commit

Permalink
Merge pull request #774 from zhasm/hotfix/rex-enable-clickhouse-for-e…
Browse files Browse the repository at this point in the history
…uler

fix(euler,clickhouse): x86 欧拉 ISO 启用clickhouse 模块
  • Loading branch information
zexi committed May 9, 2023
2 parents e0f6c37 + d55e28e commit b992406
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion onecloud/roles/clickhouse/deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
when:
- offline_data_path is defined
- offline_data_path | length > 0
- is_centos_x86 | default(false) | bool == true
- (is_centos_x86 | default(false) | bool == true) or (is_openeuler_x86 | default(false) | bool == true)
2 changes: 1 addition & 1 deletion onecloud/roles/clickhouse/install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
when:
- offline_data_path is defined
- offline_data_path | length > 0
- is_centos_x86 | default(false) | bool == true
- (is_centos_x86 | default(false) | bool == true) or (is_openeuler_x86 | default(false) | bool == true)
1 change: 1 addition & 0 deletions onecloud/roles/clickhouse/install/tasks/openeuler.yml
12 changes: 7 additions & 5 deletions onecloud/roles/common/tasks/centos_7_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
enablerepo: "yunion-*"
with_items:
- "{{ common_packages }}"
when:
- common_packages is defined
async: 1200 # Maximum allowed time in Seconds
poll: 0 # Polling Interval in Seconds
register: package_install
loop_control:
index_var: item_index
label: "[{{ item_index + 1 }}/{{ common_packages|length }}] {{ item }}"
Expand Down Expand Up @@ -45,6 +40,12 @@
when:
- is_centos_x86 is defined

- name: Selinux Status
shell: |
sestatus |grep '^SELinux status:' |awk '{print $3}'
register: selinux_status
ignore_errors: yes

- name: Check that if selinux config exists
stat:
path: /etc/selinux/config
Expand All @@ -54,4 +55,5 @@
selinux:
state: disabled
when:
- selinux_status.stdout | default("") != "disabled"
- selinux_conf_exists.stat.exists
20 changes: 19 additions & 1 deletion onecloud/roles/primary-master-node/setup_k8s/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,31 @@
when:
- join_as_host | default(false)|bool == true

- block:
- name: Set cgroup driver to systemd in kubelet.service
lineinfile:
path: /usr/lib/systemd/system/kubelet.service
regexp: '^ExecStart=/usr/bin/kubelet$'
line: 'ExecStart=/usr/bin/kubelet --cgroup-driver=systemd'

- name: reload systemd
ansible.builtin.systemd:
name: kubelet
state: restarted
daemon_reload: true
when:
is_openeuler_based | default(false) | bool == true

- name: show init args
debug:
msg: "/opt/yunion/bin/ocadm {{ init_args }}"

- name: Use ocadm init first master node
command: "/opt/yunion/bin/ocadm {{ init_args }}"
shell: |
/opt/yunion/bin/ocadm {{ init_args }}
when: kubelet_result.rc != 0
args:
executable: /bin/bash

- name: "Wait 500 seconds for primary master to response: {{ controlplane_endpoint }}"
wait_for:
Expand Down

0 comments on commit b992406

Please sign in to comment.