vCSA sme už raz inštalovali, ale dnes si ukážeme ako inštalovať vCSA cez príkazový riadok. Túto inštaláciu môžeme považovať za plne automatizovanú, pretože počas inštalácie nemusíme nič robiť. Túto inštaláciu budem robiť s desktopu, Linux Mint 17 (je možne použiť aj iný OS, dokonca aj MS Win) po sieti na hostiteľský systém ESXi 6.7.0 Update 3.
Najprv odporúčam prečítať tento článok v ktorom inštalujeme vCSA klasickým spôsobom. Predpokladám, že máme stiahnutý balík vCSA 6.7 a môžeme sa pustiť do prípravy inštalácie. Vytvoríme si adresár do ktorého namountujeme ISO. Z neho si skopírujeme do /tmp konfiguračný súbor config.json
sudo mkdir /vcsa
sudo mount -o loop /media/jany/1026B1C426B1AADC/OS/virtualizacia/vmware/VMware-VCSA-all-6.7.0-14367737.iso /vcsa
cp /vcsa/vcsa-cli-installer/templates/install/embedded_vCSA_on_ESXi.json /tmp/config.json
Konfiguračný súbor nastavíme podľa svojich požiadaviek
{
"__version": "2.13.0",
"__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.",
"new_vcsa": {
"esxi": {
"hostname": "192.168.5.2",
"username": "root",
"password": "tajne_heslo",
"deployment_network": "VM Network",
"datastore": "vm_storage"
},
"appliance": {
"__comments": [
"You must provide the 'deployment_option' key with a value, which will affect the VCSA's configuration parameters, such as the VCSA's number of vCPUs, the memory size, the storage size, and the maximum numbers of$
],
"thin_disk_mode": true,
"deployment_option": "small",
"name": "Embedded-vCenter-Server-Appliance"
},
"network": {
"ip_family": "ipv4",
"mode": "static",
"ip": "192.168.5.5",
"dns_servers": [
"192.168.1.1"
],
"prefix": "24",
"gateway": "192.168.5.1",
"system_name": "dns_meno.com"
},
"os": {
"password": "tajne_heslo",
"ntp_servers": "time.nist.gov",
"ssh_enable": false
},
"sso": {
"password": "tajne_heslo",
"domain_name": "dns_name.com"
}
},
"ceip": {
"description": {
"__comments": [
"++++VMware Customer Experience Improvement Program (CEIP)++++",
"VMware's Customer Experience Improvement Program (CEIP) ",
"provides VMware with information that enables VMware to ",
"improve its products and services, to fix problems, ",
"and to advise you on how best to deploy and use our ",
"products. As part of CEIP, VMware collects technical ",
"information about your organization's use of VMware ",
"products and services on a regular basis in association ",
"with your organization's VMware license key(s). This ",
"information does not personally identify any individual. ",
"",
"Additional information regarding the data collected ",
"through CEIP and the purposes for which it is used by ",
"VMware is set forth in the Trust & Assurance Center at ",
"http://www.vmware.com/trustvmware/ceip.html . If you ",
"prefer not to participate in VMware's CEIP for this ",
"product, you should disable CEIP by setting ",
"'ceip_enabled': false. You may join or leave VMware's ",
"CEIP for this product at any time. Please confirm your ",
"acknowledgement by passing in the parameter ",
"--acknowledge-ceip in the command line.",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
]
},
"settings": {
"ceip_enabled": true
}
}
}
Teraz popíšem čo je potrebné v konfiguračnom súbore upraviť. Riadky, ktoré budeme upravovať som zvýraznil. Čiže najprv v riadku 6-8 zadáme IP adresu, alebo hostname ESXi servera, meno root a požadované heslo. Riadok 21-25 je nastavenie pre novú VM do ktorej budeme vCSA inštalovať. Riadky 27-29 je nastavenie pre gateway (čiže bránu siete na ktorej bude vCSA nainštalované). Riadky 37,38 reprezentujú nastavenie pre SSO (Single Sign-On), tam zadáme heslo a doménové meno. Teraz overíme šablónu bez inštalácie
/vcsa/vcsa-cli-installer/lin64/vcsa-deploy install \
> --accept-eula \
> --verify-template-only \
> /tmp/config.json
Výstup by mohol vyzerať následovne
Run the installer with "-v" or "--verbose" to log detailed information
Updating log file location, copying '/tmp/vcsaCliInstaller-2019-09-22-17-02-b3nktpel/vcsa-cli-installer.log' to desired location as a backup: '/tmp/vcsaCliInstaller-2019-09-22-17-02-b3nktpel/workflow_1569171749982/vcsa-cli-installer.log.bak'
Workflow log-dir /tmp/vcsaCliInstaller-2019-09-22-17-02-b3nktpel/workflow_1569171749982
===================================== [START] Start executing Task: To validate CLI options at 17:02:30 =====================================
Command line arguments verfied.
[SUCCEEDED] Successfully executed Task 'CLIOptionsValidationTask: Executing CLI optionsValidation task' in TaskFlow 'template_validation' at
17:02:30
============================= [START] Start executing Task: To validate the syntax of the template. at 17:02:30 =============================
Template syntax validation for template '/tmp/config.json' succeeded.
Syntax validation for all templates succeeded.
[SUCCEEDED] Successfully executed Task 'SyntaxValidationTask: Executing Template Syntax Validation task' in TaskFlow 'template_validation' at
17:02:30
[START] Start executing Task: To check the version of each template, and for each older template that supports CEIP, convert it to the latest
template format, and save it to the Template Blackboard at 17:02:30
Template version processing for template '/tmp/config.json' succeeded.
Version processing for all templates succeeded.
[SUCCEEDED] Successfully executed Task 'VersionProcessingTask: Executing Template Version Processing task' in TaskFlow 'template_validation'
at 17:02:30
[START] Start executing Task: To validate the template structure against the rules specified by a corresponding template schema. at 17:02:30
Template structure validation for template '/tmp/config.json' succeeded.
Structure validation for all templates succeeded.
[SUCCEEDED] Successfully executed Task 'StructureValidationTask: Executing Template Structure Validation task' in TaskFlow
'template_validation' at 17:02:30
[START] Start executing Task: To create a dependency graph for the provided templates, with an edge pairing two templates that are dependent
on each other. Such graph relationships will affect whether certain templates can be deployed in parallel, or must be deployed sequentially.
at 17:02:30
Dependency processing for all templates succeeded.
[SUCCEEDED] Successfully executed Task 'DependencyProcessingTask: Executing Template Dependency Processing task' in TaskFlow
'template_validation' at 17:02:30
Template verification completed.
================================================================== 17:02:31 ==================================================================
Result and Log File Information...
WorkFlow log directory: /tmp/vcsaCliInstaller-2019-09-22-17-02-b3nktpel/workflow_1569171749982
Teraz spustíme samotnu inštaláciu
/vcsa/vcsa-cli-installer/lin64/vcsa-deploy install \
--accept-eula \
--acknowledge-ceip \
--terse \
--no-ssl-certificate-verification \
/tmp/config.json
Záver
Po niekoľkých minútach by malo byť všetko nainštalované a vCSA pripravená pre riadenie celej infraštruktúry vmware vSphere. Avšak mne inštalácia zlyhala kvôli RPM balíkom. Už som sa o tom zmienil, keď som vCSA inštaloval klasickým spôsobom. Ak by to nezlyhalo na RPM balíkoch, tak vCSA by sa určite nainštalovala bez problémov.