Cloud Lab-26: vCloud Director Cells- ”DB Preparation and VM Installation ” (Part 2)

In Previous post i have showed you how to create a VM and then install the Redhat Linux OS for vCloud Cells . today lets move forward to see some basic configurations and also prepare a vCloud Director Cell database.which we later use for Cell deployment.

LAB-26 TASKS (Part 2)

In this Lab we perform following tasks

  1. Cloud Cell-1 VM basic configuration
  2. Cloud Cell2 VM Creation/Installation and basic Configuration
  3. Create database for vCloud Director (Cells).

1-Cloud Cell-1 VM Basic Configuration.

When VM boot up. Use SSH or VM Console to login at cloud-cell1 machine.

cloudlab26-vCDC-DBandVMInstall-28

Disable SELinux.

Edit the SELINUX configuration file.

#vi /etc/selinux/config”

Disable “SELINUX” parameter as highlighted.

cloudlab26-vCDC-DBandVMInstall-29

Disable IPV6 (if not required)

To disable IPv6 on both this flavor we have add following lines in /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

#vi /etc/sysctl.conf

cloudlab26-vCDC-DBandVMInstall-30

Restart the VM in order to effect SELINUX Setting.

Install VM Tools

Select the VM -> Actions-> All VCenter Actions- > Guest OS -> Install VMWare Tools

cloudlab26-vCDC-DBandVMInstall-31

Click “mount”. It will mount the VM Tools ISO file.

cloudlab26-vCDC-DBandVMInstall-32

Go to SSH or VM Console and mount the CD on Linux (Cloud-Cell1) VM.

# mount /dev/cdrom /mnt

cloudlab26-vCDC-DBandVMInstall-33

Go to mnt directory and list the file.

# cd /mnt

#ls

 cloudlab26-vCDC-DBandVMInstall-34

Copy the “VMWareTools-9.4.0-1280544.tar.gz” to “tmp” directory

#cp VMWareTools-9.4.0-1280544.tar.gz /tmp

cloudlab26-vCDC-DBandVMInstall-35

Now go to “tmp” directory and unpack the VMWare Tool File.

#cd /tmp

#tar –xvzf VMWareTools-9.4.0-1280544.tar.gz

cloudlab26-vCDC-DBandVMInstall-36

When VM Tool unpacked then list the tmp directory and you will find vmware-tools-distrib directory go into the directory and list the file.

#ls

#cd vmware-tools-distrib

#ls

cloudlab26-vCDC-DBandVMInstall-37

Run the vmware-install.pl script to begin the vm tools installation.

#./vmware-install.pl

cloudlab26-vCDC-DBandVMInstall-39

It will prompt you for several step, leave all as default and click press enter in every step.

When you VM tools installation will finish then you will find following information at the end.

cloudlab26-vCDC-DBandVMInstall-40

To verify the VM Tool is installed. Go to VM -> Summary -> See VMWare Tools in running stat as highlighted

cloudlab26-vCDC-DBandVMInstall-41

We already installed OS with Minimal packages.

But see if you still have any extra demons (services) running. Then it is always good practice to close (stop) them. In lab it is in not mediatory but production you have to do this for security purpose.

As in minimal configuration GUI is not installed by default. So it boot in cmd prompt mode which we called in Linux term run level 3.

To stop the services on RUN level 3 (cmd mode)

# cd /etc/rc3.d/

#ls

Here you can see Service name start with “K” and “S”. The service which start with “S” are in running mode.

In my case ip6tables, postfix and rhnsd service are extra. Use chkconfig linux cmd to stop these services.

Stop service (At boot time)

# chkconfig ip6tables off #chkconfig postfix off

#chkconfig rhnsd off

If you reboot your VM after above step then skip the below Stop services step

Stop services (Manually Stop the Service)

# service ip6tables stop # service postfix stop

# service rhnsd stop

*Note: repeat the same steps to stop services at run level 5 (GUI mode). Only different is to go at “/etc/rc5.d/” directory insteat of “/etc/rc3.d/”*

cloudlab26-vCDC-DBandVMInstall-43

Stop the Linux Firewall (in lab it is fine) but product do not do this.

#service iptables stop

cloudlab26-vCDC-DBandVMInstall-45

Also stop at boot time

#chkconfig iptables off

Now VM is ready. You may start the vCloud director Cell install.

2-Cloud Cell2 VM Creation/Installation and basic Configuration

Repeat the same steps (1-6) to install, configure Cloud cell2. Following are the information which you should know about vCloud cell 2.

  • Set VM name (cloud-cell2)
  • Configure an IP address (168.150.11(http) – 12 (consoleproxy))
  • DNS IP address (192.168.150.1)
  • Verify time and time zone settings (Asia/Karachi)

Enter forward and Reverse DNS Entry for cloud-cell2.vmlab.com and cloud-cell2.vmrc.vmlab.com

3-Create database for vCloud Director Cells

In my Lab, I already have the SQL Server running. Following are specs and recommendation for Database server.

LAB Database VM Specs
VM Specs Memory CPU Disk
Windows Server 2008 R2 Std (OS)SQL Server 2008 Enterprise edition(DB)

 

4 GB 2 50 GB
VMWare Recommendation
SQL , Oracle 16 GB 4 100 GB

 Prerequisites (Skip In lab, because I already have the SQL Server)

  • Install Windows 2008 R2 Standard edition
  • To configure Microsoft SQL Server, log on to the SQL Server host computer using administrator credentials. You can configure SQL server to run with the LOCAL_SYSTEM identity, or any identity with the privilege to run a Windows service.
  • Configure database server
    • Specify Mixed Mode authentication during SQL Server setup.

*Note: Windows Authentication is not supported when using SQL Server with vCloud Director*

Create Database for Cloud Cells

Go to Cloud-SQL machine (192.168.150.3) and connect sql server instance from “SQL server management tools”

cloudlab26-vCDC-DBandVMInstall-46

In Object Explorer. Click on “New query” button as highlight for script to create cloud DB

cloudlab26-vCDC-DBandVMInstall-47

Create a folder with name “CloudDB” in “C Drive” I have only one drive. In production you will place the DB on high speed disk.

Copy and paste the below script on query explorer and click “execute” button. It will create a DB with name “vcloud”

USE [master]

GO

CREATE DATABASE [vcloud] ON PRIMARY

(NAME = N’vcloud’, FILENAME = N’C:\ CloudDB \vcloud.mdf’, SIZE = 100MB, FILEGROWTH = 10% )

LOG ON

(NAME = N’vcdb_log’, FILENAME = N’ C:\ CloudDB \vcloud.ldf’, SIZE = 1MB, FILEGROWTH = 10%)

COLLATE Latin1_General_CS_AS

GO

cloudlab26-vCDC-DBandVMInstall-49

The values shown for SIZE are suggestions. You might need to use larger values.

Refresh to object explorer and verify new database has created.

cloudlab26-vCDC-DBandVMInstall-51

Set the transaction isolation level.

Copy and paste the below script in query explorer and execute. This 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

cloudlab26-vCDC-DBandVMInstall-53

Create the vCloud Director Database user account.

Copy and paste the below script in query explorer and execute .this script creates database user name “vcloud” with password “P@ssw0rd”.

USE [vcloud]

GO

CREATE LOGIN [vcloud] WITH PASSWORD = ‘P@ssw0rd’, DEFAULT_DATABASE =[vcloud],

   DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF

GO

CREATE USER [vcloud] for LOGIN [vcloud]

GO

cloudlab26-vCDC-DBandVMInstall-56

Verify new created user account.

cloudlab26-vCDC-DBandVMInstall-57

Assign permissions to the vCloud Director Database user account.

Copy and paste the below script in query explorer and execute .this script assigns the db_owner role to the database user created above.

USE [vcloud]

GO

sp_addrolemember [db_owner], [vcloud]

GO

cloudlab26-vCDC-DBandVMInstall-59

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s