Andrew Latham

On systems like Debian Stretch with systemd the time sync is baked in but will not run if the legacy NTP package is installed at all so here is a howto/demo of what to do.

# apt-get purge ntp
# systemctl restart systemd-timesyncd.service
# systemctl status systemd-timesyncd.service 
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Fri 2017-08-11 10:09:11 CDT; 3s ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 31413 (systemd-timesyn)
   Status: "Synchronized to time server 92.243.6.5:123 (0.debian.pool.ntp.org)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─31413 /lib/systemd/systemd-timesyncd

Aug 11 10:09:11 nodeone systemd[1]: Starting Network Time Synchronization...
Aug 11 10:09:11 nodeone systemd[1]: Started Network Time Synchronization.
Aug 11 10:09:11 nodeone systemd-timesyncd[31413]: Synchronized to time server 92.243.6.5:123 (0.debian.pool.ntp.org).
#
Andrew Latham

Clean installs directly from the repos...

Using libvirt (virsh/virt-install/virt-manager) you can install from the HTTP repo of a Linux distribution to be super lazy. During installation you simply provide the URI in the location field or tools like virt-manager will have an option in the wizard.

For Debian you would use:

http://deb.debian.org/debian/dists/stable/main/installer-amd64/

For CentOS which lacks a CDN mirror or I could not find it quickly, you can try:

http://mirrors.kernel.org/centos/7/os/x86_64/
Andrew Latham

Devops without the extra parts

You want to deploy code onto a server into a certain directory. You have SSH to the server and it has Git installed. Your desired destination is /home/user/public_html/production/

Andrew Latham

Easy start with Ansible

Example from a local ansible source tree without using any install to run adhoc commands

Setup

Download or checkout the software, unpack and change into the base directory. We will then run a script to setup the environment. This can and should be done as a user and not root. Note you may need to install packages like python3-paramiko, python-paramiko, python3-jinja2, python-jinja2, python3-yaml, python-yaml and others to use Ansible.

cat hacking/README.md
source hacking/env-setup

Assume key works

./bin/ansible all -i 192.168.15.11, -a "uname -a"
192.168.15.11 | SUCCESS | rc=0 >>
Linux nodeone 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux

Set key

 ./bin/ansible all -i 192.168.15.11, -a "uname -a" --private-key=~/.ssh/id_rsa
192.168.15.11 | SUCCESS | rc=0 >>
Linux nodeone 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux

whoami

./bin/ansible all -i 192.168.15.11, -a "whoami" --private-key=~/.ssh/id_rsa
192.168.15.11 | SUCCESS | rc=0 >>
lathama

become root via su

./bin/ansible all -i 192.168.15.11, --private-key=~/.ssh/id_rsa -b --become-method=su -K -a "whoami"
SU password: 
192.168.15.11 | SUCCESS | rc=0 >>
root
Andrew Latham

Using tools like libvirt, virt-manager to network boot (PXE) systems.

TL;DR;

mkdir -p /srv/tftp
cp -r your_pxelinux_stuffs /srv/tftp/
virsh net-edit default

replace

<dhcp>

with

<tftp root='/srv/tftp'/>
<dhcp>
  <bootp file='pxelinux.0'/>

then

virsh net-destroy default && virsh net-start default

Profit