Many companies use Jenkins as their automation server of choice. and use Docker as their preferred way to ship their applications.
CI/CD becoming a more popular thing every day due to the worldwide promotion of DEVOPS I wanted to create a simple tutorial where we put these two technologies together and see if we can arrange a beautiful marriage.
Continue reading Jenkins & Docker
Author: Wouter Spaans
Install arch into virtualbox
This atricle is based on information found on: https://erikdubois.be/how-to-install-arch-linux/
FASE 1
cfdisk /dev/sda
label type: gpt
delete all partitions
Mount point | Partition | Partition type (GUID) | Bootable flag | Suggested size |
---|---|---|---|---|
/boot | /dev/sdx1 | EFI System Partition | Yes | 260–512 MiB |
[SWAP] | /dev/sdx2 | Linux swap | No | More than 512 MiB |
/ | /dev/sdx3 | Linux | No | Remainder of the device |
SWAP Recommandations
Amount of RAM in the system | Recommended swap space | Recommended swap space if allowing for hibernation |
---|---|---|
⩽ 2GB | 2 times the amount of RAM | 3 times the amount of RAM |
> 2GB – 8GB | Equal to the amount of RAM | 2 times the amount of RAM |
> 8GB – 64GB | At least 4 GB | 1.5 times the amount of RAM |
> 64GB | At least 4 GB | Hibernation not recommended |
Resulting for our system in:
sda1 512MB [EFI System]
sda2 2GB [Linux swap]
sda3 Remainder [Linux filesystem]
MAKE NOTE OF THE PARTUUID OF sda3, WE WILL NEED THIS LATER!
write – yes -quit
mkfs.fat -F32 /dev/sda1 mkfs.ext4 /dev/sda3 mkswap /dev/sda2 swapon /dev/sda2 mount /dev/sda3 /mnt mkdir /mnt/boot ount /dev/sda1 /mnt/boot pacstrap -i /mnt base base-devel genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt /bin/bash nano /etc/locale.gen
uncomment these line
en_US.UTF8 UTF-8
CTRL + X , yes, enter
locale-gen echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8 rm /etc/localtime ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime hwclock --systohc --utc echo arch-base > /etc/hostname nano /etc/hosts
127.0.0.1 localhost.localdomain localhost arch-base
::1 localhost.localdomain localhost arch-base
pacman -S networkmanager systemctl enable NetworkManager mkinitcpio -p linux bootctl install nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=********-****-****-****-************ rw
BE AWARE, USE LOWER CASE PARTUUID OF EARLIER NOTED PARTUUID, otherwisde it will not work!
passwd umount /dev/sda3 exit reboot
FASE 2
useradd -m -g users -G wheel,storage,power -s /bin/bash wouter passwd wouter EDITOR=nano visudo
remove # before
%wheel ALL=(ALL) ALL
pacman -S bash-completion exit
FASE 3
Login as wouter!
sudo pacman -Syyu sudo pacman -S reflector sudo reflector -l 100 -f 50 -c NL -c BE -c DE --sort rate --threads 5 --verbose --save /tmp/mirrorlist.new rankmirrors -n 0 /tmp/mirrorlist.new > /tmp/mirrorlist sudo cp /tmp/mirrorlist /etc/pacman.d sudo pacman -Syu
FASE 4
Login as wouter!
sudo pacman -S openssh systemctl start sshd.service systemctl enable sshd.service
FASE 5 – Install nome
sudo pacman -Syyu sudo pacman -S gdm gnome virtualbox-guest-utils systemctl enable gdm.service sudo reboot now
FASE 6 – Install yaourt
sudo pacman -S --needed base-devel git wget yajl git clone https://aur.archlinux.org/package-query.git cd package-query/ makepkg -si cd .. git clone https://aur.archlinux.org/yaourt.git cd yaourt/ makepkg -si cd .. sudo rm -dR yaourt/ package-query/
FASE 7 – Install pamac
yaourt -S pamac-aur
Or we can keep it very simple end just install X
FASE 5
Login as wouter!
sudo pacman -S xorg-server xorg-xinit xf86-video-vesa xterm virtualbox-guest-utils sudo gpasswd -a wouter video sudo reboot
FASE 6
Login as wouter!
sudo systemctl edit getty@tty1
[Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM
sudo nano ~/.bash_profile
... if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then exec startx fi
sudo reboot
FASE 6
Login as wouter!
Other usefull commands
To retrieve PARTUUID we can use:
blkid -s PARTUUID -o value /dev/sda3 sudo pacman -S xorg-twm - simple window manager xorg-xclock - clock xorg-apps - toolts oa xrandx virtualbox-guest-utils - virtalbox drivers xf86-video-nouveau - opensource nvidia drivers sudo pacman -S xfreerdp xfreerdp /u:**** /p:**** /v:192.168.1.67 /f
Edit an Rasbian image file
I find myself doing the same OS tweaks/fixes over and over again after we have just burned a brand new Rasbian SD card.
These fixes are:
1. Enable SSH fix
2. Enable WiFi networking fix
3. Fix the WiFi Power Management bug
4. Fix the rsyslog/xconsole bug
5. Disable IP6 fix
The solution to avoiding repetition: create our own edited copy of a rasbian img file.
How to do this?
Continue reading Edit an Rasbian image file
Turn on a light by publishing an MQTT message!
In previous posts I played with Raspberry Pi’s, MQTT clients and X10 devices.
In this post I will bind these all together providing a way to control your lights by publishing messages to an MQTT broker.
Nice!
Continue reading Turn on a light by publishing an MQTT message!
Control your X10 lights from a Raspberry Pi
Ever wanted to control your lights from a Raspberry Pi?
Have a spare X10 CM11 device laying around?
Lets put them together and make the lights shine again!
Continue reading Control your X10 lights from a Raspberry Pi
Publish iPhone presence messages to a MQTT broker
In two previous posts I explained how we can add iPhone presence detection to our Raspberry Pi 3 and how we can install and use an MQTT client to publish messages.
Now it’s time to combine these to and publish our iPhone presence to our MQTT broker.
In this post I will layout the steps needed to do this
Continue reading Publish iPhone presence messages to a MQTT broker
Add iPhone presence detection to a Raspberry Pi 3
In the previous post I wireless installed a clean version of Raspbian on a Raspbian Pi 3.
Now it’s time to do something usefull with this clean install, like add iPhone presence detection to a Raspberry Pi 3.
In this post I will layout the steps needed to do this
Continue reading Add iPhone presence detection to a Raspberry Pi 3
Install MQTT Client on a Raspberry Pi
In the previous post I wireless installed a clean version of Raspbian on a Raspbian Pi 3.
Now it’s time to do something usefull with this clean install, like install a MQTT Client (Mosquitto).
In this post I will layout the steps needed to do this
Continue reading Install MQTT Client on a Raspberry Pi
Some super handy Nano Server 2016 trick’s
Here are some hany tricks!
Manage Nano Server 2016 – Hyper-V host
In this post series I will guide you in our journey of creating a Nano Server 2016 Hyper-V host on a bare metal machine. We will meet some friendly wizards, annoying driver pitfalls, smooth powershell configuration and to top it all of it will all end well! Looks like we have our self a true fairy tail story…
This chapter: The journey continues, we configure remote management for our new server! Continue reading Manage Nano Server 2016 – Hyper-V host