docs/cloud-images.md
3ca41d48
 #Compatible Cloud Images
bdb137b4
 
aab48f13
   1. GCE - Google Compute Engine
 
   2. AMI - Amazon Machine Image
 
   3. Azure
 
   4. OVA
 
   5. Photon-bosh-stemcell
bdb137b4
 
4afc638f
 #How to build cloud images
bdb137b4
 
f311d1bc
 sudo make cloud-image IMG_NAME=image-name
bdb137b4
 
 image-name : gce/ami/azure/ova
 
 The output of the build process produces the following file formats:
f311d1bc
 
bdb137b4
 GCE - A tar file consisting of disk.raw as the raw disk file 
f311d1bc
 
bdb137b4
 AMI - A raw disk file
f311d1bc
 
bdb137b4
 Azure - A vhd file
f311d1bc
 
bdb137b4
 OVA - An ova file (vmdk + ovf)
 
 sudo make cloud-image-all builds all the cloud images
 
4afc638f
 ###How to build Photon bosh-stemcell
 
 Please follow the link to [ build ] (https://github.com/cloudfoundry/bosh/blob/develop/bosh-stemcell/README.md) Photon bosh-stemcell
 
bdb137b4
 
f311d1bc
 #How to create running instances in the cloud
bdb137b4
 
 
f311d1bc
 ##GCE
bdb137b4
 
 The tar file can be uploaded to Google's cloud storage and an instance can be created after creating an image from the tar file. You will need Google Cloud sdk on host machine to upload the image and create instances
 
f311d1bc
 ####Install google cloud sdk on host machine
bdb137b4
 curl https://sdk.cloud.google.com | bash
 
f311d1bc
 ####Upload the tar file
 gsutil cp photon-gce.tar.gz gs://bucket-name
bdb137b4
 
f311d1bc
 ####Create image
 gcloud compute --project project-id images create image-name --description description --source-uri https://storage.googleapis.com/bucket-name/photon-gce.tar.gz
bdb137b4
 
f311d1bc
 ####Create instance of GCE
 gcloud compute --project project-id instances create instance-name --zone "us-central1-f" --machine-type "n1-standard-1" other-options
bdb137b4
 
 You can create instances also from Google developer console
 
 
f311d1bc
 ##AMI
bdb137b4
 
f311d1bc
 Install the [AWS CLI] (http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os)
bdb137b4
 
f311d1bc
 ####Bundle the image
 ec2-bundle-image -c cert.pem -k private-key.pem -u $AWS_USER_ID --arch x86_64 --image photon-ami.raw --destination directory-name
bdb137b4
 
f311d1bc
 ####Upload the bundle
 ec2-upload-bundle --manifest directory-name/photon-ami.raw.manifest.xml --bucket bucket-name --access-key $AWS_ACCESS_KEY --secret-key $AWS_SECRET_KEY
 ####Register the AMI
 ec2-register bucket-name/photon-ami.raw.manifest.xml --name name --architecture x86_64 --virtualization-type hvm
bdb137b4
 
 You can now launch instances using AWS console
 
 
f311d1bc
 ##AZURE
 
 Install the [Azure CLI] (https://www.npmjs.com/package/azure)
 
 Install [QEMU](https://en.wikibooks.org/wiki/QEMU/Installing_QEMU)
bdb137b4
 
f311d1bc
 ####Create the image
 azure vm image create image_name path_to_vhd -l "West US" -o linux
bdb137b4
 
 Create running VM instances using Azure management portal
 
 
f311d1bc
 ##OVA
bdb137b4
 
49661c37
 The ova image uses a custom linux kernel, which is an optimized kernel based on version 4.1.3. Two ova files are generated from build - photon-ova.ova and photon-custom.ova. The password for photon-ova.ova should be changed using guest customization options when uploading to vCA. Photon-custom.ova is generated with the password changeme, intended for use with Fusion/Workstation.
f311d1bc
 
 ####Pre-requisites
 
 [VDDK 6.0] (https://developercenter.vmware.com/web/sdk/60/vddk)
 
bdb137b4
 	- You must copy the libraries to /usr/lib/vmware and run ldconfig
f311d1bc
 
bdb137b4
 	- Also copy the include files to /usr/include
 
f311d1bc
 [OVFTOOL] (https://my.vmware.com/group/vmware/details?downloadGroup=OVFTOOL410&productId=491)
bdb137b4
 
4afc638f
 ##Photon Bosh
 
 Please refer [bosh docs] (http://bosh.io/docs) to deploy BOSH on Photon 
bdb137b4
 
6e0aa8ba
 ##Links to the pre-built TP2 images
49661c37
 [GCE] (https://dl.bintray.com/vmware/photon/gce/1.0TP2/x86_64/photon-1.0TP2.tar.gz)  Alternatively, you can download the source tar file from the [following] (https://console.developers.google.com/m/cloudstorage/b/photon-1-0-tp2/o/photon-gce.tar.gz) Google cloud storage bucket location
6e0aa8ba
 
 [Azure] (https://dl.bintray.com/vmware/photon/azure/1.0TP2/x86_64/photon-1.0TP2.vhd)
 
 [AMI] (https://dl.bintray.com/vmware/photon/ami/1.0TP2/x86_64/photon-1.0TP2.tar.gz)
 
 [OVA for Workstation/Fusion] (https://dl.bintray.com/vmware/photon/ova/1.0TP2/x86_64/photon-1.0TP2.ova)
 
698ae648
 [vSphere Photon bosh-stemcell] (https://bintray.com/artifact/download/vmware/photon/vSpherePhotonStemcell/1.0TP2/bosh-stemcell-0000-vsphere-esxi-photon-TP2-go_agent.tgz)