Wednesday, August 7, 2013

How to Deploy a VMware vCloud Director (vCD) 5.1 using RHEL 6.2



This is a down and dirty guide for deploying vCloud. This guide uses RHEL 6.2 (Red Hat Enterprise Linux 6 64 bit, Update 2)  because it is the latest version supported by vCloud 5.1, and it already includes java 1.6, which is needed for the certificate generation later (assuming your using self-signed, again this is only for LAB use)

  1. This guide assumes you already have:

    1. At least one ESXi Host with the following VM’s on it

      • Windows Server 2008 R2 with a supported version of Microsoft MS SQL DB installed

      • vShield manager



    2. A management machine with SSH and SCP

    3. Intimate knowledge of VMware vSphere 5.1



  2. Create the vCD VM - It requires a minimum of 1GB memory, however I recommend allocating 2GB minimum

  3. Add two network interfaces (one will be used for for http, one will be sued for consoleproxy)

  4. Eager Zero Thick provision the default 16GB hard drive

  5. Install RHEL 6.2 using the standard install options

  6. Post Installation

    1. Connect to the RHEL 6.2 virtual machine console

    2. Create a location to drop files

      1. mkdir /install



    3. Make sure SSH is enabled for ease of management

    4. Install VMware Tools

    5. Allocate your Static IP’s addresses

      1. Run “setup” and put them in, sometimes after you configure the IP’s the nics won't auto start, this can be resolved by editing /etc/sysconfig/network-scripts/ifcfg-eth0 and make sure it says the line: ONBOOT=yes

      2. Turn off local firewall

      3. Install libXdmcp

        1. libXdmcp-1.0.3-1.el6.x86_64.rpm

        2. Once downloaded, WinSCP it to your RHEL 6.2 vCD VM into the /install directory

        3. On the RHEL 6.2 vCD VM

          1. cd /install

          2. chmod 555 libXdmcp-1.0.3-1.el6.x86_64.rpm

          3. rpm –i libXdmcp-1.0.3-1.el6.x86_64.rpm

          4. It should now be installed



        4. Download vmware-vcloud-director-5.1.0-810718.bin from VMware’s site, WinSCP it to your vCD VM, put it into /install directory

        5. on your vCD VM chmod 555 vmware-vcloud-director-5.1.0-810718.bin

        6. Check your Java version

          1. java –version

          2. It should respond with 1.6.0_22 or higher, if it doesn’t, I’ll make a blog post on how to upgrade it (comingsoon)

          3. You need version 1.6 if you are making your own self signed certs on the vCD VM









  7. Prepare your Certificates

    1. Good Article here

    2. keytool -keystore /install/certificates.ks -storetype JCEKS -storepass password -validity 9999 -genkey -keyalg RSA -alias http

    3. Magic Decoder Ring:

      1. keytool –keystore is the command your running, if its not there vCD will install the keytool command into /opt/vmware/vcloud-director/jre/bin/keytool after you run the executable (later in section 7)

      2. /install/certificates.ks is where we are putting the certificates file and what we are naming it

      3. -storepass is the password for the store, you’ll need this at install/configure time

      4. validity is 9999 days, if you don’t specify this, your vCloud certs will only be valid 120 days.

      5. alias is either http or consoleproxy, this specifies which IP / Portbind you are tying the Cert to.





  8. Prepare your Database

    1. Again, I am assuming you have MS SQL 2008R2 installed, without a local firewall, or ports opened.

    2. Login to Microsoft SQL Management Studio

    3. This is a great article, follow it, I will paste the highlights from it below, you can copy/paste these commands into SQL Query analyzer!!


    1)    Configure the database server.
    A database server configured with 16GB of memory, 100GB storage, and 4 CPUs should be adequate for most vCloud Director clusters.
    2)    Specify Mixed Mode authentication during SQL Server setup.
    Windows Authentication is not supported when using SQL Server with vCloud Director.
    3)    Create the database instance.
    The following script creates the database and log files, specifying the proper collation sequence.
    USE [master]
    GO
    CREATE DATABASE [vcloud] ON PRIMARY
    (NAME = N'vcloud', FILENAME = N'C:\vcloud.mdf', SIZE = 100MB, FILEGROWTH = 10% )
    LOG ON
    (NAME = N'vcdb_log', FILENAME = N'C:\vcloud.ldf', SIZE = 1MB, FILEGROWTH = 10%)
    COLLATE Latin1_General_CS_AS
    GO
    The values shown for SIZE are suggestions. You might need to use larger values.
    4)    Set the transaction isolation level.
    The following script sets the database isolation level to READ_COMMITTED_SNAPSHOT.
    USE [vcloud]
    GO
    ALTER DATABASE [vcloud] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    ALTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON;
    ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;
    ALTER DATABASE [vcloud] SET MULTI_USER;
    GO
    For more about transaction isolation, see http://msdn.microsoft.com/en-us/library/ms173763.aspx.
    5)    Create the vCloud Director database user account.
    The following script creates database user name vcloud with password vcloudpass.
    USE [vcloud]
    GO
    CREATE LOGIN [vcloud] WITH PASSWORD = 'vcloudpass', DEFAULT_DATABASE =[vcloud],
    DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
    GO
    CREATE USER [vcloud] for LOGIN [vcloud]
    GO
    6)    Assign permissions to the vCloud Director database user account.
    The following script assigns the db_owner role to the database user created in Step 5.
    USE [vcloud]
    GO
    sp_addrolemember [db_owner], [vcloud]
    GO

  9. Install vCD software on the vCD VM

    1. Run the executable

      1. ./install/vmware-vcloud-director-5.1.0-810718.bin

      2. It will ask you about which IP you want for http & for consoleproxy, http will be your web front end.

      3. It will ask you about the location of your certificates file(s)

        1. /install/certificates.ks

        2. and the password you specified when creating the certs back in Section 5



      4. It will ask you what your vShield Manager IP & Login info is (default is admin/default)

      5. It will ask your what type of DB your using, choose (2) MS SQL

      6. Fill in the IP address of your MS SQL server

      7. Default port is 1433 unless you changed it

      8. database name is vcloud

      9. database instance should also be default (unless using a shared DB server)

      10. Enter the DB user & password we specified back in section 6.

      11. It should finish the install and ask if you want to start the service, you do.

      12. Service can take a few minutes to start, be patient, then go tohttp://ipaddressofhttp/ and fill out the starting information.

      13. Default login will be administrator/yourpassword






A few Helpful Links:


No comments:

Post a Comment