Allow to create a package and install a package compiled from GitHub
Also add nginx config for reverse proxying and set up Let's Encrypt automatically
This commit is contained in:
27
site-cookbooks/kosmos-parity/recipes/from_package.rb
Normal file
27
site-cookbooks/kosmos-parity/recipes/from_package.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Cookbook Name:: kosmos-parity
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2017, Kosmos
|
||||
#
|
||||
# All rights reserved - Do Not Redistribute
|
||||
#
|
||||
|
||||
include_recipe 'kosmos-parity::user'
|
||||
|
||||
parity_version = node['kosmos-parity']['package_version']
|
||||
package_timestamp = node['kosmos-parity']['package_timestamp']
|
||||
parity_filename = "parity_#{parity_version}-#{package_timestamp}.deb"
|
||||
|
||||
parity_package_path = "#{Chef::Config[:file_cache_path]}/#{parity_filename}"
|
||||
remote_file parity_package_path do
|
||||
source "https://dl.5apps.com/#{parity_filename}"
|
||||
checksum node['kosmos-parity']['checksum']
|
||||
mode 0750
|
||||
notifies :install, "dpkg_package[parity]", :immediately
|
||||
end
|
||||
|
||||
dpkg_package "parity" do
|
||||
source parity_package_path
|
||||
version "#{parity_version}-#{package_timestamp}"
|
||||
end
|
||||
Reference in New Issue
Block a user