vmware studio practice in tim

Post on 10-May-2015

1.399 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

VMware Studio Introduction

Hubert Chan

VMware Studio Benefits

• VMware Studio Benefits– Building vApps – Automated the building of Virtual Appliances– Integrate Virtual Appliance Management

Infrastructure– Other Benefit

https://www.vmware.com/products/studio/benefits.html

Before VMware Studio Solution

• Creating a Base Image by hand– Manual 3rd party Libraries Management– Manual cleanup and post action– Modification is not version controlled– Recreate base image when add/remove 3rd party

libraries

State of Art

• Manual Instruction NOT so reliable• Midnight Daily Build suffers the Build Master• Frequent bug fixing cause build master busy to

generate new OVA

Generate OVA by VMware Studio

• VMware Studio integrates– VIX API– vSphere API– CentOS / RHEL• Kickstart (ks.cfg)• Yum repository

What you need to do

• Create a VM profile– VM template (CentOS / RedHat / …)– Define VM Hardware Specification• CPU, RAM, NICs• Partition Layout

– Define Installed Applications– Define Pre/Post Install Scripts– Build Related settings

VM Profile Template

• Inherit base template

Hardware Specification

• CPU / RAM / NICs

Hardware Specification

• Disk and Partition

Support CentOS repository

• Install RPMs from media (DVD ISO)

Install Packages

• Install 3rd party / ISV packages

Application Pre/Post Install Scripts

• Customization Scripts

Build Related Settings

• ESXi related setting

Command Line

• studiocli provides– Query build status– Create a new build– Delete a build

Ideally…

• Ideally…– Create a VM profile once– Use studiocli to trigger a build– Copy built OVA through SCP

We think we can have

• Advantages– Auto build for OVA– Add/Remove 3rd party libraries without pain– Easy to customize pre/post install scripts– VM Profile can be version controlled

Houston, we’ve got a problem.

• Install4j package is not RPM– Use post install script to install install4j package

$ wget -r -np -nH -R "index.html*" http://[VADK.localIP]/install_package/

Houston, we’ve got a problem.

• No CentOS 6.2 Template– Rewrite from RHEL 6.1

• Deployment of Install Package/RPMs is slow– Use rsync– http://coolshell.cn/articles/7425.html

Houston, we’ve got a problem.

• Provide a way to do manual installation– Hand made python scripts to control flows• Installation• Patch 3rd party configuration• Firewall rules

• studiocli does not work through SSH– Use /opt/vmware/share/build/vabs.pl

Houston, we’ve got a problem.

• Modify VM profile XML for rpms/scripts– Use python lxml and glob

• Need a CPAN mirror– Mini CPAN– Hack for CPAN init

Houston, we’ve got a problem.

• Detect build automatically from tw-testing– autofs to mount tw-testing– Check MD5 every 5 minutes and store version in a

python pickle– Trigger OVA build

Houston, we’ve got a problem.

• Performance– Tuning (especially in memory)– Use SSD to save some time– Can use vmxnet in the future

• Check VM instance whether powered off bug– No good solution now

Houston, we’ve got a problem.

• Separate Deployment Configuration– Use WRKDIR for latest package– Only overwrite deployment settings

Q & A

top related