VMware vCenter Appliance 6.0 can be deployed in two different manners. Through the GUI as I detailed that in my post here, or second way – by using scripted installation. Scripted installation allows you to stay consistent when deploying multiple isolated sites with multiple vCenter Appliances and PSC for example.
Now if you're not a scripting guy it's ok, because VMware has done a good job providing templates allowing just to modify them. Additionaly the help file explains all the options. There is 5 different templates available.
If you have read my detailed post about vCenter Server 6 where I'm detailing this you would be able to see that a new component called Platform Service Component (PSC) was introduced in vCenter Server 6. It's important to know that PSC contains different important vCenter services like SSO , Certificate or Licensing services…. but from the deployment standpoint it's single component.
The Platform service controller can be deployed as internal (embedded within vCenter) or it can run as an external component to vCenter. The guidelines from VMware says to use PSC as internal for up to 8 vCenter servers.
Five Templates for vCenter Appliance 6.0 Scripted Installation are available
Now back to our vCenter Appliance 6.0 – Simplified Scripted Installation. You can see those 5 JSON example files when you mount the VMware VCSA iso and go to the vcsa-cli-installer folder. JSON means JavaScript Object Notation. JSON file can be edited in any text editor like Notepad ++….
Those 5 Examples are:
Embedded – this one deploys VCSA with an embedded PSC (All-in-One VM)
Full Conf – this one is used by the VCSA CLI installer
PSC – this one deploys a PSC only.
PSC Replication – this one deploys a PSC (only) and joins an existing SSO domain.
VC – deploys a vCenter Server as an option only (without SSO)
Now Let's open the Embedded.example.JSON to see what's in and how to personalize:
As you can see the left image shows the personalized version where the right one shows the “clean” not personalized one. No need to explain, really. Just replace the example values by your values of your environment… Note that I just added the networking section the example file does not contain it. (copy paste from Full Conf does the job).
Step 1. Before starting the deployment you must assure that on your DNS server you have created DNS records (forward and reverse)… You can do so when you Go to the Control panel > Administrative Tools > DNS > Expand the Forward lookup zones > Right click your zone > New Host ( A or AAAA).
Step 2: Modify your JSON file (as on my example – get it here) and save a copy to some folder on your system. (In my case I saved the file to c:vcsa with a name vladan_embedded.json )
Step 3: Open command prompt (with admin rights) > go to the vcsa deployment directory on the mounted ISO, if you're running Windows workstation or laptop (in my case it is the drive letter “I”, so in my case it is I:vcsa-cli-installerwin32 ) > run this command:
vcsa-deploy <your_json_file_location_and_name>
so in my case:
vcsa-deploy c:/vcsa/vladan_embedded.json
and let the installer do its work…
In my case, it took about 20 min to fully deploy the appliance so it's not much faster than when using the GUI, but to get through the GUI it takes you perhaps few min more to enter all the details. So at the end the scripted installer finishes faster and also it check for errors in the JSON file (I had some). Get my JSON config file if you want from here.
Get Help with an Online Help File
There is an online help which might be useful. When you are in the command line just type:
vcsa-deploy -h
to get help. Those help command can be more helpful, for example, you can type
vcsa-deploy –template -h
to get just more detailed help as the –template -h is help for the vCenter server appliance CLI installer template. Each of the sections is explained. There are six sections in total:
- VCSA
- Networking
- SSO
- System
- Database
- Deployment
For example, the database section looks like this:
database: This list of parameters describes the database that vCenter Server Appliance will use.
It contains the following keys:type: The database type. Available options are 'embedded' and ‘external'. The default is 'embedded'.
user: The external database user account name. Ignored if the parameter db.type is 'embedded'.
password: The external database user password. Ignored if the parameter db.type is 'embedded'.
servername: The external database server host name. Ignored if the parameter db.type is 'embedded'.
serverport: The port number on which the external database is running. Ignored if the parameter db.type is 'embedded'.
provider: The external database provider. The available option is ‘oracle'. Ignored if the parameter db.type is 'embedded'.
instance: The external database instance name. Ignored if the parameter db.type is 'embedded'.
Video
Note that I did speed up the video after entering the initial command and start of the deployment otherwise, it took 11 min to fully deploy the appliance. I used local SSD as target datastore.
Wrap up:
I was quite nicely surprised that the work with the deployment template is quite without a problem and easy. The online help file can certainly be helpful when preparing larger deployments and needs to use an external database for each site. As I said for me it's been a nice surprise as being not really a scripting guy I found it quite easy to follow. The fact that scripted installer can use a simple JSON file for deployment has an advantage over manual one because admin does fewer mistakes during deployment and homogenization of larger environment shall be easier.
More on vSphere 6 can be found on my dedicated vSphere 6.0 page.
VMware VCSA:
- VMware VCSA – 3 Ways to Activate SSH
- VMware VCSA – How to check running services?
- VMware VCSA – How to Join Domain
Dawid Kudzielka says
How will VCSA appliance be patched/updated in the future?
Previous version had an admin web interface but I can’t find it with v6.0.
tiran says
download link to the json file doesn’t work…
https://www.dropbox.com/s/aoxqi7nrta0if4o/vladan_embedded.json?dl=0
Vladan SEGET says
Fixed -:) Thanks for letting me know…
Sagar Hindochaa says
For me its shows error:
Failed to parse the template C:\location_of_file\embedded_homelab.JSON
No JSON object could be decoded
Vladan SEGET says
Things has changed in the VCSA 6.0 U1 where there is more templates (for install and for upgrade). There is a post in draft which shall clear things out. Stay Tuned.
Suresh says
Vladan,
Can we use these scripts to upgrade vcsa 55 appliance to 6.0 and also the script does not have any option to specify the datastore, by default which datastore will be chosen for deploying the appliance on host. We are running out of space in our Esxi local datastore so would like to specify alternate datastore.
Biswajit says
I was unable to connect to esxi server due to proxy settings. You need to remove proxy setting before starting the script.
For window command is
set http_proxy=
set https_proxy=