Build a VMware Cloud on AWS Content Library using AWS S3
Gilles Chekroun
Lead NSX Systems Engineer - VMware Europe
---
Lead NSX Systems Engineer - VMware Europe
---
What is a Content Library?
DISCLAIMER: External content libraries are not supported by VMware GSS !
vSphere Content Library is a repository where you can store VM templates, vApp templates and other kind of files like ISO. Administrators can use the templates to deploy VMs and vApps. Each item library can contain multiple files. The basis is .ovf together with the description files like .mf and .vmdk
vSphere Content Library is a repository where you can store VM templates, vApp templates and other kind of files like ISO. Administrators can use the templates to deploy VMs and vApps. Each item library can contain multiple files. The basis is .ovf together with the description files like .mf and .vmdk
If you have .ova files, you can simply un-compress them using the linux command:
tar -xvf SomeFile.ova
There are two kind of Libraries: Local and Subscribed.
Local Library
Local Library stores items in a single vCenter. VM and vApp templates are stored as OVF file format.
Subscribed Library
You can create a Subscribed Library in the same vCenter and to ensure the content is up-to-date, the library can automatically sync with the source on a regular basis.
You can also use the option to download content from the source immediately or only when you need. this will help to manage local storage.
You can also delete local content (look at it like un-sync) to save space as well.
In this article, we will build the content in AWS S3 and use that as the source for publication.
Build the source
NOTE: For this first release, I will build the source from local computer and duplicate to S3. Clearly the goal is to create the source in S3 directly but that will need a few tweaks in the python script that creates the metadata indexing. Stay tuned for some updates . . .
File structure
The Content Library uses Open Virtualization Format (OVF). An OVF package consists of several files placed in one directory. There is ONE .ovf file descriptor and typically one or more disk images, certificates and other auxilliary files.
Note the directory structure with sub-directories for each template.
Create the metadata indexes
The Content Library subscription needs a lib.json file that will be created using the following python script: make_vcsp_2015.py (Thanks to William Lam and Eric Cao).
Refer to William Blog here with full details.
Refer to William Blog here with full details.
We use pthyon 2.7 and the usage is:
python make_vcsp_2015.py ContentLib <path-to-your-ContentLib>
This creates the needed indexes.
Duplicate to AWS S3
Make the Content Library bucket public
Add a Library
Give it a name and click NEXT
Use Subscribed Library and paste the S3 URL of lib.json.
Select Download content when needed to save disk space.
Select storage
Review and click FINISH
Note that the new Library has 3 templates but 0 Bytes size. The content will sync on demand.
Create the Content Library
Open vCenter and select Content LibrariesAdd a Library
Give it a name and click NEXT
Select Download content when needed to save disk space.
Select storage
Review and click FINISH
Note that the new Library has 3 templates but 0 Bytes size. The content will sync on demand.
Give it a name and chose the Workloads Folder
Continue on a classic VM deployment steps and click FINISH
The VM deployment has triggered the synchronisation of the specific content.
VM is deployed
From here, we can power it on and go ahead.
Continue on a classic VM deployment steps and click FINISH
The VM deployment has triggered the synchronisation of the specific content.
VM is deployed
From here, we can power it on and go ahead.
Save disk space and Delete Library item
To save some space on the local vSAN we can "un-sync" items from our library.
The items remain in S3 obviously for future deployments.
At this stage, we are back to a zero size Content Library.
Comments
Post a Comment