New recipe: Install .NET Core SDK

This commit is contained in:
Basti 2020-12-21 11:00:55 +01:00
parent 95c8b9fea9
commit a2b76c7d76
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
5 changed files with 48 additions and 28 deletions

View File

@ -8,17 +8,18 @@
"automatic": {
"fqdn": "bitcoin-2",
"os": "linux",
"os_version": "5.4.0-54-generic",
"os_version": "5.4.0-58-generic",
"hostname": "bitcoin-2",
"ipaddress": "192.168.122.148",
"roles": [
"btcpay"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos-bitcoin::source",
"kosmos-bitcoin::lnd",
"kosmos-bitcoin::dotnet",
"apt::default",
"timezone_iii::default",
"timezone_iii::debian",
@ -56,6 +57,7 @@
"run_list": [
"recipe[kosmos-base]",
"recipe[kosmos-bitcoin::source]",
"recipe[kosmos-bitcoin::lnd]"
"recipe[kosmos-bitcoin::lnd]",
"role[btcpay]"
]
}

5
roles/btcpay.rb Normal file
View File

@ -0,0 +1,5 @@
name "btcpay"
run_list %w(
kosmos-bitcoin::dotnet
)

View File

@ -28,3 +28,7 @@ node.default['bitcoin']['conf'] = {
node.default['lnd']['repo'] = 'https://github.com/lightningnetwork/lnd'
node.default['lnd']['revision'] = 'v0.11.0-beta'
node.default['lnd']['source_dir'] = '/opt/lnd'
node.default['dotnet']['ms_packages_src_url'] = "https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb"
node.default['dotnet']['ms_packages_src_checksum'] = "4df5811c41fdded83eb9e2da9336a8dfa5594a79dc8a80133bd815f4f85b9991"

View File

@ -0,0 +1,33 @@
#
# Cookbook:: kosmos-bitcoin
# Recipe:: dotnet
#
build_essential
apt_repository 'universe' do
uri 'http://archive.ubuntu.com/ubuntu/'
distribution 'focal'
components ['universe']
end
apt_package 'apt-transport-https'
remote_file '/opt/packages-microsoft-prod.deb' do
source node['dotnet']['ms_packages_src_url']
checksum node['dotnet']['ms_packages_src_checksum']
action :create_if_missing
end
dpkg_package 'packages-microsoft-prod' do
source '/opt/packages-microsoft-prod.deb'
action :install
notifies :run, 'execute[apt_update]'
end
execute 'apt_update' do
command 'apt update'
action :nothing
end
apt_package 'dotnet-sdk-3.1'

View File

@ -2,28 +2,6 @@
# Cookbook:: kosmos-bitcoin
# Recipe:: source
#
# The MIT License (MIT)
#
# Copyright:: 2020, Kosmos Developers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# TODO move to custom kosmos cookbook before publshing bitcoin cookbook
systemd_unit "mnt-data-bitcoin.mount" do
@ -46,10 +24,8 @@ systemd_unit "mnt-data-bitcoin.mount" do
action [:create, :enable, :start]
end
include_recipe 'ark'
build_essential
include_recipe 'ark'
%w{ libtool autotools-dev make automake cmake curl g++-multilib libtool
binutils-gold bsdmainutils pkg-config python3 patch }.each do |pkg|