Showing posts with label vShield Manager. Show all posts
Showing posts with label vShield Manager. Show all posts

Friday, January 11, 2013

Installing vCloud Director on CentOS and MS SQL Express - part 3

This is part 3 of a 3 part post that presents installation of vCloud Director 5.1 on CentOS 6.3 and MySQL Server 2012 Express
  • part 1 presents Configuration of MS SQL 2012 Express Database for vCloud Director installation
  • part 2 presents Configuration of CentOS 6.3 for vCloud Director
  • part 3 presents Installation of vCloud Director 5.1


Installation of vCloud Director 5.1

Download the bin package from VMware site (vmware-vcloud-director-5.1.1-868405.bin) and transfer it on the server. Change permissions on the file and run it. Answer "yes" the when Linux distribution is checked and stop the installation at the second question.
[root@vcd5101 ~]# chmod u+x vmware-vcloud-director-5.1.1-868405.bin
[root@vcd5101 ~]# ./vmware-vcloud-director-5.1.1-868405.bin
Checking architecture...done
Checking for a supported Linux distribution...
You are not running a Linux distribution supported by vCloud Director.
Would you like to proceed anyway? [y/n] y
….
Would you like to run the script now? (y/n)? n

We stop the installation because VMware KB 1026309 states that the keytool to be used when generating SSL certificates is the one shipped by VMware which can be found at /opt/vmware/vcloud-director/jre/bin/keytool. It is time to generate SSL certificates (one for http and one for console proxy). 
[root@vcd5101 ~]# mkdir /opt/vmware/vcloud-director/certs
[root@vcd5101 ~]# /opt/vmware/vcloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -validity 365 -alias http

[root@vcd5101 ~]# /opt/vmware/vcloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -validity 365 -alias consoleproxy

[root@vcd5101 ~]# chown -R vcloud.vcloud /opt/vmware/vcloud-director/certs/
Setup transfer server storage /opt/vmware/vcloud-director/data/transfer (NFS share) - not mandatory for single cell installation, but all bloggers recommended it.


[root@vcd5101 ~]# vi /etc/fstab
192.168.X.X:/mnt/vol1-nfs /opt/vmware/vcloud-director/data/transfer nfs rsize=8192,wsize=8192,intr 0 0
[root@vcd5101 ~]# mount -a -t nfs
Now the installation can continue by running  /opt/vmware/vcloud-director/bin/configure. Choose the IP addres for HTTP, Console and enter path to certificate store. Add Syslog server IP (I am using rsyslog instance on vCD Cell).

Enter information for DB connectivity
 

After DB configuration is finalized, start services

Configure Sysprep

Create sysprep packages structure for Windows Server 2000, 2003 and Windows XP transfer sysprep files in it.
[root@vcd5101 ~]# mkdir vcloud-sysprep
[root@vcd5101 ~]# cd vcloud-sysprep
[root@vcd5101 vcloud-sysprep]# mkdir win2000 win2k3 win2k3_64 winxp winxp_64

After sysprep files have been transfered in the strucutre for each guest OS run the following command

[root@vcd5101 ~]# /opt/vmware/vcloud-director/deploymentPackageCreator/createSysprepPackage.sh /root/vcloud-sysprep/

Restart vcd service
[root@vcd5101 ~]# service vmware-vcd restart

Setup vShield Manager

Open VM console and login to vShield manager using admin/default. execute enable and enter default as password. Run setup command and configure networking. Login on HTTPS to the IP address configured previously and connect vShield Manger to vCenter Server. Finish the configuration by setting DNS, NTP and syslog server information.

Login to vShield Manager first configuration wizard and start configuration of vCloud Director cell.



Wednesday, January 9, 2013

Installing vCloud Director on CentOS and MS SQL Express - part 1

Before it all starts


In the past 3 months I have been involved in projects using vCloud Director. The necessity to have a test environment appeared naturally. So I started working in my home lab on deploying vCloud Director. I had the help of some other blogs (about which you will hear in the post below) but I have also done it different by using CentOS 6.3 and MS SQL 2012 Express (both not supported by VMware).

The following post presents installation of vCloud Director 5.1 on CentOS 6.3 and MS SQL 2012 Express and will have 3 parts:
  • part 1 presents Configuration of MS SQL 2012 Express Database for vCloud Director installation
  • part 2 presents Configuration of CentOS 6.3 for vCloud Director
  • part 3 presents Installation of vCloud Director 5.1
Before starting anything make a little IP planning and check that you have a local DNS server and make sure that all infrastructure can be resolved properly (hosts, vcenter server, databases, vcloud cells and so on). I am using an AD (since I`ll  be testing LDAP integration ) integrated with MS DNS server. Other prerequisites: do not forget to deploy the vShield Manager appliance - each vCenter Server needs to have a vShield Manager. We will talk a bit later about basic configuration of vShield Manager.

 

Configuration of MS SQL 2012 Express Database for vCloud Director installation


First create the VM: 1 vCPU, 3 GB RAM (2GB recommended by MS), 25GB HDD thin provisioned (thin provisioning on SSD works great). Install Windows Server 2008  and VMware Tools. Configure the server (IP, hostname), if AD exists, join the server to the domain.

Next, download MS SQL 2012 Express from Microsoft site, the version that includes management studio (SQLEXPRWT_x64_ENU). Installing the DB is pretty straight forward - make sure to choose mixed mode authentication and configure sa user password. If you miss this step, it can be done after the install ( SQL Server Management Studio - Server properties - Security). During the configuration choose an instance name (VCDDB for example).

After SQL server is installed, open SQL Server Management Studio connect to VCDDB instance with sa user and add a user for vcloud director - vcddbadmin (Security - Logins - New)


Now it is time to create the DB: Database - New - vcddb01 (you can give it any name). Change the owner to user vcddbadmin.



Sizing the DB: VMware documentation offers the following parameters: data file (mdf) size = 100MB, filegrowth= 10% and for log file (ldf) size = 1MB, filegrowth= 10%. In lab environment these should suffice.
A very interesting post about vCloud director database can be found on Erik Bussink blog. Based on that post , I have decided to make the following configuration on my DB:
  • data file size = 1024MB, growth = 512 MB, limit = 3072 MB
  • log file size = 128 , growth = 128 MB, limit = 1024MB 
The actual limits are determined by both SSD space and VM size in my lab environment.



On Options page from database properties the proper collation sequence will be configured to Latin1_General_CS_AS. Default values for recovery model and compatibility level will be left unchanged ( Simple, SQL Server 2012 respectively)



The last action on the database is to prepare the DB. Again, I have used the information from Erik Bussink. Open query editor and execute the script below:

USE [vcddb01]
GO
ALTER DATABASE [vcddb01] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [vcddb01] SET ALLOW_SNAPSHOT_ISOLATION ON;
EXEC sp_addextendedproperty @name = N'ALLOW_SNAPSHOT_ISOLATION', @value = 'ON';
ALTER DATABASE [vcddb01] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;
EXEC sp_addextendedproperty @name = N'READ_COMMITTED_SNAPSHOT', @value = 'ON';
ALTER DATABASE [vcddb01] SET MULTI_USER;
GO

Form the original script I have removed the first line ALTER DATABASE [vcddb01] SET RECOVERY SIMPLE since the DB has default recovery model set as simple. Check that the extended properties were added: database Properties - Extended Properties.

To finish the installation, a couple of more things have to be done. First, configure MSSQL server to listen on TCP/IP. Using Sql Server Configuration Manager go to SQL Network Configuration and enable TCP/IP. In Properties tab chose the IP address and set the following parameters:Active YES,  Enabled YES, TCP Port 1433,  TCP Dynamic Port 0.

Then, restart the service and check that the server is listening on port 1433 (netstat -van).

Finally, configure Windows Firewall to allow incoming connections on TCP 143 and test that communication with the server on TCP 1433 is ok from another VM using the command telnet ip_addr_db 1433.