A collection of ansible playbooks to build an IPFS cluster setup with TLS termination for the Gateway, UI and HTTP API.
ipfs-cluster.yml
: Installs and configures theipfs
andipfs-cluster
daemonscertbot.yml
: Installs and configures TLS certificates for any number of hostsnginx.yml
: Installs and configures nginxnginx-config.yml
: Creates the virtual hosts on nginx to expose the HTTP Gateway and the Web UImain.yml
: Executes all of the above playbooks in sequence
- Configure the hostnames/addresses for all the nodes in the cluster in
env/ipfs/hosts.yml
(replaceipfs-node-x
with your values) - Generate an IPFS Secret and replace the placeholders in
env/ipfs/host_vars/**.yml
as well asenv/ipfs/group_vars/ipts_cluster.yml
with your values. (Refer to Ansible IPFS Cluster for info on how to get those values) - Add any number of users to the variable
ipfs_cluster_restapi_users
inenv/ipfs/group_vars/ipts_cluster.yml
- Replace the value in
env/ipfs/group_vars/all/common.yml
with your domain name for the TLS certificate. - Create a new file in
env/ipfs/group_vars/all
and declare theipfs_nginx_htpasswd
,ipfs_nginx_username
andipfs_nginx_password
with values of your choosing. make sure to add that file to gitignore
ansible-playbook -i env/ipfs-cluster main.yml
ansible-playbook -i env/ipfs-cluster main.yml --tags nginx