
This is an old unmaintained mirror of my website, I have migrated to https://www.UnixTutorial.org as of Friday, May 1st 2020.
Please update your bookmarks and check out my YouTube channel: www.UnixTutorial.tv
Unix/Linux tutorials for beginners
This is an old unmaintained mirror of my website, I have migrated to https://www.UnixTutorial.org as of Friday, May 1st 2020.
Please update your bookmarks and check out my YouTube channel: www.UnixTutorial.tv
I'm writing an e-book on my approach to taking technical exams and obtaining relevant certifications.
There's going to be two versions of the book:
Today I just wanted to share a mindmap based on the checklist – it's a great way to structure your approach for any technical certification.
Click on the image below for the high resolution image:
Have a look and let me know what you think!
Hi everyone, think by now most of us are settling into long-term working from home routine as part of COVID-19 social distancing. Hope you and your familiy are healthy and safe.
If you're looking for a technical book or two to read, Jeff Geerling just made his two books on Ansible free on Leanpub until April.
I bought his Ansible for DevOps book back in February, am on track to complete it this month. Now you can get this book and Ansible for Kubernetes for free.
Go grab the books and take your Ansible knowledge to the next level.
Stay safe!
Here are the articles and news I read in the past week or two – will roll them into the monthly Unix Tutorial Digest next time.
It's taken me exactly two weeks to recognise the value of a native editor like Sublime Text 3 used for Ansible automation and Python scripting. I'm so impressed with the benefits brought by this approach that after another gentle reminder to perhpaps make the purchase already, I decided to hit the button.
WARNING: this is going to be a summary of my approach and view of local text editing on MacBook. HOWEVER, I just swiped something incorrectly and WordPress lost the whole post I've been typing up for about an hour. So I'll have to revisit and fill in the blanks later.
I'm listing things I enjoy specifically in Sublime Text 3 editing Ansible playbooks on my Macbook, but many modern editors bring similar improvements (unfairly) compared to out-of-the-box vim session on a typical Linux instance.
I have just started deploying my new VPS server online: vps1.unixtutorial.org
The idea is that I'll be hosting a number of VPS servers for us you learn Linux basics. vps1 is Ubuntu, future VPS servers will probably be CentOS and Amazon Linux 2 (hosted on AWS). All of these will be accessible on SSH (probably non-standard port) with shell access.
Here's how it looks:
VPS access is completely FREE, but you need to become a Patreon for Unix Tutorial supporter or member of my Unix Tutorial group on Facebook. Please get in touch with me either via group or Patreon page regarding your username setup:
If you need guidance or mentorship with learning Linux, I provide some of this on the Active Learner membership level. If you want even more support or need specific lab setup learning a particular skill – this is possible with the Club Member level on Patreon.
Are you guys using Sublime Text 3?
Have heard and possibly even tried it before, wasn't impressed. But this time I'm doing Ansible playbooks and some light Python scripting development – and Sublime Text 3 is really growing on me.
Will be updating this post in the future, to list my settings and document plugins I decided to use.
I haven't shared this on Unix Tutorial before, but I'm a huge fan of mindmaps. I create and use them all the time for any process or knowledge that I am working with.
It seems to me that all the Unix Reference pages I'm creating will greatly benefit from mindmaps, so here's an example of what I mean:
Let me know what you think!
pS: I'm preparing my Unix Tutorial Patreon page this month – so check it out and let me know how I can make Unix Tutorial better to help you learn and succeed. It will mean a lot if you decide to become a patron!
I'm researching for my next Unix Tutorial Project, so today I'm spinning up two new Ubuntu 19.10 VMs and configuring them as Kubernetes Master and Kubernetes Node, accessible from my macOS desktop.
This is just a bunch of notes on the topic, the project will have the full procedure (and a YouTube video, if everything works out as I expect).
NOTE: I'm using install instructions supplied by Docker and Google for their packages install. Apparently, there's a few more ways and packaing systems to get similar results specifically on Ubuntu.
I chose Ubuntu, but any Linux capable of running Docker should be fine.
The plan is to have one VM as Kubernetes Master (k8master) and another VM as Kubernetes Node (k8node1) – that's where our containers will actually run.
I'm using Parallels on macOS, it has this express install which means you just point it at an ISO and it does unattended Ubuntu install. Really cool!
Now, we need to shut down both VMs and then add host-only network adapter to each – this will be used for cluster communication and for remotely managing k8s.
IMPORTANT: this is an additional interface. The primary one is separate and used for Internet access (cause we need it to install software).
Pretty standard procedure, following official install guides. This needs to be done on both Ubuntu 19.10 VMs.
The only thing is that Ubuntu 19.10 (code name Eoan in repo URLs) is not supported properly, so I ended up using previous distro codename (disco) for Docker URL:
$ echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" | sudo tee -a /etc/apt/sources.list.d/docker.list $ echo "deb https://apt.kubernetes.io/ kubernetes-eoan main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list $ sudo apt-get update
$ sudo apt-get install docker-ce
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce-cli git git-man liberror-perl pigz
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli git git-man liberror-perl pigz
0 upgraded, 9 newly installed, 0 to remove and 175 not upgraded.
Need to get 90.5 MB of archives.
After this operation, 418 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
$ sudo apt-get install -y kubelet kubeadm kubectl Reading package lists… Done Building dependency tree Reading state information… Done The following additional packages will be installed: conntrack cri-tools ebtables ethtool kubernetes-cni socat Suggested packages: nftables The following NEW packages will be installed: conntrack cri-tools ebtables ethtool kubeadm kubectl kubelet kubernetes-cni socat 0 upgraded, 9 newly installed, 0 to remove and 175 not upgraded. Need to get 51.8 MB of archives. After this operation, 273 MB of additional disk space will be used.
This means starting a master node:
greys@k8master:~$ sudo kubeadm init --pod-network-cidr=10.37.0.0/16 --apiserver-advertise-address=10.37.129.3
and then using the command from the output in previous step, join the Kubernetes node 1 to the cluster:
root@k8node1:/# kubeadm join 10.37.129.3:6443 --token 2cqf5d.ykwwsripsqe0s530 --discovery-token-ca-cert-hash sha256:418c2ef3a98d73cddaea8b3470d7b710c384f1644b87785e7e907e8ef44a2193
This is how we'd verify status:
greys@k8master:~$ kubectl get pods –all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-6955765f44-r567t 0/1 Pending 0 6m38s
kube-system coredns-6955765f44-wj4vw 0/1 Pending 0 6m38s
kube-system etcd-k8master 1/1 Running 0 6m50s
kube-system kube-apiserver-k8master 1/1 Running 0 6m50s
kube-system kube-controller-manager-k8master 1/1 Running 0 6m50s
kube-system kube-proxy-g5ntg 1/1 Running 0 5m4s
kube-system kube-proxy-m24gq 1/1 Running 0 6m38s
kube-system kube-scheduler-k8master 1/1 Running 0 6m50s
Confirm status of nodes:
greys@k8master:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8master NotReady master 12m v1.17.3
k8node1 NotReady 10m v1.17.3
This step will need some consideration because I already have local Kubernetes setup on my desktop (via docker-desktop), which I'd like to keep. So I'll need to add another configuration, I suspect.
That's all for now!
Systemd had the goal of optimising startup times from the very beginning. It is therefore no particular wonder that it has a tool for precise startup timing and analysis: systemd-analyze.
Run without command line parameters, systemd-analyze shows a summary of how quickly your system booted Linux last time:
greys@srv:~ $ systemd-analyze
Startup finished in 2.743s (kernel) + 2.654s (userspace) = 5.397s
graphical.target reached after 2.641s in userspace
It gets better! You can specify the blame parameter, and systemd-analyze will show you exactly how long each of the startup tasks has taken – that's really useful for troubleshooting:
greys@srv:~ $ systemd-analyze blame
1.983s docker.service
277ms certbot.service
276ms man-db.service
223ms dev-md0.device
210ms apt-daily-upgrade.service
208ms apt-daily.service
194ms logrotate.service
101ms systemd-fsck@dev-disk-by\x2duuid-cea13f85\x2d61fa\x2d414f\x2d9c2f\x2d1e48ec41ad25.service
69ms chrony.service
66ms systemd-journald.service
61ms ssh.service
59ms systemd-remount-fs.service
57ms systemd-fsck@dev-disk-by\x2duuid-cfceff76\x2df739\x2d49e2\x2da4d1\x2d02472e5457f9.service
46ms systemd-udev-trigger.service
41ms keyboard-setup.service
41ms systemd-logind.service
40ms containerd.service
36ms networking.service
31ms apparmor.service
27ms [email protected]
21ms systemd-tmpfiles-setup.service
21ms rsyslog.service
19ms systemd-update-utmp.service
15ms storage.mount
14ms var-log.mount
14ms systemd-udevd.service
12ms dev-disk-by\x2duuid-799ad160\x2d8a59\x2d4c80\x2db78a\x2d7e3986876964.swap
11ms systemd-user-sessions.service
10ms dev-disk-by\x2duuid-261bd6ac\x2d2f4c\x2d475b\x2da4e4\x2db2548368e0fa.swap
10ms systemd-update-utmp-runlevel.service
9ms systemd-journal-flush.service
9ms polkit.service
9ms dev-disk-by\x2duuid-d45708da\x2d06f4\x2d41d6\x2daabe\x2decd87fb5edbe.swap
8ms systemd-tmpfiles-clean.service
8ms [email protected]
7ms dev-mqueue.mount
7ms sys-kernel-debug.mount
7ms systemd-tmpfiles-setup-dev.service
6ms systemd-modules-load.service
6ms console-setup.service
6ms systemd-sysusers.service
4ms systemd-sysctl.service
4ms kmod-static-nodes.service
4ms dev-hugepages.mount
4ms systemd-random-seed.service
2ms ifupdown-pre.service
1ms docker.socket
greys@srv:~ $