Compare commits
1 Commits
jammy_jell
...
232601f093
| Author | SHA1 | Date | |
|---|---|---|---|
|
232601f093
|
@@ -1,5 +1,5 @@
|
||||
node.default['bitcoin']['version'] = '26.0'
|
||||
node.default['bitcoin']['checksum'] = 'ab1d99276e28db62d1d9f3901e85ac358d7f1ebcb942d348a9c4e46f0fcdc0a1'
|
||||
node.default['bitcoin']['version'] = '27.1'
|
||||
node.default['bitcoin']['checksum'] = '0c1051fd921b8fae912f5c2dfd86b085ab45baa05cd7be4585b10b4d1818f3da'
|
||||
node.default['bitcoin']['username'] = 'satoshi'
|
||||
node.default['bitcoin']['usergroup'] = 'bitcoin'
|
||||
node.default['bitcoin']['network'] = 'mainnet'
|
||||
|
||||
@@ -12,8 +12,9 @@ if node["bitcoin"]["blocksdir_mount_type"]
|
||||
include_recipe "kosmos-bitcoin::blocksdir-mount"
|
||||
end
|
||||
|
||||
%w{ libtool autotools-dev make automake cmake curl g++-multilib libtool
|
||||
binutils-gold bsdmainutils pkg-config python3 patch }.each do |pkg|
|
||||
%w{
|
||||
libtool autotools-dev make automake cmake curl g++-10-multilib
|
||||
binutils-gold bsdmainutils pkg-config python3 patch }.each do |pkg|
|
||||
apt_package pkg
|
||||
end
|
||||
|
||||
@@ -26,7 +27,7 @@ end
|
||||
|
||||
execute "compile_bitcoin-core_dependencies" do
|
||||
cwd "/usr/local/bitcoind/depends"
|
||||
command "make NO_QT=1"
|
||||
command "make CC=gcc-10 CXX=g++-10 NO_QT=1"
|
||||
action :nothing
|
||||
notifies :run, 'bash[compile_bitcoin-core]', :immediately
|
||||
end
|
||||
@@ -35,7 +36,7 @@ bash "compile_bitcoin-core" do
|
||||
cwd "/usr/local/bitcoind"
|
||||
code <<-EOH
|
||||
./autogen.sh
|
||||
./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu
|
||||
./configure CC=gcc-10 CXX=g++-10 --prefix=$PWD/depends/x86_64-pc-linux-gnu
|
||||
make
|
||||
EOH
|
||||
action :nothing
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
release = "20240514"
|
||||
ubuntu_server_cloud_image_release = "20230506"
|
||||
|
||||
node.default["kosmos_kvm"]["host"]["qemu_base_image"] = {
|
||||
"url" => "https://cloud-images.ubuntu.com/releases/jammy/release-#{release}/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img",
|
||||
"checksum" => "2e7698b3ebd7caead06b08bd3ece241e6ce294a6db01f92ea12bcb56d6972c3f",
|
||||
"path" => "/var/lib/libvirt/images/base/ubuntu-22.04-server-cloudimg-amd64-disk-kvm-#{release}.qcow2"
|
||||
"url" => "https://cloud-images.ubuntu.com/releases/focal/release-#{ubuntu_server_cloud_image_release}/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.img",
|
||||
"checksum" => "27d2b91fd2b715729d739e2a3155dce70d1aaae4f05c177f338b9d4b60be638c",
|
||||
"path" => "/var/lib/libvirt/images/base/ubuntu-20.04-server-cloudimg-amd64-disk-kvm-#{ubuntu_server_cloud_image_release}.qcow2"
|
||||
}
|
||||
|
||||
# A systemd.timer OnCalendar config value
|
||||
|
||||
@@ -17,7 +17,7 @@ DISKSIZE=${4:-10} # 10GB default
|
||||
# Directory where image files will be stored
|
||||
IMAGE_DIR=/var/lib/libvirt/images
|
||||
IMAGE_PATH=$IMAGE_DIR/${VMNAME}.qcow2
|
||||
CIDATA_PATH=${IMAGE_DIR}/${VMNAME}-cloudinit
|
||||
CIDATA_PATH=${IMAGE_DIR}/cidata-${VMNAME}.iso
|
||||
BASE_FILE=<%= @base_image_path %>
|
||||
|
||||
# Create the VM image if it does not already exist
|
||||
@@ -38,8 +38,9 @@ qemu-img info "$IMAGE_PATH"
|
||||
# Check if the cloud-init metadata file exists
|
||||
# if not, generate it
|
||||
if [ ! -r $CIDATA_PATH ]; then
|
||||
mkdir -p $CIDATA_PATH
|
||||
pushd $CIDATA_PATH
|
||||
pushd $(dirname $CIDATA_PATH)
|
||||
mkdir -p $VMNAME
|
||||
cd $VMNAME
|
||||
|
||||
cat > user-data <<-EOS
|
||||
#cloud-config
|
||||
@@ -61,19 +62,25 @@ instance-id: $VMNAME
|
||||
local-hostname: $VMNAME
|
||||
EOS
|
||||
|
||||
genisoimage -output "$CIDATA_PATH" -volid cidata -joliet -rock user-data meta-data
|
||||
chown libvirt-qemu:kvm "$CIDATA_PATH"
|
||||
chmod 600 "$CIDATA_PATH"
|
||||
popd
|
||||
fi
|
||||
|
||||
# setting --os-variant to ubuntu20.04 and ubuntu18.04 breaks SSH and networking
|
||||
virt-install \
|
||||
--name "$VMNAME" \
|
||||
--ram "$RAM" \
|
||||
--vcpus "$CPUS" \
|
||||
--cpu host \
|
||||
--arch x86_64 \
|
||||
--osinfo detect=on,name=ubuntujammy \
|
||||
--os-type linux \
|
||||
--os-variant ubuntu16.04 \
|
||||
--hvm \
|
||||
--virt-type kvm \
|
||||
--disk "$IMAGE_PATH" \
|
||||
--cdrom "$CIDATA_PATH" \
|
||||
--boot hd \
|
||||
--network=bridge=virbr0,model=virtio \
|
||||
--graphics none \
|
||||
@@ -81,5 +88,4 @@ virt-install \
|
||||
--console pty \
|
||||
--channel unix,mode=bind,path=/var/lib/libvirt/qemu/$VMNAME.guest_agent.0,target_type=virtio,name=org.qemu.guest_agent.0 \
|
||||
--autostart \
|
||||
--import \
|
||||
--cloud-init root-password-generate=off,disable=on,meta-data=$CIDATA_PATH/meta-data,user-data=$CIDATA_PATH/user-data
|
||||
--import
|
||||
|
||||
Reference in New Issue
Block a user