Skip to content

Running Project Photon on vCloud Air

grantorchard 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 here

Creating a Project 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 vCloud Air virtual datacenter select **Manage Catalogs in vCloud Director ** on the far right of screen.

    image

  3. Select the _Media & Other_ tab and ****upload the Project Photon ISO which you have downloaded in the previous step, by clicking on the upload icon.

  4. From your this page, Select “My Cloud” on the navigation bar, followed by so that we can start creating your Project Photon vApp. image

  5. Click the Build New vApp button image

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

    new vm

  7. Select the “New Virtual Machine” button

    click new vm

  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.

    new vm _Note: VMware recommends at least 2CPU cores & 384MB of RAM for Photon, with additional memory recommended depending on the number and size of your containers. _

  9. Select your desired Storage Policy

    storage policy

  10. For this example we will connect the Project Photon VM directly to the routed org network to simplify the required NAT rules to access our application. In your environment, configure the networking as appropriate for the desired connectivity 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 limitation means that selecting IP Pool settings will not provide an IP address to the VM. Once you have completed this step, click the Finish button.

    configure network

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

    doubleclick

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

    insert media

  13. Select the Project Photon ISO file and click Insert.

    insert cd

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

    power on

  15. Follow the on-screen instruction and install Project Photon

    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 Project Photon vApp to, ensure that “Make identical copy” is selected and then click OK.

    image

Getting Containers Running with Project Photon

Now that you’ve created a Project Photon vApp in your catalog, you must deploy a vApp from the catalog entry to create a container host and, then, launch containers.

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

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

    image

  3. Select Project 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 the Project Photon virtual machine, 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 Project Photon instance running on vCloud Air

Configure HTTP (Port 80) access on the Edge Gateway that is responsible for the Project Photon traffic. Now, record the External IP (Home > Gateways Tab) that you’re exposing for Project 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