Browse code

Helper documentation for cloud images

Anish Swaminathan authored on 2015/08/18 09:26:01
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,81 @@
0
+Supported Cloud Images
1
+
2
+GCE - Google Compute Engine
3
+AMI - Amazon Machine Image
4
+Azure
5
+OVA
6
+
7
+How to build cloud images
8
+
9
+sudo make cloud-image IMG_NAME=<image-name>
10
+
11
+image-name : gce/ami/azure/ova
12
+
13
+The output of the build process produces the following file formats:
14
+GCE - A tar file consisting of disk.raw as the raw disk file 
15
+AMI - A raw disk file
16
+Azure - A vhd file
17
+OVA - An ova file (vmdk + ovf)
18
+
19
+sudo make cloud-image-all builds all the cloud images
20
+
21
+
22
+How to create running instances in the cloud
23
+
24
+
25
+GCE
26
+
27
+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
28
+
29
+# Install google cloud sdk on host machine
30
+curl https://sdk.cloud.google.com | bash
31
+
32
+#Upload the tar file
33
+gsutil cp photon-gce.tar.gz gs://<bucket-name>
34
+
35
+#Create image
36
+gcloud compute --project <project-id> images create <image-name> --description <description> --source-uri https://storage.googleapis.com/<bucket-name>/photon-gce.tar.gz
37
+
38
+#Create instance of GCE
39
+gcloud compute --project <project-id> instances create <instance-name> --zone "us-central1-f" --machine-type "n1-standard-1" <other-options>
40
+
41
+You can create instances also from Google developer console
42
+
43
+
44
+AMI
45
+
46
+Install the AWS ClI : http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os
47
+
48
+#Bundle the image
49
+ec2-bundle-image -c <cert>.pem -k <private-key>.pem -u <AWS_USER_ID> --arch x86_64 --image photon-ami.raw --destination <directory-name>
50
+
51
+#Upload the bundle
52
+ec2-upload-bundle --manifest <directory-name>/photon-ami.raw.manifest.xml --bucket <bucket-name> --access-key $AWS_ACCESS_KEY --secret-key $AWS_SECRET_KEY
53
+#Register the AMI
54
+ec2-register <bucket-name>/photon-ami.raw.manifest.xml --name <name> --architecture x86_64 --virtualization-type hvm
55
+
56
+You can now launch instances using AWS console
57
+
58
+
59
+AZURE
60
+
61
+Install the Azure CLI: https://www.npmjs.com/package/azure
62
+Install QEMU: https://en.wikibooks.org/wiki/QEMU/Installing_QEMU
63
+#Create the image
64
+azure vm image create <image_name> <path_to_vhd> -l "West US" -o linux
65
+
66
+Create running VM instances using Azure management portal
67
+
68
+
69
+OVA
70
+
71
+The ova image uses a custom linux kernel, which is an optimized kernel based on version 4.1.3. The default password for the ova file is under support/cloud-image-builder/ova/vmdk_ova.json. The password should be changed using guest customization options when uploading to vCA.
72
+Pre-requisites
73
+QEMU: https://en.wikibooks.org/wiki/QEMU/Installing_QEMU
74
+VDDK 6.0: https://developercenter.vmware.com/web/sdk/60/vddk
75
+	- You must copy the libraries to /usr/lib/vmware and run ldconfig
76
+	- Also copy the include files to /usr/include
77
+OVFTOOL: https://my.vmware.com/group/vmware/details?downloadGroup=OVFTOOL410&productId=491
78
+
79
+
80
+