Software components are used to manipulate the content and behavior of an image by applying supplemental files, scripts, patches, etc. to the image. A component can contain one or more files or binaries. All the necessary files and binaries can be contained in one component or they can be divided between several smaller components to provide flexibility.
Using components you can, for example:
- Deploy or deploy and install an additional software package on the target server
- Deploy a newer kernel than the one captured in the image
- Deploy or deploy and install operating system patches that have been made available since the image was captured
- Control which drivers are deployed with an image
- Run a script or command to customize the target server for its destination environment
You specify which components to deploy with an image by using the ‘component’ profile statement in a deploy profile. You can use one or more 'component' statements in a profile.
Elements of a Component
A component can contain any of the following combinations of elements:
- Content files, a postprovision control script, and control files
- Content files and control files
- A postprovision control script and control files
Content files are files that you deploy in a component to customize your deployed image with new or custom content. For example, the content files for a component that deploys a software package would be the files for the software package. Content files must be placed in a subdirectory called
root located in the component directory.
Postprovision Control Script
The postprovision control script is a shell-compatible script that is used to manipulate the content and behavior of a deployed image. The script must be placed in the directory above the component root directory. Use control scripts to:
- Process component content files deployed with an image – For example, if you deploy an image with a component that distributes a particular software package to the deployed server, it is the control script that would initiate the installation of the software on the deployed server.
- Manipulate the image directly – For example, the script could be used to download and install software updates for software included in the image.
DynaCenter supports two postprovision control scripts:
postprovision– used for deploys to non-cloud environments and for Linux deploys to cloud environments
postprovision.cmd– used for Windows deploys to cloud environments
Note: If the purpose of the component you are deploying is to simply place files on the deployed server, you do not need to create a control script for the component.
Control files are produced by DynaCenter and used internally to store attributes and metadata for the component content files. DynaCenter creates the
.info.xml control files when it builds the component and places them in the directory above the component root directory.
Component Directory Structure
The directory for a component contains the control script, the control files, and a root directory that holds the component content files. The root directory that contains the content files corresponds to the root file system of the server image. When you deploy a component, the content files are automatically placed in the root directory structure of the deployed server.
/ home jschmoe components componentA .filelist .info.xml postprovision root component_content_file_A component_content_file_B
Component Management Commands
Components are created and managed with special commands that exist outside of the DynaCenter API. Understanding the Component Management Commands lists and describes the commands you will use to create and manage components.