Skip to content

Running Project Photon on vCloud Air

Roman Tarnavski edited this page Apr 16, 2015 · 24 revisions

Introduction

Project Photon is a secure, fully-customizable container host optimized for the VMware platform. By following this guide, you will be able to deploy it within your organization’s vCloud Air Application Catalog.

Prerequisites

Prior to starting, it is expected that you have a vCloud Air Account. If your organization doesn’t already have one, you may register for an On Demand Account here.

Downloading Project Photon

For the purpose of this, the quickest way is to download the ISO directly from BinTray

Creating a Photon vApp on vCloud Air

A catalog item is a common repository for applications that can be deployed within your vCloud Air Organisations. It contains not only ISO’s, but also virtual machines, and collectively vApps that also encompass Network Topologies.

  1. Login to vCloud Air – http://vca.vmware.com/

    image

  2. Once inside your virtual datacenter select Manage Catalogs in vCloud Director on the far right of screen.

    image

  3. Upload the ISO which you have downloaded in the previous step.

  4. From your this page, Select “My Cloud” so that we can start creating your vApp image

  5. Click the Build New vApp button image

  6. Define the Name, Runtime lease and storage lease values as desired.

    image

  7. Select the “New Virtual Machine” button

    image

  8. Name the Virtual Machine (note that the hostname will inherit this value), set the Operating System Family to Linux and the Operating System to Other Linux (64-bit). Set the desired CPU configuration, amount of memory and disk space needed as needed. When the dialog box closes, be sure to hit the Next button to proceed.

    image

  9. Select your desired Storage Policy

    image

  10. For this example we will connect directly to the routed org network to simplify the required NAT rules to access our application, this will be unique within your vCloud Air environment. Be sure to change the IP Assignment to DHCP, as the currently shipping version of VMware Tools in Photon does not support guest customisation. This means that selecting IP Pool settings will not provide an IP to the VM. Once you have completed this step, click the Finish button.

    image

  11. Back on your My Cloud screen, double click your Photon vApp

    image

  12. Right click the Photon VM and select “Insert CD/DVD from Catalog…”

    image

  13. Select the Photon ISO file and click Insert.

    image

  14. Once the CD is inserted (note that the CD icon changes to blue) click on the Start button.

    image

  15. Follow the on-screen instruction within Photon to install it

    image

  16. Once the installation is complete, eject the media and return to your My Cloud page. Right click your vApp and select “Add to Catalog…”

    image

  17. Select the Catalog to add the Photon vApp to, ensure that “Make identical copy” is selected and then click OK.

    image

Getting Containers Running with Photon

Your first port of call is to deploy the vApp created in the previous section.

  1. Login to vCloud Air - https://vca.vmware.com/ and select your virtual datacenter. image

  2. To deploy your Photon vApp, click “Add One”.

    image

  3. Select Photon from your catalog (not the public VMware catalog).

    image

  4. Enter a name for the vApp, a name for the computer and then click “Deploy This Virtual Machine”.
    image

  5. After a few moments you will see a notification that your virtual machine has been successfully created. Select it, and then click the Power On button.

    image

  6. We will need to get the IP of the VM in order to configure the NAT rule(s), so click into your VM, and then select the Networks tab. Make note of both the Virtual Machine IP and the Gateway IP.

    image

  7. Select the appropriate gateway for your virtual datacenter.

    image

  8. Create a new Destination NAT rule.

    image

  9. Configure the NAT rule as follows to enable SSH access to your VM. Use the IP address details noted in step 6.

    image

  10. Create another Destination NAT rule and configure it for HTTP access to your application. Use the IP address details noted in step 6.

    image

Enable HTTP access to your Photon instance running on vCloud Air

Configure HTTP (Port 80) access on the Edge Gateway that is responsible for the Photon traffic. Now, record the External IP (Home > Gateways Tab) that you’re exposing for Photon from the Gateway IP.

Run the Docker container

Start the Docker service so that it is enabled at boot time: $ systemctl enable docker && systemctl start docker Now to bring up a Docker container with Nginx simply run: $ docker run -p 80:80 vmwarecna/nginx Then navigate your browser to the recorded IP from the previous step, and you should see a fresh Nginx installation and welcome screen.

image

Clone this wiki locally