Book Image

PowerCLI Cookbook

By : Philip Brandon Sellers
Book Image

PowerCLI Cookbook

By: Philip Brandon Sellers

Overview of this book

Table of Contents (19 chapters)
PowerCLI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Build your own vCloud Director implementation on your vSphere lab environment


The third option is to build and load vCloud Director in a lab environment. This method is not significantly more difficult than AutoLab, but you might run into several issues during deployment that AutoLab can handle for you. This section is an overview of the build process; however, additional instructions for each step can be located in the VMware installation documentation for each product.

For your vCloud Director installation, you will need the following software loaded in your environment:

  • vCenter Server, ESXi hosts, and Microsoft Active Directory

  • vShield Manager

  • vCloud Director

The first step in enhancing a vCenter-managed environment and turning it into a vCloud-managed environment is to install vShield Manager if this isn't already in use on vCenter. vShield Manager controls network and security operations in vCenter and vCloud Director. vCloud Director requires vShield Manager, where vCenter can use it as an optional component.

Installing vShield Manager is simple. It is distributed as an OVA format virtual appliance. Perform the following steps to install vShield Manager:

  1. Using vCenter Client, import the OVA and complete the custom configuration values for default passwords.

  2. Once booted, log in to the web administration with the default password you defined and connect vShield Manager to your vCenter Server.

  3. After connecting, make sure to navigate to the vCenter server and click on each host. Install the vShield Endpoint component and optionally the vShield App component on each host. At this point, the vShield Manager is connected and ready for vCloud Director to be installed.

The next step is to install the vCloud Director; this is straightforward, but involves a few additional steps.

  1. You will need a Linux virtual machine loaded with a current operating system. CentOS is a good choice because it's free and works well with vCloud Director. You should deploy a virtual machine with two network adapters and preconfigure these network adapters with IP addresses before moving forward.

  2. The next step is to install a database for vCloud Director to connect to. You can download a free version of Oracle for Linux or Microsoft SQL Express installation. Oracle for Linux can be installed on the vCloud Director VM. If you choose SQL Express, you can install this on a Windows VM (possibly the Domain Controller for very small lab environments).

  3. Create a database and create the username and password needed to connect to it. You will use these credentials when configuring vCloud Director.

  4. The last step before installing vCloud Director is to generate a certificate keystore that will be used for the HTTPS connection on the vCloud Director's web interface. You can generate this using the Java keytool command in Linux.

  5. After installing a database, run the .bin installation file for vCloud Director in the vCloud VM. Any missing prerequisite software will be listed and you can load this with a Linux package manager.

  6. Install any prerequisites and restart the installation of vCloud Director. Once it finishes the installation, it prompts you to start the initial configuration and respond back with a yes reply.

In the initial configuration, you will specify the addresses to use with vCloud Director and the database to connect to. The initial configuration will connect to the database and build its database and tables. Once this step completes, you can launch and log in to vCloud Director with the username and password you defined during the configuration.

vCloud Director PowerCLI doesn't allow you to easily handle the highest level of administration for the vCloud environment. Instead, you should launch it and log into the administration web interface on vCloud Director. Once logged in, follow the Guided Tasks section to initially configure vCloud Director against your vCenter Server and set up a new provider virtual datacenter.

Once you have completed the guided tasks in vCloud Director, you should be ready to begin the recipes of Chapter 10, Working with vCloud Director from PowerCLI.