Sunday, 25 January 2015

CloudSystem Enterprise LDAP Integration

CloudSystem Enterprise LDAP Integration


I had a chance to play around with Organizations in CloudSystem Enteprise 8.1 and found the help and default values rather misleading and unhelpful for Active Directory Environment. I eventually captured the right values I was happy with and thought I'd share them here for reference as I'm going to have do this again someday!!

LDAP Server Information
Hostname: lab.local
Port: 389
Connection Security: SSL box unchecked
Base DN: DC=lab,DC=local
User ID (Full DN): CN=cloudsystem_service,OU=Service Accounts,DC=lab,DC=local
Password: XXXX
ReType Password: XXXX

LDAP Attributes:
User Email: mail
Group Membership: member
Manager Identifier: manager
Manager Identifier Value: dn
User Avatar: avatar

User Login Information:
User Name Attribute: sAMAccountName
User Search Base: OU=Department X Users,OU=Cloud Users
User Search Filter: sAMAccountName={0}
Search Option: Search Subtree Selected
Save first, then select Look Up User and put in username such as “jsoap” to validate

Access Control:
Add AD Group to Service Consumer Role
Enter a name for the group or organizational unit DN: CloudSystem Admins
Enter a group or organizational unit DN: CN=CloudSystem Admins,OU=Department X Groups,OU=Cloud Groups
Click Add / Update

I've still to add the Domain Controller SSL certs to the Java keystore and trust them to enable secure LDAP but otherwise the steps above work fine. I've still to test the email integration. Just need to find a lab server with 8 cores!! Hope this helps out anyone struggling with this area.

Use Sysinternals AD Explorer to connect and show the exact DN attributes to help you out! Available here:
https://technet.microsoft.com/en-ie/sysinternals/bb963907.aspx

Friday, 9 January 2015

OneView and Active Directory integration

OneView Active Directory Integration


Hi, busy today. I've been bashing my head around trying to get AD integration with OneView 1.10 working for weeks now! I kept getting the same old error:

"Cannot authenticate the server with the given credentials, search context and certificate.
Verify that the server is active and the user credentials, search context and certificate are correct."

Failed Configuration:


I got time to lab this today and after checking a few guides I decided to try a slightly different value for the second field below and use CN for it, and it worked! As this was not reflective of the Production Environment I was working on I backtracked and created a similar structure and tested that too.

Working Configuration:

Now I needed to reference an OU two levels down, if I try and JUST reference my OU's it fails but I can combine a few here and I know CN=Users works. So I used this:

Working Final Configuration:


Now I can make the Active Directory the default login option and add any group under the Lab OU. I only have two levels but if I ALSO add the sub OU Groups, I can't see any of the groups inside it so choose an OU one level up (CN=Users+OU=Lab) instead of (CN=Users+OU=Lab,OU=Groups) for this to work as shown above. Now you can search for groups under that structure and add them in with appropriate permissions.

I wish I had this post weeks ago!


HP iLO 4 - LDAP and SSL Certificate Implementation

HP iLO 4 - LDAP and SSL Certificate Implementation

I had the opportunity to integrate a BL460c Gen8 Blade running iLO 4 firmware version 2.00 this week with Active Directory and replace the default SSL certificate it uses. The Blade is integrated with OneView 1.10 also to make things more interesting!! I've captured the steps more or less below and though I'd share them as it can be quite frustrating sometimes to get these things to work from product to product and version to version. I can also look back at it myself and recall it for future work!

Replacing the Default SSL iLO Certificate


Firstly you need to edit the network settings in the iLO Configuration page (https iLO administration page, not the POST iLO configuration!).

Open OneView and browse to the Server Hardware section.

Under Hardware click on the iLO IPv4 address to log into the Server’s iLO
Under Overview / Information the iLO Hostname is using a logical serial number, this must be changed to the iLO FQDN before generating the Certificate Signing Request.

Click Network on the left, then iLO Dedicated Network Port

Click the IPv4 Tab and unselect the Enable DHCPv4 option so it and the 6 sub options are ALL deselected. For the Primary, Secondary & Tertiary DNS Server fields enter is appropriate values.
Click Submit

Select the SNTP Tab next and select “Propagate NTP or OA Time to Host” and choose the Primary Time Server as 10.35.80.1 for Telehouse or 10.33.80.1 for Knock. Select the Time Zone “Europe/London (GMT)” and Click Submit
 
 
Go to the General Tab and enter the iLO Subsystem Name (Host Name) and Domain Name as the example below shows:

iLO Subsystem Name (Host Name)
mylovelyilo
Domain Name
lab.local

Click Submit
Information,Overview,iLO Hostname value should now display mylovelyilo.lab.local
Refresh the Blade in OneView to see the Hostname FQDN change to the new value (This didn't always work for me but should update after replacing the SSL cert later I hope!)
The SSL Certificate Process is more straightforward ONCE you've fixed the iLO Hostname. Otherwise after you import the certificate file and reset you'll find the iLO has regenerated the default HP self signed certificate and you've to start over!
In the iLO Click Administration, Security. Click the SSL Certificate Tab. Click Customize Certificate. Under the Certificate Signing Request Information enter the required information based on the following example:

Country (C)
IE
State (ST)
Leinster
City or Locality (L)
Craggy Island
Organization Name (O)
Father Ted
Organizational Unit (OU)
Parochial House
Common Name (CN)
mylovelyilo.lab.local*

* This field will be pre-populated with correct iLO Hostname and does not need to be changed.

Click Generate CSR, wait a few minutes and Click it again and copy the CSR text to Notepad and save using the filename <ilo hostname>.csr and send it to your Certificate Authority.
Once the Certificate is issued, open the CER file and copy the text contents, in the iLO screen Click Import Certificate, paste the details and Click Import and reset the iLO. You can open the certificate to check the iLO Hostname is reflected in the certificate CN.
Refresh the Host in OneView and you should be there.
 
Active Directory Integration
This is bit more straightforward as you've already got the networking setup. One item to get ready in advance is you're only allowed a single Domain Controller entry so HP recommends asking that a DNS round Robin entry be created. This means you get an alias such as mylovelydcs.lab.local which returns one of two or four IP Addresses each time it's queried preventing a loss of service if one should go down. You can still get it with a local iLO account and I'd recommend leaving this option enabled but the AD integration is handy for auditing and tracking purposes.
You'll need an Advanced iLO License to use this feature and I'm sticking with the Schema-free directory integration option here which is much simpler.
Now, create a new AD Group for this purpose and add any users you want to have iLO access into this group. You need to get the LDAP value and SID - I recommend AD Explorer from Sysinternals for this purpose. You point it at your AD with a valid AD user account, search for the new group and copy the LDAP OU structure and SID from the tool.
Now in the iLO administration screen once more go to Administration, Security and Click the Directory Tab. Check the following values:
LDAP Directory Authentication: Use Directory Default Schema
Directory Server Address: <ip of DC for Lab or DNS Alias for round robin DC IPs for Production>
Directory Server LDAP Port: 636 (assumes you've certificates on your DCs or use 389 if in a lab only)
Directory User Context 1: OU=Administrative Users,OU=Testing Lab,DC=Lab,DC=Local
This OU is where the user accounts are all located in my example. If you've a few locations enter each one in turn to capture all the user account locations.
Click Apply Settings, then Click Administer Groups
Edit the default authenticated users group as some point to remove all their privileges as if left ANY AD user can log into iLO, even if they can't make any changes that's unnerving when I encountered this! Add in the AD group (Click New) you plan on using and assign all iLO permissions to it. You'll need the CN of the Group and I recommend adding the SID also. Now log out and test.
CN=iLO User Group,OU=Administrative Groups,OU=Testing Lab,DC=Lab,DC=Local
The SID Value might be:
S-1-6-21-2703213456-12345678910-10987654321-132456
That's it! iLO Configured. I might reset the iLO one more time to check the settings are held and refresh the OneView Server Hardware page of the server to make sure but that's you done! 

Friday, 21 November 2014

HP CloudSystem 8.1 Part 2


So, I've been banging my head on the deployment of this product at home but have since gotten some hands on experience in work to start getting my head around concepts and today I've retried setting up my Lab from scratch to rebuild CS8.1 and get it to work. I consolidated my SSDs to two largish ones to help with space requirements but this wasn't a show stopper as much as a nice to have. I was using an LSI card but in JBOD mode, found this wasn't great in terms of performance so now each SSD is allocated to a RAID 0 array albeit with one drive and things have improved with it's SSD caching ability.

None of that is really relevant or interesting (!) to what I'll describe here - the biggest piece of the puzzle came when my I broke the CAT-5e cable I had running downstairs to my Lab. I had strange issues with my netgear prosafe switch so after some research ordered a Cisco SG300-10 but subsequently discovered the cable issue, the switch was actually fine! The reason I went with the Cisco is to get layer 3 capability plus it's a much more powerful unit albeit with a web front end and not a full cisco IOS. I saved a fair bit by buying via Newegg but had to get a shipping forwarder to send it onto Ireland, didn't get hit with Duty so it worked out very well. The unit is €330 here, I got it for $172 + $72 forwarding charge (It's a heavy item) as an example. The Netgear power supply worked with it perfectly which was a bonus! There is a trick to getting it in layer 3 mode via a serial cable but they supply it so don't worry, I've it hooked into my vCenter VM by adding a virtual serial interface to that VM in ESXi!

Now, I was able to spend some time recently understanding the CS8.1 networking and after I redid it from scratch I deployed all the VMs without the previous HP-OO password issue. I found that the Enterprise appliance ignores the template values in terms of vCPU & RAM, it demanded 8 vCPU and 20GB Ram for itself, the cheek! I powered it off and applied 4 vCPU and 8GB of Ram and restarted it to see if this would work. My Lab only has 4 physical cores after all!

The Networking piece is described below to help you plan your own deployments. I think it's key to have a good Switch/Router and not just rely on ESXi for cloud stuff in particular.

vLAN ID Subnet Gateway Port Group
1 192.168.10.0/24 192.168.10.254 vLAN_Cloud_DC_Mgmt
50 192.168.11.0/24 N/A vLAN50_Cloud_Mgmt
51 192.168.12.0/24 192.168.12.254 vLAN51_Cloud_CAN
55 192.168.13.0/24 192.168.13.254 vLAN4095_Cloud_Data_Trunk
56 192.168.14.0/24 192.168.14.254 vLAN4095_Cloud_Data_Trunk
57 192.168.15.0/24 192.168.15.254 vLAN4095_Cloud_Data_Trunk
58 192.168.16.0/24 192.168.16.254 vLAN4095_Cloud_Data_Trunk
59 192.168.17.0/24 192.168.17.254 vLAN4095_Cloud_Data_Trunk
N/A 192.168.1.0/24 192.168.1.1 vLAN_Cloud_External

My Default Network for all my existing VMs was using subnet 192.168.10.0/24 so I left that as the native vLAN. I pretty much used the same settings as before with a few changes as shown below:

 
 
I updated my Windows PC Hosts file to make sure I could communicate. Now, I get as far as the Enterprise Appliance but it's refusing to start up and my Foundation Appliance is going crazy, 100% cpu! Looks like I'll need a Hardware Upgrade to deploy Enterprise at this rate! At least I can play with Foundation and it's portal until I figure out what's happening. I would suggest that if your lab is like mine this might be something you'll have to do on a work server not at home. I'll post any updates if I manage to get this working. At least we've no errors as shown below during the Foundation Appliance Deployment:
 
start>csstart gui --start-browser --auto-accept-cert
Web server starting.
serving on http://127.0.0.1:5000
Config file - passed basic tests, moving to advanced tests.
Config file - passed advanced tests.
Config file - passed basic tests, moving to advanced tests.
Config file - passed advanced tests.
Creating new base appliance.
Warning: Found 4 cores on the hypvervisor. Decreasing core request from 8 for ap
pliance.
Appliance (ca1) successfully reconfigured
Booting the appliance.
This step could take between 5 and 20 minutes to complete.
Elapsed time (minutes):  2
Finished.
The CloudSystem controller is being started.
This step could take between 10 and 20 minutes to complete.
Elapsed time (minutes):  6
Finished.
Waiting for the CloudSystem services to finish starting.
This step could take between 5 and 15 minutes to complete.
Elapsed time (minutes):  0 Complete.
Configured appliance EULA and support access.
Applying the first time setup network selections.
Using ssl cert:
-----BEGIN CERTIFICATE-----
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-----END CERTIFICATE-----
VM started successfully.
Open browser to https://192.168.10.70/

Update: Power Cycling the Foundation Appliance resolves the issue. You can then go in and choose to "uninstall" CloudSystem Enterprise, it just seems to reset the integration until you win the lottery and can afford a massive home server!

Update #2: After adding in the Compute Cluster you get to choose which vSwitch the Cloud Data Trunk gets created on. I noted that the proxy is actually a clone of the base appliance and like Enterprise it doesn't take it's hardware settings from the template so prepare for a 4 x vCPU and 16GB Ram VM in your environment. I've since downgraded it to 2 x vCPU and 8 GB Ram to see how it plays.

Friday, 17 October 2014

VMworld 2014


Well, I'm just back from attending the conference in Barcelona and I was taking particular interest in Security & VVols during the event. With Cloud taking off there's an increase in awareness of how vulnerable this infrastructure is to attack. Azura has had a few hiccups affecting many of their customers as they made changes to their networking stack earlier this year. Code Spaces is also of course in everyone's mind as they were held ransom and the criminal deleted their data forcing them to close. As we layer up the automation, how easy would it be to power down 20,000 VMs instead of powering them up?!

I'll list the main things I found out below throughout the Conference:

  • Do I put my VMs in the Cloud? If they are Core - Stay on Floor (In House), if they are Non-Core - They go out the door (Cloud). Keep the apps you run your business on in house!
  • Incident Management: Preparation, Identification, Containment, Eradication, Recovery, Lessons
  • 2 Man Rule - get two people to make all changes especially after 4pm on a Friday. It's called the "weekend saver"!
  • Is there any regulation around Cloud Providers themselves, to help ensure they are not just ramping up an insecure solution? FedRAMP is one strategy, the EU is working on another but it might be 2 years before they bite. Link below.
  • VVols - saw a few sessions on these. There's a VASA 2.0 network link to the Array that controls creating new VMs, snapshots, cloning etc. If this link is down, existing VMs are ok, you just can't create new ones etc using VVols, bit like HA! It won't support SCSI-3 so no windows clusters. I asked if it's possible to insert a windows CD into a VMware Host and install windows into the Storage Container directly and wipe everything and they said no, this is not possible! As you are removing the LUN construct, you will end up with fairly large Storage Containers, great if someone tramples all over it! It won't support vSAN, I think you can pass UNMAP direct to the array now from the VM O/S so that will be great for space management. You can control features like replication per VM but there's no SRM integration in the initial release. You can deploy up to 256 Storage Containers, each supports a single protocol (NFS/iSCSI/FC). Backup Providers should be onboard and ready to support too (Veeam & Commvault mentioned). You can see the VVol Container in vCenter to use for Datastore Heartbeating & HA. HP 3PAR will run a PE on each Controller from what I saw and is a Firmware Upgrade. Licensing costs still to be decided by VMware of course! Enterprise Plus Plus?!!
  • More Security: Designing a way to escape out of a VM is highly complex and costly. It's much easier to go after the admin / operational security threats, scripts are cheap and it's low cost and much easier to walk onto a site and do the deed. Secure your Management plane off the rest of the network. Don't use common accounts, give admins a separate super user account to use for changes so you can track them. Check Host Uptime and patch, patch, patch. With vMotion there's no reason not to. vRealise Air Compliance is in Beta to give you a Hardening guide / PCI scorecard. It uses the cloud however which I'm not too keen on. Consider introducing vCAC / vCO workflows for deleting VMs and archive them to nearline and ecrypt for security. Integrate Approvals into the workflow. Remove Browse Datastore permissions from most admins. $375 to build a laptop sized device that can scan an employee badge for later duplication has been demoed elsewhere!
  • Veeam v8: Has a web gui you can use to delegate individual SQL DB restores for Devs. AD comparison tool - find out what changed then fix it. Can replicate from Array snapshots. Now has SRM like features for orchestrating failovers. Snapshot hunter to find them even if vCenter says there aren't there!
  • vCenter Best Practices - watch out for the Inventory Service, it acts as a cache for the web interface to speed it up but it stores tags and storage profiles, you need to be backing these up! The XDB can grow to 60GB is worst cases, requires a reboot and tweaking to fix if this happens. Enable 8.3 paths if installing vCenter to Drive other than C:. Next version: supports upgrade from 5.0+ to 6.0 and up to 64 hosts per cluster. Linked mode with appliance possible. Still no HTML 5.0 support and switch to Chromium if using Linux.
Overall, busy Event, lots going on. Found the Hands On Labs tricky. The tasks pane on the right hand side didn't update, click on more tasks view and you'll get the true state. Gave up 30 minutes into NSX lab but was shown this trick the following day doing the VVol Intro Lab so it's just a quirk of the nested environment. Bit sluggish I must say, not as fast as when it was hosted locally in previous years. Some labs are served out of Amsterdam, others from US.

I won €500 for Charity throwing a paper plane which was unexpected!

Still working on my home lab, had network issues earlier this week, turns out landlady crushed my main network cable to downstairs. Stuck now until I get a replacement. Got my LSI 9271-8i working correctly with SSD now (Went Raid 0, 1 per drive instead of JBOD which disables cache) and a Samsung 850 Pro to boot! Retired my oldest SSD drives and hope to get the CloudSystem 8.1 up and running soon! Plus try the VMware Beta one aswell!


Links:
http://cloud.cio.gov/fedramp

Tuesday, 30 September 2014

RHCSA 7 Exam Notes - Consolidated

Hi, I'm working up an exam resit for later next month (October) so I thought I'd consolidate my Exam notes to make it easier to hit particular topics. See link below to download & best of luck!

https://drive.google.com/file/d/0B9WPh0iDN4KwdXpRYzlXTlVHZnM/edit?usp=sharing

Resetting the Root Password in RHEL7

This is one of the exam topics in the RHCSA exam that you should know. I've struggled with it a bit as there was no official documentation on this until July, a bit late for me! I've listed below the steps to help me recall this in future. There is also official documentation here:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Terminal_Menu_Editing_During_Boot.html#sec-Recovering_Root_Password

Press any key at the Grub boot loader and then e to edit the default option

Scroll down to the line starting with initrd16 and press the left arrow once until you get to the end of the line above it ending in LANG=en_IE.UTF-8 and append as follows:

LANG=en_IE.UTF-8 init=/bin/sh

Press CTRL-X to boot and you’ll get to a sh-4.2# prompt. Enter the following commands:

mount -o remount,rw /

passwd root

touch /.autorelabel     (optional - could delay VM boot excessively)

exec /sbin/init             (continue booting VM or you could power cycle VM)

Note: commands entered in the bash prompt are not echoed to screen. I get palindrome warnings but this doesn't stop it working unless you type more than 1 character – make sure you enter a single character as the new password only at this point you can change it again later.

Maybe it's something I'm doing but the above steps work and it updates the root password fine, then you just have to edit it later after the O/S loads to something more suitable. You can prep a backdoor account using visudo before you carry this out on your Lab VM, just adjust it as follows:

root ALL=(ALL) ALL
student ALL=(ALL) NOPASSWD: ALL