SystemD Puppet ERB Template for Clustered Minio
A Puppet ERB template for generating Minio cluster systemd control script.
@cluster_fqdn is an array of fully qualified domain names of each node in the cluster.
https://gist.github.com/alastairhm/51eb6f8bb35b8d785639c3e3165b41ac
Doodle's Geek Monkey by Alastair Montgomery
@cluster_fqdn is an array of fully qualified domain names of each node in the cluster.
| [Unit] | |
| Description=Minio | |
| Documentation=https://docs.minio.io | |
| Wants=network-online.target | |
| After=network-online.target | |
| After=syslog.target network.target | |
| AssertFileIsExecutable=<%= @installation_directory %>/minio | |
| [Service] | |
| WorkingDirectory=<%= @installation_directory %> | |
| Environment="MINIO_ACCESS_KEY=<%= @access_key %>" | |
| Environment="MINIO_SECRET_KEY=<%= @secret_key %>" | |
| User=<%= @owner %> | |
| Group=<%= @group %> | |
| PermissionsStartOnly=true | |
| ExecStart=<%= @installation_directory %>/minio server --config-dir <%= @configuration_directory %> \ | |
| <% @cluster_fqdn.each_with_index do |fqdn, i| -%> | |
| <%- unless i < (@cluster_fqdn.size - 1) -%> | |
| http://<%= fqdn %><%= @minio_mount_partition %>/minio-data | |
| <%- else -%> | |
| http://<%= fqdn %><%= @minio_mount_partition %>/minio-data \ | |
| <%- end -%> | |
| <% end -%> | |
| StandardOutput=journal | |
| StandardError=inherit | |
| # Specifies the maximum file descriptor number that can be opened by this process | |
| LimitNOFILE=65536 | |
| # Disable timeout logic and wait until process is stopped | |
| TimeoutStopSec=0 | |
| # SIGTERM signal is used to stop Minio | |
| KillSignal=SIGTERM | |
| SendSIGKILL=no | |
| SuccessExitStatus=0 | |
| [Install] | |
| WantedBy=multi-user.target |
https://gist.github.com/alastairhm/51eb6f8bb35b8d785639c3e3165b41ac
Doodle's Geek Monkey by Alastair Montgomery