You are on page 1of 125

CloudForms 1.

1 Cloud Engine User Guide

Using CloudForms Cloud Engine

Lana Brindley Daniel Macpherson

Athene Chan Shikha Nansi

Sarah Chua Julie Wu

CloudForms 1.1 Cloud Engine User Guide Using CloudForms Cloud Engine

Lana Brindley Red Hat Engineering Cont ent Services lbrindle@redhat .com At hene Chan Red Hat Engineering Cont ent Services achan@redhat .com Sarah Chua Red Hat Engineering Cont ent Services sachua@redhat .com Daniel Macpherson Red Hat Engineering Cont ent Services dmacpher@redhat .com Shikha Nansi Red Hat Engineering Cont ent Services snansi@redhat .com Julie Wu Red Hat Engineering Cont ent Services juwu@redhat .com

Legal Notice Copyright 2012 Red Hat. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons AttributionShare Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BYSA is available at . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the United States and other countries. Java is a registered trademark of Oracle and/or its affiliates. XFS is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries. All other trademarks are the property of their respective owners. 1801 Varsity Drive Raleigh, NC 27 606-207 2 USA Phone: +1 919 7 54 37 00 Phone: 888 7 33 4281 Fax: +1 919 7 54 37 01 Keywords Abstract A guide to using CloudForms Cloud Engine.

CloudForms 1.1 Cloud Engine User Guide

Table of Contents
Preface . ............................................................................... 1. Document Conventions 1.1. T ypographic Conventions 1.2. Pull-quote Conventions 1.3. Notes and Warnings 2. Getting Help and Giving Feedback 2.1. Do You Need Help? 2.2. We Need Feedback! Chapter . . . . . . . . . 1. . . .Introduction .................................................................... 1.1. About CloudForms 1.2. About CloudForms Cloud Engine 1.3. Components 1.3.1. Conductor 1.3.2. Deltacloud 1.3.3. Image Factory 1.3.4. Image Warehouse 1.3.5. Audrey 1.4. Supported Instance Operating Systems Chapter . . . . . . . . . 2. . . .First . . . . .T .. ime . . . .Login ......................................................... 2.1. Logging into CloudForms Cloud Engine for the First T ime Chapter . . . . . . . . . 3. . . .Views, . . . . . . .Searching . . . . . . . . . . .and . . . . Filtering .............................................. 3.1. Views 3.2. Searching 3.3. Filtering Chapter . ........4 . ...Cloud ....... Resources ............................................................. 4.1. Cloud Resources 4.2. Cloud Resource Providers 4.2.1. Cloud Resource Providers 4.2.2. Supported Cloud Resource Providers 4.2.3. Provider Connections 4.2.3.1. Setting Up a Cloud Resource Provider Connection 4.2.3.2. Disable a Cloud Resource Provider Connection 4.2.4. Provider Accounts 4.2.4.1. Setting Up a Cloud Resource Provider Account 4.2.4.2. Adding an Audrey Configuration Server to a Resource Provider Account 4.2.4.3. Editing Audrey Configuration Server Details 4.2.4.4. Delete Audrey Configuration Server Details 4.3. Cloud Resource Profiles 4.3.1. Cloud Resource Profiles 4.3.2. Creating a New Cloud Resource Profile 4.4. Cloud Resource Clusters 4.4.1. Cloud Resource Clusters 4.4.2. Setting up a Cloud Resource Cluster 4.5. Clouds 4.5.1. Clouds 4.5.2. Creating a New Cloud 4.5.3. Associating a Cloud with a Cloud Resource Provider Account 4.6. Cloud Resource Z ones 4.6.1. Cloud Resource Z ones 7 7 7 8 9 9 9 10 11 11 13 13 13 13 13 13 13 14 15 15 17 17 17 17 19 19 19 19 19 20 20 21 21 21 23 24 24 25 25 25 26 26 27 28 28 28 29 30 30

Preface

4.6.2. Creating a Cloud Resource Z one 4.6.3. Provider Selection Strategies 4.6.3.1. Creating a Provider Selection Strategy 4.6.3.2. Penalty for Failure Strategy

30 31 31 31

Chapter . . . . . . . . . 5. . . .Component . . . . . . . . . . . . Outlines ........................................................ 33 5.1. Component Outlines 33 5.2. Creating a Component Outline 33 5.3. Example Component Outlines 35 5.3.1. Red Hat Enterprise Linux 6.3 via URL 35 5.3.2. Red Hat Enterprise Linux 5.8 via ISO 35 5.3.3. Red Hat Enterprise Linux 6.3 with Audrey Agent 35 5.3.4. Red Hat Enterprise Linux 6.3 with HT T P Web Server 36 5.3.5. Red Hat Enterprise Linux 6.3 with vm-tools agent (VMware vSphere) 37 5.3.6. Red Hat Enterprise Linux 6.3 with rhev-agent (RHEV) 38 5.4. Including T arget-Specific Packages and Repositories for Component Outlines 39 5.5. Exporting a Component Outline from System Engine 41 5.5.1. About CloudForms System Engine 41 5.5.2. System T emplates 41 5.5.3. Exporting a System T emplate 42 5.5.4. Importing a CloudForms System Engine Component Outline into CloudForms Cloud Engine 42 5.6. Images 42 5.6.1. Images 42 5.6.2. Building an Image from a Component Outline 44 5.6.3. Pushing an Image to a Cloud Resource Provider 45 5.6.4. Importing an Image from a Cloud Resource Provider 46 5.6.5. Deleting an Image from CloudForms Cloud Engine 48 5.7. Using the Command Line T ool 49 5.7.1. Command Line T ool (aeolus) 49 5.7.2. Building an Image via Command Line 49 5.7.3. Pushing an Image via Command Line 50 5.7.4. Command Line Reference 51 5.7.4.1. Command Line Syntax 51 5.7.4.2. List Options 51 5.7.4.3. Build Options 53 5.7.4.4. Push Options 54 5.7.4.5. Import Options 55 5.7.4.6. Delete Options 56 Chapter . . . . . . . . . 6. . . .Applications .................................................................... 6.1. Applications 6.2. Catalogs 6.2.1. Catalogs 6.2.2. Creating a Catalog 6.2.3. Editing a Catalog 6.2.4. Deleting Catalogs 6.3. Application Blueprint 6.3.1. Application Blueprint 6.3.2. Creating an Application Blueprint from a Component Outline 6.3.3. Creating an Application Blueprint from a File Import 6.3.4. Example Application Blueprint file 6.3.5. Edit an Application Blueprint 6.3.6. Add an Application Blueprint to Additional Catalogs 6.3.7. Deleting Application Blueprints 6.4. Applications and Instances 58 58 58 58 58 59 59 60 60 60 61 61 62 63 63 63

CloudForms 1.1 Cloud Engine User Guide

6.4.1. Creating a New Application 6.4.2. Deleting an Application 6.4.3. Accessing an Instance 6.4.4. Rebooting an Instance 6.4.5. Stopping an Instance Chapter . . . . . . . . . 7. . . .Runtime . . . . . . . . .Configuration ........................................................... 7.1. Runtime Configuration 7.2. Adding Audrey Agent to all Component Outlines 7.3. Adding Runtime Configuration to an Application Blueprint 7.4. Launching Instances with Runtime Configuration 7.5. Using Runtime Configuration with System Engine Registration Chapter . . . . . . . . . 8. . . .Users .................................................................... 8.1. Creating a User 8.2. Edit an Existing User 8.3. Delete an Existing User Chapter . . . . . . . . . 9. . . .Users . . . . . . Groups .............................................................. 9.1. Creating a User Group 9.2. Editing a User Group 9.3. Adding Users to a User Group 9.4. Removing Users from a User Group 9.5. Deleting a User Group Chapter . . . . . . . . . 10. . . . . Permissions ................................................................... 10.1. Setting Global Permissions 10.2. Setting Cloud Resource Provider Permissions 10.3. Setting Cloud Resource Z one Permissions 10.4. Setting Application Blueprint Permissions 10.5. Setting Application Permissions Chapter . . . . . . . . . 11. . . . . Logging . . . . . . . . .and . . . . Reporting ...................................................... 11.1. Provider History 11.1.1. Accessing Provider History 11.2. Audit History 11.2.1. Accessing Audit History 11.2.2. Exporting Audit History 11.3. Instance History 11.3.1. Accessing Instance History 11.3.2. Exporting Instance History 11.4. Accessing Log Files Chapter . . . . . . . . . 12. . . . . Maintenance ................................................................... 12.1. Disaster Recovery 12.1.1. Cloud Engine Backup Procedure 12.1.2. Cloud Engine Restore Procedure 12.2. Image Warehouse Recovery 12.2.1. T esting Image Warehouse 12.2.2. Analyzing the Log 12.2.3. Recovery from Insufficient Space 12.2.4. Recovery from Database Failure Chapter . . . . . . . . . 13. . . . .T . emplate . . . . . . . . . Description . . . . . . . . . . . . .Language ........... (T . .DL) . . . .Schema ........................... 13.1. arch 13.2. command 13.3. commands

63 66 66 67 68 69 69 69 69 71 73 79 79 80 80 81 81 81 81 81 82 83 83 83 84 85 86 87 87 87 87 87 88 88 88 88 88 90 90 90 91 93 93 93 93 94 95 95 95 96

Preface

13.4. description 13.5. file 13.6. files 13.7. install 13.8. iso 13.9. key 13.10. md5sum 13.11. os 13.12. name (os) 13.13. name (template) 13.14. package 13.15. packages 13.16. repositories 13.17. repository 13.18. signed 13.19. rootpw 13.20. sha1sum 13.21. sha256sum 13.22. template 13.23. url (repository) 13.24. url (os) 13.25. version Chapter . . . . . . . . . 14 . . . .. Application . . . . . . . . . . . . Blueprint ........... XML . . . . Schema ........................................ 14.1. assemblies 14.2. assembly 14.3. contents (executable) 14.4. contents (file) 14.5. deployable 14.6. description (deployable) 14.7. description (service) 14.8. executable 14.9. file 14.10. files 14.11. image 14.12. parameter 14.13. parameters 14.14. reference 14.15. return 14.16. returns 14.17. service 14.18. services 14.19. value . . . . . . . . . .History Revision ......................................................................

96 97 97 98 98 99 100 100 101 102 102 103 103 104 104 105 105 106 107 107 108 109 110 110 110 110 111 111 111 112 112 112 113 113 113 114 114 114 115 115 115 116 117

CloudForms 1.1 Cloud Engine User Guide

10

Chapter 1. Introduction

Preface
1. Document Conventions
T his manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. T he Liberation Fonts set is also used in HT ML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default. 1.1. T ypographic Conventions Four typographic conventions are used to call attention to specific words and phrases. T hese conventions, and the circumstances they apply to, are as follows. Mono-spaced Bold Used to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example: T o see the contents of the file m y_next_bestselling_novel in your current working directory, enter the cat m y_next_bestselling_novel command at the shell prompt and press Enter to execute the command. T he above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context. Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example: Press Enter to execute the command. Press Ctrl + Alt+ F2 to switch to a virtual terminal. T he first example highlights a particular key to press. T he second example highlights a key combination: a set of three keys pressed simultaneously. If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in m ono-spaced bold . For example: File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions. Proportional Bold T his denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example: Choose System Preferences Mouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed m ouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand). T o insert a special character into a gedit file, choose Applications Accessories

11

CloudForms 1.1 Cloud Engine User Guide

Character Map from the main menu bar. Next, choose Search Find from the Character Map menu bar, type the name of the character in the Search field and click Next. T he character you sought will be highlighted in the Character T able . Double-click this highlighted character to place it in the T ext to copy field and then click the Copy button. Now switch back to your document and choose Edit Paste from the gedit menu bar. T he above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context. Mono-spaced Bold Italic or Proportional Bold Italic Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example: T o connect to a remote machine using ssh, type ssh username@ domain.name at a shell prompt. If the remote machine is exam ple.com and your username on that machine is john, type ssh john@ exam ple.com . T he m ount -o rem ount file-system command remounts the named file system. For example, to remount the /hom e file system, the command is m ount -o rem ount /hom e . T o see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release. Note the words in bold italics above username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: Publican is a DocBook publishing system. 1.2. Pull-quote Conventions T erminal output and source code listings are set off visually from the surrounding text. Output sent to a terminal is set in m ono-spaced rom an and presented thus:
books books_tests Desktop Desktop1 documentation downloads drafts images mss notes photos scripts stuff svgs svn

Source-code listings are also set in m ono-spaced rom an but add syntax highlighting as follows:

12

Chapter 1. Introduction

package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }

1.3. Notes and Warnings Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.

Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.

Important
Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.

Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

2. Getting Help and Giving Feedback


2.1. Do You Need Help? If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer Portal at http://access.redhat.com. T hrough the customer portal, you can: search or browse through a knowledgebase of technical support articles about Red Hat products. submit a support case to Red Hat Global Support Services (GSS). access other product documentation.

13

CloudForms 1.1 Cloud Engine User Guide

Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo. Click on the name of any mailing list to subscribe to that list or to access the list archives. 2.2. We Need Feedback! If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http://bugzilla.redhat.com/ against the product CloudForms Cloud Engine. When submitting a bug report, be sure to mention the manual's identifier: Documentation-User_Guide If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.

14

Chapter 2. First Time Login

Chapter 1. Introduction
1.1. About CloudForms
Red Hat CloudForms is an on-premise hybrid cloud Infrastructure-as-a-Service (IaaS) product that lets you create and manage private and public clouds. It provides self-service computing resources to users in a managed, governed, and secure way. CloudForms is focused on two distinct sets of capabilities related to IaaS: 1. Providing the tools to build and manage hybrid clouds. 2. Providing the tools and processes to build, manage and launch applications that run on hybrid clouds. It integrates with existing products and technologies, including physical servers and virtualization platforms from other vendors, to provide the easiest on-ramp to an on-premise cloud. Using CloudForms, you can migrate to multiple public cloud providers, including those running a software stack from a different vendor. CloudForms delivers automated resource management, automated workflow and policies to manage a diverse set of business applications in hybrid cloud environments. It also allows organizations to leverage public clouds for pay-as-you-go utility computing without creating another silo or losing control of IT security or governance. You can manage applications and infrastructure together as one unit, rather than as separate silos, simplifying the task of ensuring continuous compliance. T hus, all the infrastructure and applications will stay in sync with established policies at all times. CloudForms usage is a four-phase process.

15

CloudForms 1.1 Cloud Engine User Guide

Figure 1.1. T he four phases of the CloudForms system

Phase 1: Use CloudForms to create a standard operating environment as a master component outline. Phase 2: Build component outlines on top of a master component outline and customize each system to your desired specification. Organize component outline collections in application templates. Phase 3: Deploy and manage applications in cloud environments and provide runtime configuration. Phase 4: Provide your systems with patches, updates, and ensure continuous compliance with Red Hat subscriptions policy. Report a bug

16

Chapter 3. Views, Searching and Filtering

1.2. About CloudForms Cloud Engine


CloudForms Cloud Engine is a management application for cloud resources. It provides the following functions: T ools to abstract and utilize resources from multiple public and private cloud resource providers. Creation of components used for producing virtual machine instances on cloud resource providers. Deployment and runtime configuration of virtual machine instances. Definition of deployment quotas and permissions for users. Report a bug

1.3. Components
1.3.1. Conductor Conductor is the web-based management console to help users control multiple clouds using CloudForms Cloud Engine components. T his includes helping users to launch virtual machines on a cloud, tracking the virtual machines through their lifecycle, and removing them when they are no longer needed. Report a bug 1.3.2. Deltacloud Deltacloud is an open-source API that abstracts the differences between cloud resource providers for resource management. Deltacloud is built as a service-based REST API, and is the single API to manage all cloud resources. Clients communicate over HT T P to the Deltacloud server, which interacts with specific Cloud providers. Report a bug 1.3.3. Image Factory Image Factory is a cloud image builder. It is a daemon with a REST interface that builds images for various cloud resource providers using description language-based templates. Report a bug 1.3.4 . Image Warehouse Image Warehouse (iwhd ) manages images built with Image Factory and moves them to their associated cloud resource providers. Its functions include: REST ful based requests Unlimited key/value metadata associated with each image Simple queries on metadata Replication across different storage technologies based on policies defined by the user and dynamically evaluated in the context of object/container metadata Report a bug 1.3.5. Audrey Audrey is a set of tools for run-time configuration of cloud instances. Audrey communicates with these

17

CloudForms 1.1 Cloud Engine User Guide

components: Audrey Configuration Server T his component acts as a proxy for CloudForms Cloud Engine to communicate with Audreyenabled instances. Audrey Agent T his component is installed on an instance to communicate with the Audrey Configuration Server . Users should include this component in an image template as an additional package to install in order to enable Audrey on an instance. T he Audrey Agent communicates with the Audrey Configuration Server when the instance launches. T his enables a CloudForms Cloud Engine user to perform further configuration using a customizable script.

Report a bug

1.4. Supported Instance Operating Systems


CloudForms Cloud Engine 1.1 provides full feature support for the following instance operating systems: T able 1.1. Supported Instance Operating Systems Operating System Red Hat Enterprise Linux 6 Red Hat Enterprise Linux 5 Versions 6.4, 6.3, 6.2 5.9, 5.8, 5.7

Important
CloudForms Cloud Engine has the ability to install other guest operating systems on virtual machine instances but not all features are supported for these operating systems.

Report a bug

18

Chapter 4. Cloud Resources

Chapter 2. First Time Login


2.1. Logging into CloudForms Cloud Engine for the First Time
CloudForms Cloud Engine uses a web interface to control the application. Access to CloudForms Cloud Engine requires a username and password.

Figure 2.1. CloudForms Cloud Engine login screen

Important
T he CloudForms Cloud Engine installation procedure creates a first time adm in account with the password password . Change this password immediately after installation. Procedure 2.1. Logging into CloudForms Cloud Engine 1. Use your preferred internet browser to navigate to https://[CloudEngineHost]/conductor

19

CloudForms 1.1 Cloud Engine User Guide

Important
An untrusted connection warning appears on your web browser when accessing Cloud Engine for the first time. Accept the self-signed certificate and add the Cloud Engine URL as a security exception to override the settings. T his procedure might differ depending on the browser being used. Only do this if you are sure that the Cloud Engine URL is a trusted source.

Figure 2.2. Untrusted Connection Warning

2. Enter your usernam e and password and click Login . A successful login takes you to the CloudForms Cloud Engine Monitor Dashboard, which shows critical information about your cloud environments. Report a bug

20

Chapter 4. Cloud Resources

Chapter 3. Views, Searching and Filtering


3.1. Views
CloudForms Cloud Engine provides two types of views for users to interact with the Monitoring user interface. Change between these views with the User Interface Switch located at the top of the page. Pretty View T he Pretty View provides a high-level layout of pools. T his view displays applications and instances in a graphical layout. Change to the Pretty View at anytime using the UI switch.

Figure 3.1. Pretty View in the UI switch

Filter View T he Filter View provides features for finding and sorting resources in your cloud. T his view displays applications and instances in a tabled layout. Change to the Filter View at anytime using the UI switch.

Figure 3.2. Filter View in the UI switch

Report a bug

3.2. Searching
Search for resources in CloudForms Cloud Engine using the search box in the top-right corner of each Filter View. T ype your search value into the box and press Enter . CloudForms Cloud Engine returns a list of resources based on your search criteria.

Figure 3.3. Search box in Filter View

Report a bug

3.3. Filtering
Filter resources in CloudForms Cloud Engine using the filter selection box in the top-right corner of each tabled view. Click the filter box and select the filtering method for your view. CloudForms Cloud Engine returns a list of resources based on your filtering method.

21

CloudForms 1.1 Cloud Engine User Guide

Figure 3.4 . Filter selection box in Filter View

Report a bug

22

Chapter 4. Cloud Resources

Chapter 4. Cloud Resources


4.1. Cloud Resources
CloudForms Cloud Engine contains a set of administrative tools to manage cloud resources, such as virtual machine hardware abstractions and storage. Report a bug

4.2. Cloud Resource Providers


4 .2.1. Cloud Resource Providers A cloud resource provider is a specific public or private virtualization environment. Users abstract resources from cloud resource providers to create cloud resource profiles, which CloudForms Cloud Engine uses to create virtual machine instances in a deployment. Examples of cloud resource providers include Amazon Elastic Compute Cloud (Amazon EC2), Rackspace, GoGrid, a private VMWare ESX environment or a private Red Hat Enterprise Virtualization environment.

Figure 4 .1. Managing cloud resources for deployments

CloudForms Cloud Engine manages multiple cloud resource provider definitions simultaneously and communicates to each cloud resource provider using a special application programming interface called Deltacloud. Report a bug 4 .2.2. Supported Cloud Resource Providers

23

CloudForms 1.1 Cloud Engine User Guide

T able 4 .1. Supported cloud resource providers Provider T ype Private cloud products Public cloud providers Supported Providers Red Hat Enterprise Virtualization, VMWare vSphere Amazon EC2

Report a bug 4 .2.3. Provider Connections 4 .2.3.1. Setting Up a Cloud Resource Provider Connection Cloud resource provider setup first requires a connection to a provider using the appropriate Deltacloud driver.

Figure 4 .2. Cloud resource provider connections

Setup your cloud resource provider connection with the following procedure. 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click the Create New Cloud Resource Provider button. 4. T ype a Cloud Resource Provider Nam e for this connection. 5. T ype the Cloud Resource Provider URL for the appropriate Deltacloud API driver. 6. Choose a Cloud Resource Provider T ype from the list of supported resource providers. 7. T ype any additional headers for the Deltacloud driver in the X-Deltacloud-Provider field. 8. Click on the Save Cloud Resource Provider button to save your new cloud resource provider connection.

24

Chapter 4. Cloud Resources

T his creates the cloud resource provider connection. Use this connection when entering cloud resource provider account details.

Important
CloudForms Cloud Engine administrators have the ability to add cloud resource providers using the aeolus-configure command line tool. Consult Section 3.2. Configuring CloudForms Cloud Engine of the CloudForms Installation Guide for information on aeolus-configure use.

Important
Private cloud providers, such as Red Hat Enterprise Virtualization and VMware vSphere, require configuration file edits before they are added to CloudForms Cloud Engine . Consult Appendix A. Private Cloud Configuration of the CloudForms Installation Guide for more information.

Report a bug 4 .2.3.2. Disable a Cloud Resource Provider Connection T his procedure disables a cloud resource provider connection in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider to be disabled. 4. Click the provider slide switch to change the state of the provider from ON to OFF . 5. An alert box displays the following message:
Disable provider? All its instances will be stopped.

Click OK. T he disabled provider screen appears. T his disables the cloud resource provider connection and CloudForms Cloud Engine stops all its instances. Report a bug 4 .2.4 . Provider Accounts 4 .2.4 .1. Setting Up a Cloud Resource Provider Account Each cloud resource provider hosts a set of accounts for users to manage their cloud resources. CloudForms Cloud Engine can control multiple accounts for a single cloud resource provider.

25

CloudForms 1.1 Cloud Engine User Guide

Figure 4 .3. Cloud resource provider account creation

T his procedure sets up CloudForms Cloud Engine to connect with your cloud resource provider account. 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider to add an account. 4. Click on Accounts. 5. Click the New Account button. T he New Cloud Resource Provider Account screen appears. 6. Enter the Account Nam e of the account. 7. Enter account credentials for the resource provider.

26

Chapter 4. Cloud Resources

T able 4 .2. Required authentication details for Amazon EC2 Authentication Field Access key Description A 20-character Access Key ID created in your Amazon Web Services Account under Security Credentials Access Credentials Access Keys. Secret Access Key associated with the Access Key ID. T his Secret Access Key is found in your Amazon Web Services Account under Security Credentials Access Credentials Access Keys. Your 12-digit Amazon Web Services account ID number in your Amazon Web Services Account under Security Credentials Account Identifiers. PEM-encoded private key upload. Obtain this private key from your Amazon Web Services Account by creating a new under Security Credentials Access Credentials X.509 certificates. PEM-encoded certificate file upload. Obtain this certificate from your Amazon Web Services Account under Security Credentials Access Credentials X.509 certificates.

Secret access key

Account number

Key

Certificate

T able 4 .3. Required authentication details for RHEV-M and VMWare vSphere Authentication Field Username Password Description User with administrative access to the Provider. T he password associated with the user.

8. T ype the Priority for your Cloud Resource Provider. T his defines the weighted probability that CloudForms Cloud Engine utilizes a cloud resource provider over others. Acceptable values range from -100 to 100, with lower values contributing to a higher probability. For example, a set of three providers with an equal priority of 0 yields a 33.33 per cent chance of selection. However, a set of three providers with priority values of -1, 0 and 1 yields respective probabilities of 33.67 per cent, 33.33 per cent and 33 per cent. 9. T ype the Quota for this account. T he quota defines the limit of instances for this account. 10. Click the Save button to save your new resource provider account configuration. CloudForms Cloud Engine saves the cloud resource provider account details. Associate this account with cloud resource zones in your CloudForms Cloud Engine environment. Report a bug 4 .2.4 .2. Adding an Audrey Configuration Server to a Resource Provider Account T his procedure adds Audrey configuration server authentication to a cloud resource provider account. T his enables an instance with Audrey Agent to communicate with CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider. 4. Click on Accounts for your chosen cloud resource provider.

27

CloudForms 1.1 Cloud Engine User Guide

5. Click the desired account link in the Account Nam e column. T he cloud resource provider account information displays. 6. Click the Add link for the Config Server option. 7. Enter the Server Endpoint (URL) for your configuration server. 8. Enter the Consum er Key for your configuration server. 9. Enter the Consum er Secret for your configuration server. 10. Click the Save button. CloudForms Cloud Engine tests the connection to the configuration server and saves your details. CloudForms Cloud Engine adds the configuration server authentication details to your chosen cloud resource provider account. Report a bug 4 .2.4 .3. Editing Audrey Configuration Server Details T his procedure edits Audrey configuration server authentication for a cloud resource provider account. 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider. 4. Click on Accounts. 5. Click the desired account link in the Account Nam e column. T he cloud resource provider account information displays including Config Server details. 6. Click the Edit link for the Config Server option. 7. Modify the Audrey configuration server settings. 8. Click the Save button. CloudForms Cloud Engine tests the connection to the configuration server and saves your details. CloudForms Cloud Engine saves the modified configuration server authentication details for your cloud resource provider account. Report a bug 4 .2.4 .4 . Delete Audrey Configuration Server Details T his procedure removes Audrey configuration server authentication from a cloud resource provider account. 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider. 4. Click on Accounts. 5. Click the desired account link in the Account Nam e column. 6. T he cloud resource provider account information displays including Config Server details. Click the Delete link for the Config Server option. 7. An alert box displays:
Are you sure you want to delete this config server?

Click OK.

28

Chapter 4. Cloud Resources

CloudForms Cloud Engine removes the configuration server authentication details from your cloud resource provider account. Report a bug

4.3. Cloud Resource Profiles


4 .3.1. Cloud Resource Profiles CloudForms Cloud Engine provides the ability to define cloud resource profiles for your deployments. A cloud resource profile abstracts hardware configuration settings across multiple providers in the cloud and applies them to a virtual machine instance during deployment to a cloud resource provider. Each cloud resource profile contains a minimum value set for memory, CPUs, storage and architecture. CloudForms Cloud Engine matches this valueset with the closest predefined profile from each provider. Report a bug 4 .3.2. Creating a New Cloud Resource Profile

Figure 4 .4 . Cloud resource profile creation

T his procedure creates a cloud resource profile in CloudForms Cloud Engine . CloudForms Cloud Engine matches this cloud resource profile against profiles from your resource providers, which determines the optimal environments for application deployments. 1. Click on the Administer tab.

29

CloudForms 1.1 Cloud Engine User Guide

2. Click on Content . 3. Click on Hardware . 4. Click the New Cloud Resource Profile button. 5. T ype the Nam e of the cloud resource profile. 6. T ype the amount of Mem ory for the cloud resource profile. 7. T ype the number of CPUs for the cloud resource profile. 8. T ype the Storage size in gigabytes. 9. Select the type of system Architecture for the profile. Choose from 32-bit (i386 ) or 64-bit (x86_64 ). 10. Click the Check Matches button to show profiles from cloud resource providers that match your desired configuration. 11. Click the Save button to save your new cloud resource profiles configuration. CloudForms Cloud Engine creates a new cloud resource profile. T his profile defines abstracted hardware specifications for instances in an application deployment.

Note
Some private cloud resources providers might not match cloud resource profiles if a user enters storage data. Leave the Storage field blank in these cases.

Report a bug

4.4. Cloud Resource Clusters


4 .4 .1. Cloud Resource Clusters A cloud resource cluster is a provider-specific method of grouping cloud resources. Cloud resource clusters contain either cloud resource providers, such as Amazon EC2 or Red Hat Enterprise Virtualization, or their specific availability zones or datacenters, such as Amazon EC2 regions or data centers in a Red Hat Enterprise Virtualization environment. CloudForms Cloud Engine uses cloud resource clusters to launch deployments into a specific provider or datacenter. If a cloud resource cluster contains more than one mapping, CloudForms Cloud Engine selects the mapping based on provider account priority. T his provides a CloudForms Cloud Engine administrator with the ability to group cloud resources from several provider accounts and provider-specific groups under a single cloud resource cluster. CloudForms Cloud Engine contains locations for two different sets of Cloud Resource Cluster information. Please note the difference between the two locations. Each provider account under Cloud Resource Providers shows a set of Provider Realm s, which displays information on all available (clusters or availability zones) for a specific provider. Under Content, Cloud Resource Clusters shows the user-defined mappings from the available clusters. CloudForms Cloud Engine users select the appropriate Cloud Resource Cluster section based upon this distinction. Report a bug

30

Chapter 4. Cloud Resources

4 .4 .2. Setting up a Cloud Resource Cluster

Important
T o launch in a specific cluster, ensure to define only the cluster mapping and not the provider mapping.

Figure 4 .5. Cloud resource cluster creation

T his procedure creates a cloud resource cluster in CloudForms Cloud Engine and maps it to a specific cloud resource provider. 1. Create a cloud resource cluster: a. Click on the Administer tab. b. Click on Content . c. Click on Cloud Resource Clusters. d. Click the New Cloud Resource Clusters button. e. Provide your cluster with a valid Nam e . f. Provide your cluster with an optional Description . g. Click the Save button to save your new cloud resource cluster. 2. Map a cloud resource cluster: a. Option 1: Click Add m apping to cloud resource provider to map your cloud resource cluster to a cloud resource provider. Select a cloud resource provider and Save . b. Option 2: Click Add m apping to cloud resource cluster to map your cloud resource cluster to a list of predefined clusters from your cloud resource providers. Select a cluster and click Save . 3. T o delete a mapping or several mappings, select each mapping using the checkboxes on the left and click Delete .

31

CloudForms 1.1 Cloud Engine User Guide

CloudForms Cloud Engine creates a cloud resource cluster that contains one or more mappings. Report a bug

4.5. Clouds
4 .5.1. Clouds CloudForms Cloud Engine provides the ability to define clouds to group your cloud resource zones.

Figure 4 .6. Cloud resource zones organized into clouds

A cloud streamlines the setup of a multiple cloud resource zones to connect with a common set of cloud resource provider accounts. A cloud contains multiple cloud resource zones but each cloud resource zone belongs to one cloud only. Clouds are associated with multiple cloud resource provider accounts, and cloud resource provider accounts deliver resources to multiple clouds. An administrator chooses a single cloud, instead of having to choose several provider accounts, during cloud resource zone creation. A cloud has an instance quota to limit provider resources delivered to cloud resource zones. Report a bug 4 .5.2. Creating a New Cloud

32

Chapter 5. Component Outlines

Figure 4 .7. Cloud creation

T his procedure creates a new cloud in CloudForms Cloud Engine . A cloud organizes your cloud resource zones into groups that assign resources from chosen cloud resource providers. 1. Click on the Administer tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click the New Cloud button. 4. Specify a valid Cloud Nam e . 5. Specify the Maxim um Running Instances. Leave this field blank for unlimited instances. 6. Click the Save button to save your new cloud. CloudForms creates a new cloud. Report a bug 4 .5.3. Associating a Cloud with a Cloud Resource Provider Account T his procedure adds an account to a cloud in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click on the name of your chosen cloud. 4. Click on Accounts. T he list of cloud resource provider accounts associated with this cloud displays in a tabled format. 5. Click the Add Account button. A list of unassociated cloud resource provider accounts displays in a tabled format. 6. Select the checkboxes for all cloud resource provider accounts to associate with your chosen cloud. 7. Click the Add Account button to add your selected cloud resource provider accounts. Report a bug

33

CloudForms 1.1 Cloud Engine User Guide

4.6. Cloud Resource Zones


4 .6.1. Cloud Resource Z ones CloudForms Cloud Engine provides the ability to define cloud resource zones to group your deployments. A cloud resource zone is a logical container for application deployments. CloudForms Cloud Engine launches a deployment to a zone only if the zone's cloud contains sufficient cloud provider resources to satisfy a deployment's cloud resource profile. CloudForms also enforces a quota for each zone to define the maximum number of instances generated from application deployments. Report a bug 4 .6.2. Creating a Cloud Resource Z one

Figure 4 .8. Cloud resource zone creation

T his procedure creates a new cloud resource zone in CloudForms Cloud Engine . T his cloud resource zone contains your application deployments. 1. Click on the Administer application tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click the New Cloud Resource Zone button for a chosen cloud. 4. Specify a valid Nam e for the resource zone. 5. Change the Cloud from the drop-down selector if necessary. 6. Specify the Quota of maximum instances in the resource zone. Click unlim ited for unlimited instances. 7. Check the Cloud Resource Zone enabled? checkbox to set the resource zone to an active state. 8. Click the Save button to save the new cloud resource zone.

34

Chapter 5. Component Outlines

CloudForms Cloud Engine creates a new cloud resource zone in your chosen cloud. T he creation of a cloud resource zone provides a CloudForms user with a means to organize and launch deployments. Report a bug 4 .6.3. Provider Selection Strategies 4 .6.3.1. Creating a Provider Selection Strategy CloudForms Cloud Engine uses provider selection strategies to decide how to select an appropriate provider for launching applications into a cloud resource zone. T his procedure shows how to setup provider selection strategies. 1. Click on the Administer application tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click the Edit button for a chosen cloud resource zone. 4. Click the Cloud Resource Provider Selection button. T he Cloud Resource Provider Selection Strategies page displays. T his includes a list of Available Cloud Resource Provider Accounts assigned to the parent cloud and a list of Available Strategies for the cloud resource zone. 5. Enable or disable any number of Available Strategies for the cloud resource zone using the on/off switches on the left. CloudForms Cloud Engine saves these selections automatically. T his applies a set of strategies to the cloud resource zone. Report a bug 4 .6.3.2. Penalty for Failure Strategy T he Penalty for Failure strategy determines which cloud resource provider accounts have failed over a certain period of time and avoids them for future deployment of applications. T his procedure shows how to setup the Penalty for Failure strategy. 1. Click the Administer application tab. 2. Click the Clouds. T his displays a list of your clouds. 3. Click the Edit button for a chosen cloud resource zone. 4. Click the Cloud Resource Provider Selection button. T he Cloud Resource Provider Selection Strategies page displays. 5. Enable the Penalty for Failure strategy using the on/off switch on the left. 6. A Configure button appears for the newly enabled Penalty for Failure strategy. Click the Configure button. 7. T he Edit Penalty for Failure Strategy page appears. Enter your desired values for the following options. Percentage penalty for each failure Adds a penalty to the provider account. T his helps determine the provider account with the highest chance of success. For example, CloudForms Cloud Engine will choose a provider account with a 10 per cent fail rate over a provider account with a 30 per cent fail rate. T ime period over which the failures are aggregated (in minutes)

35

CloudForms 1.1 Cloud Engine User Guide

T he time period to gauge past failures. For example, entering 24 0 includes all failures within the last 240 minute period. T he number of failures before the Cloud Resource Provider Account should not be used T he maximum number of failures for a provider account before CloudForms Cloud Engine disregards it. 8. Click the Save button to save your strategy. T his applies the Penalty for Failure strategy to the cloud resource zone. Report a bug

36

Chapter 5. Component Outlines

Chapter 5. Component Outlines


5.1. Component Outlines
CloudForms Cloud Engine builds images from a component outline file. A component outline is configuration file with settings that correspond to a list of packages and system architecture for a virtual machine. CloudForms Cloud Engine builds a component outline into an image, which a CloudForms Cloud Engine user deploys as virtual machine instances. A component outline uses T emplate Description Language (T DL) to represent a system. T DL is an XMLbased language to create component outlines for CloudForms. T DL files define aspects of a virtual machine instance including operating system, installation settings, packages, and files. Report a bug

5.2. Creating a Component Outline


T his task manually creates a new component outline file. 1. Open a text editor and create a new file. 2. Start a component outline with XML declaration and an open tem plate tag:
<?xml version="1.0" encoding="UTF-8"?> <template>

3. Provide the component outline with a nam e and an optional description :


<name>MyImage</name> <description>My Custom Image</description>

4. Define os elements:
<os> <name>RHEL-6</name> <version>2</version> <arch>x86_64</arch> <install type="iso"> <url>http://www.example.com/isos/RHEL_6.2_x86_64.iso</url> <md5sum>3b85ec9ab2984b91070128be6aae25eb</md5sum> </install> <rootpw>p@55w0rd!</rootpw> </os>

Note
Ensue to select an appropriate nam e value and version value. For more information on all values, refer to Example Component Outlines or Chapter 13. 5. Define custom repositories for additional packages:

37

CloudForms 1.1 Cloud Engine User Guide

<repositories> <repository name="MyRepo"> <url>http://www.example.com/repo/</url> <signed>false</signed> </repository> ... </repositories>

Note
Ensue to use a fully-qualified domain name for the url instead of localhost when referring to any repositories hosted on the CloudForms Cloud Engine host. Using localhost refers to the guest image and not to the Cloud Engine host. 6. Define additional packages:
<packages> <package name="httpd"/> <package name="custom-app"> <repository>MyRepo</repository> </package> ... </packages>

Note
T he httpd package is installed from the main installation media while the custom-app package is installed from the MyRepo repository specified in repositories 7. Define files to save post-installation:
<files> <file name="/dir/filename" type="raw"> ** Content for your file ** </file> ... </files>

8. Define com m ands to execute post-installation:


<commands> <command name="HTTP Server On" type="raw"> chkconfig httpd on </command> <command name="Copy File" type="raw"> cp /dir/filename /dir/filecopy </command> ... </commands>

9. Close the component outline with a closing tem plate tag:

38

Chapter 5. Component Outlines

</template>

10. Save the component outline file. A new component outline is created. Import this component outline to CloudForms Cloud Engine to create images for your instances. Report a bug

5.3. Example Component Outlines


5.3.1. Red Hat Enterprise Linux 6.3 via URL
<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL6-3</name> <description>A Red Hat Enterprise Linux 6.3 image</description> <os> <name>RHEL-6</name> <version>3</version> <arch>x86_64</arch> <install type='url'> <url>http://example.org/rhel-6-x86_64</url> </install> <rootpw>p@55w0rd!</rootpw> </os> </template>

Report a bug 5.3.2. Red Hat Enterprise Linux 5.8 via ISO
<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL5</name> <description>A Red Hat Enterprise Linux 5.8 image</description> <os> <name>RHEL-5</name> <version>U8</version> <arch>x86_64</arch> <install type='iso'> <iso>http://example.org/rhel-5.8-x86_64.iso</iso> </install> <rootpw>p@55w0rd!</rootpw> </os> </template>

Report a bug 5.3.3. Red Hat Enterprise Linux 6.3 with Audrey Agent

39

CloudForms 1.1 Cloud Engine User Guide

<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL6-3</name> <description>A Red Hat Enterprise Linux 6.3 image</description> <os> <name>RHEL-6</name> <version>3</version> <arch>x86_64</arch> <install type='url'> <url>http://example.org/rhel-6-x86_64</url> </install> <rootpw>p@55w0rd!</rootpw> </os> <packages> <package name='aeolus-audrey-agent'/> </packages> <repository name='aeolusrepo'> <url> http://repos.example.org/repos/aeolus/ conductor/latest-release/RHEL-6.3/x86_64/ </url> <signed>False</signed> </repository> <commands> <command name="RHEL6.3 updates" type="raw">yum update -y</command> </commands> </template>

Note
T he com m and section of this component outline instructs the virtual machine to update upon booting.

Report a bug 5.3.4 . Red Hat Enterprise Linux 6.3 with HT T P Web Server

40

Chapter 5. Component Outlines

<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL6Web</name> <description>A RHEL 6.3 image with a web server</description> <os> <name>RHEL-6</name> <version>3</version> <arch>x86_64</arch> <install type='url'> <url>http://example.org/rhel-6-x86_64</url> </install> <rootpw>p@55w0rd!</rootpw> </os> <packages> <package name="httpd"/> </packages> <files> <file name="/var/www/html/index.html" type="raw"><![CDATA[ <html> <head> <title>Welcome!</title> </head> <body> <p>Welcome to my webserver!</p> </body> </html> ]]></file> </files> <commands> <command name="HTTP Server On" type ="raw">chkconfig httpd on</command> </commands> </template>

Note
T he com m and section of this component outline instructs the HT T P Web Server to start at boot.

Report a bug 5.3.5. Red Hat Enterprise Linux 6.3 with vm-tools agent (VMware vSphere)

41

CloudForms 1.1 Cloud Engine User Guide

<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL6-3</name> <description>A Red Hat Enterprise Linux 6.3 image</description> <os> <name>RHEL-6</name> <version>3</version> <arch>x86_64</arch> <install type='url'> <url>http://example.org/rhel-6-x86_64</url> </install> <rootpw>p@55w0rd!</rootpw> </os> <packages> <package name='open-vm-tools'/> </packages> <repository name='vm-toolsrepo'> <url>http://repos.example.org/repos/</url> <signed>False</signed> </repository> </template>

Note
T his template installs vm-tools agent . Install this package to have VMware vSphere support more functions.

Report a bug 5.3.6. Red Hat Enterprise Linux 6.3 with rhev-agent (RHEV)
<?xml version="1.0" encoding="UTF-8"?> <template> <name>RHEL6-3</name> <description>A Red Hat Enterprise Linux 6.3 image</description> <os> <name>RHEL-6</name> <version>3</version> <arch>x86_64</arch> <install type='url'> <url>http://example.org/rhel-6-x86_64</url> </install> <rootpw>p@55w0rd!</rootpw> </os> <packages> <package name='rhev-agent'/> </packages> <repository name='rhev-agentrepo'> <url>http://repos.example.org/repos/</url> <signed>False</signed> </repository> </template>

42

Chapter 5. Component Outlines

Note
T his template installs rhev-agent . Install this package to have Red Hat Enterprise Virtualization support more functions.

Report a bug

5.4. Including Target-Specific Packages and Repositories for Component Outlines


Some images might require certain packages and repositories based upon a target criteria. CloudForm Cloud Engine provides the ability to automatically include this content into component outlines without requiring constant inclusion within each individual component outline. T he /etc/im agefactory/target_content.xm l file defines the content to include in targetspecific images. If this file does not exist, create it. T he target_content.xm l file is a standard XML document containing a root tem plate_includes element and several include sub-elements. Each include sub-element defines a target criteria and content for inclusion. T his content definition uses the standard T DL packages and repositories elements.
<template_includes> <include target='...' os='...' version='...' arch='...'> <packages> ... </packages> <repositories> ... </repositories> </include> <include target='...' os='...' version='...' arch='...'> <packages> ... </packages> <repositories> ... </repositories> </include> </template_includes>

T he include element contains several attributes to use as criteria.

43

CloudForms 1.1 Cloud Engine User Guide

T able 5.1. Attributes for target-specific criteria Element target os version arch Description T he target provider for the image. Use ec2 , rhevm and vsphere to choose a target image type. Use all for all images. T he operating system for the image. Aligns with the T DL os element in component outlines. T he version for the operating system. Aligns with the T DL version element in component outlines. T he architecture for the operating system. Aligns with the T DL arch element in component outlines.

CloudForms Cloud Engine chooses the target-specific inclusion that closest matches the defined T DL elements in the following order of priority: target (highest), os, version and arch (lowest). If lower priority attributes are not defined, CloudForms Cloud Engine ignores this attribute and matches based upon higher priority attributes. For example, if the arch is omitted, the criteria matches to target, os and version .

Important
All include elements require the target at minimum. Ensure each include contains a target.

44

Chapter 5. Component Outlines

Example 5.1. Sample target_content.xml file T he following target_content.xm l extract defines packages to include that are specific to various combinations of Red Hat Enterprise Linux 5 and 6 targeted to Amazon EC2 and Red Hat Enterprise Virtualization providers.
<template_includes> <include target='ec2' os='RHEL-6'> <packages> <package name='my-rhel6-package-for-ec2'/> </packages> </include> <include target='rhevm' os='RHEL-6'> <packages> <package name='my-rhel6-package-for-rhevm'/> </packages> </include> <include target='ec2' os='RHEL-5'> <packages> <package name='my-rhel5-package-for-ec2'/> </packages> </include> <include target='rhevm' os='RHEL-5'> <packages> <package name='my-rhel5-package-for-rhevm'/> </packages> </include> </template_includes>

Note the omitted version and arch attributes. T his creates a broader target specification criteria for the packages.

Report a bug

5.5. Exporting a Component Outline from System Engine


5.5.1. About CloudForms System Engine CloudForms System Engine is an Infrastructure-as-a-Service (IaaS) application that provides tools to update systems within hybrid clouds. System Engine can be used to configure new systems, subscribe to updates, and maintain installations in distributed environments. Report a bug 5.5.2. System T emplates A system template defines the subscribed products and installed packages for a system in CloudForms System Engine . Once CloudForms System Engine creates and exports a system template, a user imports it into CloudForms Cloud Engine as a component outline. CloudForms Cloud Engine uses this component outline to create images with the same subscribed products and packages. Report a bug

45

CloudForms 1.1 Cloud Engine User Guide

5.5.3. Exporting a System T emplate T his procedure exports a system template from CloudForms System Engine as a new T emplate Description Language (T DL) component outline. CloudForms Cloud Engine uses this component outline to generate images for deployment to resource providers.

Warning
Adding certain packages in CloudForms System Engine templates can upgrade the kernel on EC2 images, which can cause boot failure and render the image useless. Red Hat does not support upgrading the kernel of EC2 instances outside of Red Hat Update Infrastructure . Procedure 5.1. Exporting a System T emplate 1. Click Content System T emplates. 2. A list of system templates is displayed under the System Templates menu on the right. Select the system template you wish to export. 3. Click the Download button at the bottom of the menu. 4. Select the environment you want to download your template from. 5. Click the Download button. 6. Save the system template into your local machine. A system template is exported to your local machine.

Note
Debug Certificates are automatically generated for system template downloads if they do not already exist in the organization for which they are being downloaded.

Report a bug 5.5.4 . Importing a CloudForms System Engine Component Outline into CloudForms Cloud Engine CloudForms System Engine component outlines function the same as standard T DL component outlines. Refer to the next section for instructions on building T DL component outlines into CloudForms Cloud Engine images. Report a bug

5.6. Images
5.6.1. Images A CloudForms Cloud Engine user builds a T DL file into an image, which contains a series of providerspecific target images. T hese target images are pushed and stored with their respective cloud resource providers. Images

46

Chapter 5. Component Outlines

An image is a virtual machine base built from a T emplate Description Language (T DL) file. CloudForms Cloud Engine deploys images as virtual machine instances on Cloud Resource Providers.

Figure 5.1. T he CloudForms Cloud Engine process for building and pushing images

An image in CloudForms Cloud Engine contains the following parts: Build CloudForms Cloud Engine records each image created from a template as an individual build. Each build includes individual images for specific providers. T his means CloudForms Cloud Engine generates images for multiple providers based upon a single template.

T arget Image A target image is an image built for a specific cloud resource provider type. For example, CloudForms Cloud Engine has the ability to create target images for both Amazon EC2 and Red Hat Enterprise Virtualization Manager as part of a single build. T hese target images are pushed to their respective cloud resource providers for deployment.

47

CloudForms 1.1 Cloud Engine User Guide

Provider Image A provider image is an image pushed and stored on a cloud resource provider. CloudForms Cloud Engine uses the chosen provider image to deploy virtual machine instances.

Report a bug 5.6.2. Building an Image from a Component Outline T he following procedure demonstrates how to load a T DL component outline and build it into an image for a specific cloud resource provider. 1. Initial steps: a. Ensure CloudForms can access your T DL file either from your client machine or from a URL. b. Click on the Administer tab. c. Click on Clouds. T his displays a list of your clouds. d. Click on New Image for a chosen cloud. 2. Option 1: Import the component outline from a file upload:

Figure 5.2. Upload a component outline from a file

a. T ype a Nam e for your image. b. Click Browse and select your component outline. c. Select the Edit this file before saving checkbox to edit the component outline before saving it to the database. 3. Option 2: Import the component outline From URL:

48

Chapter 5. Component Outlines

Figure 5.3. Upload a component outline from a URL

a. T ype a Nam e for your image. b. T ype the Com ponent Outline URL for your component outline. c. Select the Edit this file before saving checkbox to edit the component outline before saving it to the database. 4. Edit the component outline: a. Edit the imported T emplate Description Language (T DL) XML in the textbox provided. b. Click the Save and Continue to complete the component outline import. 5. Verifying the image a. CloudForms Cloud Engine verifies a valid image from your component outline. b. Click Save Com ponent Outline to save the component outline and create an image. c. T he Image Properties screen displays. Click the Build for each target image you wish to build or click Build All to build all target images. CloudForms Cloud Engine loads your component outline and builds it into an image. Report a bug 5.6.3. Pushing an Image to a Cloud Resource Provider

49

CloudForms 1.1 Cloud Engine User Guide

Figure 5.4 . Click the Push button to push an image to a cloud resource provider

T his procedure pushes an image to a cloud resource provider. 1. Click on the Administer tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click on Images. A list of images stored in CloudForms Cloud Engine displays. 4. Click the Nam e of an image. T he image detail screen displays. 5. Click the Push button to push a target image to its cloud resource provider. 6. Wait for CloudForms Cloud Engine to complete the image push. CloudForms Cloud Engine pushes your target image to your cloud resource provider.

Note
CloudForms Cloud Engine uses snapshots of Amazon Machine Images when pushing images to EC2 cloud resource providers. CloudForms Cloud Engine does not support image uploads to EC2 cloud resource providers.

Report a bug 5.6.4 . Importing an Image from a Cloud Resource Provider T his procedure imports an image from a cloud resource provider. 1. Click on the Administer tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click on name of cloud. A list of images stored in CloudForms Cloud Engine displays. 4. Click on Images. T his displays a list of images for your chosen cloud. 5. Click the Im port Im age button.

50

Chapter 5. Component Outlines

6. Choose a Cloud Resource Provider Account from the drop-down selector. 7. Enter the Cloud Resource Provider's Im age ID from your cloud resource provider. 8. Enter a valid Im age Nam e . 9. Click Continue to import the component outline. CloudForms Cloud Engine imports your image from your cloud resource provider.

Note
Each cloud in the Clouds section contains an Im port Im age shortcut.

Note
Imported images from cloud resource providers require Audrey Agent to work with Aeolus Configuration Server. Runtime configuration is available only on instances with the Audrey Agent.

51

CloudForms 1.1 Cloud Engine User Guide

Important
T he Com ponent Outline ID refers to the image or template ID for your cloud resource providers. Amazon EC2 providers require the format am i-xxxxxxx for component outline identification. Find these am i-xxxxxxx values in your Amazon Web Services (AWS) Management Console. Red Hat Enterprise Virtualization providers require a template UUID for the image. Access a list of these UUIDs via the Red Hat Enterprise Virtualization Manager's REST API as per the following steps. 1. Ensure you have the proper SSL certification imported on your client. T o obtain a certificate from Red Hat Enterprise Virtualization Manager, follow the instructions in Section 2.1. TLS/SSL Certification of the Red Hat Enterprise Virtualization 3.0 REST API Guide. Import the certificate using the following command:
# certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "Red Hat Enterprise Virtualization Manager" -i [CERT-FILE]

2. View a list of template UUIDs using the following command on your Red Hat Enterprise Virtualization Manager's REST API:
# curl https://[RHEVM-HOST]/api/templates --user [USER]@ [DOMAIN]:[PASSWORD]

T o search for template with a specific name, use the following command:
# curl https://[RHEVM-HOST]/api/templates?search=name%3D[TEMPLATE-NAME] --user [USER]@ [DOMAIN]:[PASSWORD]

T he API returns an XML representation of each template and its UUID:


<templates> <template id="[UUID]" href="/api/templates/[UUID]"> <name>Template_01</name> ... </template> <template id="[UUID]" href="/api/templates/[UUID]"> <name>Template_02</name> ... </template> ... </templates>

Use this UUID as the Com ponent Outline ID for CloudForms Cloud Engine imports.

Report a bug 5.6.5. Deleting an Image from CloudForms Cloud Engine T he following procedure demonstrates how to delete an image from CloudForms Cloud Engine . 1. Initial steps: a. Click on the Administer tab. b. Click on Clouds.

52

Chapter 5. Component Outlines

c. Click on Images. d. Click on the image template name you want to delete. 2. Option 1: Delete a target image and all associated provider image records: a. Click on Delete next to the Cloud Provider type name.

Note
While all associated image records are deleted, the image template is not deleted, and is available for reuse. 3. Option 2: Delete a single provider image record: a. Click on the X mark next to the provider image for deletion. 4. Option 3: Delete an image template and all associated image records: a. Click on the red Delete .

Warning
All associated image records, including the image template will be deleted. b. Click on OK when prompted

Important
All three delete options only delete image records from the client's side. If you want to delete image records from both the client and provider's side, go to the provider's management console, and use the Component Outline UUID to search and delete the image records.

Report a bug

5.7. Using the Command Line Tool


5.7.1. Command Line T ool (aeolus) CloudForms Cloud Engine uses a command-line interface application (aeolus) as a basis for building and pushing to cloud resource providers. Report a bug 5.7.2. Building an Image via Command Line T his task uses the aeolus command line tool to build a T emplate Descriptor Language (T DL) file into an image for a cloud resource provider. 1. Ensure the T DL file is stored in a location aeolus can access on your CloudForms Cloud Engine host. 2. Run the following command:
# aeolus image build --target [TARGET] --template [FILENAME]

53

CloudForms 1.1 Cloud Engine User Guide

T he following output displays for building an Amazon EC2 image:


# aeolus image build --target ec2 --template ec2-template.xml Target Image Target Status ------------------------------------------------749799f5-5096-4ce4-8c96-7da8365e7f80 ec2 COMPLETED Image ------------------------------------a01199a4-9bd0-46ae-9665-df07034a9357 26f3d3e9ff10 # Build ---------------------------------f9e1ceec-8073-4299-8ab8-

CloudForms Cloud Engine creates a new image from the template. T his image contains a build, which includes target images for specific cloud resource provider types. aeolus builds the T DL file and pushes the resulting image to the cloud resource provider. Report a bug 5.7.3. Pushing an Image via Command Line T his task uses the aeolus command line tool to push a built image to the cloud resource provider. 1. Run the following command:
# aeolus image push --account [ACCOUNT] --image [IMAGE-UUID]

T he following output displays for a push to an Amazon EC2 account:


# aeolus image push --account ec2 --image df07034a9357 ID -----------------------------------1154c01e-c05d-45eb-9563-aac4e03b0688 Account ------ec2 # Status -----New a01199a4-9bd0-46ae-9665Provider ------------ec2-us-east-1

Image -----------------------------------a01199a4-9bd0-46ae-9665-df07034a9357

CloudForms Cloud Engine starts the process to push all target images associated with the chosen image to their respective providers. 2. T o view the progress of the push, run the following command:
# tail -f /var/log/imagefactory.log /var/log/iwhd.log

T his command outputs a continuous update of the logs associated with image building and pushing. T he push will finish with the following line:
2011-11-24 15:18:20,769 DEBUG imgfac.ImageWarehouse.ImageWarehouse pid(1226) Message: Setting metadata ({'latest_unpushed': None}) for http://localhost:9090/images/caeabf4b-8b7f-404f-b06b-b4b4607d9445

54

Chapter 5. Component Outlines

Press CT RL-C to return to the command prompt. aeolus pushes the built image to the cloud resource provider. Report a bug 5.7.4 . Command Line Reference 5.7.4 .1. Command Line Syntax Use the following syntax to run aeolus functions:
# aeolus [ACTION-TYPE] [COMMAND] [GENERAL-OPTIONS] [COMMAND-OPTIONS]

T he following table outlines the action type for aeolus. T able 5.2. aeolus action type Command im age Description Actions related to image builds, pushes, and imports.

T he following table outlines the commands for aeolus im age . T able 5.3. aeolus commands Command list build push im port delete Description List resources such as images, image targets, cloud resource providers, resource provider accounts. Build an image from a T DL file. Push a built image to a cloud resource provider. Import an image from a cloud resource provider. Delete a built image.

Report a bug 5.7.4 .2. List Options Use the following options with the list command. List options -i, --images Retrieve a list of all images. -E, --environment ENVIRONMENT Limit image list to environment. -b, --builds IMAGEID Retrieve a list of all builds for an image. Requires the UUID of an image.

55

CloudForms 1.1 Cloud Engine User Guide

-t, --targetimages BUILDID Retrieve a list of all target images for a build. Requires the UUID of a build. -P, --providerimages TARGETIMAGE Retrieve a list of all provider images for a target image. Requires the UUID of a target image. -g, --targets Retrieve a list of all cloud resource provider types. -p, --providers Retrieve a list of cloud resource provider connections in CloudForms Cloud Engine . -a, --accounts Retrieve a list of cloud resource provider accounts in CloudForms Cloud Engine . -c, --environments Retrieve a list of clouds in CloudForms Cloud Engine .

56

Chapter 5. Component Outlines

Example 5.2. Examples for list command List images:


# aeolus image list --images

List builds:
# aeolus image list --builds 29f75966-52b7-11e1-8b34-001a4a400e1c

List target images:


# aeolus image list --targetimages 5537e55a-8e7b-4030-b4e8-8e062a5c99e8

List provider images:


# aeolus image list --providerimages 5c0c27db-161b-4421-8dfb-2f551b74f296

List provider types:


# aeolus image list --targets

List cloud resource providers:


# aeolus image list --providers

List cloud resource provider accounts:


# aeolus image list --accounts

List clouds:
# aeolus image list --environments

Report a bug 5.7.4 .3. Build Options Use the following options with the build command. Build options -e, --template FILE Build an image from a T DL file. Requires a the local location of a T DL file. -z, --no-validation Disable T DL validation of template file. -T , --target TARGET1,TARGET2 Disable T DL validation of template file.

57

CloudForms 1.1 Cloud Engine User Guide

-E, --environment ENVIRONMENT Build for specific cloud.

Example 5.3. Examples for build command Build image for a cloud resource provider:
# aeolus image build --target ec2 --template mytemplate.xml --environment default

Build image for multiple cloud resource providers:


# aeolus image build --target ec2,rhevm --template mytemplate.xml --environment default

Report a bug 5.7.4 .4 . Push Options Use the following options with the push command. Push options -I, --image IMAGEID Use base image for the push. Requires the UUID of an image. -B, --build BUILDID Use build for the push. Requires the UUID of a build. -t, --targetimages TARGETID Use target image from a build. Requires the UUID of a target image. -A, --account NAME1,NAME2 Name of cloud resource provider accounts to use for pushing target images. Ensure a target image exists for each account.

58

Chapter 6. Applications

Example 5.4 . Examples for push command Push target image to an account:
# aeolus image push --account myaccount --targetimage 5c0c27db-161b-4421-8dfb2f551b74f296

Push target images from a build to accounts:


# aeolus image push --account myaccount --build 5537e55a-8e7b-4030-b4e88e062a5c99e8

Push target images from an image to accounts:


# aeolus image push --account myaccount --image 29f75966-52b7-11e1-8b34001a4a400e1c

Report a bug 5.7.4 .5. Import Options Use the following options with the im port command. Import options -d, --id ID T he ID for a given object. T able 5.4 . IDs for Import to CloudForms Cloud Engine Provider Amazon EC2 Red Hat Enterprise Virtualization VMware vSphere ID T ype Amazon Machine Image (AMI) ID T emplate UUID T emplate UUID Example ami-79af0410 99408929-82cf-4dc7-a532-9d998063fa95 99408929-82cf-4dc7-a532-9d998063fa95

-r, --description DESCRIPTION T he XML description for an object. -A, --account NAME1,NAME2 Names of the cloud resource provider accounts to use for imports. -E, --environment ENVIRONMENT Name of the clouds to use for imports.

59

CloudForms 1.1 Cloud Engine User Guide

Example 5.5. Examples for im port command Import image from a provider:
# aeolus image import --account my-ec2 --environment default --id ami-8d0cdce4 --description '<image><name>myAMI</name></image>'

Report a bug 5.7.4 .6. Delete Options Use the following options with the delete command. Delete options -I, --image IMAGEID Delete an image and all associated builds. -B, --build BUILDID Delete a single build and all associated target images. -m, --targetimage TARGETID Delete a single target image from a build and all associated cloud resource provider images. -D, --providerimage PROVIDERIMAGEID Delete a single image on a cloud resource provider.

Example 5.6. Examples for delete command Delete image:


# aeolus image delete --image 29f75966-52b7-11e1-8b34-001a4a400e1c

Delete build:
# aeolus image delete --build 5537e55a-8e7b-4030-b4e8-8e062a5c99e8

Delete target image:


# aeolus image delete --targetimage 5c0c27db-161b-4421-8dfb-2f551b74f296

Delete provider image:


# aeolus image delete --providerimage 9085b2d3-5edd-4d8d-8344-095d5b5bb00e

Report a bug

60

Chapter 6. Applications

61

CloudForms 1.1 Cloud Engine User Guide

Chapter 6. Applications
6.1. Applications
An application is the result of a CloudForms process. An application is an instance, or set of instances, launched on a cloud resource provider. CloudForms imports an application blueprint identifying the built component outline and desired hardware profile, and launches the application into a chosen cluster. CloudForms selects a resource provider from the chosen cluster that best fits a cloud resource profile's requirements. CloudForms then launches the application's instances into the cloud resource provider. T his chapter examines the process of creating application deployments. T his process includes the following stages: 1. Create a catalog for application blueprints. 2. Assign images to application blueprints to define instances in an application. 3. Create an application from an application blueprint and deploy it to a cloud resource provider. Report a bug

6.2. Catalogs
6.2.1. Catalogs CloudForms Cloud Engine creates catalogs to group your application blueprints. A catalog is a collection of application blueprints. T hese blueprints define the deployment configuration of a set of systems in an application. CloudForms administrators define a series of application blueprints, each containing a reference to a component outline. T hese blueprints simplify the process of launching an application to a cloud resource provider. Report a bug 6.2.2. Creating a Catalog T his procedure creates a new catalog with CloudForms Cloud Engine . Catalogs contain application blueprints.

Figure 6.1. New catalog creation

62

Chapter 6. Applications

1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Click the New Catalog button. 4. Specify a valid Nam e for the catalog. 5. Choose a Cloud Resource Zone for the catalog. 6. Click the Save button to save your new catalog. CloudForms creates a new catalog to store catalog entries. Report a bug 6.2.3. Editing a Catalog T his procedure edits a catalog's details. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Click on the Nam e link of a catalog to edit. 4. Click on the Edit button. 5. Modify the catalog details. 6. Click the Save button to save the catalog changes. CloudForms Cloud Engine saves changes to the chosen catalog. Report a bug 6.2.4 . Deleting Catalogs T his procedure deletes a single catalog or multiple catalogs. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Option 1: Single delete a. Click on the Nam e link of a catalog to delete. b. Click on the Delete button. An alert box displays:
Are you sure you want to proceed?

Click OK. 4. Option 2: Multiple delete a. Click the checkboxes of all catalogs to delete. b. Click the Delete button. An alert box displays:
Are you sure you want to proceed?

Click OK. CloudForms Cloud Engine deletes your chosen catalogs.

63

CloudForms 1.1 Cloud Engine User Guide

Report a bug

6.3. Application Blueprint


6.3.1. Application Blueprint CloudForms Cloud Engine uses application blueprints to define the instances in an application. An application blueprint makes a reference to a component outline and a cloud resource profile, or multiple sets of both, to define each instance. CloudForms Cloud Engine also builds blueprints either from a single image or from an XML file import. CloudForms Cloud Engine provides the ability to edit application blueprints to include additional component outlines or create multiple instances in a deployment. Report a bug 6.3.2. Creating an Application Blueprint from a Component Outline T his procedure adds a new application blueprint from a component outline.

Figure 6.2. Application blueprint creation from a component outline

1. Click on the Administer tab. 2. Click on Clouds. T his displays a list of your clouds. 3. Click on Images. A list of your images displays in a tabled format. 4. Click on the Nam e of a image in the table. Information about the image displays in a new screen. 5. Click the New Application Blueprint from Im age button. 6. T he Create Application Blueprint screen appears. Provide the application blueprint with a Nam e and select Default Cloud Resource Profile for the instance.

64

Chapter 6. Applications

Important
If you intend to launch the application right away after step 8, make sure the Application Blueprint Name , which is also the default Application Name , is within the character limit. T he total characters of the Application Name and the Image Name combined should not exceed 50 characters, otherwise an error will occur when creating applications. 7. Choose the Catalog to post the application blueprint. Mark the checkboxes to specify one or more catalogs for the blueprint. 8. Click the Save button to save your application blueprint to the chosen catalogs. CloudForms creates a new application blueprint based upon an image and saves the blueprint in your chosen catalogs. T his blueprint refers to the chosen images to form an instance in a deployment. T his blueprint also refers to the chosen cloud resource profile to define the logical hardware specifications of your instance. Report a bug 6.3.3. Creating an Application Blueprint from a File Import T his procedure adds a new application blueprint using an XML file to define the application. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Choose a catalog to add the blueprint. Click on its Nam e link. 4. Click the New Application Blueprint button. 5. Choose either to Upload a file or load the blueprint From URL. 6. Specify a valid Nam e for the application blueprint. 7. Provide a Description for the application blueprint. 8. If Upload is selected: a. Click Browse and select the application blueprint filename. 9. If From URL is selected: a. Specify the URL for the application blueprint's file. 10. Select the Edit XML file after save checkbox to edit your blueprint after pressing Save . 11. Click the Save button to save your new application blueprint. CloudForms Cloud Engine creates a new application blueprint in the catalog. T his blueprint contains references to a component outline, or set of component outlines, to form instances in an application. T his blueprint also contains references to cloud resource profiles to define the logical hardware specifications of your instances. Report a bug 6.3.4 . Example Application Blueprint file

65

CloudForms 1.1 Cloud Engine User Guide

<deployable name="My Application Blueprint"> <description>This is an example Application Blueprint file</description> <assemblies> <assembly name="samplehost" hwp="hwp1"> <image id="609a6eee-5ec5-4b13-8486-7491d091f8dc" /> </assembly> <services> <service name="httpd"> <executable> <contents><![CDATA[#!/bin/bash service httpd start ]]></contents> </executable> <files> <file> <contents filename="/var/www/html/index.html"><![CDATA[ <html> <head> <title>Welcome!</title> </head> <body> <p>Welcome to my webserver!</p> </body> </html> ]]></contents> </file> </files> </service> </services> </assemblies> </deployable>

Note
T his application blueprint uses runtime configuration. Make sure your CloudForms Cloud Engine server is configured with Audrey.

Report a bug 6.3.5. Edit an Application Blueprint T his procedure edits an application blueprint's details. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Choose a catalog with blueprints to edit. Click on the Nam e link. 4. Click on the Nam e link of an application blueprint to edit. 5. Click on the Edit button. 6. Modify the application blueprint details. 7. Click the Save button to save the application blueprint changes. CloudForms saves changes to the chosen application blueprint.

66

Chapter 6. Applications

Report a bug 6.3.6. Add an Application Blueprint to Additional Catalogs T his procedure adds an application blueprint to a new catalog. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Choose a catalog with blueprints. Click on the Nam e link. 4. Click on the Nam e link of an application blueprint. 5. Scroll to the Catalogs section. T his section indicates the catalogs that currently contain the application blueprint. 6. Choose a catalog to enable access from the drop-down menu and click the Add + button. CloudForms Cloud Engine adds the application blueprint to a new catalog. Report a bug 6.3.7. Deleting Application Blueprints T his procedure deletes a single application blueprint or multiple application blueprints. 1. Click on the Administer tab. 2. Click on Content . T his displays a list of your catalogs. 3. Choose a catalog with blueprints to delete. Click on its Nam e link. 4. Option 1: Single delete a. Click on the Nam e link of an application blueprint to delete. b. Click on the Delete button. An alert box displays:
Are you sure you want to delete?

Click OK. 5. Option 2: Multiple delete a. Click the checkboxes of all application blueprints to delete. b. Click the Rem ove button in the Application Blueprints section. An alert box displays:
Are you sure you want to delete?

Click OK. CloudForms deletes your chosen application blueprints. Report a bug

6.4. Applications and Instances


6.4 .1. Creating a New Application T his procedure creates a new application in CloudForms Cloud Engine . Applications launch instances into cloud resource providers.

67

CloudForms 1.1 Cloud Engine User Guide

1. Open CloudForms Cloud Engine . 2. Click on the Monitor application tab. 3. Choose a cloud resource zone for application creation and click its name. 4. Click the New Application button. T he application creation screen appears.

Figure 6.3. Application creation screen

5. Specify a valid Application Nam e .

Important
Limit the Application Name , so that the total characters of the Application Name and the Image Name combined should not exceed 50 characters, otherwise an error will occur when creating applications. 6. Choose a Application Blueprint from the drop-down selector. 7. Choose a valid Cloud Resource Cluster for the application. 8. Click the Next button. T he deployment launch confirmation screen appears.

68

Chapter 7. Runtime Configuration

Figure 6.4 . Application launch confirmation screen

9. Review the application details. If an error occurs during instance launch, the deployment process terminates and CloudForms Cloud Engine displays an appropriate error message. T o ignore instance errors and proceed with the deployment process until completion, choose Ignore instance errors during launch . 10. Click the Launch button to launch the application.

Figure 6.5. A launched application containing a single instance

CloudForms creates an application and launches its instances into your chosen cluster.

69

CloudForms 1.1 Cloud Engine User Guide

Note
CloudForms only creates applications in enabled cloud resource zones. T he application deployment fails if the chosen zone is disabled.

Important
CloudForms Cloud Engine stores information on running instances, such as references to base component outlines. As a recommendation, do not delete any component outlines that running instances have used.

Report a bug 6.4 .2. Deleting an Application T his procedure deletes an application or multiple applications. 1. Open CloudForms Cloud Engine . 2. Click on the Monitor application tab. 3. Choose a cloud resource zone for application creation and click its name. 4. Option 1: Single delete a. Click on the Nam e link of an application to delete. b. Click on the Delete button. An alert box displays:
Are you sure you want to delete this application?

Click OK. 5. Option 2: Multiple delete a. Ensure you are using the tabled view. If not, click the tabled view button. b. Click the checkboxes of all applications to delete. c. Click the Delete Selected button. An alert box displays:
Are you sure you want to proceed with deletion?

Click OK. CloudForms deletes chosen applications and their instances from cloud resource providers. Report a bug 6.4 .3. Accessing an Instance An instance is a running virtual machine, started by a user or an administrator, on a cloud resource provider. A user accesses an instance through secure shell (SSH) using the rootpw from the instance's original component outline.

70

Chapter 7. Runtime Configuration

Important
Ensure port 22 (SSH) on your resource provider is open for in-bound communication. Users have access to EC2 instances using SSH certificates, which are obtained via CloudForms Cloud Engine . T he following task shows how to obtain the SSH certificate and configure access to a chosen EC2 instance. T his procedure provides the user with access to a CloudForms EC2 instance. 1. Obtain the EC2 instance's SSH key: a. Click on the Monitor tab. b. T he Monitor dashboard displays a list of cloud resource zones. Click the name of a cloud resource zone. c. A list of applications in the chosen cloud resource zone displays. Click the name of an application. d. A list of instances in the chosen application displays. Each EC2 instance contains a Download key link to its SSH key. Click the Download key link for a chosen instance. e. Save the SSH key to a location on your hard disk. 2. Securing your SSH key: a. SSH certificates require user-only read access before use. Run the following command:
$ chmod 400 [certificate]

3. Accessing your EC2 instance via SSH: a. Run the following command:
$ ssh -i [certificate] [hostname]

T he user gains access to the CloudForms-created EC2 instance. Report a bug 6.4 .4 . Rebooting an Instance T his procedure provides the user with steps required to reboot an instance from the user interface.

Note
Red Hat Enterprise Virtualization does not support this function of rebooting an instance from the graphical user interface. VMware vSphere supports this function providing that the vm -tools agent is installed. 1. Click on the Monitor tab. 2. T he Monitor dashboard displays a list of cloud resource zones. Click the name of a cloud resource zone. 3. A list of applications in the chosen cloud resource zone displays. Click the name of an application. 4. A list of instances in the chosen application displays. Each instance contains a Restart button. Press the Restart button for a chosen instance. A status message indicating a successfully

71

CloudForms 1.1 Cloud Engine User Guide

Press the Restart button for a chosen instance. A status message indicating a successfully queued restart appears. CloudForms reboots the chosen instance. Report a bug 6.4 .5. Stopping an Instance T his procedure provides steps required to stop an instance or multiple instances with the user interface. 1. Click on the Monitor tab. 2. T he Monitor dashboard displays a list of cloud resource zones. Click the name of a cloud resource zone. 3. A list of applications in the chosen cloud resource zone displays. Click the name of an application. 4. A list of instances in the chosen application displays. Switch to the filtered view. 5. Select one or multiple instances to stop using the checkboxes. 6. Click the Stop selected instances button. 7. CloudForms Cloud Engine changes the state of each chosen instance to stopped . CloudForms Cloud Engine stops each chosen instance.

Important
An instance cannot be started again once stopped.

Report a bug

72

Chapter 7. Runtime Configuration

Chapter 7. Runtime Configuration


7.1. Runtime Configuration
T hese steps show how to access the runtime configuration for an Audrey-enabled instance. 1. Click on the Monitor tab. 2. Click the name of an application in a cloud resource zone. 3. Choose the T abled View icon and select the Nam e of an instance. T he instance information screen displays. T he second section shows the Runtim e Configuration for your instance. Report a bug

7.2. Adding Audrey Agent to all Component Outlines


T he following task adds Audrey Agent to all future component outlines. 1. Add the following XML to your Imagefactory's target configuration file (/etc/im agefactory/target_content.xm l ):
<template_includes> <include target='all' os='all' version='all' arch='all'> <packages> <package name='aeolus-audrey-agent'/> </packages> </include> </template_includes>

2. Build and push your component outlines. All future component outlines contain Audrey Agent. Report a bug

7.3. Adding Runtime Configuration to an Application Blueprint


Important
All instances using runtime configuration require Audrey Agent installed as a package. Ensure images used for instances contain the audrey-agent package included in the image's component outline. for information on adding packages to a component outline, read 5.3.1 Adding Packages to System Templates in the CloudForms 1.1 System Engine User Guide. T his procedure adds runtime configuration parameters to an application blueprint. 1. Open an application blueprint: a. Click on the Administer tab. b. Click on Content . T his displays a list of your catalogs. c. Choose a catalog with blueprints to edit. Click on the Nam e link. d. Click on the Nam e link of an application blueprint to edit.

73

CloudForms 1.1 Cloud Engine User Guide

e. Click on the Edit XML button. 2. Add runtime configuration elements to the application blueprint: a. Include one or more services for each instance (signified with an assem bly element).
<deployable name="Application"> <description>An example Application</description> <assemblies> <assembly name="instance-1" hwp="hwp1"> <image id="beedb0f9-ca05-46a1-bcbb-704887752d8e"/> <services> <service name="my-service"> <executable url="http://www.example.com/script.sh"/> <files> <file url="http://www.example.com/config.rb"/> </files> <parameters> <parameter name="param-1"> <value type="scalar">default_text</value> </parameter> <parameter name="param-2"> <reference assembly="instance-2" parameter="hostname"/> </parameter> </parameters> </service> ... </services> <returns> <return name="hostname"/> </returns> </assembly> <assembly name="instance-2" hwp="hwp1"> ... <returns> <return name="hostname"/> </returns> </assembly> </assemblies> </deployable>

In this example, instance-1 contains a service called m y-service . T his service contains an executable , files and param eters. T he executable element refers to the script that runs when the instance boots. In the example, the script is script.sh . A service only has one script. T he files element refers to additional configuration files for the service. T he example refers to a single file called config.rb . T he files element accepts one or more file elements. T he param eters element refers to the parameters for the service. T he example contains two param eter elements: param -1 is a user-defined parameter with a default value of default_text. param -2 contains a reference to the hostnam e return value from instance-2 . T his reference acts as a service dependency from one instance service to another. Parameters are used in the executable script as variables that take on the following format:

74

Chapter 7. Runtime Configuration

AUDREY_VAR_[service]_[parameter]

For example:
AUDREY_VAR_my-service_param-1

CloudForms Cloud Engine replaces variables that match this format with their values. b. Define the return values (returns) for the service's executable script.
<deployable name="Application"> <description>An example application</description> <assemblies> <assembly name="instance-1" hwp="hwp1"> <image id="beedb0f9-ca05-46a1-bcbb-704887752d8e"/> <services> ... </services> <returns> <return name="hostname"/> </returns> </assembly> ... </assemblies> </deployable>

T his example contains a single return value called hostnam e . T he application blueprint uses return value for other service parameters in other instances. Audrey uses input from the Facter Ruby library as a basis for these return values. 3. Save the application blueprint: a. Click on the Save button to save your changes. CloudForms Cloud Engine saves the new runtime configuration information to the chosen application blueprint. Report a bug

7.4. Launching Instances with Runtime Configuration


CloudForms Cloud Engine provides users with runtime configuration options when launching an application. After selecting an application blueprint, CloudForms Cloud Engine displays a list of parameter fields and references defined in the application blueprint. Select a service from the left panel and type the desired configuration values in its parameter fields.

75

CloudForms 1.1 Cloud Engine User Guide

Figure 7.1. User-defined runtime configuration parameters

T he example above uses the following extract from an application blueprint to define the http service.

76

Chapter 7. Runtime Configuration

<deployable name="Wordpress Multi-Instance Deployable"> ... <assemblies> <assembly name="apache" hwp="hwp1"> <image id="beedb0f9-ca05-46a1-bcbb-704887752d8e"/> <services> <service name="http"> <executable url="http://www.example.com/wordpress-http.sh"/> <parameters> <parameter name="wp_name" type="scalar"> <value>MyWordpressSite</value> </parameter> <parameter name="wp_user" type="scalar"> <value>wordpress</value> </parameter> <parameter name="wp_pw" type="scalar"> <value>wordpress</value> </parameter> <parameter name="mysql_ip" type="scalar"> <reference assembly="mysql" parameter="ipaddress"/> </parameter> <parameter name="mysql_hostname" type="scalar"> <reference assembly="mysql" parameter="hostname"/> </parameter> <parameter name="mysql_dbup" type="scalar"> <reference assembly="mysql" parameter="dbup"/> </parameter> </parameters> </service> </services> <returns> <return name="hostname"/> <return name="ipaddress"/> </returns> </assembly> ... </assemblies> </deployable>

Click Finalize to continue with the Application launch. Report a bug

7.5. Using Runtime Configuration with System Engine Registration


A user registers an Audrey-enabled instance with CloudForms System Engine using runtime configuration. T he following task shows how to register an instance with CloudForms System Engine using a runtime configuration script embedded within an application blueprint. 1. Load the following application blueprint into CloudForms Cloud Engine :

77

CloudForms 1.1 Cloud Engine User Guide

<?xml version="1.0" encoding="UTF-8"?> <deployable name="My Deployment"> <description>This is a sample deployment that registers and subscribes to content hosted by katello.</description> <assemblies> <assembly name="[NAME]" hwp="[PROFILE]"> <image id="[UUID]"/> <services> <service name="GPG_KEY_IMPORT"> <executable> <contents><![CDATA[#!/bin/bash rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release echo ${AUDREY_VAR_GPG_KEY_IMPORT_IMPORT_BETA_KEY:=False} if [[ $AUDREY_VAR_GPG_KEY_IMPORT_IMPORT_BETA_KEY == [Tt][Rr][Uu][Ee] ]]; then rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta fi ]]> </contents> </executable> <parameters> <parameter name="IMPORT_BETA_KEY"> <value type="scalar">True</value> </parameter> </parameters> </service> <service name="RHEL_PRODUCT_CERT"> <executable> <contents><![CDATA[#!/usr/bin/python os sys subprocess shutil

import import import import

def is_ec2_deployment(): '''Returns boolean True of False to indicate whether the current system is an ec2 image''' # FIXME - make sure 'wget' is installed, or use 'curl' cmd = 'curl --silent http://169.254.169.254/latest/dynamic/instanceidentity/document' return subprocess.call(cmd.split()) == 0 os.chdir('/var/audrey/tooling/user/RHEL_PRODUCT_CERT') # If running as an ec2 deployment, and no product cert is defined ... create one if is_ec2_deployment() and not os.path.isfile('/etc/pki/product/69.pem') and os.path.isfile('69.pem'): if not os.path.isdir('/etc/pki/product'): os.mkdir('/etc/pki/product') shutil.copy('69.pem', '/etc/pki/product/69.pem')]]> </contents> </executable> <files> <file> <contents filename="69.pem"><![CDATA[ -----BEGIN CERTIFICATE-----

78

Chapter 8. Users

MIIGDTCCA/WgAwIBAgIJALDxRLt/tUszMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTExMTEwODE1NDYyNFoXDTMxMTEw MzE1NDYyNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFsyMGM3MWU4 Ni1iZjA4LTRlZjYtYTAxYS1lYzQ0MDRkNzIyODZdMIICIjANBgkqhkiG9w0BAQEF AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x 8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I 5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl 1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v 5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C AwEAAaOBljCBkzAJBgNVHRMEAjAAMDAGCysGAQQBkggJAUUBBCEMH1JlZCBIYXQg RW50ZXJwcmlzZSBMaW51eCBTZXJ2ZXIwFAYLKwYBBAGSCAkBRQIEBQwDNi4yMBcG CysGAQQBkggJAUUDBAgMBng4Nl82NDAlBgsrBgEEAZIICQFFBAQWDBRyaGVsLTYs cmhlbC02LXNlcnZlcjANBgkqhkiG9w0BAQUFAAOCAgEAsS+51Nhm3vTPqU75GJwN WFTOh/S7Imf2h569t2C6MsOE2z2a5Q9bs20PmcfjSH5pTjRxbniegZKMAydlM8Oi p3VOEulgBqbERMb2NmYLWFugN2emMPZ8Y+c4ZkxzxNrHG68858PLw/Hw3x7ceyVn SzVhG24CESgeIhyLzHmqnsM2TVx3gnIaKgpfNio6+g8TQ3Zdn0Y3aWVF4046e8sB niCqWaGWXq/cG6+KSQkADvxQXqBLIf/BG7zXnjeg7CwfDItWdca1fJBLh3WZTAdc d90Jhn5IUqwPWf6nupuyAFcxLcMHvn+7/x6sbUz7sdNJfUx/WnU52OqsuM/03wqn b449m8INeGCoa7yZdSQlcnH6UWLeKnrnhk/81Rrv265Q044dxzUA+aMJPn0ZFXIj 76ot5agNeCEtZyKWptOR7to6gQutD4It8siqR2L2TK8eNcFxJVFSuenMjScoppJo WsK6OXGdxJA2PLpSSm0vJtFrLdjt3NnoMXHTi7HmldC1HLMLGEg/QNDdesdZcLBE AI2X5TrH/24IpBKtT+y/lImchb9INSsFJa29SSCrTFKLOc8aGvlb4nidHhRgFOzO fT34E8euLKc0d3pznxL/W8M/JsLF7abe3pijcvY0wGp9LHit2qeCJMWWdv6OKZMK 8DbQo0gvmAQZGuMI459xDTA= -----END CERTIFICATE----]]> </contents> </file> </files> </service> <service name="KATELLO_REGISTER"> <executable> <contents><![CDATA[#!/usr/bin/python import os import sys import re import subprocess import shutil from ConfigParser import ConfigParser from string import Template def s_format(s, dct): if hasattr(s, 'format'): return s.format(**dct) else: # convert python-2.6 format to something 2.4 can handle return Template(re.sub(r'{([^}]+)}', '$\\1', s)).substitute(dct)

def run(cmd):

79

CloudForms 1.1 Cloud Engine User Guide

if isinstance(cmd, str): cmd = cmd.split() p_open = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (stdout, stderr) = p_open.communicate() if p_open.returncode != 0: print "Error: command failed (%s) - %s" % (p_open.returncode, stdout) sys.exit(p_open.returncode) return stdout

def subscription_manager_version(): sm_rpm_ver = run('rpm -q --queryformat %{VERSION} subscription-manager') sm_ver_maj, sm_ver_min, sm_ver_rest = sm_rpm_ver.split(".", 2) return int(sm_ver_maj), int(sm_ver_min)

def audrey_var(name, default=None): return os.environ.get("AUDREY_VAR_KATELLO_REGISTER_%s" % name, default)

def setup_releasever(): fp = open("/etc/yum/vars/releasever", "r+") fp.write(audrey_var("RELEASEVER")) fp.close()

def register_katello_command(): org = audrey_var("KATELLO_ORG") activation_key = audrey_var("ACTIVATION_KEY", "").strip() auto_subscribe = audrey_var("AUTO_SUBSCRIBE", "false").lower() == "true" username = audrey_var("KATELLO_USER") password = audrey_var("KATELLO_PASS") kat_env = audrey_var("KATELLO_ENV") sm_ver_maj, sm_ver_min = subscription_manager_version() cmd = "subscription-manager register --force" cmd += " --org=%s" % org if sm_ver_maj <= 0: if sm_ver_min <= 96: if auto_subscribe: cmd += " --username=%s --password=%s" % (username, password) cmd += " --autosubscribe" elif activation_key != "" and sm_ver_min >= 95: cmd += " --activationkey=%s" % activation_key else: pass # determine and print error condition to stdout else: if auto_subscribe: cmd += " --username=%s --password=%s" % (username, password) cmd += " --env=%s" % kat_env cmd += " --autosubscribe" elif activation_key != "": cmd += " --activationkey=%s" % activation_key else: pass # determine and print error condition to stdout return cmd

80

Chapter 9. Users Groups

# If requested, customize the yum $releasever if not audrey_var("RELEASEVER", "Default").lower() in ["", "default"]: setup_releasever() # FIXME - Installing using yum on a system with no enabled repos will remove # product cert. Until bug#806457 is fixed, install using the 'rpm' command. # cmd = "yum -y install %s" % cert_rpm cert_rpm = s_format("http://{AUDREY_VAR_KATELLO_REGISTER_KATELLO_HOST}/pub/candlepincert-consumer-{AUDREY_VAR_KATELLO_REGISTER_KATELLO_HOST}-1.0-1.noarch.rpm", os.environ) cmd = "rpm -ivh %s" % cert_rpm run(cmd) cmd = register_katello_command() print run(cmd)]]> </contents> </executable> <parameters> <parameter name="KATELLO_HOST"> <value type="scalar"></value> </parameter> <parameter name="KATELLO_PORT"> <value type="scalar"></value> </parameter> <parameter name="KATELLO_ORG"> <value type="scalar"></value> </parameter> <parameter name="KATELLO_ENV"> <value type="scalar"></value> </parameter> <parameter name="KATELLO_USER"> <value type="scalar"></value> </parameter> <parameter name="KATELLO_PASS"> <value type="password"></value> </parameter> <parameter name="RELEASEVER"> <value type="scalar">Default</value> </parameter> <parameter name="AUTO_SUBSCRIBE"> <value type="scalar">True</value> </parameter> <parameter name="ACTIVATION_KEY"> <value type="scalar">None</value> </parameter> </parameters> </service> </services> </assembly> </assemblies> </deployable>

Ensure to replace the emphasized strings in the example with your desired values.

81

CloudForms 1.1 Cloud Engine User Guide

Note
T his example application blueprint is also available on your Audrey Configuration Server at: https://[CONFIGSERVER]/exam ples

Important
Ensure that images used in this example have Audrey Agent installed. 2. Launch an application using this blueprint. T he runtime configuration parameters screen shows the following fields that require your CloudForms System Engine details: T able 7.1. User-defined runtime parameters for CloudForms System Engine registration Parameter IMPORT _BET A_KEY KAT ELLO_HOST KAT ELLO_PORT KAT ELLO_ORG KAT ELLO_ENV KAT ELLO_USER KAT ELLO_PASS AUT O_SUBSCRIBE ACT IVAT ION_KEY Description Sets whether to import the Red Hat Enterprise Linux Beta GPG key. Requires a Boolean value: true or false . T he hostname or IP address for the CloudForms System Engine host. T he port used to access the CloudForms System Engine host. T he chosen organization on the CloudForms System Engine host for registration. T he chosen environment on the CloudForms System Engine host for registration. T he user for accessing the CloudForms System Engine host. T he password for accessing the CloudForms System Engine host. Set auto-subscription status for registration. Requires a Boolean value: true or false . T he activation key for your registration. Use None for no activation key. Use None if AUT O_SUBSCRIBE equals true

3. Click Finalize to continue with the Application launch. T he application launches and registers with CloudForms System Engine using the supplied parameters. Report a bug

82

Chapter 10. Permissions

Chapter 8. Users
8.1. Creating a User

Figure 8.1. New user creation

T hese steps show how to create a new user in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Users. 3. Click the Add User button. Figure 8.2. New User Button

T he New User screen appears. 4. T ype the user's First nam e . 5. T ype the user's Last nam e . 6. T ype the user's E-m ail address. 7. T ype a username for the new user in the Choose a usernam e field. 8. T ype a password for the new user in the Choose a password field. 9. Retype the password for the new user into the Confirm password field. 10. T ype the Maxim um Running Instances a user can have running simultaneously. Leave this field blank for unlimited.

83

CloudForms 1.1 Cloud Engine User Guide

11. Select whether the User Status is Active or Inactive . T his setting determines whether the user's access is active. 12. Click Save User to save your new user. Report a bug

8.2. Edit an Existing User


T hese steps show how to edit details of an existing user in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Users. 3. Click on the User ID of the required user. 4. Information about that particular user appears in the Details View. Click the Edit button to edit the user's details. 5. Modify the required details. 6. Click the Save User button to save your changes. Report a bug

8.3. Delete an Existing User


T hese steps show how to delete an existing user in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Users. 3. Click each checkbox to the left of each user you want to delete. 4. Click the Delete Selected command button. 5. An alert box appears:
Are you sure you want to proceed with deletion?

Click OK. Report a bug

84

Chapter 10. Permissions

Chapter 9. Users Groups


9.1. Creating a User Group
T hese steps show how to create a new user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on User Groups. 3. Click the Add User Group button. T he New User Group screen appears. 4. Select a user group T ype . Choose Local to create a local user group within the CloudForms Cloud Engine database. 5. T ype the user group Nam e . 6. T ype a description for the user group. 7. Click Save User Group to save your new user group. Report a bug

9.2. Editing a User Group


T hese steps show how to edit a user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on User Groups. 3. Click the Nam e of a user group to edit. T he Edit User Group screen appears. 4. Modify your chosen user group property fields. 5. Click the Save User Group button to save your user group properties. Report a bug

9.3. Adding Users to a User Group


T hese steps show how to add users to a user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on User Groups. 3. Click the Nam e of a user group to add users. A new screen shows the Properties, Mem bers and Perm issions for the user group. Scroll to the Mem bers section. 4. Click the Add Members button. 5. Use the check box to select which users belong to the user group. 6. Click the Add Members button to save your selection. Report a bug

9.4. Removing Users from a User Group


85

CloudForms 1.1 Cloud Engine User Guide

T hese steps show how to remove users from a user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on User Groups. 3. Click the Nam e of a user group to remove users. A new screen shows the Properties, Mem bers and Perm issions for the user group. Scroll to the Mem bers section. 4. Use the check box to select which users to remove from the user group. 5. Click the Remove button. T he following message appears:
Are you sure you want to proceed?

Click the OK button. Report a bug

9.5. Deleting a User Group


T hese steps show how to delete a new user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on User Groups. 3. Use the check box to select the user groups to remove. 4. Click the Delete Selected button. T he following message appears:
Are you sure you want to proceed?

Click the OK button. Report a bug

86

Chapter 11. Logging and Reporting

Chapter 10. Permissions


10.1. Setting Global Permissions

Figure 10.1. Global permissions

T his procedure shows how to provide global role grants to each user or user group in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Global Role Grants. 3. Click on the Grant Access button. T he provider access selection screen appears. 4. Choose a Role from the drop-down menu for each user and user group. 5. Click Grant Access to save your permissions. CloudForms sets additional global role grants for each user or user group. Report a bug

10.2. Setting Cloud Resource Provider Permissions

87

CloudForms 1.1 Cloud Engine User Guide

Figure 10.2. Cloud resource provider permissions

T hese steps show how to provide user and user groups and roles with access to cloud resource providers in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Providers dashboard displays. 3. Click a Cloud Resource Provider Nam e to select a provider. 4. Click on Role Assignm ents. T he current list of user and user groups and roles with access to the chosen provider displays. 5. Click on the Grant Access button. T he provider access selection screen appears. 6. Choose a Role from the drop-down menu for each user and user group. 7. Click Grant Access to save your permissions. Report a bug

10.3. Setting Cloud Resource Zone Permissions

88

Chapter 11. Logging and Reporting

Figure 10.3. Cloud resource zone permissions

T hese steps show how to provide user and user groups and roles with access to cloud resource zones in CloudForms Cloud Engine . 1. Click on the Monitor tab. 2. Click the name of a cloud resource zone. 3. Click on Role Assignm ents. T he current list of user and user groups and roles with access displays. 4. Click on the Grant Access button. T he zone access selection screen appears. 5. Choose a Role from the drop-down menu for each user and user group. 6. Click Grant Access to save your permissions. Report a bug

10.4. Setting Application Blueprint Permissions

Figure 10.4 . Application blueprint permissions

T hese steps show how to provide user and user groups and roles with access to Application Blueprints in CloudForms Cloud Engine . 1. Click on the Administer tab. 2. Click on Content .

89

CloudForms 1.1 Cloud Engine User Guide

2. Click on Content . 3. Click on the Nam e of a catalog. A list of the catalog's application blueprints displays. 4. Click on the Nam e of an application blueprint. T he application blueprint's properties displays. 5. Scroll to the Role Assignm ents section. 6. Click on the Grant Access button. T he application blueprint access selection screen appears. 7. Choose a Role from the drop-down menu for each user and user group. 8. Click Grant Access to save your permissions. Report a bug

10.5. Setting Application Permissions

Figure 10.5. Application permissions

T hese steps show how to provide user and user groups and roles with access to an application in CloudForms Cloud Engine . 1. Click on the Monitor tab. 2. Click the name of cloud resource zone. 3. Click the name of an application in the cloud resource zone. 4. Click on Role Assignm ents. T he current list of user and user groups and roles with access displays. 5. Click on the Grant Access button. T he application access selection screen appears. 6. Choose a Role from the drop-down menu for each user and user group. 7. Click Grant Access to save your permissions. Report a bug

90

Chapter 12. Maintenance

Chapter 11. Logging and Reporting


11.1. Provider History
11.1.1. Accessing Provider History T he following procedure shows how to filter and display reports for cloud resource providers. 1. Click on the Administer tab. 2. Click on Cloud Resource Providers. T he Cloud Resource Provider dashboard appears. 3. Use the From and T o date selection fields to specify a date range. 4. Click the Apply Filter button. T he dashboard displays a record for the date range specified of currently running, pending and erroneous instances, plus historical data for previously running and erroneous instances. A graph of running instances, both current and historical, appears in the lower half of the page. Report a bug

11.2. Audit History


11.2.1. Accessing Audit History T hese steps show how to view the history for multiple instances. 1. Click on the Monitor T ab. 2. Click on Logs. 3. Select applicable filters, or leave it as default. Filter options include: Viewing filters Refine log search results by applying Viewing filters. Viewing options include: Event T ypes, States, Pools, Providers, and Users. Date filter Refine log search results to a certain time frame with the Date filter. Ordered By filter Select the order you want the logs to be displayed by with the Ordered by filter. 4. Click on Apply filters.

Note
T he number next to Apply filters shows how many instances have matched your search preference.

Report a bug

91

CloudForms 1.1 Cloud Engine User Guide

11.2.2. Exporting Audit History T hese steps show how to export audit history as a CSV file. 1. Click on the Monitor T ab. 2. Click on Logs. 3. Click the Export logs button. 4. Your browser asks for a location to save the CSV file. Choose a location and save. Report a bug

11.3. Instance History


11.3.1. Accessing Instance History CloudForms Cloud Engine contains functions for generating event reports for instances and a series of logs to track functions for individual components. T hese steps show how to view the history for an instance. 1. Click on the Monitor tab. 2. Click the name of an application in a cloud resource zone. 3. Choose the T abled View icon and select the Nam e of an instance. T he instance information screen displays. T he third section shows the History for your instance. Report a bug 11.3.2. Exporting Instance History T hese steps show how to export instance history as a CSV file. 1. Click on the Monitor tab. 2. Click the name of cloud resource zone. 3. Click the name of an application in the cloud resource zone. 4. Choose the T abled View icon. 5. Click the Export events button. 6. Your browser asks for a location to save the CSV file. Choose a location and save. Report a bug

11.4. Accessing Log Files


CloudForms Cloud Engine provides a log file for each of its components. T able 11.1, CloudForms Cloud Engine Log Files lists the location of all log files and their function.

92

Chapter 12. Maintenance

T able 11.1. CloudForms Cloud Engine Log Files Location /var/log Log File aeolus.log im agefactory.lo g iwhd.log Description General log messages for CloudForms Cloud Engine . Imagefactory log file. Contains history of all interactions related to building images for cloud resource providers. Image Warehouse log file. Contains history of all interactions related to image storage and management on cloud resource providers. Log for all Ruby-based interactions with CloudForms Cloud Engine . Log for status update transactions. Ruby webserver log for CloudForms Cloud Engine . Log files for Deltacloud API interactions. Log file for Image Warehouse database interactions. Log file for CloudForms Cloud Engine upgrades.

/var/log/aeolusconductor

rails.log dbom atic.log thin.log

/var/log/deltacloudcore /var/log/m ongodb/ /var/log/aeolusconductor/

* .log m ongodb.log aeolus_upgrade. log

Report a bug

93

CloudForms 1.1 Cloud Engine User Guide

Chapter 12. Maintenance


12.1. Disaster Recovery
12.1.1. Cloud Engine Backup Procedure T his example uses the /backup directory as our target directory to hold backup archives. Execute the following commands as the root system account. 1. Prepare your backup location:
# # # # mkdir /backup chgrp postgres /backup chmod g+w /backup cd /backup

2. Stop all CloudForms Cloud Engine services.


# aeolus-services stop

3. Back up the Cloud Engine PostgreSQL and MongoDB databases with their respective tools.

Note
As an optional method of backup, perform the following commands while database services are offline:
# tar --selinux -czvf mongo_data.tar.gz /var/lib/mongodb # tar --selinux -czvf pgsql_data.tar.gz /var/lib/pgsql/data/

T his method archives the all PostgreSQL and MongoDB databases. T his type of backup requires a complete shutdown of all services and it is recommended to perform this backup mainly during maintenance periods. Back up PostgreSQL databases T he database name for Cloud Engine is conductor . Execute pg_dum p to create online database backups. T his process can take minutes to finish depending on database sizes.
# service postgresql start # su postgres -c "pg_dump -Fc conductor > /backup/conductor.dump" # service postgresql stop

Note
For more info about PostgreSQL backups consult pg_dum p manual page or visit http://www.postgresql.org/docs/8.4/static/backup.html. Back up MongoDB database Use online tools to backup the iwhd database (MongoDB) while the database is running. Execute

94

Chapter 13. Template D escription Language (TD L) Schema

the following command in the backup directory:


# service mongod start # mongodump --host localhost --out mongo_dump # service mongod stop

T his tool should create a /backup/m ongo_dum p/repo directory with several JSON files.

Note
For more information consult mongodump man page or visit http://www.mongodb.org/display/DOCS/Backups. 4. Back up the Cloud Engine configuration files.
tar --selinux -czvf ce-backup.tar.gz /etc/aeolus-conductor /etc/aeolusconfigure /etc/imagefactory /etc/iwhd /etc/fstab /usr/share/aeolusconductor/config/{database.yml,environments/development.rb,oauth.json,environm ents/production.rb,settings.yml,environments/test.rb}

5. Back up the Cloud Engine image files.


tar --selinux -czvf ce-images-backup.tar.gz /var/lib/iwhd

6. Check the backup process. T he process creates the following archive files and a directory:
# ls ce-backup.tar.gz ce-images-backup.tar.gz conductor.dump mongo_dump

Cloud Engine is now backed up. Please restart your Cloud Engine instance.
# aeolus-services start

Report a bug 12.1.2. Cloud Engine Restore Procedure T he following process describes a full Cloud Engine restore. T his process deletes all data from a current Cloud Engine instance. Ensure you are restoring to the correct instance. All commands are executed as root in the directory with archives created during the backup process. 1. Reinstall CloudForms Cloud Engine and components
# yum aeolus-all

2. Run the configuration script.


# aeolus-configure

3. Stop all CloudForms Cloud Engine services.


# aeolus-services stop

4. Change to the backup directory.

95

CloudForms 1.1 Cloud Engine User Guide

# cd /backup

5. Restore the system files. Double-check that the files extract on the correct host. Restore all system files with following commands executed from the backup directory:
# tar --selinux -xvf ce-backup.tar -C / --exclude etc/fstab

Note
T he /etc/fstab is not restored due to the possibility of new file system mounts on a restored system. If using a Red Hat Enterprise Virtualization provider, restore the mount to the provider's export domain manually using the information in the /etc/fstab backup. 6. Drop the existing Cloud Engine PostgreSQL database.
# service postgresql start # su postgres -c "dropdb conductor"

Note
T here is a possibility of the following error appearing during database drop:
database xxx is being accessed by other users

Ensure all processes are stopped. 7. Restore the image files.


# tar --selinux -xvf ce-images-backup.tar -C /

8. Restore Cloud Engine PostgreSQL databases with the following commands:


# su postgres -c "pg_restore -C -d postgres /backup/conductor.dump"

Note
For more info about PostgreSQL backups consult pg_dum p manual page or visit http://www.postgresql.org/docs/8.4/static/backup.html. 9. Ensure MongoDB is running and delete the old data:
# service mongod start # echo 'db.dropDatabase();' | mongo repo

10. Execute the following command in the directory with backup archives.
# mongorestore --host localhost /backup/mongo_dump/repo

96

Chapter 13. Template D escription Language (TD L) Schema

Note
For more information consult mongorestore man page or visit http://www.mongodb.org/display/DOCS/Backups. 11. Restart all CloudForms Cloud Engine processes:
# aeolus-services start

Report a bug

12.2. Image Warehouse Recovery


12.2.1. T esting Image Warehouse Image Warehouse troubleshooting starts with access to the REST API. T o test the active state of Image Warehouse, run the following command on the CloudForms Cloud Engine host:
# curl http://localhost:9090/

A properly functioning Image Warehouse returns an XML representation with this command. Report a bug 12.2.2. Analyzing the Log T he default location of the Image Warehouse Log is /var/log/iwhd.log . T he log format includes two messages for each API operation. T he first message is logged when the API receives a request. T he second message is logged when the API completes the request. A user reading the log correlates the two messages by the IP address and port number of the client. T he following example corresponds to the curl command above:
Dec 06 15:33:43 iwhd[3363]: 192.168.128.11.37750 "GET /" Dec 06 15:33:43 iwhd[3363]: 192.168.128.11.37750 200 302

For additional troubleshooting, add the -v argument to IWHD_ARGS in /etc/sysconfig/iwhd and restart the Image Warehouse daemon (iwhd). Note the verbose log contains a large amount of information and is generally used only to debug Image Warehouse. Report a bug 12.2.3. Recovery from Insufficient Space If Image Warehouse returns an error 500 on both PUT and POST requests, the most common cause is insufficient space due to the accumulation of temporary data. T his is the case in particular for configurations with Red Hat Enterprise Virtualization Manager or oVirt clouds. Once the root cause of the failing registrations is resolved, remove the accumulated templates manually. Attributes and metadata are kept in MongoDB database. Its location is set by the configuration of mongod. T he default is /var/lib/m ongodb . Bulk data is either stored in the cloud under management, where it is a subject to the controls of the

97

CloudForms 1.1 Cloud Engine User Guide

cloud, or in a filesystem-like type of backend, such as fs or fs-rhev-m . Registration operations require additional temporary space to succeed. Small control files are created in /tm p . Registration in Red Hat Enterprise Virtualization Manager requires space in the cluster. An image is uploaded to the export domain, which is seen as an NFS-mounted directory. T he location of this directory is set outside of iwhd, usually by Conductor. System crashes can cause incomplete images to accumulate there. T heir file names start with iwhd . Once a template is uploaded, it has to be imported, according to the Red Hat Enterprise Virtualization Manager terminology. T his process can fail and leave an incomplete template visible to RHEV-M. T he safest way to remove this template is from the UI of Red Hat Enterprise Virtualization Manager. Remove only temporary files and templates that are excessively old. Exercise caution when removing all temporary files in a busy cloud environment. Report a bug 12.2.4 . Recovery from Database Failure If CloudForms Cloud Engine fails to load after a host reboot, check the MongoDB service's status.
# service mongod status

MongoDB is a database service that stores attributes and metadata for Image Warehouse. In the event of an improper system shut down, MongoDB can fail to start on boot due to the presence of a database lockfile. Systems affected include the following information in the mongo log (/var/log/m ongodb/m ongodb.log )
old lock file: /var/lib/mongodb/mongod.lock. probably means unclean shutdown recommend removing file and running --repair see: http://dochub.mongodb.org/core/repair for more information

If MongoDB refuses to start on reboot, remove the database lock using the following command:
# rm -f /var/lib/mongodb/mongod.lock # mongod --repair

Reboot the host and access CloudForms Cloud Engine via the web interface. Report a bug

98

Chapter 13. Template D escription Language (TD L) Schema

Chapter 13. Template Description Language (TDL) Schema


13.1. arch
T he arch element provides information about the type of CPU architecture of the instance. Possible return values for Linux operating systems include 32-bit (i386 ) and 64-bit (x86_64 ). T he arch is a required element. Parent Elements os. Child Elements None. Example 13.1. An example of the arch element.
<template> ... <os> ... <arch>x86_64</> ... </os> ... </template>

Report a bug

13.2. command
T he com m and element provides commands to run post-installation. T he com m and can be of two types: raw or base64 . Parent Elements com m ands. Child Elements None.

99

CloudForms 1.1 Cloud Engine User Guide

Example 13.2. An example of the com m and element


</template> ... <commands> <command name="Create SSH config file for root" type="raw">touch /root/.ssh/config</command> </commands> ... </template>

Report a bug

13.3. commands
T he com m ands element acts as a collection of commands for execution at the end of image creation. Parent Elements tem plate . Child Elements com m and . Example 13.3. An example of the com m ands element
<template> ... <commands> <command name="Create SSH config file for root" type="raw">touch /root/.ssh/config</command> </commands> ... </template>

Report a bug

13.4. description
T he description element tag provides a short description of the template. It contains a string value. It is an optional element. Parent Elements tem plate . Child Elements None.

100

Chapter 13. Template D escription Language (TD L) Schema

Example 13.4 . An example of the description element


<template> ... <description>A description of the image</description> ... </template>

Report a bug

13.5. file
T he file element tag adds content to the image in a file at the specified path. file can be of two types: raw and base64. Parent Elements files. Child Elements None. Example 13.5. An example of the file element
<template> ... <files> <file name="/root/.ssh/config" type="raw"><![CDATA[ Host Example User myuser Port 1313 HostName example.com ]]></file> </files> ... </template>

Report a bug

13.6. files
T he files element tag lists user-defined files to add to the image. Parent Elements tem plate . Child Elements file .

101

CloudForms 1.1 Cloud Engine User Guide

Example 13.6. An example of the files element


<template> ... <files> <file name="/root/.ssh/config" type="raw"><![CDATA[ Host Example User myuser Port 1313 HostName example.com ]]></file> </files> ... </template>

Report a bug

13.7. install
T he install element refers to the installation source, which is either iso or url . When type="iso" , the os is installed from an ISO image of the required operating system. When type="url" , the os is installed from a repository url. T he install element is a required element. Parent Elements os. Child Elements url , iso , m d5sum , sha1sum , and sha256 . Example 13.7. An example of the install element
<template> ... <os> <install type="url"> <url>http://download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_6 4/os/</url> </install> ... </os> </template>

Report a bug

13.8. iso
102

Chapter 13. Template D escription Language (TD L) Schema

T he iso element is required for providing the ISO image location of the installation media. T his element is required if when install type="iso" . Parent Elements install . Child Elements None. Example 13.8. An example of the iso element
<template> ... <os> ... <install type='iso'> <iso>http://download.fedoraproject.org/pub/fedora/linux/ releases/15/Fedora/x86_64/iso/Fedora-15-x86_64-DVD.iso</iso> </install> ... </os> </template>

Report a bug

13.9. key
T he key element represents the product key for Windows installation media. Parent Elements os. Child Elements None. Example 13.9. An example of the key element
<template> ... <os> ... <key>12345-67890-ABCDE-FGHIJ-KLMNO</key> ... </os> </template>

Report a bug

103

CloudForms 1.1 Cloud Engine User Guide

13.10. md5sum
T he m d5sum element is used for the install element when type="iso" . m d5sum is a method used to check the integrity and authenticity of ISO files using a MD5 digital fingerprint. It is an optional element. Parent Elements install . Child Elements None. Example 13.10. An example of the m d5sum element
<template> ... <os> ... <install type='iso'> <iso>http://download.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/x86_6 4/iso/Fedora-15-x86_64-DVD.iso</iso> <md5sum>47f4cc0b788002e8b264881beb4ec08b</md5sum> </install> ... </os> ... </template>

Report a bug

13.11. os
T he os element acts as a parent element for operating system values in a template. It contains multiple mandatory parameters. Parent Elements tem plate . Child Elements nam e , version , arch , install , rootpw, and key.

104

Chapter 13. Template D escription Language (TD L) Schema

Example 13.11. An example of the os element


<template> ... <os> <name>RHEL-6</name> <version>2</version> <arch>x86_64</arch> ... </os> </template>

Report a bug

13.12. name (os)


T he nam e element is required for the os element. T he nam e element is the operating system's name. It contains a string value. T able 13.1. Name Listings Operating System Fedora 15 Fedora 16 Red Hat Enterprise Linux 5.6 Red Hat Enterprise Linux 5.7 Red Hat Enterprise Linux 5.8 Red Hat Enterprise Linux 5.9 Red Hat Enterprise Linux 6.1 Red Hat Enterprise Linux 6.2 Red Hat Enterprise Linux 6.3 Red Hat Enterprise Linux 6.4 Name Fedora Fedora RHEL-5 RHEL-5 RHEL-5 RHEL-5 RHEL-6 RHEL-6 RHEL-6 RHEL-6

Parent Elements os. Child Elements None.

105

CloudForms 1.1 Cloud Engine User Guide

Example 13.12. An example of the os nam e element

<template> ... <os> <name>RHEL-6</name> ... </os> </template>

Report a bug

13.13. name (template)


T he nam e element is the template's name. It contains a string value. Parent Elements tem plate . Child Elements None. Example 13.13. An example of the template element
<template> ... <name>Example_Template</name> ... </template>

Report a bug

13.14. package
T he package element tag provides the information about the programs that are organized as sets of packages. Each package has its own set of names for types, which helps to prevent name conflicts. A top level type is accessible outside the package that declares it only if the type is declared public.T he naming structure for packages is hierarchical. Members of a package are class and interface types , which are declared in compilation units of the package, and subpackages, which may contain compilation units and subpackages of their own. Parent Elements packages. Child Elements None.

106

Chapter 13. Template D escription Language (TD L) Schema

Example 13.14 . An example of the package element


<template> ... <packages> <package name='aeolus-audrey-agent'></package> </packages> ... </template>

Report a bug

13.15. packages
T he packages element tag is used to indicate the package to which the compilation unit belongs. Packages that are stored in a file system have certain constraints on the organization of their compilation units to allow a simple implementation to find classes easily. A compilation unit automatically has access to all types declared in its package and also automatically imports all of the public types declared in the predefined package. Parent Elements tem plate . Child Elements package . Example 13.15. An example of the packages element
<template> ... <packages> <package name="httpd"/> ... </packages> </template>

Report a bug

13.16. repositories
T he repositories element acts as a collection of additional repositories. Parent Elements tem plate . Child Elements

107

CloudForms 1.1 Cloud Engine User Guide

repository. Example 13.16. An example of the description element


<template> ... <repositories> <repository name="Additional Repository"> <url>http://www.example.com/repositories/x86_64/</url> </repository> </repositories> ... </template>

Report a bug

13.17. repository
T he repository element tag provides the destination information of source repository from additional packages. It contains a string value. Parent Elements repositories. Child Elements signed and url . Example 13.17. An example of the description element
<template> ... <repositories> <repository name="Additional Repository"> <url>http://www.example.com/repositories/x86_64/[-1245128208]/url> </repository> </repositories> ... </template>

Report a bug

13.18. signed
T he signed is used when installing from RPM packages. Each package is signed with a GPG key or signature. It contains a Boolean value to indicate CloudForms' use for GPG signatures for repository verification. Parent Elements

108

Chapter 13. Template D escription Language (TD L) Schema

repository. Child Elements None. Example 13.18. An example of the signed element
<template> ... <repositories> <repository name="Additional Repository"[-207143004] <url>http://www.example.com/repositories/x86_64/</url> <signed>true</signed> </repository> </repositories> ... </template>

Report a bug

13.19. rootpw
T he rootpw element is required for the os installation. T he rootpw sets the root or administration password. Parent Elements os. Child Elements None. Example 13.19. An example of the rootpw element
<template> ... <os> ... <rootpw>p@55w0rd!</rootpw> ... </os> </template>

Report a bug

13.20. sha1sum
T he sha1sum element is used for the install element when type="iso" . sha1sum is a method used to check the integrity and authenticity of ISO files using a SHA-1 digital fingerprint. It is an optional

109

CloudForms 1.1 Cloud Engine User Guide

element. Parent Elements install . Child Elements None. Example 13.20. An example of the sha1sum element
<template> ... <os> ... <install type='iso'> <iso>http://download.fedoraproject.org/pub/fedora/linux/ releases/15/Fedora/x86_64/iso/Fedora-15-x86_64-DVD.iso</iso> <sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</sha1sum> </install> ... </os> ... </template>

Report a bug

13.21. sha256sum
T he sha256sum element is used for the install element when type="iso" . sha256sum is a method used to check the integrity and authenticity of ISO files using a 256-bit SHA-2 digital fingerprint. It is an optional element. Parent Elements install . Child Elements None.

110

Chapter 14. Application Blueprint XML Schema

Example 13.21. An example of the sha256sum element


<template> ... <os> ... <install type='iso'> <iso>http://download.fedoraproject.org/pub/fedora/linux/ releases/15/Fedora/x86_64/iso/Fedora-15-x86_64-DVD.iso</iso> <sha256sum> b23a1dbe9d29b9f545e56dcf334b4cb7a65f63e8df615dbe9bfbf57e5bcfb581 </sha256sum> </install> ... </os> ... </template>

Report a bug

13.22. template
T he tem plate element is the base XML element for your template file. It contains several sub-elements that refer to your system installation. Parent Elements None. Child Elements nam e , description , os, packages, files, com m ands, and repositories. Example 13.22. An example of the tem plate element
<template> <name>Example_Template</name> <description>An example of a template</description> <os> ... </os> </template>

Report a bug

13.23. url (repository)


T he url element tag provides the URL of the repository. T his element requires a fully qualified domain name or consistent IP address accessible from the guest image. It contains a string value.

111

CloudForms 1.1 Cloud Engine User Guide

Parent Elements repository. Child Elements None. Example 13.23. An example of the url element
<template> ... <repositories> <repository name="Additional Repository"> <url>http://www.example.com/repositories/x86_64/</url> </repository> </repositories> ... </template>

Report a bug

13.24. url (os)


T he url element is required for providing the URL location of installation media. T his element is required if when install type="url" . Parent Elements install . Child Elements None. Example 13.24 . An example of the url element
<template> ... <os> ... <install type='url'> <url>http://download.fedoraproject.org/pub/fedora/ linux/releases/14/Fedora/x86_64/os/</url> </install> </os> ... </template>

Report a bug

112

Chapter 14. Application Blueprint XML Schema

13.25. version
T he version element is required for the os installation. T he version element identifies the version number for the chosen operating system. It contains a string value. T able 13.2. Version Listing Operating System Fedora 15 Fedora 16 Red Hat Enterprise Linux 5.6 Red Hat Enterprise Linux 5.7 Red Hat Enterprise Linux 5.8 Red Hat Enterprise Linux 5.9 Red Hat Enterprise Linux 6.1 Red Hat Enterprise Linux 6.2 Red Hat Enterprise Linux 6.3 Red Hat Enterprise Linux 6.4 Name Fedora Fedora RHEL-5 RHEL-5 RHEL-5 RHEL-5 RHEL-6 RHEL-6 RHEL-6 RHEL-6 Version 15 16 U6 U7 U8 U9 1 2 3 4

Parent Elements os. Child Elements None. Example 13.25. An example of the version element
<template> ... <os> <name>Fedora</name> <version>16</version> ... </os> </template>

Report a bug

113

CloudForms 1.1 Cloud Engine User Guide

Chapter 14. Application Blueprint XML Schema


14.1. assemblies
T he assem blies element is a container for the instances in an application. An application can contain more than one instance, which a CloudForms Cloud Engine user achieves using multiple assem bly elements with the assem blies element. T his element is a required element. Parent Elements deployable . Child Elements assem bly. Report a bug

14.2. assembly
T he assem bly element defines an instance in an application. A CloudForms Cloud Engine user can use multiple assem bly elements to create multiple instances in an application deployment. T able 14 .1. Attributes for the assem bly element Attribute nam e hwp Data T ype string enumerated Description T he name of the instance. A reference to the cloud resource profile for the instance.

Parent Elements assem blies. Child Elements im age , returns, services. Report a bug

14.3. contents (executable)


T he contents refers to the content of an executable script if no URL is specified in the executable element. Parent Elements executable . Child Elements None.

114

Chapter 14. Application Blueprint XML Schema

Report a bug

14.4. contents (file)


T he contents refers to the content of a configuration file if no URL is specified in the file element. Parent Elements executable . Child Elements None. Report a bug

14.5. deployable
T he deployable element is a base container for your application blueprint and represents the application for deployment. T his element is a required element. T able 14 .2. Attributes for the deployable element Attribute id nam e version Data T ype string string enumerated Description T he application blueprint's id. T he application blueprint's name. T he application blueprint's version. T he default value is 1.0 .

Parent Elements None. Child Elements description , assem blies. Report a bug

14.6. description (deployable)


T he description element is a plain text description of the application. Parent Elements deployable . Child Elements None. Report a bug

115

CloudForms 1.1 Cloud Engine User Guide

14.7. description (service)


T he description element is a plain text description of a service. Parent Elements service . Child Elements None. Report a bug

14.8. executable
T he executable refers to a script that launches upon an instance's post-boot. When the instance is launched, the Audrey executes the script for each service definition. T he executable script is responsible for understanding how to interpret the optional parameters and configuration files. T able 14 .3. Attributes for the element Attribute url Data T ype URL Description T he location and name of the executable script.

Parent Elements service . Child Elements content. Report a bug

14.9. file
T he file refers to an individual configuration file, which executable scripts can use. T able 14 .4 . Attributes for the element Attribute url Data T ype URL Description T he location and name of the configuration file.

Parent Elements files. Child Elements contents.

116

Revision History

Report a bug

14.10. files
T he files element is a container for configuration files in a application service. Parent Elements service . Child Elements file . Report a bug

14.11. image
T he im age element is a reference to a built image in your CloudForms Cloud Engine environment. T able 14 .5. Attributes for the im age element Attribute id build Data T ype UUID UUID Description A reference to an image's identification value. A reference to a build's identification value.

Parent Elements assem bly. Child Elements None. Report a bug

14.12. parameter
T he param eter element represents a single runtime parameter for an application service. T able 14 .6. Attributes for the parameter element Attribute nam e type Data T ype string One of scalar or password . Description T he name of the parameter. Indicates the type of parameter field, either a scalar value or a hidden password field.

Parent Elements param eters.

117

CloudForms 1.1 Cloud Engine User Guide

Child Elements value , reference . Report a bug

14.13. parameters
T he param eters element is a container for parameters in a application service. Parent Elements service . Child Elements param eter . Report a bug

14.14. reference
T he reference element accepts a return parameter from another assem bly. T his creates a dependency from one instance service to another. T able 14 .7. Attributes for the reference element Attribute assem bly param ete r Data T ype string string Description T he name of the assembly with the desired return parameter. T he name of the return parameter.

Parent Elements param eter . Child Elements None. Report a bug

14.15. return
T he return element is a single parameter value that an application service provides. Other assemblies utilize these return parameters for use in their own executable scripts. T he return element uses variables from the Facter Ruby library. For more information, read the full specification of Facter variables on the Facter Documentation website
[1] .

118

Revision History

T able 14 .8. Attributes for the return element Attribute name Data T ype string Description T he name of the return parameter.

Parent Elements returns. Child Elements None. Report a bug

14.16. returns
T he returns element is a container for return parameters from application service. Parent Elements assem bly. Child Elements return . Report a bug

14.17. service
T he service element configures a runtime service on your application. An application can contain multiple services each using a service container element. Audrey runs a service using an executable script, an optional list of configuration files, and an optional list of parameters. T able 14 .9. Attributes for the element Attribute nam e Data T ype string Description T he name for the service.

Parent Elements services. Child Elements description , executable , files, param eters. Report a bug

14.18. services
119

CloudForms 1.1 Cloud Engine User Guide

T he services element is a container for runtime services for the application. Parent Elements assem bly. Child Elements service . Report a bug

14.19. value
T he value element indicates the default value of a parameter. Parent Elements param eter . Child Elements None. Report a bug
[1] Fac ter Do c umentatio n - http ://d o c s .p up p etlab s .c o m/fac ter/

120

Revision History

Revision History
Revision 0-93 T ue 19 Feb 2013 Updating documentation for RHEL 6.4 support Revision 0-92 Wed 13 Feb 2013 Updating documentation for RHEL 6.4 support Minor fixes Revision 0-91 Minor typos. Fri 4 Jan 2013 Dan Macpherson

Dan Macpherson

Julie Wu

Revision 0-90 T hu 3 Jan 2013 Julie Wu Changed System Engine to Cloud Engine in the restore procedure. Revision 0-88 Beta respin. Revision 0-87 Snapshot for translation. Revision 0-86 Minor fix. Fri 16 Nov 2012 Dan Macpherson

Mon 12 Nov 2012

Dan Macpherson

T hu 08 Nov 2012

Dan Macpherson

Revision 0-85 T hu 08 Nov 2012 Implemented Docs QE feedback. Revision 0-84 Wed 07 Nov 2012 Implemented minor corrections. Revision 0-83 Mon 05 Nov 2012 Snapshot for 1.1 Release Candidate.

Dan Macpherson

Dan Macpherson

Dan Macpherson

Revision 0-82 Fri 02 Nov 2012 Dan Macpherson Revising intructions for Cloud Resource Providers to match UI changes. Revision 0-81 Fri 02 Nov 2012 Removing support for RHEL 6.1 images. Revision 0-80 T hu 01 Nov 2012 Fix to Bugzilla product and component. Revision 0-79 T ue Oct 30 2012 Removed reboot/reset note from 6.4.4 Added vm tools agent note in 6.4.4 Added more example component outlines Revision 0-78 Mon Oct 29 2012 BZ #818573 - RHEV API ports fixed Dan Macpherson

Dan Macpherson

Julie Wu

Dan Macpherson

121

CloudForms 1.1 Cloud Engine User Guide

BZ #867928 - Added note regarding retaining LDAP Fluff config when adding a new provider BZ #820228 - T ypo fixes BZ #870084 - Add note for stopping build and push processes BZ #799020 - Correction to tar command for backing up config files BZ #843807 - Added correct description of Priority Revision 0-77 Fri Oct 19 2012 Minor fix to Application Blueprint example Revision 0-76 Fri Oct 19 2012 Revised screenshots after UI change Revision 0-74 T hu Oct 18 2012 BZ #799020 - Revision of Disaster Recovery Plan with juwu Revision 0-73 Package refresh T ues Oct 16 2012 Dan Macpherson

Dan Macpherson

Dan Macpherson

Dan Macpherson

Revision 0-72 T ues Oct 16 2012 Dan Macpherson BZ #795901 - Modification to reflect UI change BZ #818573 - Document obtaining SSL cert for RHEV BZ #856379 - Fixed typos BZ #856380 - Expanded Views section BZ #856390 - Fixed typo BZ #856391 - Modification to reflect UI change BZ #859506 - Document behavior of Ignore Instance errors during launch button BZ #862323 - Added some extra information on services dependencies Revision 0-71 Fixed Chapter9 typos Fri Oct 12 2012 Julie Wu

Revision 0-70 T hu Oct 11 2012 BZ #856390 fixed typos and tags Revision 0-69 Revisions for first draft Revision 0-68 Revised task structure Mon Oct 08 2012

Julie Wu

Dan Macpherson

Wed Oct 03 2012

Dan Macpherson

Revision 0-67 Wed Oct 03 2012 Added T opic: Example Application Blueprint file [11651]

Julie Wu

Revision 0-66 Wed Sept 19 2012 Julie Wu Added example in [9594][9595][9605][11541][11540][9609][9614][9628][9617][9619][9620][9621][9622][9624][9625][9626 ][9627][9623][9630][9631][9597][9599][9612][9607][9610][9611] Revision 0-65 Wed Sept 19 2012 Added Provider Selection Strategy documentation Daniel Macpherson

122

Revision History

Revision 0-64 Mon Sept 17 2012 Updated [9729] [11524] Edited [9603], added Audrey example Added [11540][11541] Edited [9748][9747] Revision 0-63 Fri Sept 14 2012 Early preview documentation for CloudForms 1.1 Revision 0-62 Mon Sep 10 2012 Merged several topics together Removed section layer in Runtime chapter Revision 0-61 Initial build for CloudForms 1.1 Mon Sept 10 2012

Julie Wu

Daniel Macpherson

Julie Wu

Daniel Macpherson

Revision 0-60 Fri Sep 07 2012 Edited not in [9647] #819674 Added an important note in [9651]

Julie Wu

Revision 0-59 T hu Sep 06 2012 Julie Wu Created T opic [11398]Deleting an image from the Cloud Resource Provider #854674 Fixed typos in [9953] [9663] #854674 Replaced RHEV-M with Red Hat Enterprise Virtualization Manager [9964] #854674 Edited [9964] Edited [9965] title #819674 Added an important note in [9647] Revision 0-58 Wed Sep 05 2012 Restored [9747][9748][9749][9744] and removed [9966] Merged [9927][9733] Merged [9751][9931] Merged [9933][9671] Merged [9934][9673] Moved image from [9753] to [9653] Moved image and important note from [9756] to [9674] Edited [9756] topic title Edited [9755] topic title Moved image from [9754] to [9666] Removed [9935] In [9666], added T ask Summary Revision 0-57 T ue Sep 04 2012 Merged [9747][9748][9749][9744] into Components [9966] Revision 0-56 T hu Aug 30 2012 #808208 wrote a new procedure for deleting an image from GUI Revision 0-55 Edited T opic titles Wed Aug 29 2012 Julie Wu

Julie Wu

Julie Wu

Julie Wu

123

CloudForms 1.1 Cloud Engine User Guide

Merged [9766][9768][9767] into [9943] Revision 0-54 T ue Aug 27 2012 Julie Wu Updated OS version in: Instance Operating Systems [9923]#850507 Added full stop in:First T ime Login [9927]#847165 Revision 0-53 Minor fix for 1.0.1 release Fri Jul 6 2012 Daniel Macpherson

Revision 0-52 T ue Jun 19 2012 Minor revision for 1.0.1 release Revision 0-50 T ue Apr 13 2012 Final runtime script for System Engine registration Revision 0-4 6 T ue Apr 10 2012 Dropping FINAL documentation to translation Revision 0-4 5 Final minor revisions T hu Apr 5 2012

Daniel Macpherson

Daniel Macpherson

Daniel Macpherson

Daniel Macpherson

Revision 0-4 4 Mon Apr 2 2012 BZ #805601 - Correction to typo in import CLI options

Daniel Macpherson

Revision 0-4 2 Fri Mar 30 2012 Daniel Macpherson BZ #807851 - Added new task for System Engine registration with runtime configuration Revision 0-4 0 T hu Mar 29 2012 Revisions to Aeolus CLI instructions BZ #805596 - Revised Aeolus CLI build instructions BZ #805601 - Revised Aeolus CLI import instructions Daniel Macpherson

Revision 0-39 Wed Mar 28 2012 Daniel Macpherson BZ #805609 - Corrections to Create Application Blueprint process BZ #805612 - Changed Accessing Instances in an Application process to be EC2-specific BZ #805555 - Added note that cites Installation Guide for process to create providers via aeolusconfigure BZ #805559 - Added note to remove storage details for some cloud resource profiles BZ #805563 - Minor revisions to Pushing an Image section BZ #805578 - Revisions to Importing a Component Outline from a Cloud Resource Provider section BZ #805590 - Revision to Importing a Component Outline import note in regard to Audrey BZ #805553 - Minor revisions to Introduction BZ #805777 - Added rootpw element to the example templates Revision 0-38 Mon Mar 19 2012 Revising as per advice from translation team. Revision 0-37 Mon Mar 19 2012 T ag correction for GUI element. Daniel Macpherson

Daniel Macpherson

124

Revision History

Revision 0-34 Mon Mar 5 2012 Implemented suggestions from translation team. Revision 0-21 Fri Feb 10 2012 Implemented Documentation QE feedback.

Daniel Macpherson

Daniel Macpherson

Revision 0-17 Wed Feb 8 2012 Daniel Macpherson BZ #785043 - Improved cloud resource provider account creation instructions and removed redundant step. Revision 0-16 Wed Feb 8 2012 Daniel Macpherson Revised documentation based upon changes to UI labels and branding. Fixes to documentation based upon QE. Revision 0-15 T ue Jan 31 2012 Daniel Macpherson BZ #717997 - Added note on use of localhost for repository URL in T DL BZ #719972 - Added more detail on version element in T DL. Added RHEL 5 T DL example. Revision 0-14 Mon Jan 30 2012 Daniel Macpherson BZ #781594 - Added note regarding instances built from imported images not containing Audrey Agent. Revision 0-10 Fri Jan 12 2012 Daniel Macpherson BZ #746306, BZ #747645, BZ #767382 - Improved Cloud Resource Cluster concept and task. Added admonition regarding priority for providers over clusters. Revision 0-3 T ue Dec 09 2011 Building book for technical review Revision 0-2 Publishing on doc-stage T ue Dec 01 2011 Daniel Macpherson

Shikha Nansi

Revision 0-1 T ue Dec 01 2011 Initial creation of book by publican

Shikha Nansi

125