2020-07-31 00:20:36 +00:00
|
|
|
### Keyboard config
|
|
|
|
d-i debian-installer/locale string en_US.UTF-8
|
|
|
|
d-i keyboard-configuration/variant select American English
|
|
|
|
d-i keyboard-configuration/xkb-keymap select us
|
|
|
|
d-i keyboard-configuration/toggle select No toggling
|
|
|
|
|
|
|
|
### Network configuration
|
|
|
|
d-i netcfg/choose_interface select auto
|
|
|
|
d-i netcfg/get_hostname string unassigned-hostname
|
|
|
|
d-i netcfg/get_domain string unassigned-domain
|
|
|
|
d-i netcfg/hostname string k8s-demo
|
|
|
|
d-i netcfg/wireless_wep string
|
|
|
|
d-i netcfg/dhcp_hostname string k8s-demo
|
|
|
|
d-i hw-detect/load_firmware boolean true
|
|
|
|
|
|
|
|
### Mirror settings
|
|
|
|
d-i mirror/country string manual
|
|
|
|
d-i mirror/http/hostname string cdn.debian.net
|
|
|
|
d-i mirror/http/directory string /debian
|
|
|
|
d-i mirror/http/proxy string
|
|
|
|
|
|
|
|
### Account setup
|
|
|
|
d-i passwd/root-login boolean false
|
|
|
|
|
|
|
|
# To create a normal user account.
|
|
|
|
d-i passwd/user-fullname string K8S Admin
|
|
|
|
d-i passwd/username string k8s
|
|
|
|
d-i passwd/user-password password K8Sdemo
|
|
|
|
d-i passwd/user-password-again password K8Sdemo
|
|
|
|
|
|
|
|
# The user account will be added to some standard initial groups. To
|
|
|
|
# override that, use this.
|
2020-07-31 09:43:54 +00:00
|
|
|
#d-i passwd/user-default-groups string docker
|
2020-07-31 00:20:36 +00:00
|
|
|
|
|
|
|
### Clock and time zone setup
|
|
|
|
d-i clock-setup/utc boolean true
|
|
|
|
d-i time/zone string UTC
|
|
|
|
d-i clock-setup/ntp boolean true
|
|
|
|
d-i clock-setup/ntp-server string clock.ix.gs
|
|
|
|
|
|
|
|
### Partitioning
|
2020-07-31 00:53:24 +00:00
|
|
|
d-i partman-auto/method string regular
|
2020-07-31 00:20:36 +00:00
|
|
|
d-i partman-lvm/device_remove_lvm boolean true
|
|
|
|
d-i partman-md/device_remove_md boolean true
|
|
|
|
d-i partman-lvm/confirm boolean true
|
|
|
|
d-i partman-lvm/confirm_nooverwrite boolean true
|
|
|
|
d-i partman-auto/choose_recipe select atomic
|
2020-07-31 01:20:43 +00:00
|
|
|
d-i partman-basicfilesystems/no_swap boolean true
|
2020-07-31 00:20:36 +00:00
|
|
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
|
|
|
d-i partman/choose_partition select finish
|
|
|
|
d-i partman/confirm boolean true
|
|
|
|
d-i partman/confirm_nooverwrite boolean true
|
2020-07-31 00:53:24 +00:00
|
|
|
d-i partman/default_filesystem string xfs
|
2020-07-31 00:20:36 +00:00
|
|
|
|
|
|
|
### Apt setup
|
|
|
|
d-i apt-setup/non-free boolean true
|
|
|
|
d-i apt-setup/contrib boolean true
|
|
|
|
d-i debian-installer/allow_unauthenticated boolean true
|
|
|
|
|
|
|
|
|
|
|
|
### Package selection
|
|
|
|
tasksel tasksel/first multiselect none, ssh-server, standard
|
|
|
|
|
|
|
|
# Individual additional packages to install
|
|
|
|
d-i pkgsel/include string \
|
|
|
|
apt-transport-https gnupg2 ca-certificates curl \
|
2020-07-31 11:33:22 +00:00
|
|
|
iptables linux-headers-amd64 git ansible wget \
|
|
|
|
gdebi-core
|
2020-07-31 00:20:36 +00:00
|
|
|
|
|
|
|
# Whether to upgrade packages after debootstrap.
|
|
|
|
# Allowed values: none, safe-upgrade, full-upgrade
|
|
|
|
d-i pkgsel/upgrade select full-upgrade
|
|
|
|
popularity-contest popularity-contest/participate boolean true
|
|
|
|
|
|
|
|
### Boot loader installation
|
|
|
|
d-i grub-installer/only_debian boolean true
|
|
|
|
d-i grub-installer/with_other_os boolean true
|
|
|
|
d-i grub-installer/bootdev string default
|
|
|
|
|
|
|
|
### Finishing up the installation
|
|
|
|
d-i finish-install/reboot_in_progress note
|
|
|
|
d-i debian-installer/exit/poweroff boolean true
|
|
|
|
|
|
|
|
#### Advanced options
|
|
|
|
### Running custom commands during the installation
|
|
|
|
d-i preseed/late_command string in-target /bin/sh -c " \
|
2020-07-31 11:33:22 +00:00
|
|
|
echo k8s-demo > /etc/hostname ; \
|
|
|
|
sed -i 's/debian/k8s-demo/' /etc/hosts ; \
|
2020-07-31 00:20:36 +00:00
|
|
|
update-alternatives --set iptables /usr/sbin/iptables-legacy ; \
|
|
|
|
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy ; \
|
|
|
|
update-alternatives --set arptables /usr/sbin/arptables-legacy ; \
|
|
|
|
update-alternatives --set ebtables /usr/sbin/ebtables-legacy ; \
|
|
|
|
( systemctl disable nftables && systemctl mask nftables ) ; \
|
|
|
|
curl -s https://download.docker.com/linux/debian/gpg | sudo apt-key add - ; \
|
2020-07-31 09:43:54 +00:00
|
|
|
curl https://helm.baltorepo.com/organization/signing.asc | sudo apt-key add - ; \
|
2020-07-31 00:20:36 +00:00
|
|
|
echo 'deb [arch=amd64] https://download.docker.com/linux/debian/ stretch stable' >/etc/apt/sources.list.d/docker.list ; \
|
2020-07-31 09:43:54 +00:00
|
|
|
echo 'deb https://baltocdn.com/helm/stable/debian/ all main' > /etc/apt/sources.list.d/helm-stable-debian.list ; \
|
2020-07-31 00:20:36 +00:00
|
|
|
apt-get update ; \
|
|
|
|
apt-get install -y \
|
2020-07-31 09:43:54 +00:00
|
|
|
docker-ce docker-ce-cli containerd.io helm ; \
|
2020-07-31 00:20:36 +00:00
|
|
|
apt-get clean ; \
|
2020-07-31 09:43:54 +00:00
|
|
|
curl -L https://dl.bintray.com/flant/werf/v1.1.19+fix10/werf-linux-amd64-v1.1.19+fix10 -o /usr/bin/werf ; \
|
|
|
|
chmod +x /usr/bin/werf ; \
|
2020-07-31 10:19:33 +00:00
|
|
|
git clone https://git.ix.gs/public/coins-demo.git /opt/coins-demo ; \
|
2020-07-31 13:32:43 +00:00
|
|
|
cp /opt/coins-demo/contrib/mfg.service /usr/lib/systemd/system/ ; \
|
|
|
|
systemctl daemon-reload ; \
|
|
|
|
systemctl enable mfg.service ; \
|
2020-07-31 00:47:35 +00:00
|
|
|
systemctl enable serial-getty@ttyS0.service ; \
|
|
|
|
systemctl enable docker.service \
|
2020-07-31 00:20:36 +00:00
|
|
|
|| true"
|