Apu2 is an evolution of the apu board with a cooler running quad core CPU, more robust Intel NICs, and lower total solution cost.
Mac address:
- black:
- wifi: 04F021457CA4
- ..
- blue:
- wifi: 04:f0:21:45:7c:a2
- enp2s0: 00:0d:b9:4e:77:84
- enp3s0: 00:0d:b9:4e:77:85
- enp4s0: 00:0d:b9:4e:77:86
- red:
- wifi: 04F021457CA5
Step 1: Install a linux distro on apu2 ( Offical documentation )
- Boot the USB on apu2
- Press down arrow until appears on the screen
Display help screens; type 'menu' at boot prompt to return to this menu" press "enter
- Write ¨menu¨ and press enter
- Press F6
- after
boot:
prompt writeinstall console=ttyS0,115200n8
and press enter - wait (about 30 seconds)
Must download Ubuntu Alternate (ubuntu-18.04.2-server-amd64, not live-server)
Once at the boot:
prompt type:
install vga=off console=ttyS0,115200n8
Install the .iso on the USB with Unetbootin (iso mode).
Changing file /boot/grub/boot.cfg and replacing vga=...
with ´console=ttyS0,115200n8´, in theory should work, but it doesn´t.
The file boot.cfg exists only using ISO MODE.
Both command and files are the same for ubuntu and debian.
-
Generate the preseed.cfg file. We have 2 different options:
- Automatic generate:Used this (not tested)
sudo apt-get install debconf-utils
sudo debconf-get-selections --installer
- Modify the example founded in the documentation
- Automatic generate:Used this (not tested)
-
Turn on the apu2, once at prompt
boot:
, add to commandinstall vga.. console=..
what´s next:
The best theory situation should be: install vga=off console=ttyS0m115200n8 url=172.28.48.21:5000/preseed.cfg
But it doesn work properly, and still ask:
- language and country. Solution: add paramater
locale=en_US.UTF-8
- hostname, caused by a bug. Solutions:
- add
priority=critical
- add
hostanme=ubuntu
- add
- interface, caused by a bug. Solution
- add parameter
interface=enp2s0
- or
interface=auto
afterurl=...
but it´s not really auto, it however takes the first interface
- add parameter
So, the final command is: install vga=off console=ttyS0,115200n8 locale=en_US.UTF-8 url=172.28.48.21:5000/preseed.cfg priority=critical interface=enp2s0
Script finito
The preseed file should run a script that:
- add to file ~/.ssh/authorized_keys
a public keys
- change value of PubkeyAuthentication and PasswordAuthentication:
- change value: sed 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config > temp.txt
- uncomment and change value: sed 's/#?(PubkeyAuthentication\s*).*$/\1 yes/' /etc/ssh/sshd_config
mv -f temp.txt /etc/ssh/sshd_config
echo ¨chiave pubblica¨ >> ~/.ssh/authorized_keys
Per far partire lo script dal preseeding:
d-i preseed/run string ssh_script.sh
: da problemi, l´installazione si interrompe dicendo di non poter scaricare né il file né il preseeding
`d-i preseed/late_command string in-target wget -P /tmp/ 172.28.48.21:5000/ssh_script.sh; in-target chmod $+x /tmp/ssh_script.sh; in-target /tmp/ssh_script.sh``
/etc/ansible/hosts: list of my hosts grouped by a name in brackets (eg. [test-servers]) Writing a playbook to install apache:
Appunti:
- installre python 3
- installare virtualenv py3
- installare ansible 2.7 dentro il virtualenv
nel vritualenv:
-
installare client openstack
-
installare dipendenze per ansible con openstack
-
scaricare file openrc da divine
-
caricare le credenziali di openrc nella shell
-
verificare che funzioni (openstack network list)
-
caricare le credenziali di openrc in ansible
creare playbook ansible che crea una nuov vm
ansible all -m ping
installazione webserver copia degli script