Move attributes from the ipfs cookbook to kosmos-ipfs

The default attributes set in the ipfs cookbook do not include
attributes that are specific to Kosmos anymore
This commit is contained in:
Greg Karékinian
2019-07-05 15:38:30 +02:00
parent 7803513318
commit 9c8befc179
3 changed files with 21 additions and 26 deletions

View File

@@ -24,32 +24,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
node.override['ipfs']['version'] = '0.4.21'
node.override['ipfs']['checksum'] = 'a7ec5ddc4d52f818cbf3853a80f7ec17f9fde9128f039485dbe1889cf673d562'
include_recipe "ipfs"
include_recipe "kosmos-ipfs::kredits_pinner"
# Configure ipfs
# The default gateway is already used by kosmos' hubot (8080)
ipfs_config "Addresses.Gateway" do
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 ["*"]
node['kosmos-ipfs']['ipfs']['config'].each do |k, v|
ipfs_config k do
value v
end
end
unless node.chef_environment == "development"