Add minio to ansible
This commit is contained in:
parent
5f9747c378
commit
e006f44dd6
10 changed files with 53 additions and 53 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -13,6 +13,7 @@
|
|||
/homebox/
|
||||
/influxdb/
|
||||
/jellyfin/
|
||||
/minio/
|
||||
/tandoor/
|
||||
/telegraf/
|
||||
/tinytinyrss/
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
services_path: /opt/services/
|
||||
ansible_port: "{{ vault_node002.ansible_port }}"
|
||||
ansible_user: "{{ vault_node002.ansible_user }}"
|
||||
|
|
2
_ansible/inventory/host_vars/node003/main.yml
Normal file
2
_ansible/inventory/host_vars/node003/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
ansible_port: "{{ vault_node003.ansible_port }}"
|
||||
ansible_user: "{{ vault_node003.ansible_user }}"
|
|
@ -4,3 +4,5 @@ all:
|
|||
ansible_connection: local
|
||||
node002:
|
||||
ansible_host: node002.serguzim.net
|
||||
node003:
|
||||
ansible_host: node003.serguzim.net
|
||||
|
|
5
_ansible/node003.yml
Normal file
5
_ansible/node003.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Run roles for node003
|
||||
hosts: node003
|
||||
roles:
|
||||
- minio
|
7
_ansible/roles/minio/tasks/main.yml
Normal file
7
_ansible/roles/minio/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
- name: Deploy {{ svc.name }}
|
||||
tags:
|
||||
- minio
|
||||
- storage
|
||||
block:
|
||||
- import_tasks: deploy-common-service.yml
|
34
_ansible/roles/minio/vars/main.yml
Normal file
34
_ansible/roles/minio/vars/main.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
svc:
|
||||
domain: "s3.serguzim.me"
|
||||
name: minio
|
||||
port: 9000
|
||||
caddy_extra: |
|
||||
@nocache {
|
||||
query nocache=*
|
||||
}
|
||||
header @nocache "Cache-Control" "no-store, no-cache"
|
||||
extra_svcs:
|
||||
- domain: console.s3.serguzim.me
|
||||
docker_host: minio
|
||||
port: 9001
|
||||
|
||||
svc_env:
|
||||
MINIO_SERVER_URL: "https://{{ svc.domain }}/"
|
||||
MINIO_BROWSER_REDIRECT_URL: "https://console.{{ svc.domain }}"
|
||||
MINIO_VOLUMES: "/data"
|
||||
|
||||
MINIO_ROOT_USER: "{{ vault_minio.user }}"
|
||||
MINIO_ROOT_PASSWORD: "{{ vault_minio.pass }}"
|
||||
|
||||
compose:
|
||||
watchtower: true
|
||||
image: minio/minio
|
||||
env: true
|
||||
volumes:
|
||||
- data:/data
|
||||
file:
|
||||
services:
|
||||
app:
|
||||
command: server --console-address ":9001"
|
||||
volumes:
|
||||
data:
|
|
@ -1,16 +0,0 @@
|
|||
s3.serguzim.me {
|
||||
import default
|
||||
|
||||
@nocache {
|
||||
query nocache=*
|
||||
}
|
||||
header @nocache "Cache-Control" "no-store, no-cache"
|
||||
#header "Cache-Control" "no-store, no-cache"
|
||||
|
||||
reverse_proxy minio:9000
|
||||
}
|
||||
|
||||
console.s3.serguzim.me {
|
||||
import default
|
||||
reverse_proxy minio:9001
|
||||
}
|
12
minio/.env
12
minio/.env
|
@ -1,12 +0,0 @@
|
|||
MINIO_SERVER_URL="https://s3.serguzim.me/"
|
||||
MINIO_BROWSER_REDIRECT_URL="https://console.s3.serguzim.me"
|
||||
MINIO_VOLUMES="/data"
|
||||
|
||||
MINIO_ROOT_USER=
|
||||
MINIO_ROOT_PASSWORD=
|
||||
|
||||
#MINIO_IDENTITY_OPENID_CONFIG_URL="https://auth.serguzim.me/application/o/s3-serguzim-me/.well-known/openid-configuration"
|
||||
#MINIO_IDENTITY_OPENID_CLIENT_ID=
|
||||
#MINIO_IDENTITY_OPENID_CLIENT_SECRET=
|
||||
#MINIO_IDENTITY_OPENID_CLAIM_NAME="policy"
|
||||
#MINIO_IDENTITY_OPENID_REDIRECT_URI="https://console.s3.serguzim.me/oauth_callback"
|
|
@ -1,24 +0,0 @@
|
|||
version: '3'
|
||||
services:
|
||||
app:
|
||||
image: minio/minio
|
||||
restart: always
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
env_file:
|
||||
- .env
|
||||
- .secret.env
|
||||
volumes:
|
||||
- "data:/data"
|
||||
command: server --console-address ":9001"
|
||||
networks:
|
||||
apps:
|
||||
aliases:
|
||||
- minio
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
||||
networks:
|
||||
apps:
|
||||
external: true
|
Reference in a new issue