Skip to content

Commit

Permalink
优化storage结构,修复deploy节点分离nas部署失败
Browse files Browse the repository at this point in the history
  • Loading branch information
lusyoe authored and gjmzj committed Aug 7, 2018
1 parent be08287 commit 7119c70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions roles/cluster-storage/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
- block:
- name: 准备nfs-client 配置目录
file: name={{ base_dir }}/manifests/storage/nfs state=directory
- name: 准备部署nfs-client动态存储

- name: 生成nfs-client动态存储配置
template:
src: nfs/nfs-client-provisioner.yaml.j2
dest: "{{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"

- name: 开始部署nfs-client动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
when: 'storage_nfs_enabled == "yes"'

- block:
- name: 准备部署alicloud-nas动态存储
- name: 准备alicloud-nas配置目录
file: name={{ base_dir }}/manifests/storage/alicloud-nas state=directory

- name: 生成alicloud-nas动态存储配置
template:
src: alicloud-nas/alicloud-nas.yaml.j2
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"

- name: 复制alicloud-disk配置
copy:
src: alicloud-disk.yaml
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"

- name: 开始部署alicloud-disk存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"

- name: 开始部署alicloud-nas动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
when: 'storage_aliyun_nas_enabled == "yes"'
Expand Down

0 comments on commit 7119c70

Please sign in to comment.