Write a Citrix Lifecycle Manager Blueprint

10:41 PM
Write a Citrix Lifecycle Manager Blueprint -

Citrix Lifecycle Management offers a catalog of Citrix-supported technical drawings, you can use Citrix to implement solutions such as XenApp and XenDesktop, but in this blog I'm going to go through how you can create your own scripts and plans Citrix Lifecycle management.

we create a simple but useful blueprint which a Windows Server ready and gives it a name; the process will show you how to create a design in a manner that it can be reused as a component, a higher level plan build

Step 1 :. Create script

We will use PowerShell as a scripting language for this blueprint; The first task is to create a script, a Windows computer

For Design & Deploy tab in Citrix Lifecycle Management Console and click the new script link Navigate to designate as below represented .:

write-bp0

the new script Wizard opens: enter the script a name (renamecomputer); a kind (PS1) and optionally a description and tags, then press Next

write-bp3

You can use either the built-in editor to directly the script or copy / paste the script source edit of your favorite development tool. I use the latter approach, as I prefer, PowerShell scripts with the native PowerShell Integrated Scripting Environment under Windows.

write-bp2

Here is a tip for writing PowerShell scripts to develop, interact well with the Citrix Lifecycle Manager platform: use to a try / catch block as a "wrapper" for your script code; the exception handler should write the error message to the output current, so that it appears in the Blueprint deployment report then with a non-zero exit code to end the PowerShell script to inform the Citrix Lifecycle Manager platform, that an error has occurred. finished

Once the script code then press the script parameters to define: in this case there is only one parameter of type String, the computer name is. Also check the required field must be specified as this parameter, and the tooltip edit some useful text describes to give the parameter

write-bp3

I turn also recommend that you always use the Box named parameters for scripts PowerShell: this means that Citrix Lifecycle Manager is then passed named parameters to PowerShell when the script is called, it is as the default position parameters to find mechanism more flexible, when you come to write complex scripts

[

Click Next and it press any attachments with this script be finished associated to save the new script

step 2 :. Create Blueprint Computer

, the next step is to rename a plan container for the steps to create necessary to rename a Windows computer. At first glance, one can the plan structure I find in this a little more complicated blog use, as is necessary, but bear with me and you will see how we go on, as the pattern that you will contribute to a re-usable range of to provide components blueprints, you can use more complex plans to compose

to the new blueprint o back to design & Deploy tab and click create new plan :.

write-bp4

[1945001geben] your component blueprint a name: create computer named, optionally add a description and tags, and then click the Deploy tab, as shown below

write-bp5

Open the My scripts and utility step trees in Blueprint Designer view as shown below:

write-bp-6

now pull the renamecomputer script by reboot step in your plan, falling as steps 1 and 2, followed by:

write-bp7

step 3: define parameters Blueprint

now we do this in a reusable component. by in the blueprint of the description are the set of parameters required to execute this plan In this case it is very simple - only the name of the computer. Click on the inputs Blueprint tab and create a new input parameter called computer name (Remember we are here not restricted PowerShell parameter naming conventions, create so that we have a human readable name). Add a tooltip when a further description of this parameter is required, and then click the highlighted icon below a regular expression for parameter validation add:

write-bp8

As far as I can work out a Windows computer name between 1 and 15 alpha-numeric characters ( "-" and a hyphen) is the top mark with at least one alphabetic character so my regular expression shown, trying to force it (I'm sure to get comments about this). Also there is a field, so they appear to enter an error message if the input data does not match the regular expression. must

Now the renamecomputer script in step 1 of the action plan are "wired" so that the value of this new parameter Blueprint input to the input script flows through: click the Inputs tab of Step 1 of the plan, and then click the reference symbol of the parameter computer script command, which I have highlighted below:

write-bp9

A reference dialog structure opens upwards - open the Create named computer tree and check the computer name radio button up so that the Blueprint input parameters. to the wired renamecomputer script ComputerName parameter

write-bp10

wired Once the reference as shown below appears. To keep the distribution point of view clean, it is also advisable to disable the Visible box (see Mark below), so the script step parameter is no longer visible during the deployment step.

write-bp11

This is the component design completely: press Save to complete the process

I suggest you follow this convention by all input requirements as Blueprint describe inputs - this allows you to treat the component (to some extent) how. and a black box at a glance what the Blueprint input requirements component are

Step 4 :. create named Computer Blueprint

The next step is to create a blueprint that can be used by Citrix Lifecycle Management to create a designated computer.

for Design & Deploy view go back and press the new Blueprint link again and create a design called Named computer. Include a description and tags, if you want to cooperate with all the resources point conditions (by default, a plan can be used on each resource location - if you want to restrict where your plan is deployed, use the check boxes on the tab do Overview).

Click on the Deploy tab and a server object from the cloud step in the Blueprint Designer followed by Create Named Computer Blueprint of My Blueprints

write-bp12

draw step 5: Configure and server object

of Citrix Lifecycle management platform offers as a template author a limited ability to select a can deployer limit of your plan to limit and guide make. We will use these functions to guide the provision of the Action Plan

Click the Options tab of the server object. Creating 2 or more Windows computers do the same name does not really make much sense, so make sure the VM instance count is set to 1 and the check box that says Do not allow changes during use ,

write-bp13

Next, click Share on the Config tab and enter the configuration that you want to recommend for use. I will illustrate with values ​​for Citrix XenServer, but you can configurations for each of the platforms recommend you want to support:

Use to select the Key drop-down menu that restriction (eg XenServer VM) and give it a value, then the + key (marked) another row in the table to create:

write-bp14

sees my completed list of recommendations for XenServer as follows:

write-bp15

Note that you must make no recommendations, but they can be useful, can not be sure, for a deployer safe defaults supply of those values ​​while providing your plan to choose.

Step 6: Configuring the Blueprint on the server

are executed

Now we have the Blueprint component configured on the server object to perform that we create. Click Select Server in the runs on the Create Named computer Step tab:

write-bp16

A dialog box opens to select the server; check the Blueprint radio button and then check the server. All server box and press Done

write-bp17

Step 7: Configuring Teardown

The deployment phase of the plan is complete, click on the tab of the tear tab followed manage the tear down process for the plan to define:

write-bp18

the only demolish action that we need to execute this plan is all servers to terminate that created it Has. Drag the Terminate machine object from the Blueprint Designer in the shutdown step:

write-bp19

Now click Save and your design is complete

Step 8 : testing the blueprint

In the design & deploy view select Named computer design and click deploy

write-bp-20

, the wizard starts deployment and architectural overview of the plan to deliver applications: how do you see our use of a component plan (Create Named computer) has resulted in the deployment architecture diagram is shown below:

write-bp21

to the wizard to completion, to determine how the use of the recommended configuration from the server object is given.

Previous
Next Post »
0 Komentar