In this part I will begin PKS installation by deploying Pivotal Ops Manager which basically provides a management interface (UI/API) for Platform Operators to manage the complete lifecycle of both BOSH and PKS starting from install then going to patch and upgrade.
To refer other posts of this series are here:
Getting Started with VMware PKS & NSX-T
Deploy VMware PKS – Part1
In addition, you can also deploy new application services using Ops Manager Tiles like adding an Enterprise-class Container Registry like VMware Harbor which can then be configured to work with PKS.
Installing OpsManager
- Download the Pivotal Cloud Foundry Ops Manager for vSphere .OVA file from Pivotal Network. Use the dropdown menu to select the supported Ops Manager release and ensure that you have checked “Compatibility Matrix” and accordingly download supported version,
- Once Downloaded , Log into vCenter using the vSphere Web Client or HTML5 Client to deploy the Ops Manager OVA.
- Choose your Management cluster , appropriate network and other OVA deployment options , i am not going to cover OVA deployment procedure here. Only at customize template , enter below details:
- Admin Password: A default password for the user “ubuntu”.
- If you do not enter a password, Ops Manager will not boot up.
- Custom hostname: The hostname for the Ops Manager VM, in My example opsmgr.corp.local.
- DNS: One or more DNS servers for the Ops Manager VM.
- Default Gateway: The default gateway for Ops Manager.
- IP Address: The IP address of the Ops Manager network interface.
- NTP Server: The IP address of one or more NTP servers for Ops Manager.
- Netmask: The network mask for Ops Manager.
- Admin Password: A default password for the user “ubuntu”.
- Create a DNS entry for the IP address that you used for Ops Manager ,which we will use in next steps. use this DNS NAME/IP address and browse on a browser , which will take you to Authentication System for initial authentication setup and for our setup, i will use “Internal Authentication” for this Lab. Click on “Internal Authentication”
- Next, you will be prompted to create a new admin user which we will use to manage BOSH. Once you have successfully created the user, go ahead and login with the new user account
- Once you are logged into Ops Manager, you can see that the BOSH Tile is already there but is showing as un-configured (orange colour denotes un-configured) which means BOSH has not yet been deployed yet. Go ahead and click on the tile to begin the configuration to deploy BOSH.
Before starting Bosh Tile configuration , we need to prepare NSX Manager, listed below procedure for:
Generating and Registering the NSX Manager Certificate for PKS
The NSX Manager CA certificate is used to authenticate PKS with NSX Manager. You create an IP-based, self-signed certificate and register it with the NSX Manager.By default, the NSX Manager includes a self-signed API certificate with its hostname as the subject and issuer. PKS Ops Manager requires strict certificate validation and expects the subject and issuer of the self-signed certificate to be either the IP address or fully qualified domain name (FQDN) of the NSX Manager. That’s the reason, we need to regenerate the self-signed certificate using the FQDN of the NSX Manager in the subject and issuer field and then register the certificate with the NSX Manager using the NSX API.
- Create a file for the certificate request parameters named “nsx-cert.cnf” in a linux VM where openssl tool is installed.
- Write below content in to the file which we create in above step.
- Export the NSX_MANAGER_IP_ADDRESS and NSX_MANAGER_COMMONNAME environment variables using the IP address of your NSX Manager and the FQDN of the NSX Manager host.
- Using openssl tool generate the certificate by running below command:
- Verify the certificate by running command as below:
- ~$ openssl x509 -in nsx.crt -text -noout and ensure SAN has DNS name and IP addresses.
- Import this Certificate in NSX Manager , go to System -> Trust -> Certificates and click on Import -> Import Certificate
- Ensure that Certificate looks like this in your NSX Manager.
- Next is to Register the certificate with NSX Manager using below procedure , first the ID of the certificate from gui.
- Run the below command (in to your API client ) to register the certificate using below command replace “CERTIFICATE-ID” with your certificate ID.
- export CERTIFICATE_ID=”CERTIFICATE-ID” curl –insecure -u admin:’ADMIN-PASSWORD’ -X \
POST “https://$NSX_MANAGER_IP_ADDRESS/api/v1/node/services/http?action=apply_certificate&certificate_id=$CERTIFICATE_ID”
- export CERTIFICATE_ID=”CERTIFICATE-ID” curl –insecure -u admin:’ADMIN-PASSWORD’ -X \
Now let’s configure BOSH tile , which will deploy BOSH based on our input parameters.
Configure BOSH Tile to Deploy BOSH Director
Click on the tile. It will open the tile’s setting tab with the vCenter Config parameters page.
- vCenter Config
- Name: a unique meaning full name
- vCenter Host: The hostname of the vCenter.
- vCenter Username: Username for above VC with create and delete privileges for virtual machines (VMs) and folders.
- vCenter Password: the password of above VC.
- Datacenter Name: Exact name of data center object in vCenter
- Virtual Disk Type: Select “Thin” or “Thick”
- Ephemeral Datastore Names: The names of the data stores that store ephemeral VM disks deployed by Ops Manager , you can specify many data stores by using comma.
- Persistent Datastore Names (comma delimited): The names of the datastores that store persistent VM disks deployed by Ops Manager.
- To deploy BOSH as well as the PKS Control Plane VMs, Ops Manager will go ahead and upload a Stemcell VM ( A VM Template that PKS) and it will clone from that image for both PKS Management VMs as well as base K8S VMs.
- NSX-T Config
- Choose NSX Networking and Select NSX-T
- NSX Address: IP/DNS Name for NSX-T Manager.
- NSX Username and NSX Password: NSX-T credential
- NSX CA Cert: Open the NSX CA Cert that you generated in above section and copy/paste its content to this field.
-
- Other Config
- VM Folder: The vSphere datacenter folder where Ops Manager places VMs.
- Template Folder: The vSphere folder where Ops Manager places stemcells(templates).
- Disk path Folder: The vSphere datastore folder where Ops Manager creates attached disk images. You must not nest this folder.
- And Click on “Save”.
- Director Config
- For Director config , i have put in few details like:
- NTP Server Details
- Enable VM Resurrector Plugin
- Enable Post Deploy Scripts
- Recreate all VMs (optional)
- For Director config , i have put in few details like:
- Availability Zone
- Availability zones are defined at a vSphere Cluster level. These AZs will then be used by BOSH director to determine where to deploy the PKS Management VMs as well as the Kubernetes VMs.Multiple Availability Zones allow you to provide high-availability across data centers. for this demonstration i have created two AZs, one for Management and one for my Compute.
- Availability zones are defined at a vSphere Cluster level. These AZs will then be used by BOSH director to determine where to deploy the PKS Management VMs as well as the Kubernetes VMs.Multiple Availability Zones allow you to provide high-availability across data centers. for this demonstration i have created two AZs, one for Management and one for my Compute.
- Create Network
- Since i am using dvs for my PKS management component , we need to specify those details in to this segment and make sure you select the Management AZ which is the vSphere Cluster where BOSH and PKS Control Plane VM will be deployed.
- Assign AZs and Networks
- In this section, Define the AZ and networking placement settings for the PKS Management VM.Singleton Availability Zone – The Ops Manager Director installs in this Availability Zone.
- Security & Syslog
- This section i am leaving default , if required for your deployment , pls refer documentation.
- Resource Config
- As per in part 1 sizing , the BOSH director vm by default allocates 2 vCPUs, 8GB memory, 64GB disk and also has a persistent disk of 50GB and Each of the four Compilation VMs uses 4 vCPUs, 4GB memory, 16GB disk each. For my lab deployment i have changed it to suite to my lab resources.Bosh director needs minimum of 8 GB Memory to run , so choose options accordingly.
- Review Pending Changes and Apply Changes
- With all the input completed, return to the Installation Dashboard view by clicking Installation Dashboard at the top of the window. The BOSH Director tile will now have a green bar indicating all the required parameters have been entered. Next we click REVIEW PENDING CHANGES and Apply Changes
- Monitor Installation and Finish
- If all the inputs are right then you will see that your installation is successful
After you login to your vCenter , you will see a new powered on VM in your inventory that starts with vm-UUID which is the BOSH VM. Ops Manager uses vSphere Custom Attributes to add additional metadata fields to identify the various VMs it can deploy, you can check what type of VM this is by simply looking at the deployment, instance_group or job property. In this case, we can see its been noted as p-bosh.
and this completes Ops Manager and BOSH deployment , next post we will install PKS tile.
Pingback: Deploy VMware PKS – Part3 – VMTECHIE