In a previous post, I walked through setting up the “off-array” Pure1 VM Analytics Collector. I did skip over some steps that some might prefer I didnt. So here is a more detailed walkthrough of the process.
- Creating an Ubuntu VM
- Install Docker CE
- Create a collector in Pure1
- Install the collector
Creating the VM
First download the ISO:
WinSCP the ISO to a datastore on an ESXi host. Now create a new VM:
Create a new VM:
Chose your cluster:
Choose a datastore:
Choose a VM hardware version (generally go with the latest supported):
Choose Linux as the guest type then Ubuntu Linux 64-bit
Give the VM at least 2 vCPUs and at least 2 GB of memory (I gave it 4). I also gave it 100 GB of disk space, but you can go with a lot less if needed (default of 16 GB should be plenty).
Choose New CD/DVD Drive and then datastore ISO File:
When selected, make sure the Connect box is checked.
Finish the wizard and then power-on the VM:
First launch the console of the VM. The web console or the remote console is fine. Your call.
Choose your language. Note if this does not appear, that means you forgot to check the Connect button. If you did. Shut the VM down, go to edit settings, CD/ROM and then check the Connect at Power-On Option and then boot it back up.
Choose the language and press enter
Then make sure “Install Ubuntu Server” is highlighted and then press enter.
Then choose your language then country for the install process and press enter:
Next do not auto-discover keyboard and keep No selected and move on. Choose the type of keyboard and press enter to continue.
Press enter to continue and Ubuntu will look for a DHCP address. If it does not find one, then you must enter one in manually.
If it should get DHCP, check that you have the VM on the right network in vSphere and then you can retry the lookup, or simply enter it in manually:
I will do the manual process. If you are using DHCP, skip these few steps:
Then enter the netmask:
Then the gateway:
Then the host name (this will autopopulate if DNS is configured and the previous networking settings were correct)
Then the domain suffix:
Now enter a full name for the default user (root is disabled by default in Ubuntu, so you must create at least one user)
If the shown timezone is incorrect, change it to the right one.
Next create the file system. To keep it simple, let’s just use the “Guided – use entire disk” option (which is not the default).
Select the disk:
This will format the virtual disk. Wait for it to complete (takes about a minute).
If you need a proxy to route to the internet, enter it here:
Then choose automatic updates
The next step is to choose the services–the only one you really need to add here is SSH server. Arrow down to it, then press the space bar to select hit. Hit enter to continue.
When complete, authorize the installation of the GRUB boot loader.
Let the install complete.
So remove the ISO by going to the VM settings:
Then changing the CD/DVD drive back to “Client Device”. Click OK. Then let the VM reboot.
Configure the Pre-requisites
When it comes back up. SSH into your VM.
Use the login you provided during install:
One of the requirements is Python 3.5.2 or later, which nicely comes default with Ubuntu:
So all we have to do is install Docker. We support Docker EE (enterprise edition) and CE (community edition). Let’s just do CE. The instructions I follow below came from here:
First off, you need to make sure the apt package index is updated, so run this:
sudo apt-get update
Now enable HTTPS for apt-get:
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
Copy and paste that whole command at once.
You will need to confirm in the middle by entering y on the keyboard and pressing enter.
Then we need to add Dockers GPG key. Yes the command ends with a solo dash. This is a one liner.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Now to setup the repository:
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
Once again, this is a single copy and paste. Copy that whole operation above at once and then paste it into the SSH window and press enter to run it.
Now update apt-get again:
sudo apt-get update
The install Docker:
sudo apt-get install docker-ce
The last step before installing the collector is configuring the logs to rotate hourly so they can be phoned home.
Run the following command:
sudo mv /etc/cron.daily/logrotate /etc/cron.hourly
You’re done with pre-config!
Install the Collector
Before you can install the collector, you must create it in Pure1. So log into Pure1.
Click on VM topology on the left panel.
Then click on the gear icon in the top of the panel that appears.
In the panel that appears, click Create Collector
Give it a name (it is just a friendly name, it does not need to match the collector name).
Hover with your mouse of the new collector and then click the View Installation script icon.
Click copy to copy the script.
Go back to your SSH session and paste it into the collector and hit enter. Make sure to type in sudo before pasting it. If you forget, the script will fail and remind you do to so.
The collector will install.
Configure the Collector
Now the last step is to simply authenticate vCenter. You can use read only credentials if you choose.
(note if you are specifying a login domain, you will need to put the full user name in quotes like “pure\cody”)
sudo purevmanalytics connect --hostname <hostname>--username <username> --password <password>
You can review the status with purevmanalytics list:
You’re done! You should see data starting to populate in Pure1 in an hour or so.