This post originally appeared on Medium on April 12th 2021
Welcome to the first part of the series where I’ll show you how to set up Monitoring for your Infrastructure using Grafana and InfluxDB. Click here for the introduction to the series.
I’m going to use Ubuntu Server 20.04 LTS as my Docker Host. For the purpose of this series, this will be installed as a VM on Hyper-V. There are a few things you need to know for the configuration:
- Ubuntu can be installed as either a Gen1 or Gen2 VM on Hyper-V. For the purposes of this demo, I’ll be using Gen2.
- Once the VM has been provisioned, you need to turn off Secure Boot, as shown here
- Start the VM, and you will be prompted to start the install. Select “Install Ubuntu Server”:
- The screen then goes black as it runs the integrity check of the ISO:
- Select your language…..
- …..and Keyboard layout:
- Next, add your Network Information. You can also choose to “Continue without network” if you wish and set this up later in the Ubuntu OS:
- You then get the option to enter a Proxy Address if you need to:
- And then an Ubuntu Archive Mirror — this can be left as default:
- Next, we have the Guided Storage Configuration Screen. You can choose to take up the entire disk as default, or else go for a custom storage layout. As a best practice, its better to keep your boot, swap, var and root filesystems on different partitions (an excellent description of the various options can be found here). So in this case, I’m going to pick “Custom storage layout”:
- On the next screen, you need to create your volume groups for boot/swap/var/root. As shown below, I go for the following:
- boot — 1GB — if Filesystems become very large (eg over 100GB), boot sometimes has problems seeing files on these larger drives.
- swap — 2GB — this needs to be at least equal to the amount of RAM assigned. This is equivalent to the paging files on a Windows File System.
- var — 40GB — /var contains kernel log files and also application log files.
- root — whatever is left over, this should be minimum 8GB, 15GB or greater is recommended.
- Once you have all of your options set up, select “Done”:
- Next, you get into Profile setup screen where you set up the root username and password:
- Next, you are prompted to install OpenSSH to allow remote access.
- Next, we get to choose to install additional “popular” software. In this case, I’m choosing to install docker as we will need it later to run our Grafana and InfluxDB container instances:
- And finally, we’re installing!! Keep looking at the top where it will say “Install Complete”. You can then reboot.
- And we’re in!! As you can see, the system is telling us there are are 23 updates that can be installed:
- So lets run the command “sudo apt list — upgradeable” and see what updates are available:
- All looks good, so lets run the “sudo apt-get upgrade” command to upgrade all:
- The updates will complete, and this will also install Docker as we had requested during the initial setup. Lets check to make sure its there by running “sudo docker version”:
Next Time ….
Thanks for taking the time to read this post. I’d love to hear your thoughts on this, and I hope to see you back next week when we download the Grafana and InfluxDB Docker images and configure them to run on our host.
Hope you enjoyed this post, until next time!!