You can automate the process of platform installation with Ansible configuration management system. Ansible uses scripts (playbooks) – yaml-files describing a set of actions to be executed. Read more about Ansible in the official documentation.
Using Ansible scripts allows you to perform the following automatically:
- install the platform;
- create the first cluster;
- create a physical network and pool of IP addresses for virtual machines (VMs);
- connect an SSL certificate;
- configure platform backups.
Preparation
- Check the platform server for compliance with system requirements. Read more in Server requirements.
-
Install Ansible on the PC from which the platform installation will run. Refer to the official documentation for the installation procedure.
Installation playbooks have been tested with Ansible versions 2.9 and 2.12. - On the PC with Ansible:
-
Download the installation playbooks:
wget https://download.ispsystem.com/extras/ansible/vmmanager6_common.tar.gz
- Create an SSH key and copy it to the platform server. Read more in SSH protocol.
-
Platform installation
On the PC with Ansible:
-
Create a directory for installation playbooks:
mkdir vm6_ansible
-
Unpack the archive with the playbooks into the directory:
tar xzf vmmanager6_common.tar.gz -C vm6_ansible/
-
Enter the directory you created:
cd vm6_ansible
-
Specify the installation parameters in the vars section of the vmmanager6.yml file:
Example of settingsvars: vmi_first_username: "admin@example.com" vmi_first_password: "secret" vmmanager6_license_token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" vmi_stage: "beta" vmi_domain: "{{ ansible_ssh_host }}" vmi_network: "192.168.0.0/24" vmi_network_gateway: "192.168.0.1" vmi_network_note: "Network for my VMs" vmi_pool_name: "Pool 1" vmi_pool_note: "Pool for my VMs" vmi_cluster_name: "Cluster 1" vmi_cluster_note: "Cluster for my VMs" vmi_time_zone: "UTC" vmi_domain_template: ".example.com" vmi_node_check_ip: "1.1.1.1" vmi_certificate: "-----BEGIN CERTIFICATE-----\nMIIDkTC..............AlS\nldgeq7s=\n-----END CERTIFICATE-----\n" vmi_certificate_key: "-----BEGIN PRIVATE KEY-----\nMIIEvg...............XO6HBlXDeTd\n-----END PRIVATE KEY-----\n" vmi_certificate_ca: "" vmi_backup_ip: "10.3.0.4" vmi_backup_user: "root" vmi_backup_password: "secret123" vmi_backup_path: "/backup"
Comments -
If you do not plan to connect an SSL certificate, delete or comment the line in vmmanager6.yml file:
- include_tasks: cert.yml
-
If you do not plan to set up platform backups, delete or comment the line in the vmmanager6.yml file:
- include_tasks: backup.yml
-
Run the installation:
ansible-playbook -i <IP>, -u root vmmanager6.yml
Comments to the command - Wait until the installation is complete.
After installation, VMmanager will be accessible by IP address or domain name of your server.