Photon OS, is an open-source minimalist Linux operating system from VMware that is optimized for cloud computing platforms, VMware vSphere deployments, and applications native to the cloud.
Photon OS is a Linux container host optimized for vSphere and cloud-computing platforms such as Amazon Elastic Compute and Google Compute Engine. As a lightweight and extensible operating system, Photon OS works with the most common container formats, including Docker, Rocket, and Garden. Photon OS includes a yum-compatible, package-based lifecycle management system called tdnf.
Photon OS has been optimized to run on VMware infrastructure and public clouds; as such, it has been stripped down and includes only the drivers necessary to run on a VMware hypervisor (ESXi, Workstation and Fusion), or on one of the supported public clouds—Amazon Web Services (AWS), Google Cloud Platform (GCP) and Microsoft Azure.
i wanted to share how simple it is to deploy the Photon OS within the GCP Platform, i am still waiting for google to certificate the photon as OS as an approve Image for Deployment but for the time been i wanted to show you the steps to deploy vmware photon 4 on GCP as Custom Image.
Downloading Photon OS
You download Photon OS from https://github.com/vmware/photon/wiki/Downloading-Photon-OS
preparing Photon OS on Google Compute Engine
You can use Photon OS as a virtual machine on Google Compute Engine (GCE). Pre-packaged and tested Google GCE image that is ready to deploy in your Google Compute Engine Environment, with all modifications and package requirements for running Photon OS in GCE.
Prerequisites for Running Photon OS on GCE
Before you use Photon OS within GCE, verify that you have the following resources:
Google Compute Engine Account
Working with GCE requires a Google Compute Engine account with valid payment information. Keep in mind that, if you try the examples in this document, you will be charged by Google. The GCE-ready version of Photon OS is free to use.
Photon OS Image
VMware recommends that administrators use the Photon OS image for Google Compute Engine (GCE) to create Photon OS instances on GCE. Photon OS bundles the Google startup scripts, daemon, and cloud SDK into a GCE-ready image that has been modified to meet the configuration requirements of GCE. You can download the Photon OS image for GCE from : https://github.com/vmware/photon/wiki/Downloading-Photon-OS
Installing Photon OS on Google Compute Engine
When you create a VM instance, Google Cloud creates an internal DNS name from the instance name. Unless you specify a custom hostname, Google Cloud uses the automatically created internal DNS name as the hostname it provides to the VM.
Creating a VM from a custom image
A custom image belongs only to your project. To create an instance with a custom image, you must first have a custom image
After you download the Photon OS image for GCE, log into GCE and install Photon OS with this following steps:
Create a New BucketCreate a new bucket to store your Photon OS image for GCE.
i have not provide Unique name to the bucket, you see that vmware-images is all ready taken so i used other name to created the bucket
vmware-images-1800 name did the work, and it is simple to create a bucket as creating a folder on your desktop.
i choose that the bucket will reside on Region Location to same money but you can choose the best SLA option for you.
the best location for me will be Oregon, i love that i leave next to a big hub, have faster speed to move data 🙂
As you can see we have created our vmware-images-1800 bucket and it is available to load files.
- Upload the Photon OS Image
While viewing the bucket that created, click the
Upload files button, navigate to your Photon OS image and click the
When the upload finishes, you can see the Photon OS compressed image in the file list for the bucket that you created.
and now you can see the file loaded to the bucket
Create a New Image
To create a new image, click on
Images in the
Compute category in the left panel and then click on the
New Image button.
you will need to provide the name for the image , the source and location of the image files, in this examples i will use my load image on bucket vmware-images-1800.
you will need to provide the location of the images files.
again i have choose Regional location to save money and the prefer Hub with us-west1
Create button to create your image. You must be able to see the Images catalog and your Photon OS image at the top of the list.
Create a New Instance
and now we can go to GCP compute Engine and start the photon instance, it is critical to understand that google Compute engine is base on the same function that VMware Hyper vision is doing, when you deploy the image it all most the same as deploying it with Vcenter and ESXI Host.
Google GCP Compute Engine is base on KVM Redhat and provide an improve version of this open source platform.
Before creating an instance with Google GCP you will need to enable the Compute engine API and then follow to the Compute Engine Dashboard and press on Create a new instance.
you will need to provide a name for the instance , in my example i used eran-photon-4, and again choose the closest hub to me us-west1
choose the change the boot disk for your image , the default is Debian GNU/Linux, please choose the change button
at the boot disk please choose the Custom Images tab
with the Custom images please choose the image we prepare : eran-photon-4
allow HTTP and HTTPS Traffic if you plan to access the VM externally
When the instance is created you will be returned to your list of VM instances. If you click on the instance, the status page for the instance will allow you to SSH into your Photon OS environment using the SSH button at the top of the panel.
after the boot you can ssh to the instance
Connecting with SSH Keys to the VM.
and here we are , log in to the photon OS and running Linux Commands
At this point, your instance is running and you are ready to start the Docker engine and run a container workload