Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(euler,clickhouse): x86 欧拉 ISO 启用clickhouse 模块 #774

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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