Project

General

Profile

установка на чистый Debian Stretch (Skycover 3)

apt install qemu vim htop zsh puppet xen-linux-system-amd64 lsb-release sudo aptitude smartmontools

в /etc/default/grub добавить:

GRUB_CMDLINE_XEN="dom0_mem=3072M" 

dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub

/var/lib/ganeti/rapi/users:

scweb СЛУЧАЙНЫЙ_ПАРОЛЬ write

удалить systemd:

apt-get install -y --force-yes sysvinit-core sysvinit-utils
cp /usr/share/sysvinit/inittab /etc/inittab
перезагрузка
apt-get remove -y --force-yes --purge --auto-remove systemd
echo -e 'Package: systemd\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/systemd
echo -e '\n\nPackage: *systemd*\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
echo -e '\nPackage: systemd:i386\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
echo "deb http://sci-dev.skycover.ru/apt stretch main" > /etc/apt/sources.list.d/sci-dev.list
wget -O- http://sci-dev.skycover.ru/apt/stretch.pub|apt-key add -
aptitude update
aptitude install ganeti ganeti-instance-debootstrap sci-config sci-scripts

настройки:

ссш:

## Enable ssh-dss keys support
echo "    PubkeyAcceptedKeyTypes=+ssh-dss" >> $TARGET/etc/ssh/ssh_config
echo "PubkeyAcceptedKeyTypes=+ssh-dss" >> $TARGET/etc/ssh/sshd_config

модули ядра:

echo options drbd minor_count=128 usermode_helper=/bin/true disable_sendpage=1 >>$target/etc/modprobe.d/drbd.conf
echo options loop max_loop=64 >>$target/etc/modprobe.d/local-loop.conf
echo drbd >>$target/etc/modules
echo 8021q >>$target/etc/modules
mkdir /stuff/cdimages

/etc/default/smartmontools - включить smartd

/etc/rc.local

# If you use hardware raid or external FC/Infiniband storage, you prorably would rather use noop scheduler instead of deadline

# rise priority for dom0, alowing drbd to work fine
xl sched-credit -d0 -w512

modprobe sg
disks=`sg_map -i|awk '{print substr($2, length($2))}'`
for i in $disks; do
  # Set value if you want to use read-ahead
  ra="" 
  if [ -n "$ra" ]; then
    blockdev --setra $ra /dev/sd$i
  fi
  if grep -q sd$i /etc/sysfs.conf; then
    echo sd$i already configured in /etc/sysfs.conf
  else
 cat <<EOF >>/etc/sysfs.conf
block/sd$i/queue/scheduler = deadline
block/sd$i/queue/iosched/front_merges = 0
block/sd$i/queue/iosched/read_expire = 150
block/sd$i/queue/iosched/write_expire = 1500
EOF
  fi
done
/etc/init.d/sysfsutils restart

/etc/sysctl.conf:

net.ipv4.ip_forward=1

sysctl -p

ln -s /usr/lib/xen-4.8 /usr/lib/xen
ln -s /vmlinuz /boot/vmlinuz-xenU
ln -s /initrd.img /boot/initrd.img-xenU
aptitude install sci-web