blob: a894f16428a05e5831728b23191066f16c6db2a1 [file] [log] [blame]
Denis Egorenkof7aaccf2019-02-26 13:47:25 +04001Deploy cfg01 on Mac OS with VirtualBox
2======================================
3
4**Prerequisites**
5
6Recommended VirtualBox version is 5.2.26, with Extenstion pack for the same version:
7
8 * Get VirtualBox package for your system: https://download.virtualbox.org/virtualbox/5.2.26/
9 * Extension pack: https://download.virtualbox.org/virtualbox/5.2.26/Oracle_VM_VirtualBox_Extension_Pack-5.2.26.vbox-extpack
10 * Python JSON module
11
12**Common info**
13
14Script gives you an ability to deploy cfg01 VM with provided cfg01 VDI disk
15image and config-drive iso file on your local laptop.
16
17Script takes as arguments two URLs: for cfg01 disk image and for config-drive ISO file.
18Both arguments are required in specified order. All other parameters are optional and can
19be overrided by exporting them via 'export' command or by creating in script's
20run directory env file 'env_overrides' with next possible arguments:
21
22 * VM_NAME - the name of VM to be created in VirtualBox. Default: 'cfg01-mcp.local'.
23 * VM_DISK - the name of virtual disk to be used for virtual machine. Can be
24 an absolute path as well. This variable will be used as target file name for
25 downloading virtual machine disk, please be sure that path exists.
26 Default: 'cfg01-disk.vdi'
27 * CONFIG_DRIVE_ISO - same as VM_DISK, but for config-drive ISO file.
28 Default: 'cfg01.deploy-local.local-config.iso'
29 * AUTO_USER_CONFIRM - do not ask user confirmation to override some resource if already exists.
30 Default: false
31 * UPDATE_ISO_INTERFACES - Update network settings in provided config-drive ISO file.
32 The target and main hosts, which is used to deploy cfg01 instance, are based under
33 OS Linux family and QEMU/KVM virtualization and virtio net-driver. Xenial system, which
34 used for cfg01, already contains a new SystemD predictable network interface names mechanism [0],
35 which automatically assigns ens[3-9] interface names for VMs. VirtualBox is using multi-functional
36 network card, which leads to renaming all network interfaces to enp0s* names.
37 [0] https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
38 Default: true
39
40 * DEPLOY_NET_NAME - NAT-Service network name, which is used as primary interface for cfg01. This network
41 doesn't provided direct access to VM, it is possible to add manually port forwarding rules if needed, but
42 for VM access use host-only network CONTROL_NET. Default: 'deploy_nat_network'
43 * DEPLOY_NETWORK - NAT-Service network with CIDR to use. Should be same as on model generation
44 step 'networking'. Default: '192.168.15.0/24'
45 * DEPLOY_GATEWAY - NAT-Service network gateway. Should be same as on model generation step 'networking'.
46 Default: '192.168.15.1'
47 * DEPLOY_IP_ADDRESS - Primary deploy IP address, which is also specified during model generation.
48 Default: '192.168.15.15'
49
50 * CONTROL_NET_NAME - Host-only based network name, which has static names 'vboxnetX', where 'X' is simple
51 count of existing networks for such type. Default: 'vboxnet0'
52 * CONTROL_GATEWAY - Host-only based network gateway. Default: '192.168.56.1'
53 * CONTROL_NETWORK - Host-only based network with CIDR to use. Should be same as on model generation
54 step 'networking'. Default: '192.168.56.0/24'
55 * CONTROL_IP_ADDRESS - Control IP address, which is also specified during model generation.
56 Default: '192.168.56.15'
57
58Script will go through next steps:
59
60 * Download disk image and config drive ISO;
61 * Define virtual machine with provided parameters;
62 * If needed config-drive ISO network data will be updated on a fly;
63 * Run virtual machine.
64
65Once VM is up and running you can use VirtualBox VM console to check what is going on during deploy.
66It will drop all logs into console and it doesn't matter loged in user or not. It is good to specify during
67model generation username and password to be able to login via VM console if something goes wrong.
68Once you are logged in you can follow usual debug procedure for cfg01 node.