Category Archives: Photon Platform

VMware Photon Platform 1.2 released

Yesterday VMware silently released a new version of its opensource cloud native platform. VMware Photon Platform 1.2 is available for download at github now. You can find the details of the new release in the release notes. Below are the highlights of the new release.

What’s new?

  • Photon Controller now supports ESXi 6.5 Patch 201701001. Support for ESXi 6.0 is dropped.
  • Photon platform now comes with Lightwave 1.2 which supports authenticating using windows sessions credentials. Given you’re using the CLI from a windows box.
  • The platform now supports Kubernetes 1.6 and also supports persistent volumes for Kubernetes
  • NSX-T support is improved
  • Resource tickets have been replaced with quotas which can be increased and decreased. This is a big improvement in my opinion. The previous release wouldn’t let you change resource allocation which was a definite blocker for production use.
  • The API is now versioned. Which means the API url now starts with /v1/

What’s broken?

  • Lightwave 1.2 is incompatible with earlier versions
  • ESXi 6.0 is no longer supported
  • The API is incompatible with previous API versions. But the good new is that it’s now versioned so this was the last time they broke the API (hopefully).

update 20-04-2017: Some updates taken from the github issues

  • HA Lightwave setup is no longer supported. Will be back in 1.2.1
  • version 1.1.1 didn’t create any flavours at installation but 1.2 seems to create duplicate flavours.

BOSH on VMware Photon Platform

I explained both BOSH and the Photon platform in previous posts. I never did a post on how to deploy BOSH on vSphere but this document does a very good job describing the process. The only thing I want to add to that is: Don’t use “@” in your passwords! Cost me a day or so to figure out what was going wrong. In this post I will detail how to run BOSH on VMware Photon platform.

Update 19-04-2017: This post was based on Photon platform 1.1.1. As of today the current version is Photon platform 1.2. The steps in this post may or may not work for version 1.2.

Prepare Photon Platform

  1. Install Photon platform. This blog post details how you to do that.
  2. Make sure you have the photon cli installed. Instructions here.
  3. I’m going to assume that you don’t have anything configured on the photon platform yet. If you have you’ll probably already know what to do. I’ll also ussume this is a lab where you have full access.
  4. Connect the photon cli to you photon platform.
  5.  Create a photon tenant and tell the cli to use it (press enter on any questions to use the default)
  6. Create a network. I’m going to assume you use the default portgroup named “VM Network”. If not please substitute your network name in the command below.
  7. Create a resource ticket for the bosh environment. I didn’t find a way to deploy to other projects than the one you deployed the bosh director to. So make sure you create a big enough ticket to also fit the workloads you’ll be deploying with BOSH.
  8. Create a project that consumes the resources.
  9. Add some flavor.  Flavors are types of resources on offer on the Photon platform. It’s like AWS instance types.

Deploy BOSH

Install BOSH cli tools

To be able to install BOSH you’ll need the bosh-init tool. This tool is like a mini BOSH which is able to deploy BOSH. So it’s kinda like BOSH deploys itself. I won’t explain how to install bosh-init, the cloud foundry docs on this are pretty good. Please follow instructions here.

To be able to interact with a BOSH director once it’s deployed you’ll need the BOSH cli itself. In this case you’ll even need it before the BOSH director is running because it’s used to build the Photon CPI release. Again, find the cloud foundry docs on how to install the bosh cli here.

Prepare the Photon CPI

BOSH is able to work with a lot of different cloud (IaaS) providers and platforms. I already mentioned vSphere. But BOSH is also able to use vCloud, AWS, Google and Openstack. The magic that makes this multi-cloud solution possible is the Cloud Provider Interface or CPI.

VMware has published a CPI for Photon. It’s not published on the BOSH website yet but you can find it on github.  To be able to use the CPI you’ll want to install it into a BOSH director. How? Using a BOSH release of course. The Photon CPI BOSH release is here. Since there is no ready build  Photon CPI release we’ll have to build our own. Don’t be scared, it’s not that hard (disclaimer: I’m using Ubuntu. commands on a Mac should be  similar, not sure about window though). Here we go:

  1. Make sure you have the git client installed on your OS
  2. Create a folder to contain the CPI release and your deployment yml. I used ~/my-bosh/photon.
  3. cd into the folder you created
  4. Clone the Photon CPI release git repo, cd into the created folder and create the release:
  5. There’ll be a dev_releases folder in the bosh-photon-cpi-release folder now. Copy the cpi tgz file to ~/my-bosh/photon

Create BOSH manifest

deployments in BOSH are described in so called manifests. These are files in YAML format containing a bunch of settings. Each type of deployment has it’s own manifest and so does the bosh deployment itself.

You can find an example manifest for bosh with the photon CPI in the photon CPI release git repo.  I’ll share my own manifest below so you ‘ll have a feel of what it should look like with all the values populated. If you used the yml from my blog post to deploy photon  then you can use the my bosh manifest with just two changes:

  1. change the network id on line 39. The command to get the id is
  2. Change the photon project id on line 114. The command to get the id is

save the manifest yml to ~/my-bosh/photon/bosh-photon.yml

Run bosh-init deploy

Now you can finally start the deployment. It’s very simple 🙂

And now we wait 🙂

Use BOSH

Now that we deployed BOSH we might want to try to use BOSH for something useful. One of the simplest examples of something useful is deploying a redis server. Here are the steps involved:

  1. On the Photon platform create another resource ticket and a new project consuming the ticket.
  2. Target the bosh cli to the fresh BOSH director and login (if you’re using my yml the password is ‘password’
  3. run bosh status to confirm you’re connected and BOSH is up and running. Screenshot from 2017-04-04 16-44-17
  4. Upload the ubuntu trusty stemcell
  5. Upload the redis release
  6. Create a cloud-config YAML for BOSH. Below is my yml.
    1. Replace the project id on line 17
    2. Configure you ip range in lines 37..41
    3. Replace the network id in line 42
  7. Load the cloud config into bosh
  8. Create the redis deployment yaml. Again, below is my version of it.
    1. Replace the director_uuid. Retrieve the uuid by running bosh status
    2. Store the manifest in ~/my-bosh/photon/redis.yml
  9. Tell the bosh cli to use this manifest
  10. Now deploy redis

After the deployment is finished you can list the deployments and the VMs it deployed but running these commands

The output should be similar to this: Screenshot from 2017-04-04 19-19-46

Pfew….. if you made it this far: Congrats! you’re on your way to being a cloud native :).

Getting started with VMware Photon Platform

VMware Photon Platform is an opensource cloud platform build by VMware on top for ESXi. It is specifically build to run containerized and cloud native applications. As such it pushes a lot of features into the application layer and out of the infrastructure. For example: It doesn’t support VMware HA or DRS. Or even vMotion. In this post I’ll help you getting started with VMware Photon Platform.

Update 19-04-2017: This post was based on Photon platform 1.1.1. As of today the current version is Photon platform 1.2. The only supported ESXi version is now ESXi 6.5, Patch 201701001. The steps in this post may or may not work for version 1.2.

The platform

The Photon platform contains a few different components:

  • Photon installation appliance: Deploy this appliance first an use it to deploy other photon components
  • Lightwave: This is similar to VMware SSO
  • Photon Controller: This is basically a vCenter replacement. It has a scale-out architecture and provides the Photon API, multi tenancy and resource management
  • HA Proxy: Loadbalances requests to the Photon Controllers
  • Photon OS: A tiny Linux distribution optimized to run Docker containers
  • Photon Agent: This is running on each ESXi host managed by Photon controller

Photon supports the following VMware technologies:

  • vSAN: aggregate your local disks into a large storage pool. Since there is no vCenter server in a photon deployment you need an additional appliance to manage vSAN
  • NSX: Photon integrates with VMwares SDN platform. But again: not vCenter. So you’ll only be able to use NSX-T, not the wel known NSX-v

Getting Photon Platform up and running

There is a quickstart guide which gives you most information you need t deploy Photon Platform. Use the steps below to save some time and fill in some blanks.

Prepare your lab

  1. Download the installer OVA here.
  2. Download ESXi 6.0.0 here (note: 6.5 is not supported at the moment of writing)
  3. Download patch with build number4600944 here (yes, photon only supports this specific build nr sadly…)
  4. Install two ESXi 6.0.0 hosts. I run them as virtual machines on my home lab. DO NOT CONNECT THEM TO A VCENTER!
  5. Both ESxi hosts need a local or shared datastore If you’re following my instruction you’ll have to name them “local02”. I used 150GB datastores which is sufficient to deploy the Photon components on one host. I have 23.4GB left on host running the platform.
  6. SCP the patch to the fresh hosts and use this KB article for instructions on how to deploy the patch
  7. Make sure you have at least 1 static IP available in the network where you’ll be deploying Photon. Obviously that IP should be able to reach the ESXi hosts

Deploy Photon

  1. Deploy the photon-installer ova file to one of the ESXi hosts. Just use the good ol’ vSphere C# client :). The quickstart guide mentions the web client but there is no webclient on ESXi 6.0…. Of course you can use the web client fling but that would add another step to this process.
  2. Prepare a YAML file. The quickstart guide describes the file you need.
    1. One thing the guide doesn’t mention is the fact that you need a complex password of at least 8 characters for the lightwave administrator. If you don’t the installer won’t throw an error, the installation of lightwave will just fail with a very generic error.
    2. something that is in de quickstart guide but I missed at first is the fact that all components need to use the lightwave server as their DNS server. Only the lightwave server itself uses your own DNS server.
    3. Below is the YAML I used. You’ll probably have to replace the IP addresses and it assumes that the root password for your ESXi hosts is “password”.  It also assumes that your ESXi hosts have a datastore called “local02”. another thing you might notice: I’m not joining the host where the photon appliances are deployed to the photon controller. Somehow I can’t get that to work.
  3. Save the yml above to a file and copy it to the photon installer appliance. The root password for the appliance is “changeme”. I stored the file in /root/photon.yml
  4. Log into the photon installer appliance over SSH (root/changeme)
  5. run: cd /opt/vmware/photon/controller/bin
  6. run: ./photon-setup platform install -config /root/photon.yml
  7. watch the magic happen 🙂
  8. when the magic is finished connect a browser to the loadbalancer ip. If you used my yml go to: https://192.168.192.76:4343Screenshot from 2017-04-04 13-15-07
  9. Log in using the lightwave administrator credentials. If you used my yml that would be: administrator@photon.lab / Passw0rd123!
  10. Tadaa:   Screenshot from 2017-04-04 13-17-56
  11. The GUI is nice but a lot of features are still missing. If you want to use photon you’ll need the CLI. you can find it on the Github releases page and here are instructions on how to install it.

Using Photon

This post is lengthy enough as it is so I won’t go into details here. One of the features of Photon is that it can deploy a Kubernetes cluster for you.  I’m also working on a post explaining how to use BOSH with photon.