Thursday, 26 September 2019

How can VMware Integrated Containers be useful in real life scenario

What is VIC:

VIC - vSphere Integrated Containers enables IT, teams, to seamlessly run traditional workloads and container workloads side-by-side on existing vSphere infrastructure.

The solution is delivered in the form of appliance just like any other VMware mgmt solution. The appliance comprises of, 

  • vSphere Integrated Containers Engine, a container runtime for vSphere that allows you to provision containers as virtual machines, offering the same security and functionality of virtual machines in VMware ESXi™ hosts or vCenter Server® instances.
  • vSphere Integrated Containers Plug-In for vSphere Client, that provides information about your vSphere Integrated Containers set up and allows you to deploy virtual container hosts directly from the vSphere Client.
  • vSphere Integrated Containers Registry (Harbor), an enterprise-class container registry server that stores and distributes container images. vSphere Integrated Containers Registry extends the Docker Distribution open source project by adding the functionalities that an enterprise requires, such as security, identity, and management.
  • vSphere Integrated Containers Management Portal, a container management portal, built on the VMware Admiral project, that provides a UI for DevOps teams to provision and manage containers, including the ability to obtain statistics and information about container instances. Management Portal administrators can manage container hosts and apply governance to their usage, including capacity quotas and approval workflows. Management Portal administrators can create projects, and assign users and resources such as registries and virtual container hosts to those projects.

All components run on Photon OS 2.0. These components currently support the Docker image format. vSphere Integrated Containers is entirely Open Source and free to use. 
Why VIC and how does it differ from other services: 
As the VIC is entirely Open source and freeware, it can be tested in any existing VMware environment. We do not need many efforts or changes to introduce VIC in our setup. 
With no or minimal efforts we can get the VIC up and running. The VIC can be used for any container/cloud-native application testing. If you are a starter or new to cloud-native application hosting/testing then VIC is a great place to start.   
Being said if you are a learner or new to container apps, then VIC will become handy, as you don't need to spend much time on setting up the foundation. 
Unlike any other cloud-native platforms, VIC doesn't require much time to set up the base infrastructure. Once you deploy the VIC, you are ready to spin up the 1st container., 
Deployment of VIC: 
The deployment of VIC appliance is as same as any other vmware appliance and pretty straight forward. 

Important note regarding Network:
VCH Networking

Configuration steps : 
Once we deploy the appliance successfully the next is to configure it for use. 
1. Open Chrome and access the appliance to get the administration portal. 

2.  This is the landing page of the VIC 

3.  Next step is to configure the users who can manage the VIC and VCH. This can be done in Identity management. 

4. Create a new Project. The project can be either allocated to a team or for a specific application hosting. This is a logical grouping of containers 

5. There will be a default project as well and we can add the projects based on the necessity 

6.  Each project should have a members or entitlements, internal repositories settings, Infrastructure ( where we add the VCH) etc 

7.  We can add the users from the Identity manager ( integrated with LDAP or AD). Assign the role of the user in the specific project 

8.  We can add users and groups for multiple projects at once 


Next topic we cover : 
1. How to deploy a VCH 
2. Add VCH host to the Project 
3. Spin up the first container in the project 

Thanks for reading! 

Sunday, 7 October 2018

vRA 7.5 Installation steps - Back to Basics

vRealize Automation Installation Overview

You can install vRealize Automation to support minimal, proof of concept environments, or in different sizes of distributed, enterprise configurations that are capable of handling production workloads. Installation can be interactive or silent.

After installation, you start using vRealize Automation by customizing your setup and configuring tenants, which provides users with access to self-service provisioning and life-cycle management of cloud services

New in this vRealize Automation Installation:

If you installed earlier versions of vRealize Automation, be aware of changes in the installation process for this release. 

This release simplifies the vRealize Automation appliance node removal process. 
The vRealize Automation appliance administration interface has changed. 
Database tab features have moved to the Cluster tab. The Database tab has been removed, and the Cluster tab has become a primary tab. 
The Migration tab has become a primary tab and now includes vRealize Automation and vRealize Orchestrator migration. 
The support bundle option has moved to the Logs tab. 
vRealize Code Stream has been removed from the Licensing tab.

The vRealize Automation Appliance
The vRealize Automation appliance is a preconfigured Linux virtual appliance. The vRealize Automation
appliance is delivered as an open virtualization file that you deploy on existing virtualized infrastructure
such as vSphere.
The vRealize Automation appliance performs several functions central to vRealize Automation.

  • The appliance contains the server that hosts the vRealize Automation product portal, where users log in to access self-service provisioning and management of cloud services.
  • The appliance manages single sign-on (SSO) for user authorization and authentication.
  • The appliance server hosts a management interface for vRealize Automation appliance settings.
  • The appliance includes a preconfigured PostgreSQL database used for internal vRealize Automation appliance operations.    
  • The appliance includes a preconfigured instance of vRealize Orchestrator. vRealize Automation uses vRealize Orchestrator workflows and actions to extend its capabilities. 
  • The appliance contains the downloadable Management Agent installer. All Windows servers that make up your vRealize Automation IaaS must install the Management Agent.

           In large deployments with redundant appliances, the secondary appliance databases serve as replicas to provide high availability.
         The embedded instance of vRealize Orchestrator is now recommended. In older deployments or special cases, however, users might connect vRealize Automation to an external vRealize Orchestrator instead.

The Management Agent registers IaaS Windows servers with the vRealize Automation appliance,

automates the installation and management of IaaS components, and collects support and telemetry

In this blog post we are going to see the basics steps of vRA 7.5 setup/installation

Deploy the vRealize Automation Appliance

Before you can take any of the installation paths, vRealize Automation requires that you deploy at least one vRealize Automation appliance.

To create the appliance, you use the vSphere Client to download and deploy a partially configured virtual machine from a template. You might need to perform the procedure more than once, if you expect to create an enterprise deployment for high availability and failover. Such a deployment typically has multiple vRealize Automation appliances behind a load balancer.

Log in to the vSphere Client with an account that has permission to deploy OVF templates to the inventory.

Download the vRealize Automation appliance .ovf or .ova file to a location accessible to the vSphere Client.

Select the vSphere Deploy OVF Template option.
Enter the path to the vRealize Automation appliance .ovf or .ova file.

Enter an appliance name and inventory location.
When you deploy appliances, use a different name for each one, and do not include non-alphanumeric characters such as underscores ( _ ) in names.

Select the host and cluster in which the appliance will reside.

Read and accept the end-user license agreement.

Select the storage that will host the appliance.
Select a disk format.
Thick formats improve performance, and thin formats save storage space.

Format does not affect appliance disk size. If an appliance needs more space for data, add disk by using vSphere after deploying.

From the drop-down menu, select a Destination Network.

Complete the appliance properties.
Enter and confirm a root password.
The root account credentials log you in to the browser-based administration interface hosted by the appliance, or the appliance operating system command-line console.

Select whether or not to allow remote SSH connections to the command-line console.
Disabling SSH is more secure but requires that you access the console directly in vSphere instead of through a separate terminal client.

For Hostname, enter the appliance FQDN.
For best results, enter the FQDN even if using DHCP.

vRealize Automation supports DHCP, but static IP addresses are recommended for production deployments.

In Network Properties, when using static IP addresses, enter the values for gateway, netmask, and DNS servers. You must also enter the IP address, FQDN, and domain for the appliance itself, as shown in the following example.

Review the settings and submit the request

When you submit the request the deployment work flow starts. This workflow firstly deploys the appliance and once the deployment finishes the VM will be powered ON. You can watch the installation/initialisation steps in the console.

The initial setup would take few minutes and VM lands in initial/welcome screen.

Start the wizard by logging in as root to the vRealize Automation appliance administration interface.

As you login, the vRealize automation appliance configuration wizard starts,

Accept the license agreement

On the Deployment Type page, you decide which vRealize Automation components, and how many of each, you want to install.

Minimal deployments use just one vRealize Automation appliance and one Windows server that hosts IaaS components. In minimal deployments, you may host the IaaS database on a separate SQL Server system, or install SQL on the IaaS Windows server.

You cannot convert a minimal deployment to an enterprise deployment. To scale a deployment up, start with a small enterprise deployment, and add components to that. Starting with a minimal deployment is not supported.

Enterprise deployments involve multiple, separate appliances and Windows hosts, typically with load balancing. Enterprise deployments also permit you to host the IaaS database on a separate SQL Server system or on one of the IaaS Windows servers.

When you select an enterprise deployment, additional Installation Wizard pages appear in the summary list at the left of the wizard.

Infrastructure as a Service
The Infrastructure as a Service (IaaS) option selects whether or not to configure existing Windows machines with vRealize Automation modeling and provisioning capabilities.

When you select IaaS, additional Installation Wizard pages appear in the summary list at the left of the wizard.

IaaS Windows Servers
For a Windows machine to serve as an IaaS component host, you must download and install vCAC-IaaSManagementAgent-Setup.msi on the Windows machine.
Management Agent installation requires communication with a running vRealize Automation appliance. Each time that you install the Management Agent on Windows, that system becomes uniquely tied to the specific appliance and deployment.
Potential IaaS Windows servers that have the correct Management Agent installed appear under Discovered Hosts.

To have the Installation Wizard ignore a discovered host, click Delete. Deleting a Windows host does not remove its Management Agent. To uninstall the agent, use the Add or Remove Programs feature directly in Windows.

Start the agent installation in the windows machine to finish the agent setup

Location to install the agents

Suffice the details of the vRA appliance , credentials to login to the vRA and also the certificate ( if you use custom certs then the host names should match the windows instance)

Service account details of the local windows instance/account

Once the installation finishes, switch back to the vRA 7.5 configuration wizard and look for the agent status.

As above you would be able to see the last sync details of the agent with the vRealize automation appliance.

Proceed with the configuration of Iaas and the DB. Further steps are pretty much easier as like the previous versions and I would cover the screen shots in the next thread.

To be continued ...... 

Wednesday, 16 May 2018

Startup guide for vSphere Automation SDK for REST API

VMware introduced a new API service in vSphere 6.5 version which is known as vSphere Automation API. This service allows us to introduce several new SDKs for JAVA, Perl, Ruby, REST etc.  Today we will see how to setup the basic wizard to start using the API service in day to day life.

For more information about what was introduced with the vSphere Automation APIs visit Here

Documentation :

The documentation for this SDK version is pretty straight forward. We can browse to each level of API and see the sections of what the operations it performs. We can get the URL, JSON , XML representation for each and every operations in the document.

SDK tool kit:

You can download the SDK kit from VMware {code}

Tools required:

We will use Postman today so that we will be able to start working with the API quickly and build your knowledge of how it works before using API in your own application. Postman is a great application to design, build and test Rest APIs. Postman have clients available for Windows, Mac and Linux platforms.

We shall download Postman from link

First  we need to gain access to the vSphere Automation SDK for REST from VMware’s GitHub repository. Make sure to read through the README, noting that we’ll be able to view and use these resources, as well as contribute back to the following items:

  • vSphere Automation SDK for REST API Reference Documentation
  • Postman Samples
  • JavaScript Samples (we’ll cover these here, as part two)

The easiest method is now to either download or clone the repository.

Downloading can be done as follows:
  • Click on the green “Clone or Download” button and then click “Download ZIP”
  • Once downloaded, extract the zip file to the location of your choosing

At this point, you will now have a local copy of the repository

Cloning can also be done through the GitHub Desktop client as follows:

  • Click on the green “Clone or Download” button and then click “Open in Desktop”
  • Within the newly opened “Clone As” window, select the appropriate directory and name, then select “Clone”

So now we have the SDK ready in our local repository and let's get the Postman configured to be working. Open the Postman app and sign in to it

Welcome Page: 

Initial Setup:

Click on the Import File and choose files button. Browse to the location where you unzipped the SDK file and then navigate to : Client\Samples\postman. Select the 2 JSON files from the directory. 

  • vSphere-Automation-Rest-API-Resources.postman.json
  • vSphere-Automation-Rest-API-Samples.postman.json

Choose the files which we have downloaded from GitHub

We’ll now notice two new collections which are named quite similarly to the files imported. The vSphere Automation REST Resources collection is a number of requests, grouped in folders by their object level, that can be performed against a vSphere environment. The vSphere Automation REST Samples is a couple groups of requests which can be combined to perform a normal task. Some of the examples include ESXi host connection and disconnection, VM creation, and VM power actions.
Last part of setup comes down to configuring some environmental variables. As you begin browsing through the requests, you’ll start noticing some double curly brackets that may look like this: {{vc}} This is what’s known as an environmental variable within Postman, and vc will be used to refer to the vCenter Server. There’s only a couple environmental variables which need to be set in order to begin: vc, user, password. Those are fairly self-explanatory, so let’s set them up in Postman.
To begin creating environmental variables, head towards the gear icon in the top right hand side and click on it. This is where environments are managed. Add a new environment by clicking on the orange “Add” button. Give the environment a name, then enter in those three items mentioned above and valid values for your environment. Click the orange “Add” button again to complete the creation, and click on the “X” to the right of “Manage Environments” to close the window.

Import the Certificates if you are using Customer signed certificates

Disable SSL verification if you do not use CA signed certs

Go to File > Settings > SSL Certificate Verification ( set to OFF)

Once done, try connecting to the vCenter. Expand the vSphere Automation REST Resources collection, expand the Authentication folder, and select Login.

We can gather a bit of information about the request at this point. We’ll be doing a Post method to the vCenter’s URL of /rest/com/cmware/cis/session with a basic authentication type and sourcing the username and password from our environmental variables. Before making the request, make sure to select the environment that was just created by selecting it via dropdown box next to the gear icon on the top right hand side.

Play around with the Environment: 

We’re now authenticated to the vCenter’s API endpoint, so we can start exploring some other areas within the vSphere Automation REST Resources section. Let’s do some environmental discovery while we’re still exploring the SDK.
To get a list of the hosts available by this vCenter’s API endpoint, expand the Hosts folder and select List. Here we can see the request uses a Get method to the vCenter’s URL of /rest/vcenter/host. Clicking “Send” will give us a list of the hosts available as well as some basic information such as the host ID, name, connection state, and power state.

To get a list of the VMs available by this vCenter’s API endpoint, expand the VM folder and select List. At this point, hopefully you can figure out what the request is going to look like and a rough guess at what information is going to be pulled back.

We’ve got the basics down now, how about getting into some additional detail on a VM. In the VM folder, select the Details. In the URL, we’re just appending the VM’s ID to the end of the prior call. The example includes ‘vm-1021’ which can be modified to a VM ID as identified in the prior request. Clicking on “Send” retrieves a ton of information back about the configuration settings for that VM including CPU information, NICs, boot configuration, and so forth.

Likewise you can go further and get the details of each object using the POST commands. You can also create a VMs using the "Create VM" function right over the list. 

Make yourself comfortable with the basics and I see you soon with the next steps in next thread.  :-) 

How can VMware Integrated Containers be useful in real life scenario

What is VIC: VIC - vSphere Integrated Containers enables IT, teams, to seamlessly run traditional workloads and container workloads ...