Configuring Pure1 VM Analytics: Detailed Guide

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.

  1. Creating an Ubuntu VM
  2. Install Docker CE
  3. Create a collector in Pure1
  4. Install the collector

Creating the VM

First download the ISO:

http://releases.ubuntu.com/16.04.5/ubuntu-16.04.5-server-amd64.iso

WinSCP the ISO to a datastore on an ESXi host. Now create a new VM:

Create a new VM:

Choose new VM:

Give it a name:

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:

Navigate to wherever you put the Ubuntu ISO and choose it:

When selected, make sure the Connect box is checked.

Finish the wizard and then power-on the VM:

Installing Ubuntu

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 DNS:

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)

I then choose to not encrypt my home, you may do whatever though:

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:

Then confirm:

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:

https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1

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.

https://pure1.purestorage.com/ 

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.

 

21 thoughts on “Configuring Pure1 VM Analytics: Detailed Guide”

  1. I am a new client of Pure Storage and was quite disappointed that this is not provided as an OVA. I have been working with Pure Support who was to create the VM on my behalf due to certain steps not working out for us in the previous guide. Still waiting on feedback.

    1. Nope go ahead and add many vCenters to a single collector. As long as the vCenter can route to all of your vCenters you can use one. Only if the network is isolated between vCenters do you need more than one

  2. When I configure the logs to rotate, I receive this message. Any ideas?

    :~$ sudo mv /etc/cron.daily/logrotate /etc/cron.hourly

    mv: cannot stat ‘/etc/cron.daily/logrotate’: No such file or directory

    1. This usually means it has already been done. Check both /etc/cron.daily/ and /etc/cron.hourly/ to see if logrotate is there

  3. I got everything set up and when I went to connect to vCenter I got this…………

    lume@PureVMAnalytics:~$ sudo purevmanalytics connect –hostname vcenter-vcs-atl.cloudservices.com –username administrator@vsphere.local –password **********

    Name Host Username Password
    vcenter-vcs-atl.cloudservices.com vcenter-vcs-atl.cloudservices.com administrator@vsphere.local ****

    Which was different than I got on the other two successful ones I set up.

    Now I’m getting this and I’ve run the script twice.

    lume@PureVMAnalytics:~$ purevmanalytics list
    Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/analytics_collector/json: dial unix /var/run/docker.sock: connect: permission denied
    Error: Unable to find Pure Storage VM Analytics Collector. Please run the installation script.
    lume@PureVMAnalytics:~$

  4. During collector configuration I am using a read only domain account for username and password. Don’t seem to be workin.
    Account need to be local account on the VC?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.