Skip to content

Commit

Permalink
Install minimal minio
Browse files Browse the repository at this point in the history
  • Loading branch information
mvalsecc committed May 2, 2024
1 parent 3685de5 commit 92c3cb2
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 3 deletions.
19 changes: 19 additions & 0 deletions main-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,28 @@
- vars/vm_setting.yml
- vars/download.yml

# Deploy NFS storage and use nfs-subdir-external-provisioner as backend for PVC
tasks:
- include_tasks: tasks/kvm_host/install-storage.yml
when:
- ff_provision_storage is defined
- ff_provision_storage == true
- include_tasks: tasks/kvm_host/setup-openshift-install-nfs-subdir-external-provisioner.yaml
when:
- ff_provision_storage is defined
- ff_provision_storage == true

# Install Minio
- hosts: kvm_host
gather_facts: yes
vars_files:
- vars/config.yml
- vars/vm_setting.yml
- vars/download.yml
tasks:
- include_tasks: tasks/kvm_host/setup-minio.yaml
when:
- ff_provision_storage is defined
- ff_provision_storage == true
- ff_deploy_minio is defined
- ff_deploy_minio == true
22 changes: 20 additions & 2 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,34 @@
- include_tasks: tasks/kvm_host/install-worker.yml
- include_tasks: tasks/kvm_host/wait-for-complete.yml

# Deploy NFS storage and use nfs-subdir-external-provisioner as backend for PVC
- hosts: kvm_host
gather_facts: yes
vars_files:
- vars/config.yml
- vars/vm_setting.yml
- vars/download.yml

tasks:
- include_tasks: tasks/kvm_host/install-storage.yml
- include_tasks: setup-openshift-install-nfs-subdir-external-provisioner.yaml
when:
- ff_provision_storage is defined
- ff_provision_storage == true
- include_tasks: tasks/kvm_host/setup-openshift-install-nfs-subdir-external-provisioner.yaml
when:
- ff_provision_storage is defined
- ff_provision_storage == true

# Install Minio
- hosts: kvm_host
gather_facts: yes
vars_files:
- vars/config.yml
- vars/vm_setting.yml
- vars/download.yml
tasks:
- include_tasks: tasks/kvm_host/setup-minio.yaml
when:
- ff_provision_storage is defined
- ff_provision_storage == true
- ff_deploy_minio is defined
- ff_deploy_minio == true
1 change: 1 addition & 0 deletions tasks/base/get_materials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
register: downloaded_helm_client
until: downloaded_helm_client is succeeded
retries: 3

- name: send helm client
unarchive:
src: "{{ files.base }}/clients/helm.tar.gz"
Expand Down
1 change: 0 additions & 1 deletion tasks/base/mk_files-dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
file:
path: "{{ files.rocky }}"
state: directory
tags: nfs

- name: make files/clients dir
file:
Expand Down
18 changes: 18 additions & 0 deletions tasks/kvm_host/setup-minio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# References: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/31#issuecomment-756823499
# https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner#without-helm
- name: Install minio
shell: >-
wget https://raw.githubusercontent.com/kubernetes/examples/master/staging/storage/minio/minio-standalone-pvc.yaml;
sed -i 's/standard/nfs-client/' minio-standalone-pvc.yaml;
/root/bin/oc create -f minio-standalone-pvc.yaml;
rm minio-standalone-pvc.yaml;
/root/bin/oc create -f https://raw.githubusercontent.com/kubernetes/examples/master/staging/storage/minio/minio-standalone-deployment.yaml;
/root/bin/oc create -f https://raw.githubusercontent.com/kubernetes/examples/master/staging/storage/minio/minio-standalone-service.yaml;
/root/bin/oc create sa minio;
/root/bin/oc adm policy add-scc-to-user hostnetwork-v2 -z minio;
/root/bin/oc expose svc minio-service;
environment:
KUBECONFIG: "{{ files.kvm }}/bare-metal/auth/kubeconfig"
8 changes: 8 additions & 0 deletions vars/vm_setting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ spec_storage:
disk: 50 # Size of the disk that includes the NFS export
disk_cache: unsafe

# Deploy minimal non distributed, non HA minio instance
# See https://github.com/kubernetes/examples/blob/master/staging/storage/minio/README.md
ff_deploy_minio: true

# To deploy loki ff_provision_storage, ff_deploy_minio and ff_deploy_loki must ALL be set to true
ff_deploy_loki: false


# Remove the bootstrap node after the OCP installation is complete.
# If this value is "true", the bootstrap node will be preserved.
keep_bootstrap: false
Expand Down

0 comments on commit 92c3cb2

Please sign in to comment.