Information Technology Reference
In-Depth Information
Establishing Deployment Rules
The deployment rules are where the “rubber meets the road” for vSphere Auto Deploy. When
you dei ne a deployment rule, you are linking an image proi le to one or more hosts. It's at this
point that vSphere Auto Deploy will copy all the VIBs dei ned in the specii ed image proi le up
to the Auto Deploy server so that they are accessible from the hosts. Once a deployment rule
is in place, you can actually begin provisioning hosts via Auto Deploy (assuming all the other
pieces are in place and functioning correctly, of course).
As with image proi les, deployment rules are managed via PowerCLI. You'll use the
New-DeployRule and Add-DeployRule commands to dei ne new deployment rules and add
them to the working rule set, respectively.
Perform the following steps to dei ne a new deployment rule:
1. In a PowerCLI session where you've previously connected to vCenter Server and dei ned
an image proi le, use the New-DeployRule command to dei ne a new deployment rule
that matches an image proi le to a physical host:
New-DeployRule -Name ″Img_Rule ″ -Item ″My_Custom_Profile″
-Pattern ″vendor=Cisco″, ″ipv4=10.1.1.225,10.1.1.250″
This rule assigns the image proi le named My_Custom_Proi le to all hosts with Cisco in
the vendor string and having either the IP address 10.1.1.225 or 10.1.1.250. You could also
specify an IP range like 10.1.1.225-10.1.1.250 (using a hyphen to separate the start and end
of the IP address range).
2. Next, create a deployment rule that assigns the ESXi host to a cluster within vCenter
Server:
New-DeployRule -Name ″Default_Cluster″ -Item ″Cluster-1″ -AllHosts
This rule puts all hosts into the cluster named Cluster-1 in the vCenter Server with which
the Auto Deploy server is registered. (Recall that an Auto Deploy server must be regis-
tered with a vCenter Server instance.)
3. Add these rules to the working rule set:
Add-DeployRule Img_Rule
Add-DeployRule Default_Cluster
As soon as you add the deployment rules to the working rule set, vSphere Auto Deploy
will, if necessary, start uploading VIBs to the Auto Deploy server in order to satisfy the
rules you've dei ned.
4. Verify that these rules have been added to the working rule set with the
Get-DeployRuleSet command.
Now that a deployment rule is in place, you're ready to provision via Auto Deploy. Boot the
physical host that matches the patterns you dei ned in the deployment rule, and it should follow
the boot sequence described at the start of this section. Figure 2.9 shows what it looks like when
a host is booting ESXi via vSphere Auto Deploy.
By now, you should be starting to see the l exibility that Auto Deploy offers. If you need
to deploy a new ESXi image, you need only dei ne a new image proi le (using a new software
depot, if necessary), assign that image proi le with a deployment rule, and reboot the physical
servers. When the servers come up, they will boot the newly assigned ESXi image via PXE.
Search WWH ::




Custom Search