Merge branch 'feature/new_ipfs_cookbook' of kosmos/chef into master
This commit is contained in:
commit
f887a88e2d
@ -18,7 +18,7 @@ DEPENDENCIES
|
|||||||
hostsfile (= 2.4.5)
|
hostsfile (= 2.4.5)
|
||||||
ipfs
|
ipfs
|
||||||
git: https://github.com/67P/ipfs-cookbook.git
|
git: https://github.com/67P/ipfs-cookbook.git
|
||||||
revision: 3d4e9cceeaf89d30ca1b063e26a51905e8ddfd6b
|
revision: 1d09c151083beecb9c606805b1cb135c2619e7c5
|
||||||
ref: master
|
ref: master
|
||||||
logrotate (= 2.2.0)
|
logrotate (= 2.2.0)
|
||||||
mariadb (= 0.3.1)
|
mariadb (= 0.3.1)
|
||||||
@ -99,7 +99,7 @@ GRAPH
|
|||||||
hostname (0.4.2)
|
hostname (0.4.2)
|
||||||
hostsfile (>= 0.0.0)
|
hostsfile (>= 0.0.0)
|
||||||
hostsfile (2.4.5)
|
hostsfile (2.4.5)
|
||||||
ipfs (0.3.0)
|
ipfs (0.4.0)
|
||||||
ark (>= 0.0.0)
|
ark (>= 0.0.0)
|
||||||
logrotate (2.2.0)
|
logrotate (2.2.0)
|
||||||
mariadb (0.3.1)
|
mariadb (0.3.1)
|
||||||
|
@ -10,6 +10,19 @@
|
|||||||
"role[mastodon]",
|
"role[mastodon]",
|
||||||
"role[ejabberd]"
|
"role[ejabberd]"
|
||||||
],
|
],
|
||||||
|
"normal": {
|
||||||
|
"kosmos-ipfs": {
|
||||||
|
"ipfs": {
|
||||||
|
"config": {
|
||||||
|
"Swarm.ConnMgr.LowWater": 100,
|
||||||
|
"Swarm.ConnMgr.HighWater": 300
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ipfs": {
|
||||||
|
"memory_max": "1G"
|
||||||
|
}
|
||||||
|
},
|
||||||
"automatic": {
|
"automatic": {
|
||||||
"ipaddress": "andromeda.kosmos.org"
|
"ipaddress": "andromeda.kosmos.org"
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
"sockethub",
|
"sockethub",
|
||||||
"sockethub::proxy"
|
"sockethub::proxy"
|
||||||
],
|
],
|
||||||
|
"normal": {
|
||||||
|
"ipfs": {
|
||||||
|
"memory_max": "256M"
|
||||||
|
}
|
||||||
|
},
|
||||||
"automatic": {
|
"automatic": {
|
||||||
"ipaddress": "barnard.kosmos.org"
|
"ipaddress": "barnard.kosmos.org"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
# FIXME api_port should come from the ipfs cookbook/attributes
|
node.default['kosmos-ipfs']['ipfs']['config'] = {
|
||||||
# It has nothing to do with nginx
|
# The default gateway is already used by kosmos' hubot (8080)
|
||||||
|
"Addresses.Gateway" => "/ip4/127.0.0.1/tcp/9090",
|
||||||
|
# Do not keep track of bandwidth metrics. Disabling bandwidth metrics can
|
||||||
|
# lead to a slight performance improvement, as well as a reduction in memory
|
||||||
|
# usage.
|
||||||
|
'Swarm.DisableBandwidthMetrics' => true,
|
||||||
|
# Disable the p2p-circuit relay transport
|
||||||
|
'Swarm.DisableRelay' => true,
|
||||||
|
# Number of connections that, when exceeded, will trigger a connection GC
|
||||||
|
# operation
|
||||||
|
'Swarm.ConnMgr.HighWater' => 40,
|
||||||
|
# Minimum number of connections to maintain
|
||||||
|
'Swarm.ConnMgr.LowWater' => 20
|
||||||
|
}
|
||||||
|
|
||||||
node.default['kosmos-ipfs']['nginx']['api_port'] = 5001
|
node.default['kosmos-ipfs']['nginx']['api_port'] = 5001
|
||||||
node.default['kosmos-ipfs']['nginx']['gateway_port'] = 9090
|
node.default['kosmos-ipfs']['nginx']['gateway_port'] = 9090
|
||||||
node.default['kosmos-ipfs']['nginx']['external_api_port'] = 5444
|
node.default['kosmos-ipfs']['nginx']['external_api_port'] = 5444
|
||||||
|
@ -4,7 +4,7 @@ maintainer_email 'mail@kosmos.org'
|
|||||||
license 'MIT'
|
license 'MIT'
|
||||||
description 'Installs/Configures kosmos-ipfs'
|
description 'Installs/Configures kosmos-ipfs'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '0.1.3'
|
version '0.2.0'
|
||||||
|
|
||||||
depends 'ipfs'
|
depends 'ipfs'
|
||||||
depends 'kosmos-base'
|
depends 'kosmos-base'
|
||||||
|
@ -24,32 +24,13 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
node.override['ipfs']['version'] = '0.4.21'
|
|
||||||
node.override['ipfs']['checksum'] = 'a7ec5ddc4d52f818cbf3853a80f7ec17f9fde9128f039485dbe1889cf673d562'
|
|
||||||
include_recipe "ipfs"
|
include_recipe "ipfs"
|
||||||
include_recipe "kosmos-ipfs::kredits_pinner"
|
include_recipe "kosmos-ipfs::kredits_pinner"
|
||||||
|
|
||||||
# Configure ipfs
|
node['kosmos-ipfs']['ipfs']['config'].each do |k, v|
|
||||||
|
ipfs_config k do
|
||||||
# The default gateway is already used by kosmos' hubot (8080)
|
value v
|
||||||
ipfs_config "Addresses.Gateway" do
|
end
|
||||||
value "/ip4/127.0.0.1/tcp/9090"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Set up the Gateway to be writable
|
|
||||||
ipfs_config "Gateway.Writable" do
|
|
||||||
value true
|
|
||||||
end
|
|
||||||
|
|
||||||
# Set up CORS headers
|
|
||||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Credentials" do
|
|
||||||
value ["true"]
|
|
||||||
end
|
|
||||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Methods" do
|
|
||||||
value ["PUT", "GET", "POST"]
|
|
||||||
end
|
|
||||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Origin" do
|
|
||||||
value ["*"]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
unless node.chef_environment == "development"
|
unless node.chef_environment == "development"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user