Installing Puppet Enterprise on Linux server

Installing Puppet Enterprise on Linux server

1.  Go to https://puppet.com/ and download the .tar.gz Puppet enterprise master and Agent installation      files.
eg: for centos7
 https://pm.puppetlabs.com/cgi-bin/download.cgi?dist=el&rel=7&arch=x86_64&ver=latest
2.  Upload the puppet-enterprise tar.gz file to the Puppet Master Server.
Here we are using a server installed with CentOS

3. untar the installation file

4. Now we will start the  Puppet Enterprise Master installation.
Go to the folder and run the installer file puppet-enterprise-installer

Note:  if you are not using a DNS server, add the entries for the IP address and hostname in the /etc/hosts files

5.  Press ‘Y’ to continue installation

6. As shown in the above pic, open a browser and go to the url mentioned.
Here we are opening https://puppetmaster:3000
Click “Let’s get started!”  to continue the installation.

Note: If you are accessing GUI from a different desktop/server make sure that the port 3000 and 443 ( for later use ) is open between them

7. Choose your deployment mode.
Since my environment is less than 7000 nodes,  I am using only 1 master server, I am going with Monolithic.

8. Enter the puppet master FQDN and Puppet master DNS alias.

Note: if you don’t have a DNS server, make sure that these entries are added to /etc/hosts file

9.  Enable Application Orchestration

10
10.1  Select the database support needed.
Here I am selecting the option to install the PostgresSQL and to create PuppetDB database on it      during the installation.
10.2 Enter the admin password, this is need to login to the Enterprise GUI console after installation.

11. Confirm the plan and click “continue”

11.  If there are no messages in red color, click “Deploy now”.

12. Now the Puppet entries is getting installed.

13. After installation you can login to the Puppet Enterprise GUI using https://puppetmaster url and user name as admin and password  given in step 10.2

 

Vagrant – running a vagrant box in windows 7

Vagrant  – running a box in windows 7

1.  Download and install virtual box from https://www.virtualbox.org/wiki/Downloads
and start up the virtual box.

2. Download and install vagrant from  http://downloads.vagrantup.com/

I had my vagrant installed in the location C:HashiCorpVagrant.
And added C:HashiCorpVagrant;C:HashiCorpVagrantbin to windows environment path.

3.  Also install putty from http://www.putty.org/   for SSH access to the box

4.  I had issues installing the box image using vagrant command, through internet. So I downloaded them and copied them and initiated it locally.

For this I created a project location C:HashiCorpVagrantProjectsVM

And I downloaded the box file or copied the box file from the url http://files.vagrantup.com/lucid32.box to the default box file location %userprofile%.vagrant.dboxes

5.  Add the downloaded box.
For this open the windows command prompt as administrator and add the box to vagrant list using command,

> vagrant box add lucid32 %userprofile%.vagrant.dboxeslucid32.box –provider virtualbox

  note : replace %userprofile% with the location to .vagrant.d folder

6.   Go to the project location C:HashiCorpVagrantProjectsVM and run the command

> vagrant init lucid32

it will create a vagrant configuration file in the current project location

7. Now start up the VM using the box image lucid32 by running the command

> vagrant up


8.  To get the ssh details run the command,

> vagrant ssh-config



9. Use the details got from the step 8 to ssh login using putty.

 username : vagrant
 password: vagrant



Now you are in the vm.




HP StorageWorks D2700 DAS – adding spare disk

HP StorageWorks D2700 DAS – How to add spare disk1.  Login to the server and go to the HP Array configuration utility.
Select the “SAS Array” for which we have add the spare disk.
Here we have selected the “SAS Array B”.’

Then click on the “Spare Management” button shown on the right side of the window.

 

2.  Select the disk from “Unassigned Drives” group and click save.
Here we are adding 1 spare disk. So selected the disk in Bay 10 and click “save” button to assign it as spare disk for the “SAS Array B”.

 

3.  Now can see the disk is assigned as a spare disk for the “SAS Array B”.

 

 

Create LVM on CentOS / RHEL 5.8

How to add 3 new external hdds and create LVM on it.

steps required to configure LVM include:

 

  • Creating physical volumes from the hard drives.
  • Creating volume groups from the physical volumes.
  • Creating logical volumes from the volume groups and assign the logical volumes mount points
In this case external hdds connected to the server as /dev/sdc, /dev/sdd, /dev/sde
[ The command fdisk -l  will show the hdds connected to the server ]
1. Create a partition on the hdd and change file system to 8e (LVM )
Note:- This is a destructive process, and make sure that any data in the hdd is backed up before proceeding.
  a) fdisk /dev/sdc
  b) enter “n” to create partition,
         enter “1” to create primary partition
         select start and end as default (just press enter at both prompts )
  c) enter “t” to change the file system type and enter ‘8e’ for LVM
  d) enter “w” to save the changes
  e) enter “q” to exit
2)  Create Physical volume

 

3) Create Volume group from the Physical volumes create

Here I am creating a Volume group  “DB_TEST_EXTERNAL”

 

4) Create Logical Volume from the Volume group

Here I am creating a Logical Volume named “LV_DATA”

5)  Create filesystem on the share

mkfs.ext3 /dev/DB_TEST_EXTERNAL/LV_DATA

 

VMware ESXi 5.x – to mount a netapp NFS share from ESXi command prompt

VMware ESXi 5.x – to mount a netapp NFS share from ESXi command prompt
1)   To list the current NFS mounts on the server


esxcli storage nfs list
2) Command to mount the a Netapp NFS share
volume name : /vol/v2tc_x1/qtc_x1/
hostname :  remotehost.domain.com
mount folder name:  DataStore_Name esxcli storage nfs add -H remotehost.domain.com  -s /vol/v2tc_x1/qtc_x1/ -v DataStore_Name



3) To remove the NFS mount


esxcli storage nfs remove -v DataStore_Name



Find HBA WWPN in RHEL / CentOS 5.x

Find HBA WWPN in RHEL / CentOS 5.X

Method1:

1) Run the following command to find the manufacturer of the HBA card

[root@host ~]# lspci |grep -i HBA
07:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
0a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

2) To find the WWPN number use the following command and look for port_name

systool -c fc_host -v

[root@host ~]# systool -c fc_host -v |grep “port_name”
port_name           = “0x500XXXXXXXXXXX7e”
port_name           = “0x500XXXXXXXXXXX4a”

Method2:

[root@host ~]# cat /sys/class/scsi_host/host1/device/fc_host:host1/port_name
0x500XXXXXXXXXXX7e
[root@host~]# cat /sys/class/scsi_host/host0/device/fc_host:host0/port_name
0x500XXXXXXXXXXX4a

Change multipathing policy to RoundRobin on ESXi 5.x

1.
Select an ESXi host you want to modify, and
click the Configuration tab.
2.
Click Storage.
3.
Select a datastore or mapped LUN.
4.
Click Properties.
5.
In the Properties dialog, select the desired
extent, if necessary.
6.
Click Extent Device > Manage Paths and obtain
the paths in the Manage Path dialog.
7.
Under the Policy section, select the desired
multipathing policy from the dropdown.

8.
Click Change to confirm the change in path
policy.

 

How to find the HBA details in ESXi 5.1 server

How to find the HBA details in ESXi 5.1 server
1.  from /proc/scsi
~ # cd /proc/scsi/qla2xxx/
/proc/scsi/qla2xxx #
/proc/scsi/qla2xxx # ls
3  4
/proc/scsi/qla2xxx # cat 3 | head -3
QLogic PCI to Fibre Channel Host Adapter for HPAK344A:
        FC Firmware version 5.06.05 (90d5), Driver version 934.5.6.0-1vmwHere,
FC firmware version is – 5.06.05 (90d5),
Driver version is – 934.5.6.0-1vmw

2.  run the following command
~ # esxcfg-scsidevs -a
 # esxcfg-scsidevs -a
vmhba0  hpsa              link-n/a  sas.500xxxxxxxxxxxxx                    (0:2:0.0) Hewlett-Packard Company Smart Array P420i
vmhba1  qla2xxx           link-up   fc.500xxxxxxxxxxxd9:500xxxxxxxxxxxd8    (0:xx:x.x) QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA
vmhba2  qla2xxx           link-up   fc.500xxxxxxxxxxx99:500xxxxxxxxxxx98    (0:xx:x.x) QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA– you can see the driver as qla2xxx  for QLogic HBA card
— now to find driver version execute the following command

~ # vmkload_mod -s qla2xxx |grep Version
Version: Version 934.5.6.0-1vmw, Build: 472560, Interface: 9.2 Built on: Sep 21 2012

HP Storage P2000 G3 MSA – Delete a vdisk and create a new vdisk

One of the vdisk on the HP Storage P2000 G3 MSA was showing fault.
I got an error message saying that “The virtual disk is offline. Disks may be down or missing. Data may be lost”.

We had 2 hdd failed in the vdiks, we had this failed hdd’s replaced.
The 2 hdd failure has caused the raid 5  vdisk to fail.

Now I couldn’t re-add the new disk because of the raid failure.

So I had to delete the vdisk and create a new vdisk and volumes under the vdisk.