blob: 03aef1fd2478aaee50c59562dcfd1d5146263d60 [file] [log] [blame]
Denis Egorenkodcc233d2019-03-06 18:09:24 +04001====================
2Deploy cfg01 locally
3====================
4
5Deploy cfg01 on Ubuntu with QEMU/KVM (libvirt)
6==============================================
7
8**Prerequisites**
9
10Script will check and install next required packages: qemu-utils libvirt-bin virtinst qemu-kvm.
11
12**Common info**
13
Denis Egorenkobcf88892019-04-26 19:45:30 +040014Script ``define-vm.sh`` gives you an ability to deploy cfg01 VM with provided cfg01 Qcwo2 disk
Denis Egorenkodcc233d2019-03-06 18:09:24 +040015image and config-drive iso file on your local laptop.
16
17Script is operating by next ENV variables:
18
19 * VM_NAME - the name of VM to be created in VirtualBox. Default: 'cfg01-mcp.local'.
20 * VM_SOURCE_DISK - the name of virtual disk to be used for virtual machine. Can be relative or absolute path.
Denis Egorenkoc2656402019-04-19 18:17:50 +040021 You can download and use the following image: http://images.mcp.mirantis.net/cfg01-day01-2019.2.0.qcow2
22 * VM_CONFIG_DISK - Config-drive ISO file, can be relative or absolute path.
Denis Egorenkodcc233d2019-03-06 18:09:24 +040023 * VM_MGM_BRIDGE_NAME - Bridge name to use for deploy management network. Should have Internet access if not
24 offline case. Optional, default: 'br-mgm'
25 * VM_CTL_BRIDGE_NAME - Bridge name to use for control network. Optional, default: 'br-ctl'
26 * VM_MGM_BRIDGE_DISABLE - Do not use host bridge for deploy management network and create new nat-network.
27 Optional, default: false
28 * VM_CTL_BRIDGE_DISABLE - Do not use host bridge for control network and create host-only based new network.
29 Optional, default: false
30 * VM_MGM_NETWORK_NAME - Name for deploy management network. Optional, default: 'mgm_network'
31 * VM_CTL_NETWORK_NAME - Name for control network. Optional, default: 'ctl_network'
32 * VM_MGM_NETWORK_GATEWAY - NAT-Service network gateway for deploy management network.
33 Optional, default: '192.168.15.1'
34 * VM_MGM_NETWORK_MASK - Network mask for deploy management network. Optional, default: '255.255.255.0'
35 * VM_CTL_NETWORK_GATEWAY - Host-only based network gateway for control network.
36 Optional, default: '192.168.56.1'
37 * VM_CTL_NETWORK_MASK - Network mask for control network. Optional, default: '255.255.255.0'
38
39Script will check that disk and config-drive are present and then define needed networks and spawn virtual machine.
Denis Egorenkobcf88892019-04-26 19:45:30 +040040Start VM with ``virsh start <VM_NAME>``. Then check that VM is up and running.
Denis Egorenkodcc233d2019-03-06 18:09:24 +040041
42Once VM is up and running you can use ``virsh console`` to check what is going on during deploy.
Denis Egorenkobcf88892019-04-26 19:45:30 +040043It is recommended to specify username and password/ssh-key during model generation for login via VM console or ssh if
Denis Egorenkodcc233d2019-03-06 18:09:24 +040044something goes wrong. Once you are logged in you can follow usual debug procedure for cfg01 node.
45
Denis Egorenkobcf88892019-04-26 19:45:30 +040046When cfg01 is bootstrapped and configured, Jenkins is available via: http://<salt_master_management_address>:8081/
47Default login creds are: root/r00tme
48
Denis Egorenkoc2656402019-04-19 18:17:50 +040049Deploy OpenStack All-In-One node on Ubuntu with QEMU/KVM (libvirt)
50==================================================================
51
52**Prerequisites**
53
54Setup cfg01 node and it's up, running and configured.
55
56**Common info**
57
Denis Egorenkobcf88892019-04-26 19:45:30 +040058Script ``define-slave-vm.sh`` gives you an ability to deploy OpenStack All-in-one VM with provided Qcwo2 disk
Denis Egorenkoc2656402019-04-19 18:17:50 +040059image and config-drive iso file on your local laptop.
60
61Script is operating by next ENV variables:
62
63 * SLAVE_VM_NAME - the name of VM to be created in VirtualBox.
64 * SLAVE_VM_SOURCE_DISK - the name of virtual disk to be used for virtual machine. Can be relative or absolute path.
65 You can download and use the following image: http://images.mcp.mirantis.net/ubuntu-16-04-x64-mcp2019.2.0.qcow2
66 * SLAVE_VM_MEM_KB - amount of RAM for VM in KB. Default is: 16777216
67 * SLAVE_VM_CPUS - amount of CPUs to use. Default is: 4.
68
69Next parameters should be same as for cfg01 node:
70
71 * VM_CONFIG_DISK
72 * VM_MGM_BRIDGE_NAME
73 * VM_CTL_BRIDGE_NAME
74 * VM_MGM_BRIDGE_DISABLE
75 * VM_CTL_BRIDGE_DISABLE
76 * VM_MGM_NETWORK_NAME
77 * VM_CTL_NETWORK_NAME
78 * VM_MGM_NETWORK_GATEWAY
79 * VM_MGM_NETWORK_MASK
80 * VM_CTL_NETWORK_GATEWAY
81 * VM_CTL_NETWORK_MASK
82
83Also once you setup cfg01 setup the next parameter: export CREATE_NEWORKS=false
84This parameter will disable network recreation, which can be needed in case of changing network setup.
85
86Also if you are not going to use system bridges, set next parameters to true:
87
88 * VM_MGM_BRIDGE_DISABLE=true
89 * VM_CTL_BRIDGE_DISABLE=true
90
91This will switch using to locally created virsh networks.
92
93Script will check that disk and cfg01 config-drive are present and then prepare config-drive for all-in-one node.
Denis Egorenkobcf88892019-04-26 19:45:30 +040094Start VM with ``virsh start <SLAVE_VM_NAME>``. Once VM is up and running you can use ``virsh console`` to check what is
95going on during bootstrap. For that VM will be used same fail safe user as specified for cfg01.
Denis Egorenkodcc233d2019-03-06 18:09:24 +040096
Denis Egorenkof7aaccf2019-02-26 13:47:25 +040097Deploy cfg01 on Mac OS with VirtualBox
98======================================
99
100**Prerequisites**
101
102Recommended VirtualBox version is 5.2.26, with Extenstion pack for the same version:
103
104 * Get VirtualBox package for your system: https://download.virtualbox.org/virtualbox/5.2.26/
105 * Extension pack: https://download.virtualbox.org/virtualbox/5.2.26/Oracle_VM_VirtualBox_Extension_Pack-5.2.26.vbox-extpack
106 * Python JSON module
107
108**Common info**
109
110Script gives you an ability to deploy cfg01 VM with provided cfg01 VDI disk
111image and config-drive iso file on your local laptop.
112
113Script takes as arguments two URLs: for cfg01 disk image and for config-drive ISO file.
114Both arguments are required in specified order. All other parameters are optional and can
115be overrided by exporting them via 'export' command or by creating in script's
116run directory env file 'env_overrides' with next possible arguments:
117
118 * VM_NAME - the name of VM to be created in VirtualBox. Default: 'cfg01-mcp.local'.
119 * VM_DISK - the name of virtual disk to be used for virtual machine. Can be
120 an absolute path as well. This variable will be used as target file name for
121 downloading virtual machine disk, please be sure that path exists.
122 Default: 'cfg01-disk.vdi'
123 * CONFIG_DRIVE_ISO - same as VM_DISK, but for config-drive ISO file.
124 Default: 'cfg01.deploy-local.local-config.iso'
125 * AUTO_USER_CONFIRM - do not ask user confirmation to override some resource if already exists.
126 Default: false
127 * UPDATE_ISO_INTERFACES - Update network settings in provided config-drive ISO file.
128 The target and main hosts, which is used to deploy cfg01 instance, are based under
129 OS Linux family and QEMU/KVM virtualization and virtio net-driver. Xenial system, which
130 used for cfg01, already contains a new SystemD predictable network interface names mechanism [0],
131 which automatically assigns ens[3-9] interface names for VMs. VirtualBox is using multi-functional
132 network card, which leads to renaming all network interfaces to enp0s* names.
133 [0] https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
134 Default: true
135
136 * DEPLOY_NET_NAME - NAT-Service network name, which is used as primary interface for cfg01. This network
137 doesn't provided direct access to VM, it is possible to add manually port forwarding rules if needed, but
138 for VM access use host-only network CONTROL_NET. Default: 'deploy_nat_network'
139 * DEPLOY_NETWORK - NAT-Service network with CIDR to use. Should be same as on model generation
140 step 'networking'. Default: '192.168.15.0/24'
141 * DEPLOY_GATEWAY - NAT-Service network gateway. Should be same as on model generation step 'networking'.
142 Default: '192.168.15.1'
143 * DEPLOY_IP_ADDRESS - Primary deploy IP address, which is also specified during model generation.
144 Default: '192.168.15.15'
145
146 * CONTROL_NET_NAME - Host-only based network name, which has static names 'vboxnetX', where 'X' is simple
147 count of existing networks for such type. Default: 'vboxnet0'
148 * CONTROL_GATEWAY - Host-only based network gateway. Default: '192.168.56.1'
149 * CONTROL_NETWORK - Host-only based network with CIDR to use. Should be same as on model generation
150 step 'networking'. Default: '192.168.56.0/24'
151 * CONTROL_IP_ADDRESS - Control IP address, which is also specified during model generation.
152 Default: '192.168.56.15'
153
154Script will go through next steps:
155
156 * Download disk image and config drive ISO;
157 * Define virtual machine with provided parameters;
158 * If needed config-drive ISO network data will be updated on a fly;
159 * Run virtual machine.
160
161Once VM is up and running you can use VirtualBox VM console to check what is going on during deploy.
Denis Egorenkodcc233d2019-03-06 18:09:24 +0400162It will drop all logs into console and it doesn't matter loged in user or not. It is recommended to specify
163username and password during model generation for login via VM console if something goes wrong.
Denis Egorenkof7aaccf2019-02-26 13:47:25 +0400164Once you are logged in you can follow usual debug procedure for cfg01 node.