Skip to content

Commit a80ad36

Browse files
mig5madoke
authored andcommitted
Switch to use kubo instead of go-ipfs as of v0.36.0
1 parent 81f027c commit a80ad36

File tree

5 files changed

+18
-46
lines changed

5 files changed

+18
-46
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Ansible role for `go-ipfs` and `ipfs-cluster`
1+
# Ansible role for `kubo` and `ipfs-cluster`
22

33
This repository contains an Ansible role to install and run
4-
[`go-ipfs`](https://github.com/ipfs/go-ipfs) and
4+
[`kubo`](ihttps://github.com/ipfs/kubo) and
55
[`IPFS Cluster`](https://github.com/ipfs/ipfs-cluster).
66

77
They include a Systemd service file both.
@@ -25,7 +25,7 @@ that fits you best. Otherwise follow these steps:
2525
- Create `group_vars/ipfs.yml` and `group_vars/ipfs_cluster.yml` files setting the right configuration values including generating an [IPFS Cluster secret](https://cluster.ipfs.io/documentation/guides/security/#the-cluster-secret) with `od -vN 32 -An -tx1 /dev/urandom | tr -d ' \n' ; echo`. More details in the [Group Vars](#group-vars) section.
2626
- Add a file for each hostname (filename is the hostname), to the `host_vars` folder as outlined in [Host Vars](#host-vars), containing the necessary host-specific variables (example in the `molecule/default/molecule.yml` file).
2727

28-
Upon successful execution, both `go-ipfs` and `ipfs-cluster` should be running in the nodes (they are installed under `/usr/local/bin` and run by a created `ipfs` system user).
28+
Upon successful execution, both `kubo` and `ipfs-cluster` should be running in the nodes (they are installed under `/usr/local/bin` and run by a created `ipfs` system user).
2929

3030
You can use `systemctl status ipfs` and `systemctl status ipfs-cluster` to check the status of the new services.
3131

@@ -105,4 +105,4 @@ Assumes you have a working molecule setup with docker, running `molecule test` s
105105
106106
```console
107107
python 3 -m molecule test
108-
```
108+
```

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# IPFS
22

3-
# override to disable go-ipfs setup
3+
# override to disable kubo setup
44
ipfs_enable: true
55

66
ipfs_version: v0.9.0

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
galaxy_info:
22
author: Hector Sanjuan
3-
description: Ansible role to install and run go-ipfs and IPFS Cluster
3+
description: Ansible role to install and run kubo and IPFS Cluster
44

55
# If the issue tracker for your role is not on github, uncomment the
66
# next line and provide a value

tasks/ipfs/main.yml

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
- name: create download folder for go-ipfs
1+
- name: create download folder for kubo
22
become: yes
33
file:
44
state: directory
55
owner: root
66
group: root
7-
dest: /opt/go-ipfs/{{ipfs_version}}
7+
dest: /opt/kubo/{{ipfs_version}}
88

99
- name: download and unpack IPFS
1010
when: not ansible_check_mode
1111
block:
1212
- name: download IPFS
1313
become: yes
1414
get_url:
15-
url: "{{ dist_url }}/go-ipfs/{{ipfs_version}}/go-ipfs_{{ipfs_version}}_linux-{{ipfs_arch}}.tar.gz"
16-
dest: /opt/go-ipfs/{{ipfs_version}}/go-ipfs.tar.gz
15+
url: "{{ dist_url }}/kubo/{{ipfs_version}}/kubo_{{ipfs_version}}_linux-{{ipfs_arch}}.tar.gz"
16+
dest: /opt/kubo/{{ipfs_version}}/kubo.tar.gz
1717
timeout: 30
1818

19-
- name: unpack go-ipfs
19+
- name: unpack kubo
2020
become: yes
2121
unarchive:
2222
remote_src: yes
23-
src: /opt/go-ipfs/{{ipfs_version}}/go-ipfs.tar.gz
24-
dest: /opt/go-ipfs/{{ipfs_version}}
25-
creates: /opt/go-ipfs/{{ipfs_version}}/go-ipfs
23+
src: /opt/kubo/{{ipfs_version}}/kubo.tar.gz
24+
dest: /opt/kubo/{{ipfs_version}}
25+
creates: /opt/kubo/{{ipfs_version}}/kubo
2626
notify: restart IPFS
2727

28-
- name: link go-ipfs executable
28+
- name: link kubo executable
2929
become: yes
3030
file:
3131
state: link
3232
owner: root
3333
group: root
3434
dest: /usr/local/bin/ipfs
35-
src: /opt/go-ipfs/{{ipfs_version}}/go-ipfs/ipfs
35+
src: /opt/kubo/{{ipfs_version}}/kubo/ipfs
3636

3737
- name: install ipfs systemd init service
3838
become: yes
@@ -88,34 +88,6 @@
8888
creates: "{{ ipfs_home }}/.ipfs/config"
8989
notify: restart IPFS
9090

91-
- name: download and unpack NOpfs
92-
when: not ansible_check_mode
93-
block:
94-
- name: create plugins folder
95-
become: yes
96-
file:
97-
state: directory
98-
owner: ipfs
99-
group: ipfs
100-
dest: "{{ ipfs_home }}/.ipfs/plugins"
101-
102-
- name: download and unpack nopfs
103-
when: not ansible_check_mode
104-
become: yes
105-
unarchive:
106-
remote_src: yes
107-
src: "https://github.com/ipfs-shipyard/nopfs/releases/download/nopfs-kubo-plugin/{{nopfs_version}}/nopfs-kubo-plugin_{{nopfs_version}}_linux_{{ipfs_arch}}.tar.gz"
108-
dest: "{{ ipfs_home }}/.ipfs/plugins/"
109-
include:
110-
- nopfs-kubo-plugin/nopfs-kubo-plugin
111-
extra_opts:
112-
- "--strip-components=1"
113-
owner: ipfs
114-
group: ipfs
115-
notify: restart IPFS
116-
tags:
117-
- nopfs
118-
11991
- name: set version file (to notify restart on upgrades)
12092
become: yes
12193
copy:
@@ -125,7 +97,7 @@
12597
owner: ipfs
12698
group: ipfs
12799
notify: restart IPFS
128-
100+
129101
- name: reload systemd
130102
become: yes
131103
systemd:

vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dist_url: https://dist.ipfs.io
1+
dist_url: https://dist.ipfs.tech

0 commit comments

Comments
 (0)