Update IPFS cookbook

This commit is contained in:
Basti 2020-10-25 12:09:01 +01:00
parent 0f5f84dba2
commit 2c368f0f10
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
11 changed files with 19 additions and 32 deletions

View File

@ -47,7 +47,7 @@ cookbook 'homebrew', '= 3.0.0'
cookbook 'mariadb', '= 0.3.1'
cookbook 'ipfs',
git: 'https://gitea.kosmos.org/kosmos/ipfs-cookbook.git',
ref: 'v0.4.1'
ref: 'v0.7.0'
cookbook 'elasticsearch', '= 4.2.0'
cookbook 'java', '~> 4.3.0'
cookbook 'ulimit', '~> 1.0.0'

View File

@ -18,8 +18,8 @@ DEPENDENCIES
hostsfile (= 2.4.5)
ipfs
git: https://gitea.kosmos.org/kosmos/ipfs-cookbook.git
revision: 5c31191ff8571bc8425375fbf938913ac64aa2ee
ref: v0.4.1
revision: d7c25b6ce5fa490b6de3529fdc163fb64f1ece8a
ref: v0.7.0
java (~> 4.3.0)
logrotate (= 2.2.0)
mariadb (= 0.3.1)
@ -92,7 +92,7 @@ GRAPH
hostname (0.4.2)
hostsfile (>= 0.0.0)
hostsfile (2.4.5)
ipfs (0.4.1)
ipfs (0.7.0)
ark (>= 0.0.0)
java (4.3.0)
homebrew (>= 0.0.0)

View File

@ -13,12 +13,10 @@ provisioner:
verifier:
name: inspec
root_path: '/opt/verifier' # Needed for the specs to be detected in Docker
chef_license: accept
platforms:
- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
@ -33,8 +31,3 @@ suites:
run_list:
- recipe[ipfs::default]
attributes:
- name: cluster
run_list:
- recipe[ipfs::cluster]
- recipe[ipfs::cluster_service]
attributes:

View File

@ -6,17 +6,14 @@ provisioner:
name: chef_zero
platforms:
- name: ubuntu-16.04
- name: ubuntu-18.04
- name: debian-9
verifier:
chef_license: accept
suites:
- name: default
run_list:
- recipe[ipfs::default]
attributes:
- name: cluster
run_list:
- recipe[ipfs::cluster]
- recipe[ipfs::cluster_service]
attributes:

View File

@ -20,7 +20,6 @@ services: docker
env:
matrix:
- INSTANCE=default-debian-9
- INSTANCE=default-ubuntu-1604
- INSTANCE=default-ubuntu-1804
before_script:
@ -30,7 +29,7 @@ before_script:
- cookstyle --version
- foodcritic --version
script: CHEF_LICENSE=accept-no-persist KITCHEN_LOCAL_YAML=.kitchen.dokken.yml CHEF_VERSION=13.10.4 kitchen verify ${INSTANCE}
script: CHEF_LICENSE=accept-no-persist KITCHEN_LOCAL_YAML=.kitchen.dokken.yml kitchen test ${INSTANCE}
matrix:
include:

View File

@ -10,7 +10,7 @@ GRAPH
build-essential (8.1.1)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
ipfs (0.4.0)
ipfs (0.4.2)
ark (>= 0.0.0)
mingw (2.1.0)
seven_zip (>= 0.0.0)

View File

@ -1,5 +1,5 @@
node.default['ipfs']['version'] = '0.4.22'
node.default['ipfs']['checksum'] = '43431bbef105b1c8d0679350d6f496b934d005df28c13280a67f0c88054976aa'
node.default['ipfs']['version'] = '0.7.0'
node.default['ipfs']['checksum'] = 'ef7c3f1bcae94c13c6e1033855ff99bb8e19089e01ea5018437847854c8c811f'
node.default['ipfs']['ulimit'] = 64000
node.default['ipfs']['memory_max'] = '512M'

View File

@ -1,6 +1,6 @@
{
"name": "ipfs",
"description": "Installs/Configures ipfs",
"description": "Installs/Configures go-ipfs",
"long_description": "# IPFS Cookbook\n\nThis cookbook installs go-ipfs and starts it as a daemon\n\n## Requirements\n\n### Platforms\n\nThis cookbook is tested on Ubuntu 18.06, 16.04 and Debian 9 using Test Kitchen.\nIt currently only supports 64bit platforms\n\n### Chef\n\n- Chef 12.5 or later (the cookbook provides a\n [Custom Resource](https://docs.chef.io/custom_resources.html) to configure\n go-ipfs)\n\n### Cookbook dependencies\n\n- `ark` to download and uncompress the go-ipfs package\n\n## Usage\n\n### ipfs::default\n\nJust include `ipfs` in your node's `run_list`:\n\n```json\n{\n \"name\":\"my_node\",\n \"run_list\": [\n \"recipe[ipfs]\"\n ]\n}\n```\n\n## Attributes\n\n- `node['ipfs']['version']` - the go-ipfs version to download from the official\nsite (64bit)\n- `node['ipfs']['checksum']` - the SHA256 checksum for the package\n- `node['ipfs']['config']` - a hash of config options\n\n## Resources\n\n`ipfs_config` sets the config. Supports hashes, arrays, booleans and strings.\nDoes not change anything if the config already has that value, and restarts\nthe server automatically\n\n```ruby\nipfs_config \"Gateway.Writable\" do\n value \"true\"\n end\n```\n\n## Running the specs and integrations tests\n\nInstall the latest [Chef DK](https://downloads.chef.io/chefdk).\n\n```\nchef exec delivery local all # Run the linting check, syntax check and unit tests\nkitchen verify # Run the integration tests for Ubuntu 16.04, 18.06 and Debian 9\n```\n\n## License and Authors\n\nAuthors: Kosmos Developers mail@kosmos.org \nCopyright: 2018-2019, [Kosmos Developers](https://kredits.kosmos.org/)\n\n```\nUnless otherwise noted, all files are released under the MIT license, possible\nexceptions will contain licensing information in them.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n",
"maintainer": "Kosmos Developers",
"maintainer_email": "mail@kosmos.org",
@ -17,7 +17,7 @@
"recipes": {
},
"version": "0.4.1",
"version": "0.7.0",
"source_url": "https://github.com/67P/ipfs-cookbook",
"issues_url": "https://github.com/67P/ipfs-cookbook/issues",
"privacy": false,

View File

@ -2,9 +2,9 @@ name 'ipfs'
maintainer 'Kosmos Developers'
maintainer_email 'mail@kosmos.org'
license 'MIT'
description 'Installs/Configures ipfs'
description 'Installs/Configures go-ipfs'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.4.1'
version '0.7.0'
supports %w(ubuntu debian)

View File

@ -32,6 +32,7 @@ ark 'ipfs' do
url "https://dist.ipfs.io/go-ipfs/v#{version}/go-ipfs_v#{version}_linux-amd64.tar.gz"
checksum node['ipfs']['checksum']
has_binaries ['ipfs']
notifies :restart, 'service[ipfs]', :delayed
end
execute 'ipfs init --empty-repo' do

View File

@ -45,10 +45,7 @@ describe 'IPFS' do
{
'Swarm.AddrFilters' => addr_filters.rstrip,
'Swarm.DisableBandwidthMetrics' => true,
'Swarm.DisableRelay' => true,
'Swarm.ConnMgr.HighWater' => 10,
'Swarm.ConnMgr.LowWater' => 1,
'Gateway.Writable' => true,
}.each do |k, v|
describe command("IPFS_PATH=/home/ipfs/.ipfs ipfs config '#{k}'") do
let(:sudo_options) { '-u ipfs -i' }