diff --git a/Makefile b/Makefile index 828e2e345..d0be41cd1 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,9 @@ clean: deep_clean: clean sudo rm -rf $(LOCAL_MIRROR) +vbox-scripts: + echo "Target is deprecated. Virtualbox scripts have been moved to http://git.openstack.org/openstack/fuel-virtualbox.git" + # Common configuration file. include $(SOURCE_DIR)/config.mk @@ -70,4 +73,3 @@ include $(SOURCE_DIR)/repos.mk include $(SOURCE_DIR)/mirror/module.mk include $(SOURCE_DIR)/packages/module.mk include $(SOURCE_DIR)/iso/module.mk -include $(SOURCE_DIR)/virtualbox.mk diff --git a/README.md b/README.md index 1dc5b9629..33e78b04f 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,6 @@ Directory structure: RPM spec for fuel and fuel-release packages. - ```utils``` Auxiliary scripts. (being deprecated) -- ```virtualbox``` - Scripts that allow a user to try Fuel easily. Being run they start several virtual box - VMs. One of them is used for the Fuel master node and others are used as slave nodes - where Fuel installs an operating system and deploys OpenStack. - ```Makefile``` It is the main GNU Make file which includes all other necessary GNU Make files. - ```config.mk``` @@ -36,5 +32,3 @@ Directory structure: are listed here. - ```sandbox.mk``` The script that is used for building chroot environments. -- ```virtualbox.mk``` - The script that is used for preparing tarball archive with virtualbox scripts. diff --git a/config.mk b/config.mk index 34a95cb89..9b115067e 100644 --- a/config.mk +++ b/config.mk @@ -29,7 +29,6 @@ FUEL_LIBRARY_VERSION?=9.0 # Artifacts names ISO_NAME?=fuel-$(PRODUCT_VERSION) -VBOX_SCRIPTS_NAME?=vbox-scripts-$(PRODUCT_VERSION) # Where we put artifacts ISO_PATH:=$(ARTS_DIR)/$(ISO_NAME).iso diff --git a/virtualbox.mk b/virtualbox.mk deleted file mode 100644 index a18e742b7..000000000 --- a/virtualbox.mk +++ /dev/null @@ -1,9 +0,0 @@ -######################## -# VBOX-SCRIPTS ARTIFACT -######################## -vbox-scripts: $(VBOX_SCRIPTS_PATH) - -$(VBOX_SCRIPTS_PATH): \ - $(call find-files,$(SOURCE_DIR)/virtualbox) - mkdir -p $(@D) - cd $(SOURCE_DIR) && zip -r $@ virtualbox diff --git a/virtualbox/README.md b/virtualbox/README.md deleted file mode 100644 index d369229be..000000000 --- a/virtualbox/README.md +++ /dev/null @@ -1,44 +0,0 @@ -VirtualBox enviropment kit -========================== - -Requirements ------------- - -- VirtualBox with VirtualBox Extension Pack -- procps -- expect -- openssh-client -- xxd -- Cygwin for Windows host PC -- Enable VT-x/AMD-V acceleration option on your hardware for 64-bits guests - -Run ---- - -In order to successfully run Mirantis OpenStack under VirtualBox, you need to: -- download the official release (.iso) and place it under 'iso/' directory -- run "./launch.sh" (or "./launch\_8GB.sh" or "./launch\_16GB.sh" according to your system resources). It will automatically pick up the iso and spin up master node and slave nodes - -If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH. -Usually it is enough to run: export PATH=$PATH:/cygdrive/c/Program Files/Oracle/VirtualBox - -If there are any errors, the script will report them and abort. - -If you want to change settings (number of OpenStack nodes, CPU, RAM, HDD), please refer to "config.sh". - -To shutdown VMs and clean environment just run "./clean.sh" - -To deploy on a remote machine just set environment variable REMOTE_HOST with ssh connection string. -The variable REMOTE_PORT allows to specify custom port for ssh. - -```bash - REMOTE_HOST=user@user.mos.mirantis.net ./launch_8GB.sh -# or - REMOTE_HOST=user@user.mos.mirantis.net REMOTE_PORT=23 ./launch_8GB.sh -``` - -TODO ----- - -- add the ability to use Boot ROM during the remote deploy -- add the new (even smaller) Boot ROM with iPXE HTTP enabled diff --git a/virtualbox/actions/check-available-memory.sh b/virtualbox/actions/check-available-memory.sh deleted file mode 100755 index a993c69fb..000000000 --- a/virtualbox/actions/check-available-memory.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Copyright 2014 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script check available memory on host PC for quality provision VMs via VirtualBox -# - -source ./config.sh -source ./functions/memory.sh - -total_memory=$(get_available_memory) - -if [ $total_memory -eq -1 ]; then - echo "Launch without checking RAM on host PC" - echo "Auto check memory is unavailable, you need install 'free'. Please install procps package." -else - # Count selected RAM configuration - for machine_number in $(eval echo {1..$cluster_size}); do - if [ -n "${vm_slave_memory_mb[$machine_number]}" ]; then - vm_total_mb=$(( $vm_total_mb + ${vm_slave_memory_mb[$machine_number]} )) - else - vm_total_mb=$(( $vm_total_mb + $vm_slave_memory_default )) - fi - done - vm_total_mb=$(( $vm_total_mb + $vm_master_memory_mb )) - - # Do not run VMs if host PC not have enough RAM - can_allocate_mb=$(( ($total_memory - 524288) / 1024 )) - if [ $vm_total_mb -gt $can_allocate_mb ]; then - echo "Your host has not enough memory." - echo "You can allocate no more than ${can_allocate_mb}MB, but trying to run VMs with ${vm_total_mb}MB" - exit 1 - fi -fi -echo "Done." diff --git a/virtualbox/actions/clean-previous-installation.sh b/virtualbox/actions/clean-previous-installation.sh deleted file mode 100755 index de6da991a..000000000 --- a/virtualbox/actions/clean-previous-installation.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# set -x - -# Copyright 2014 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script performs initial check and configuration of the host system. It: -# - check that there is no previous installation of Mirantis OpenStack (if there is one, the script deletes it) - -# Include the script with handy functions to operate VMs and VirtualBox networking -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh - -# Delete all VMs from the previous Mirantis OpenStack installation -delete_vms_multiple $vm_name_prefix -echo "Done." diff --git a/virtualbox/actions/create-interfaces.sh b/virtualbox/actions/create-interfaces.sh deleted file mode 100755 index 69e2d8139..000000000 --- a/virtualbox/actions/create-interfaces.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# set -x - -# Copyright 2014 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script performs initial check and configuration of the host system. It: -# - creates host-only network interfaces -# - -# Include the script with handy functions to operate VMs and VirtualBox networking -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh - -echo "Deleting old interfaces if exists..." -if [[ "${rm_network}" == "0" ]]; then - delete_fuel_ifaces -else - delete_all_hostonly_interfaces -fi -echo - -# Create the required host-only interfaces -for ip in $fuel_master_ips; do - create_hostonly_interfaces $ip -done diff --git a/virtualbox/actions/delete-interfaces.sh b/virtualbox/actions/delete-interfaces.sh deleted file mode 100755 index 03d37f2b8..000000000 --- a/virtualbox/actions/delete-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# set -x - -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# This script deletes host-only network interfaces. -# - -# Include scripts with handy functions to operate VMs and VirtualBox networking -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh - -# Delete host-only interfaces -if [[ "${rm_network}" == "0" ]]; then - delete_fuel_ifaces -else - delete_all_hostonly_interfaces -fi - diff --git a/virtualbox/actions/master-node-create-and-install.sh b/virtualbox/actions/master-node-create-and-install.sh deleted file mode 100755 index b4ddc8fee..000000000 --- a/virtualbox/actions/master-node-create-and-install.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script creates a master node for the product, launches its installation, -# and waits for its completion -# - -# Include the handy functions to operate VMs and track ISO installation progress -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh -source ./functions/product.sh -source ./functions/translate.sh - -# Create master node for the product -# Get variables "host_nic_name" for the master node -get_fuel_name_ifaces - -name="${vm_name_prefix}master" - -# Create master node VM -create_vm $name "${host_nic_name[0]}" $vm_master_cpu_cores $vm_master_memory_mb $vm_master_disk_mb - -# Add additional NICs -add_hostonly_adapter_to_vm $name 2 "${host_nic_name[1]}" - -# Add NAT adapter for internet access -add_nat_adapter_to_vm $name 3 $vm_master_nat_network - -# Mount ISO with installer -mount_iso_to_vm $name $iso_path - -#add RDP connection -if [ ${headless} -eq 1 ]; then - enable_vrde $name ${RDPport} -fi - -if [ "${skipfuelmenu}" = "yes" ]; then - boot_line="$(translate " vmlinuz $cmdline wait_for_external_config=yes showmenu=no"$'\n')" -else - boot_line="$(translate " vmlinuz $cmdline wait_for_external_config=yes"$'\n')" -fi - -# Start virtual machine with the master node -echo -start_vm $name -echo - -# Wait until product VM needs outbound network/internet access -wait_for_product_vm_to_download $vm_master_ip $vm_master_username $vm_master_password "$vm_master_prompt" - -# Enable outbound network/internet access for the machine -enable_outbound_network_for_product_vm $vm_master_ip $vm_master_username $vm_master_password "$vm_master_prompt" - -# Wait until the machine gets installed and Puppet completes its run -wait_for_product_vm_to_install $vm_master_ip $vm_master_username $vm_master_password "$vm_master_prompt" - -# Report success -echo -echo "Master node has been installed." - -#Sleep 10s to wait for Cobbler to settle -sleep 10 diff --git a/virtualbox/actions/master-node-enable-internet.sh b/virtualbox/actions/master-node-enable-internet.sh deleted file mode 100755 index 5bf2361fc..000000000 --- a/virtualbox/actions/master-node-enable-internet.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script can be used as a handly utility to provide master node with the internet access -# It configures network interface inside the VM which is mapped to VirtualBox NAT adapter, and -# also configures default gateway. -# -# Typically, you would use this script after time after rebooting VirtualBox VM with the master node. - -# Include the handy functions to operate VMs and track ISO installation progress -source ./config.sh -source ./functions/vm.sh -source ./functions/product.sh - -# Master node name -name="${vm_name_prefix}master" - -# Enable outbound network/internet access for the machine -enable_outbound_network_for_product_vm $vm_master_ip $vm_master_username $vm_master_password "$vm_master_prompt" - diff --git a/virtualbox/actions/prepare-environment.sh b/virtualbox/actions/prepare-environment.sh deleted file mode 100755 index 15fc80292..000000000 --- a/virtualbox/actions/prepare-environment.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/bash -# set -x - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script performs initial check and configuration of the host system. It: -# - verifies that all available command-line tools are present on the host system -# - accepts one parameter value ('launch' or 'clean') which indicates how it is should be used -# -# We are avoiding using 'which' because of http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script -# - -# Include the script with handy functions to operate VMs and VirtualBox networking -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh -source ./functions/shell.sh - -# Check for procps package -if [ "$(execute uname -s | cut -c1-6)" = "CYGWIN" ]; then - echo -n "Checking for 'free'... " - execute type free >/dev/null 2>&1 - if [ $? -eq 1 ]; then - echo "\"free\" is not available in the path, but it's required. Please install the \"procps\" package. Aborting." - exit 1 - else - echo "OK" - fi -fi - -# Check for expect -echo -n "Checking for 'expect'... " -execute type expect >/dev/null 2>&1 -if [ $? -eq 1 ]; then - echo "\"expect\" is not available in the path, but it's required. Please install Tcl \"expect\" package. Aborting." - exit 1 -else - echo "OK" -fi - -# Check for xxd -echo -n "Checking for 'xxd'... " -execute type xxd >/dev/null 2>&1 -if [ $? -eq 1 ]; then - echo "\"xxd\" is not available in the path, but it's required. Please install the \"xxd\" package. Aborting." - exit 1 -else - echo "OK" -fi - -# Check for VirtualBox -echo -n "Checking for \"VBoxManage\"... " -execute type VBoxManage >/dev/null 2>&1 -if [ $? -eq 1 ]; then - echo "\"VBoxManage\" is not available in the path, but it's required. Likely, VirtualBox is not installed. Aborting." - exit 1 -else - echo "OK" -fi - -# Check for VirtualBox Extension Pack -echo -n "Checking for VirtualBox Extension Pack... " -extpacks=`execute VBoxManage list extpacks | grep 'Usable' | grep 'true' | wc -l` -if [ "$extpacks" -le 0 ]; then - echo >&2 "VirtualBox Extension Pack is not installed. Please, download and install it from the official VirtualBox web site at https://www.virtualbox.org/wiki/Downloads"; exit 1; -fi -echo "OK" - -# execute some checks only in the 'launch' mode -if [ $1 == "launch" ]; then - -# Check for VirtualBox iPXE firmware -echo -n "Checking for VirtualBox iPXE firmware..." -if [ -z $pxe_path ]; then - echo "SKIP" - if [ -z "$REMOTE_HOST" ]; then - echo "VirtualBox iPXE firmware is not found. Used standard firmware from the VirtualBox Extension Pack." - execute VBoxManage setextradata global VBoxInternal/Devices/pcbios/0/Config/LanBootRom - fi -else - echo "OK" - if [ -z "$REMOTE_HOST" ]; then - execute VBoxManage setextradata global VBoxInternal/Devices/pcbios/0/Config/LanBootRom "$(pwd)/$pxe_path" 2>/dev/null - echo "Going to use iPXE boot firmware file $pxe_path" - else - echo "The iPXE boot on the remote system should be configured manually." - fi -fi - -# Check for ISO image to be available -echo -n "Checking for Mirantis OpenStack ISO image... " -if [ -z $iso_path ]; then - echo "Mirantis OpenStack image is not found. Please download it from software.mirantis.com and put under the 'iso' directory." - exit 1 -fi -echo "OK" -echo "Going to use Mirantis OpenStack ISO file $iso_path" - -# Copy ISO to host -copy_if_required $iso_path - -fi # end 'launch' mode check - -# Check if SSH is installed. Cygwin does not install SSH by default. -echo -n "Checking if SSH client installed... " -execute type ssh >/dev/null 2>&1 -if [ $? -eq 1 ]; then - echo "SSH client is not installed. Please install the \"openssh\" package if you run this script under Cygwin. Aborting." - exit 1 -else - echo "OK" -fi - -echo -n "Checking if ipconfig or ifconfig installed... " -case "$(execute uname)" in - Linux | Darwin) - if ! execute test -x /sbin/ifconfig ; then - echo "No ifconfig available at /sbin/ifconfig path! This path is hard-coded into VBoxNetAdpCtl utility." - echo "Please install ifconfig or create symlink to proper interface configuration utility. Aborting." - exit 1 - fi - ;; - CYGWIN*) - # Cygwin does not use ifconfig at all and even has no link to it. - # It uses built-in Windows ipconfig utility instead. - execute type ipconfig >/dev/null 2>&1 - if [ $? -eq 1 ]; then - echo "No ipconfig available in Cygwin environment. Please check you can run ipconfig from Cygwin command prompt. Aborting." - exit 1 - fi - ;; - *) - echo "$(execute uname) is not supported operating system." - exit 1 - ;; -esac -echo "OK" - -# Report success -echo "Done." diff --git a/virtualbox/actions/slave-nodes-create-and-boot.sh b/virtualbox/actions/slave-nodes-create-and-boot.sh deleted file mode 100755 index 46a4ef803..000000000 --- a/virtualbox/actions/slave-nodes-create-and-boot.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# -# This script creates slaves node for the product, launches its installation, -# and waits for its completion -# - -# Include the handy functions to operate VMs -source ./config.sh -source ./functions/vm.sh -source ./functions/network.sh - -# Get variables "host_nic_name" for the slave nodes -get_fuel_name_ifaces - -# Create and start slave nodes -for idx in $(eval echo {1..$cluster_size}); do - name="${vm_name_prefix}slave-${idx}" - vm_ram=${vm_slave_memory_mb[$idx]} - [ -z $vm_ram ] && vm_ram=$vm_slave_memory_default - echo - vm_cpu=${vm_slave_cpu[$idx]} - [ -z $vm_cpu ] && vm_cpu=$vm_slave_cpu_default - echo - create_vm $name "${host_nic_name[0]}" $vm_cpu $vm_ram $vm_slave_first_disk_mb - - # Add additional NICs to VM - if [ ${#host_nic_name[*]} -gt 1 ]; then - for nic in $(eval echo {1..$((${#host_nic_name[*]}-1))}); do - add_hostonly_adapter_to_vm $name $((nic+1)) "${host_nic_name[${nic}]}" - done - fi - # Add additional disks to VM - echo - add_disk_to_vm $name 1 $vm_slave_second_disk_mb - add_disk_to_vm $name 2 $vm_slave_third_disk_mb - - #add NIC1 MAC to description - mac=$(execute VBoxManage showvminfo $name --machinereadable |awk -F '=' '{ if ($1 == "macaddress1") print $2}') - execute VBoxManage modifyvm $name --description $mac - - #add RDP connection - if [ ${headless} -eq 1 ]; then - enable_vrde $name $((${RDPport} + idx)) - fi - - enable_network_boot_for_vm $name - - # The delay required for downloading tftp boot image - sleep 10 - start_vm $name -done - -# Report success -echo -echo "Slave nodes have been created. They will boot over PXE and get discovered by the master node." -echo "To access master node, please point your browser to:" -echo " http://${vm_master_ip}:8000/" -echo "The default username and password is admin:admin" diff --git a/virtualbox/clean.sh b/virtualbox/clean.sh deleted file mode 100755 index 3541c60fe..000000000 --- a/virtualbox/clean.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -source ./functions/shell.sh - -# Check remote host/port settings -check_remote_settings - -# Add VirtualBox directory to PATH -add_virtualbox_path - -# Shutdown installation and clean environment -echo "Prepare the host system..." -./actions/prepare-environment.sh clean || exit 1 -echo - -echo "Сlean previous installation if exists..." -./actions/clean-previous-installation.sh || exit 1 -echo - -echo "Deleting old interfaces if exists..." -./actions/delete-interfaces.sh || exit 1 diff --git a/virtualbox/config.sh b/virtualbox/config.sh deleted file mode 100755 index 162c34cb5..000000000 --- a/virtualbox/config.sh +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -source ./functions/memory.sh -source ./functions/shell.sh - -# Get the first available ISO from the directory 'iso' -iso_path=`ls -1t iso/*.iso 2>/dev/null | head -1` - -# get the first available iPXE boot firmware from the directory 'drivers' -pxe_path=`ls -1t drivers/*.*rom 2>/dev/null | head -1` - -# Every Mirantis OpenStack machine name will start from this prefix -vm_name_prefix=fuel- - -# By default, all available vbox network interfaces will be removed. -# 0 - don't remove all vbox networks. Remove only fuel networks if they exist -# 1 - remove all vbox networks -rm_network=1 - -# Please add the IPs accordingly if you going to create non-default NICs number -# 10.20.0.1/24 - Mirantis OpenStack Admin network -# 172.16.0.1/24 - OpenStack Public/External/Floating network -# 172.16.1.1/24 - OpenStack Fixed/Internal/Private network -# 192.168.0.1/24 - OpenStack Management network -# 192.168.1.1/24 - OpenStack Storage network (for Ceph, Swift etc) -fuel_master_ips="10.20.0.1 172.16.0.254 172.16.1.1" - -# Network mask for fuel interfaces -mask="255.255.255.0" - -# Determining the type of operating system, set global variables and adding CPU core to the master node - case "$(execute uname)" in - Linux) - os_type="linux" - net_sleep="2s" - if [ "$(execute nproc)" -gt "1" ]; then - vm_master_cpu_cores=2 - else - vm_master_cpu_cores=1 - fi - ;; - Darwin) - os_type="darwin" - net_sleep="2s" - mac_nproc=`execute sysctl -a | grep machdep.cpu.thread_count | sed 's/^machdep.cpu.thread_count\:[ \t]*//'` - if [ "$mac_nproc" -gt "1" ]; then - vm_master_cpu_cores=2 - else - vm_master_cpu_cores=1 - fi - ;; - CYGWIN*) - os_type="cygwin" - net_sleep="12s" - if [ "$(execute nproc)" -gt "1" ]; then - vm_master_cpu_cores=2 - else - vm_master_cpu_cores=1 - fi - ;; - *) - echo "$(execute uname) is not supported operating system." - exit 1 - ;; - esac - -# Master node settings -vm_master_memory_mb=1536 -vm_master_disk_mb=65535 - -# Master node access to the internet through the host system, using VirtualBox NAT adapter -vm_master_nat_network=192.168.200.0/24 - -# These settings will be used to check if master node has installed or not. -# If you modify networking params for master node during the boot time -# (i.e. if you pressed Tab in a boot loader and modified params), -# make sure that these values reflect that change. -vm_master_ip=10.20.0.2 -vm_master_username=root -vm_master_password=r00tme -vm_master_prompt='root@fuel ~]#' - -# The number of nodes for installing OpenStack on -# - for minimal non-HA installation, specify 2 (1 controller + 1 compute) -# - for minimal non-HA with Cinder installation, specify 3 (1 ctrl + 1 compute + 1 cinder) -# - for minimal HA installation, specify 4 (3 controllers + 1 compute) -if [ "$CONFIG_FOR" = "16GB" ]; then - cluster_size=5 -elif [ "$CONFIG_FOR" = "8GB" ]; then - cluster_size=3 -else - # Section for custom configuration - cluster_size=3 -fi - -# Slave node settings. This section allows you to define CPU count for each slave node. - -# You can specify CPU count for your nodes as you wish, but keep in mind resources of your machine. -# If you don't, then will be used default parameter -if [ "$CONFIG_FOR" = "16GB" ]; then - vm_slave_cpu_default=1 - - vm_slave_cpu[1]=1 - vm_slave_cpu[2]=1 - vm_slave_cpu[3]=1 - vm_slave_cpu[4]=1 - vm_slave_cpu[5]=1 -elif [ "$CONFIG_FOR" = "8GB" ]; then - vm_slave_cpu_default=1 - - vm_slave_cpu[1]=1 - vm_slave_cpu[2]=1 - vm_slave_cpu[3]=1 -else - # Section for custom configuration - vm_slave_cpu_default=1 - - vm_slave_cpu[1]=1 - vm_slave_cpu[2]=1 - vm_slave_cpu[3]=1 -fi - -# This section allows you to define RAM size in MB for each slave node. -# Keep in mind that PXE boot might not work correctly with values lower than 768. -# You can specify memory size for the specific slaves, other will get default vm_slave_memory_default -# Mirantis OpenStack 3.2 controllers require 1280 MiB of RAM as absolute minimum due to Heat! - -# You may comment out all the following memory parameters to use default value for each node. -# It is recommended if you going to try HA configurations. -# for controller node at least 1.5Gb is required if you also run Ceph and Heat on it -# and for Ubuntu controller we need 2Gb of ram - -# For compute node 1GB is recommended, otherwise VM instances in OpenStack may not boot -# For dedicated Cinder, 768Mb is OK, but Ceph needs 1Gb minimum - -if [ "$CONFIG_FOR" = "16GB" ]; then - vm_slave_memory_default=1536 - - vm_slave_memory_mb[1]=2048 - vm_slave_memory_mb[2]=2048 - vm_slave_memory_mb[3]=2048 - vm_slave_memory_mb[4]=2048 - vm_slave_memory_mb[5]=2048 -elif [ "$CONFIG_FOR" = "8GB" ]; then - vm_slave_memory_default=1024 - - vm_slave_memory_mb[1]=1536 - vm_slave_memory_mb[2]=1536 - vm_slave_memory_mb[3]=1536 -else - # Section for custom configuration - vm_slave_memory_default=1024 - - vm_slave_memory_mb[1]=2048 - vm_slave_memory_mb[2]=1024 - vm_slave_memory_mb[3]=1024 -fi - -# Within demo cluster created by this script, all slaves (controller -# and compute nodes) will have identical disk configuration. Each -# slave will have three disks with sizes defined by the variables below. In a disk configuration -# dialog you will be able to allocate the whole disk or it's part for -# operating system (Base OS), VMs (Virtual Storage), Ceph or other function, -# depending on the roles applied to the server. -# Nodes with combined roles may require more disk space. -vm_slave_first_disk_mb=65535 -vm_slave_second_disk_mb=65535 -vm_slave_third_disk_mb=65535 - -# Set to 1 to run VirtualBox in headless mode -headless=0 -RDPport=5000 - -# set to "yes" if you want to boot the Fuel master node without the Fuel Menu. (enabling this will add an option "showmenu=no" to the kernel comdline so don't need to provide it below) -skipfuelmenu="no" - -# use defaults from the isolinux.cfg if script started from the GitHub cloned repositoy files. otherwise use same defaults defined here. -cmdline="$(grep 'append initrd' ../iso/isolinux/isolinux.cfg -m1 2>/dev/null | sed -e 's/^[ ]*append[ ]*//')" -cmdline="${cmdline:-initrd=initrd.img net.ifnames=0 biosdevname=0 ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: dns1=10.20.0.1 selinux=0}" -# if you want to override the defaults feel free to uncomment and edit the line below -# cmdline="initrd=initrd.img net.ifnames=0 biosdevname=0 ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: dns1=10.20.0.1 selinux=0" diff --git a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.isarom b/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.isarom deleted file mode 100644 index 674357479..000000000 Binary files a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.isarom and /dev/null differ diff --git a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.mrom b/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.mrom deleted file mode 100644 index 624a709d1..000000000 Binary files a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.mrom and /dev/null differ diff --git a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.rom b/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.rom deleted file mode 100644 index 04475c144..000000000 Binary files a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/8086100e.rom and /dev/null differ diff --git a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/README.md b/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/README.md deleted file mode 100644 index 253f02229..000000000 --- a/virtualbox/drivers/Intel 82540EM Gigabit Ethernet [8086100e]/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# iPXE - open source boot firmware for VirtualBox - -This is a prebuilt binary version of **iPXE** as an **VirtualBox PXE ROM**. - -The **iPXE** source code is maintained in a git repository. You can check out a copy of the code using: - -``` -git clone git://git.ipxe.org/ipxe.git -``` - -and build it using: - -``` -cd ipxe/src -make -``` - -You will need to have at least the following packages installed in order to build **iPXE**: - -``` -* gcc (version 3 or later) -* binutils (version 2.18 or later) -* make -* perl -* syslinux (for isolinux, only needed for building .iso images) -* liblzma or xz header files -* zlib, binutils and libiberty header files (only needed for EFI builds) -``` - -to build this **Intel 82540EM Gigabit Ethernet PXE ROM** for VirtualBox use: - -``` -make CONFIG=vbox bin/8086100e.isarom -``` - -Max size of a VirtualBox ROM is 56KB (57344 bytes). -There should be no need to pad the image as long as the binary is smaller or equal to this size. - -To use the ROM in VirtualBox you need to enable it using this command: - -``` -vboxmanage setextradata global VBoxInternal/Devices/pcbios/0/Config/LanBootRom \ - /absolute/path/to/8086100e.isarom -``` - -NB: If you build the ROM using the .rom prefix then it'll be built as a PCI -ROM, which won't work properly in VirtualBox. The error message you'll see -is "No more network devices", which is somewhat confusing. If you enter the -shell and use the "autoboot" command things will work as intended. Remember -to always build as a .isarom to avoid this issue. - -You can find **iPXE** at the official site of the project: . diff --git a/virtualbox/drivers/README.md b/virtualbox/drivers/README.md deleted file mode 100644 index e9860d697..000000000 --- a/virtualbox/drivers/README.md +++ /dev/null @@ -1 +0,0 @@ -Put ROM firmware in this folder diff --git a/virtualbox/dumpkeys.cache b/virtualbox/dumpkeys.cache deleted file mode 100644 index 1f7de9b33..000000000 --- a/virtualbox/dumpkeys.cache +++ /dev/null @@ -1,1348 +0,0 @@ -keymaps 0-255 -keycode 1 = Escape Escape Escape - control keycode 1 = Escape - shift control keycode 1 = Escape - altgr control keycode 1 = Escape - alt keycode 1 = Meta_Escape - shift alt keycode 1 = Meta_Escape - control alt keycode 1 = Meta_Escape -keycode 2 = one exclam - alt keycode 2 = Meta_one - shift alt keycode 2 = Meta_exclam -keycode 3 = two at at - control keycode 3 = nul - shift control keycode 3 = nul - alt keycode 3 = Meta_two - shift alt keycode 3 = Meta_at - control alt keycode 3 = Meta_nul -keycode 4 = three numbersign - control keycode 4 = Escape - alt keycode 4 = Meta_three - shift alt keycode 4 = Meta_numbersign -keycode 5 = four dollar dollar - control keycode 5 = Control_backslash - alt keycode 5 = Meta_four - shift alt keycode 5 = Meta_dollar - control alt keycode 5 = Meta_Control_backslash -keycode 6 = five percent - control keycode 6 = Control_bracketright - alt keycode 6 = Meta_five - shift alt keycode 6 = Meta_percent -keycode 7 = six asciicircum - control keycode 7 = Control_asciicircum - alt keycode 7 = Meta_six - shift alt keycode 7 = Meta_asciicircum -keycode 8 = seven ampersand braceleft - control keycode 8 = Control_underscore - alt keycode 8 = Meta_seven - shift alt keycode 8 = Meta_ampersand - control alt keycode 8 = Meta_Control_underscore -keycode 9 = eight asterisk bracketleft - control keycode 9 = Delete - alt keycode 9 = Meta_eight - shift alt keycode 9 = Meta_asterisk - control alt keycode 9 = Meta_Delete -keycode 10 = nine parenleft bracketright - alt keycode 10 = Meta_nine - shift alt keycode 10 = Meta_parenleft -keycode 11 = zero parenright braceright - alt keycode 11 = Meta_zero - shift alt keycode 11 = Meta_parenright -keycode 12 = minus underscore backslash - control keycode 12 = Control_underscore - shift control keycode 12 = Control_underscore - alt keycode 12 = Meta_minus - shift alt keycode 12 = Meta_underscore - control alt keycode 12 = Meta_Control_underscore -keycode 13 = equal plus - alt keycode 13 = Meta_equal - shift alt keycode 13 = Meta_plus -keycode 14 = Delete Delete Delete - control keycode 14 = Delete - shift control keycode 14 = Delete - altgr control keycode 14 = Delete - alt keycode 14 = Meta_Delete - shift alt keycode 14 = Meta_Delete - control alt keycode 14 = Meta_Delete -keycode 15 = Tab Meta_Tab Tab - control keycode 15 = Tab - shift control keycode 15 = Tab - altgr control keycode 15 = Tab - alt keycode 15 = Meta_Tab - shift alt keycode 15 = Tab - control alt keycode 15 = Meta_Tab -keycode 16 = +q +Q +q - control keycode 16 = Control_q - shift control keycode 16 = Control_q - altgr control keycode 16 = Control_q - alt keycode 16 = Meta_q - shift alt keycode 16 = Meta_Q - control alt keycode 16 = Meta_Control_q -keycode 17 = +w +W +w - control keycode 17 = Control_w - shift control keycode 17 = Control_w - altgr control keycode 17 = Control_w - alt keycode 17 = Meta_w - shift alt keycode 17 = Meta_W - control alt keycode 17 = Meta_Control_w -keycode 18 = +e +E +e - control keycode 18 = Control_e - shift control keycode 18 = Control_e - altgr control keycode 18 = Control_e - alt keycode 18 = Meta_e - shift alt keycode 18 = Meta_E - control alt keycode 18 = Meta_Control_e -keycode 19 = +r +R +r - control keycode 19 = Control_r - shift control keycode 19 = Control_r - altgr control keycode 19 = Control_r - alt keycode 19 = Meta_r - shift alt keycode 19 = Meta_R - control alt keycode 19 = Meta_Control_r -keycode 20 = +t +T +t - control keycode 20 = Control_t - shift control keycode 20 = Control_t - altgr control keycode 20 = Control_t - alt keycode 20 = Meta_t - shift alt keycode 20 = Meta_T - control alt keycode 20 = Meta_Control_t -keycode 21 = +y +Y +y - control keycode 21 = Control_y - shift control keycode 21 = Control_y - altgr control keycode 21 = Control_y - alt keycode 21 = Meta_y - shift alt keycode 21 = Meta_Y - control alt keycode 21 = Meta_Control_y -keycode 22 = +u +U +u - control keycode 22 = Control_u - shift control keycode 22 = Control_u - altgr control keycode 22 = Control_u - alt keycode 22 = Meta_u - shift alt keycode 22 = Meta_U - control alt keycode 22 = Meta_Control_u -keycode 23 = +i +I +i - control keycode 23 = Tab - shift control keycode 23 = Tab - altgr control keycode 23 = Tab - alt keycode 23 = Meta_i - shift alt keycode 23 = Meta_I - control alt keycode 23 = Meta_Tab -keycode 24 = +o +O +o - control keycode 24 = Control_o - shift control keycode 24 = Control_o - altgr control keycode 24 = Control_o - alt keycode 24 = Meta_o - shift alt keycode 24 = Meta_O - control alt keycode 24 = Meta_Control_o -keycode 25 = +p +P +p - control keycode 25 = Control_p - shift control keycode 25 = Control_p - altgr control keycode 25 = Control_p - alt keycode 25 = Meta_p - shift alt keycode 25 = Meta_P - control alt keycode 25 = Meta_Control_p -keycode 26 = bracketleft braceleft - control keycode 26 = Escape - alt keycode 26 = Meta_bracketleft - shift alt keycode 26 = Meta_braceleft -keycode 27 = bracketright braceright asciitilde - control keycode 27 = Control_bracketright - alt keycode 27 = Meta_bracketright - shift alt keycode 27 = Meta_braceright - control alt keycode 27 = Meta_Control_bracketright -keycode 28 = Return Return Return - control keycode 28 = Return - shift control keycode 28 = Return - altgr control keycode 28 = Return - alt keycode 28 = Meta_Control_m - shift alt keycode 28 = Return - control alt keycode 28 = Return -keycode 29 = Control Control Control - control keycode 29 = Control - shift control keycode 29 = Control - altgr control keycode 29 = Control - alt keycode 29 = Control - shift alt keycode 29 = Control - control alt keycode 29 = Control -keycode 30 = +a +A +a - control keycode 30 = Control_a - shift control keycode 30 = Control_a - altgr control keycode 30 = Control_a - alt keycode 30 = Meta_a - shift alt keycode 30 = Meta_A - control alt keycode 30 = Meta_Control_a -keycode 31 = +s +S +s - control keycode 31 = Control_s - shift control keycode 31 = Control_s - altgr control keycode 31 = Control_s - alt keycode 31 = Meta_s - shift alt keycode 31 = Meta_S - control alt keycode 31 = Meta_Control_s -keycode 32 = +d +D +d - control keycode 32 = Control_d - shift control keycode 32 = Control_d - altgr control keycode 32 = Control_d - alt keycode 32 = Meta_d - shift alt keycode 32 = Meta_D - control alt keycode 32 = Meta_Control_d -keycode 33 = +f +F +f - control keycode 33 = Control_f - shift control keycode 33 = Control_f - altgr control keycode 33 = Control_f - alt keycode 33 = Meta_f - shift alt keycode 33 = Meta_F - control alt keycode 33 = Meta_Control_f -keycode 34 = +g +G +g - control keycode 34 = Control_g - shift control keycode 34 = Control_g - altgr control keycode 34 = Control_g - alt keycode 34 = Meta_g - shift alt keycode 34 = Meta_G - control alt keycode 34 = Meta_Control_g -keycode 35 = +h +H +h - control keycode 35 = BackSpace - shift control keycode 35 = BackSpace - altgr control keycode 35 = BackSpace - alt keycode 35 = Meta_h - shift alt keycode 35 = Meta_H - control alt keycode 35 = Meta_BackSpace -keycode 36 = +j +J +j - control keycode 36 = Linefeed - shift control keycode 36 = Linefeed - altgr control keycode 36 = Linefeed - alt keycode 36 = Meta_j - shift alt keycode 36 = Meta_J - control alt keycode 36 = Meta_Linefeed -keycode 37 = +k +K +k - control keycode 37 = Control_k - shift control keycode 37 = Control_k - altgr control keycode 37 = Control_k - alt keycode 37 = Meta_k - shift alt keycode 37 = Meta_K - control alt keycode 37 = Meta_Control_k -keycode 38 = +l +L +l - control keycode 38 = Control_l - shift control keycode 38 = Control_l - altgr control keycode 38 = Control_l - alt keycode 38 = Meta_l - shift alt keycode 38 = Meta_L - control alt keycode 38 = Meta_Control_l -keycode 39 = semicolon colon - alt keycode 39 = Meta_semicolon - shift alt keycode 39 = Meta_colon -keycode 40 = apostrophe quotedbl - control keycode 40 = Control_g - alt keycode 40 = Meta_apostrophe - shift alt keycode 40 = Meta_quotedbl -keycode 41 = grave asciitilde - control keycode 41 = nul - alt keycode 41 = Meta_grave - shift alt keycode 41 = Meta_asciitilde -keycode 42 = Shift Shift Shift - control keycode 42 = Shift - shift control keycode 42 = Shift - altgr control keycode 42 = Shift - alt keycode 42 = Shift - shift alt keycode 42 = Shift - control alt keycode 42 = Shift -keycode 43 = backslash bar - control keycode 43 = Control_backslash - alt keycode 43 = Meta_backslash - shift alt keycode 43 = Meta_bar -keycode 44 = +z +Z +z - control keycode 44 = Control_z - shift control keycode 44 = Control_z - altgr control keycode 44 = Control_z - alt keycode 44 = Meta_z - shift alt keycode 44 = Meta_Z - control alt keycode 44 = Meta_Control_z -keycode 45 = +x +X +x - control keycode 45 = Control_x - shift control keycode 45 = Control_x - altgr control keycode 45 = Control_x - alt keycode 45 = Meta_x - shift alt keycode 45 = Meta_X - control alt keycode 45 = Meta_Control_x -keycode 46 = +c +C - control keycode 46 = Control_c - shift control keycode 46 = Control_c - altgr control keycode 46 = Control_c - alt keycode 46 = Meta_c - shift alt keycode 46 = Meta_C - control alt keycode 46 = Meta_Control_c -keycode 47 = +v +V +v - control keycode 47 = Control_v - shift control keycode 47 = Control_v - altgr control keycode 47 = Control_v - alt keycode 47 = Meta_v - shift alt keycode 47 = Meta_V - control alt keycode 47 = Meta_Control_v -keycode 48 = +b +B +b - control keycode 48 = Control_b - shift control keycode 48 = Control_b - altgr control keycode 48 = Control_b - alt keycode 48 = Meta_b - shift alt keycode 48 = Meta_B - control alt keycode 48 = Meta_Control_b -keycode 49 = +n +N +n - control keycode 49 = Control_n - shift control keycode 49 = Control_n - altgr control keycode 49 = Control_n - alt keycode 49 = Meta_n - shift alt keycode 49 = Meta_N - control alt keycode 49 = Meta_Control_n -keycode 50 = +m +M +m - control keycode 50 = Control_m - shift control keycode 50 = Control_m - altgr control keycode 50 = Control_m - alt keycode 50 = Meta_m - shift alt keycode 50 = Meta_M - control alt keycode 50 = Meta_Control_m -keycode 51 = comma less - alt keycode 51 = Meta_comma - shift alt keycode 51 = Meta_less -keycode 52 = period greater - alt keycode 52 = Meta_period - shift alt keycode 52 = Meta_greater -keycode 53 = slash question - control keycode 53 = Control_underscore - shift control keycode 53 = Delete - alt keycode 53 = Meta_slash - shift alt keycode 53 = Meta_question -keycode 54 = Shift Shift Shift - control keycode 54 = Shift - shift control keycode 54 = Shift - altgr control keycode 54 = Shift - alt keycode 54 = Shift - shift alt keycode 54 = Shift - control alt keycode 54 = Shift -keycode 55 = KP_Multiply KP_Multiply Hex_C - control keycode 55 = KP_Multiply - shift control keycode 55 = KP_Multiply - altgr control keycode 55 = KP_Multiply - alt keycode 55 = KP_Multiply - shift alt keycode 55 = KP_Multiply - control alt keycode 55 = KP_Multiply -keycode 56 = Alt Alt Alt - control keycode 56 = Alt - shift control keycode 56 = Alt - altgr control keycode 56 = Alt - alt keycode 56 = Alt - shift alt keycode 56 = Alt - control alt keycode 56 = Alt -keycode 57 = space space space - control keycode 57 = nul - shift control keycode 57 = space - altgr control keycode 57 = space - alt keycode 57 = Meta_space - shift alt keycode 57 = Meta_space - control alt keycode 57 = Meta_nul -keycode 58 = Caps_Lock Caps_Lock Caps_Lock - control keycode 58 = Caps_Lock - shift control keycode 58 = Caps_Lock - altgr control keycode 58 = Caps_Lock - alt keycode 58 = Caps_Lock - shift alt keycode 58 = Caps_Lock - control alt keycode 58 = Caps_Lock -keycode 59 = F1 F13 Console_13 - control keycode 59 = F25 - alt keycode 59 = Console_1 - control alt keycode 59 = Console_1 -keycode 60 = F2 F14 Console_14 - control keycode 60 = F26 - alt keycode 60 = Console_2 - control alt keycode 60 = Console_2 -keycode 61 = F3 F15 Console_15 - control keycode 61 = F27 - alt keycode 61 = Console_3 - control alt keycode 61 = Console_3 -keycode 62 = F4 F16 Console_16 - control keycode 62 = F28 - alt keycode 62 = Console_4 - control alt keycode 62 = Console_4 -keycode 63 = F5 F17 Console_17 - control keycode 63 = F29 - alt keycode 63 = Console_5 - control alt keycode 63 = Console_5 -keycode 64 = F6 F18 Console_18 - control keycode 64 = F30 - alt keycode 64 = Console_6 - control alt keycode 64 = Console_6 -keycode 65 = F7 F19 Console_19 - control keycode 65 = F31 - alt keycode 65 = Console_7 - control alt keycode 65 = Console_7 -keycode 66 = F8 F20 Console_20 - control keycode 66 = F32 - alt keycode 66 = Console_8 - control alt keycode 66 = Console_8 -keycode 67 = F9 F21 Console_21 - control keycode 67 = F33 - alt keycode 67 = Console_9 - control alt keycode 67 = Console_9 -keycode 68 = F10 F22 Console_22 - control keycode 68 = F34 - alt keycode 68 = Console_10 - control alt keycode 68 = Console_10 -keycode 69 = Num_Lock Num_Lock Hex_A - control keycode 69 = Num_Lock - shift control keycode 69 = Num_Lock - altgr control keycode 69 = Num_Lock - alt keycode 69 = Num_Lock - shift alt keycode 69 = Num_Lock - control alt keycode 69 = Num_Lock -keycode 70 = Scroll_Lock Show_Memory Show_Registers - control keycode 70 = Show_State - alt keycode 70 = Scroll_Lock -keycode 71 = KP_7 KP_7 Hex_7 - control keycode 71 = KP_7 - shift control keycode 71 = KP_7 - altgr control keycode 71 = KP_7 - alt keycode 71 = Ascii_7 - shift alt keycode 71 = KP_7 - control alt keycode 71 = KP_7 -keycode 72 = KP_8 KP_8 Hex_8 - control keycode 72 = KP_8 - shift control keycode 72 = KP_8 - altgr control keycode 72 = KP_8 - alt keycode 72 = Ascii_8 - shift alt keycode 72 = KP_8 - control alt keycode 72 = KP_8 -keycode 73 = KP_9 KP_9 Hex_9 - control keycode 73 = KP_9 - shift control keycode 73 = KP_9 - altgr control keycode 73 = KP_9 - alt keycode 73 = Ascii_9 - shift alt keycode 73 = KP_9 - control alt keycode 73 = KP_9 -keycode 74 = KP_Subtract KP_Subtract Hex_D - control keycode 74 = KP_Subtract - shift control keycode 74 = KP_Subtract - altgr control keycode 74 = KP_Subtract - alt keycode 74 = KP_Subtract - shift alt keycode 74 = KP_Subtract - control alt keycode 74 = KP_Subtract -keycode 75 = KP_4 KP_4 Hex_4 - control keycode 75 = KP_4 - shift control keycode 75 = KP_4 - altgr control keycode 75 = KP_4 - alt keycode 75 = Ascii_4 - shift alt keycode 75 = KP_4 - control alt keycode 75 = KP_4 -keycode 76 = KP_5 KP_5 Hex_5 - control keycode 76 = KP_5 - shift control keycode 76 = KP_5 - altgr control keycode 76 = KP_5 - alt keycode 76 = Ascii_5 - shift alt keycode 76 = KP_5 - control alt keycode 76 = KP_5 -keycode 77 = KP_6 KP_6 Hex_6 - control keycode 77 = KP_6 - shift control keycode 77 = KP_6 - altgr control keycode 77 = KP_6 - alt keycode 77 = Ascii_6 - shift alt keycode 77 = KP_6 - control alt keycode 77 = KP_6 -keycode 78 = KP_Add KP_Add Hex_E - control keycode 78 = KP_Add - shift control keycode 78 = KP_Add - altgr control keycode 78 = KP_Add - alt keycode 78 = KP_Add - shift alt keycode 78 = KP_Add - control alt keycode 78 = KP_Add -keycode 79 = KP_1 KP_1 Hex_1 - control keycode 79 = KP_1 - shift control keycode 79 = KP_1 - altgr control keycode 79 = KP_1 - alt keycode 79 = Ascii_1 - shift alt keycode 79 = KP_1 - control alt keycode 79 = KP_1 -keycode 80 = KP_2 KP_2 Hex_2 - control keycode 80 = KP_2 - shift control keycode 80 = KP_2 - altgr control keycode 80 = KP_2 - alt keycode 80 = Ascii_2 - shift alt keycode 80 = KP_2 - control alt keycode 80 = KP_2 -keycode 81 = KP_3 KP_3 Hex_3 - control keycode 81 = KP_3 - shift control keycode 81 = KP_3 - altgr control keycode 81 = KP_3 - alt keycode 81 = Ascii_3 - shift alt keycode 81 = KP_3 - control alt keycode 81 = KP_3 -keycode 82 = KP_0 KP_0 Hex_0 - control keycode 82 = KP_0 - shift control keycode 82 = KP_0 - altgr control keycode 82 = KP_0 - alt keycode 82 = Ascii_0 - shift alt keycode 82 = KP_0 - control alt keycode 82 = KP_0 -keycode 83 = KP_Period KP_Period KP_Period - control keycode 83 = KP_Period - shift control keycode 83 = KP_Period - altgr control keycode 83 = Boot - alt keycode 83 = KP_Period - shift alt keycode 83 = KP_Period - control alt keycode 83 = Boot -keycode 84 = Last_Console Last_Console Last_Console - control keycode 84 = Last_Console - shift control keycode 84 = Last_Console - altgr control keycode 84 = Last_Console - alt keycode 84 = Last_Console - shift alt keycode 84 = Last_Console - control alt keycode 84 = Last_Console -keycode 86 = less greater bar - alt keycode 86 = Meta_less - shift alt keycode 86 = Meta_greater -keycode 87 = F11 F23 Console_23 - control keycode 87 = F35 - alt keycode 87 = Console_11 - control alt keycode 87 = Console_11 -keycode 88 = F12 F24 Console_24 - control keycode 88 = F36 - alt keycode 88 = Console_12 - control alt keycode 88 = Console_12 -keycode 96 = KP_Enter KP_Enter Hex_F - control keycode 96 = KP_Enter - shift control keycode 96 = KP_Enter - altgr control keycode 96 = KP_Enter - alt keycode 96 = KP_Enter - shift alt keycode 96 = KP_Enter - control alt keycode 96 = KP_Enter -keycode 97 = Control Control Control - control keycode 97 = Control - shift control keycode 97 = Control - altgr control keycode 97 = Control - alt keycode 97 = Control - shift alt keycode 97 = Control - control alt keycode 97 = Control -keycode 98 = KP_Divide KP_Divide Hex_B - control keycode 98 = KP_Divide - shift control keycode 98 = KP_Divide - altgr control keycode 98 = KP_Divide - alt keycode 98 = KP_Divide - shift alt keycode 98 = KP_Divide - control alt keycode 98 = KP_Divide -keycode 99 = Compose Compose Compose - control keycode 99 = Control_backslash - shift control keycode 99 = Compose - altgr control keycode 99 = Compose - alt keycode 99 = Control_backslash - shift alt keycode 99 = Compose - control alt keycode 99 = Meta_Control_backslash -keycode 100 = AltGr AltGr AltGr - control keycode 100 = AltGr - shift control keycode 100 = AltGr - altgr control keycode 100 = AltGr - alt keycode 100 = Compose - shift alt keycode 100 = AltGr - control alt keycode 100 = AltGr -keycode 101 = Break Break Break - control keycode 101 = Break - shift control keycode 101 = Break - altgr control keycode 101 = Break - alt keycode 101 = Break - shift alt keycode 101 = Break - control alt keycode 101 = Break -keycode 102 = Find Find Find - control keycode 102 = Find - shift control keycode 102 = Find - altgr control keycode 102 = Find - alt keycode 102 = Find - shift alt keycode 102 = Find - control alt keycode 102 = Find -keycode 103 = Up Up Up - control keycode 103 = Up - shift control keycode 103 = Up - altgr control keycode 103 = Up - alt keycode 103 = KeyboardSignal - shift alt keycode 103 = Up - control alt keycode 103 = Up -keycode 104 = Prior Scroll_Backward Prior - control keycode 104 = Prior - shift control keycode 104 = Prior - altgr control keycode 104 = Prior - alt keycode 104 = Prior - shift alt keycode 104 = Prior - control alt keycode 104 = Prior -keycode 105 = Left Left Left - control keycode 105 = Left - shift control keycode 105 = Left - altgr control keycode 105 = Left - alt keycode 105 = Decr_Console - shift alt keycode 105 = Left - control alt keycode 105 = Left -keycode 106 = Right Right Right - control keycode 106 = Right - shift control keycode 106 = Right - altgr control keycode 106 = Right - alt keycode 106 = Incr_Console - shift alt keycode 106 = Right - control alt keycode 106 = Right -keycode 107 = Select Select Select - control keycode 107 = Select - shift control keycode 107 = Select - altgr control keycode 107 = Select - alt keycode 107 = Select - shift alt keycode 107 = Select - control alt keycode 107 = Select -keycode 108 = Down Down Down - control keycode 108 = Down - shift control keycode 108 = Down - altgr control keycode 108 = Down - alt keycode 108 = Down - shift alt keycode 108 = Down - control alt keycode 108 = Down -keycode 109 = Next Scroll_Forward Next - control keycode 109 = Next - shift control keycode 109 = Next - altgr control keycode 109 = Next - alt keycode 109 = Next - shift alt keycode 109 = Next - control alt keycode 109 = Next -keycode 110 = Insert Insert Insert - control keycode 110 = Insert - shift control keycode 110 = Insert - altgr control keycode 110 = Insert - alt keycode 110 = Insert - shift alt keycode 110 = Insert - control alt keycode 110 = Insert -keycode 111 = Remove Remove Remove - control keycode 111 = Remove - shift control keycode 111 = Remove - altgr control keycode 111 = Boot - alt keycode 111 = Remove - shift alt keycode 111 = Remove - control alt keycode 111 = Boot -keycode 112 = Macro Macro Macro - control keycode 112 = Macro - shift control keycode 112 = Macro - alt keycode 112 = Macro - control alt keycode 112 = Macro -keycode 113 = F13 F13 F13 - control keycode 113 = F13 - shift control keycode 113 = F13 - alt keycode 113 = F13 - control alt keycode 113 = F13 -keycode 114 = F14 F14 F14 - control keycode 114 = F14 - shift control keycode 114 = F14 - alt keycode 114 = F14 - control alt keycode 114 = F14 -keycode 115 = Help Help Help - control keycode 115 = Help - shift control keycode 115 = Help - alt keycode 115 = Help - control alt keycode 115 = Help -keycode 116 = Do Do Do - control keycode 116 = Do - shift control keycode 116 = Do - alt keycode 116 = Do - control alt keycode 116 = Do -keycode 117 = F17 F17 F17 - control keycode 117 = F17 - shift control keycode 117 = F17 - alt keycode 117 = F17 - control alt keycode 117 = F17 -keycode 118 = KP_MinPlus KP_MinPlus KP_MinPlus - control keycode 118 = KP_MinPlus - shift control keycode 118 = KP_MinPlus - alt keycode 118 = KP_MinPlus - control alt keycode 118 = KP_MinPlus -keycode 119 = Pause Pause Pause - control keycode 119 = Pause - shift control keycode 119 = Pause - altgr control keycode 119 = Pause - alt keycode 119 = Pause - shift alt keycode 119 = Pause - control alt keycode 119 = Pause -keycode 125 = Decr_Console Decr_Console Decr_Console - control keycode 125 = Decr_Console - shift control keycode 125 = Decr_Console - altgr control keycode 125 = Decr_Console - alt keycode 125 = Decr_Console - shift alt keycode 125 = Decr_Console - control alt keycode 125 = Decr_Console -keycode 126 = Incr_Console Incr_Console Incr_Console - control keycode 126 = Incr_Console - shift control keycode 126 = Incr_Console - altgr control keycode 126 = Incr_Console - alt keycode 126 = Incr_Console - shift alt keycode 126 = Incr_Console - control alt keycode 126 = Incr_Console -keycode 127 = Last_Console Last_Console Last_Console - control keycode 127 = Last_Console - shift control keycode 127 = Last_Console - altgr control keycode 127 = Last_Console - alt keycode 127 = Last_Console - shift alt keycode 127 = Last_Console - control alt keycode 127 = Last_Console -keycode 128 = nul nul nul - control keycode 128 = nul - shift control keycode 128 = nul - alt keycode 128 = nul - control alt keycode 128 = nul -keycode 129 = nul nul nul - control keycode 129 = nul - shift control keycode 129 = nul - alt keycode 129 = nul - control alt keycode 129 = nul -keycode 130 = nul nul nul - control keycode 130 = nul - shift control keycode 130 = nul - alt keycode 130 = nul - control alt keycode 130 = nul -keycode 131 = nul nul nul - control keycode 131 = nul - shift control keycode 131 = nul - alt keycode 131 = nul - control alt keycode 131 = nul -keycode 132 = nul nul nul - control keycode 132 = nul - shift control keycode 132 = nul - alt keycode 132 = nul - control alt keycode 132 = nul -keycode 133 = nul nul nul - control keycode 133 = nul - shift control keycode 133 = nul - alt keycode 133 = nul - control alt keycode 133 = nul -keycode 134 = nul nul nul - control keycode 134 = nul - shift control keycode 134 = nul - alt keycode 134 = nul - control alt keycode 134 = nul -keycode 135 = nul nul nul - control keycode 135 = nul - shift control keycode 135 = nul - alt keycode 135 = nul - control alt keycode 135 = nul -keycode 136 = nul nul nul - control keycode 136 = nul - shift control keycode 136 = nul - alt keycode 136 = nul - control alt keycode 136 = nul -keycode 137 = nul nul nul - control keycode 137 = nul - shift control keycode 137 = nul - alt keycode 137 = nul - control alt keycode 137 = nul -keycode 138 = nul nul nul - control keycode 138 = nul - shift control keycode 138 = nul - alt keycode 138 = nul - control alt keycode 138 = nul -keycode 139 = nul nul nul - control keycode 139 = nul - shift control keycode 139 = nul - alt keycode 139 = nul - control alt keycode 139 = nul -keycode 140 = nul nul nul - control keycode 140 = nul - shift control keycode 140 = nul - alt keycode 140 = nul - control alt keycode 140 = nul -keycode 141 = nul nul nul - control keycode 141 = nul - shift control keycode 141 = nul - alt keycode 141 = nul - control alt keycode 141 = nul -keycode 142 = nul nul nul - control keycode 142 = nul - shift control keycode 142 = nul - alt keycode 142 = nul - control alt keycode 142 = nul -keycode 143 = nul nul nul - control keycode 143 = nul - shift control keycode 143 = nul - alt keycode 143 = nul - control alt keycode 143 = nul -keycode 144 = nul nul nul - control keycode 144 = nul - shift control keycode 144 = nul - alt keycode 144 = nul - control alt keycode 144 = nul -keycode 145 = nul nul nul - control keycode 145 = nul - shift control keycode 145 = nul - alt keycode 145 = nul - control alt keycode 145 = nul -keycode 146 = nul nul nul - control keycode 146 = nul - shift control keycode 146 = nul - alt keycode 146 = nul - control alt keycode 146 = nul -keycode 147 = nul nul nul - control keycode 147 = nul - shift control keycode 147 = nul - alt keycode 147 = nul - control alt keycode 147 = nul -keycode 148 = nul nul nul - control keycode 148 = nul - shift control keycode 148 = nul - alt keycode 148 = nul - control alt keycode 148 = nul -keycode 149 = nul nul nul - control keycode 149 = nul - shift control keycode 149 = nul - alt keycode 149 = nul - control alt keycode 149 = nul -keycode 150 = nul nul nul - control keycode 150 = nul - shift control keycode 150 = nul - alt keycode 150 = nul - control alt keycode 150 = nul -keycode 151 = nul nul nul - control keycode 151 = nul - shift control keycode 151 = nul - alt keycode 151 = nul - control alt keycode 151 = nul -keycode 152 = nul nul nul - control keycode 152 = nul - shift control keycode 152 = nul - alt keycode 152 = nul - control alt keycode 152 = nul -keycode 153 = nul nul nul - control keycode 153 = nul - shift control keycode 153 = nul - alt keycode 153 = nul - control alt keycode 153 = nul -keycode 154 = nul nul nul - control keycode 154 = nul - shift control keycode 154 = nul - alt keycode 154 = nul - control alt keycode 154 = nul -keycode 155 = nul nul nul - control keycode 155 = nul - shift control keycode 155 = nul - alt keycode 155 = nul - control alt keycode 155 = nul -keycode 156 = nul nul nul - control keycode 156 = nul - shift control keycode 156 = nul - alt keycode 156 = nul - control alt keycode 156 = nul -keycode 157 = nul nul nul - control keycode 157 = nul - shift control keycode 157 = nul - alt keycode 157 = nul - control alt keycode 157 = nul -keycode 158 = nul nul nul - control keycode 158 = nul - shift control keycode 158 = nul - alt keycode 158 = nul - control alt keycode 158 = nul -keycode 159 = nul nul nul - control keycode 159 = nul - shift control keycode 159 = nul - alt keycode 159 = nul - control alt keycode 159 = nul -keycode 160 = nul nul nul - control keycode 160 = nul - shift control keycode 160 = nul - alt keycode 160 = nul - control alt keycode 160 = nul -keycode 161 = nul nul nul - control keycode 161 = nul - shift control keycode 161 = nul - alt keycode 161 = nul - control alt keycode 161 = nul -keycode 162 = nul nul nul - control keycode 162 = nul - shift control keycode 162 = nul - alt keycode 162 = nul - control alt keycode 162 = nul -keycode 163 = nul nul nul - control keycode 163 = nul - shift control keycode 163 = nul - alt keycode 163 = nul - control alt keycode 163 = nul -keycode 164 = nul nul nul - control keycode 164 = nul - shift control keycode 164 = nul - alt keycode 164 = nul - control alt keycode 164 = nul -keycode 165 = nul nul nul - control keycode 165 = nul - shift control keycode 165 = nul - alt keycode 165 = nul - control alt keycode 165 = nul -keycode 166 = nul nul nul - control keycode 166 = nul - shift control keycode 166 = nul - alt keycode 166 = nul - control alt keycode 166 = nul -keycode 167 = nul nul nul - control keycode 167 = nul - shift control keycode 167 = nul - alt keycode 167 = nul - control alt keycode 167 = nul -keycode 168 = nul nul nul - control keycode 168 = nul - shift control keycode 168 = nul - alt keycode 168 = nul - control alt keycode 168 = nul -keycode 169 = nul nul nul - control keycode 169 = nul - shift control keycode 169 = nul - alt keycode 169 = nul - control alt keycode 169 = nul -keycode 170 = nul nul nul - control keycode 170 = nul - shift control keycode 170 = nul - alt keycode 170 = nul - control alt keycode 170 = nul -keycode 171 = nul nul nul - control keycode 171 = nul - shift control keycode 171 = nul - alt keycode 171 = nul - control alt keycode 171 = nul -keycode 172 = nul nul nul - control keycode 172 = nul - shift control keycode 172 = nul - alt keycode 172 = nul - control alt keycode 172 = nul -keycode 173 = nul nul nul - control keycode 173 = nul - shift control keycode 173 = nul - alt keycode 173 = nul - control alt keycode 173 = nul -keycode 174 = nul nul nul - control keycode 174 = nul - shift control keycode 174 = nul - alt keycode 174 = nul - control alt keycode 174 = nul -keycode 175 = nul nul nul - control keycode 175 = nul - shift control keycode 175 = nul - alt keycode 175 = nul - control alt keycode 175 = nul -keycode 176 = nul nul nul - control keycode 176 = nul - shift control keycode 176 = nul - alt keycode 176 = nul - control alt keycode 176 = nul -keycode 177 = nul nul nul - control keycode 177 = nul - shift control keycode 177 = nul - alt keycode 177 = nul - control alt keycode 177 = nul -keycode 178 = nul nul nul - control keycode 178 = nul - shift control keycode 178 = nul - alt keycode 178 = nul - control alt keycode 178 = nul -keycode 179 = nul nul nul - control keycode 179 = nul - shift control keycode 179 = nul - alt keycode 179 = nul - control alt keycode 179 = nul -keycode 180 = nul nul nul - control keycode 180 = nul - shift control keycode 180 = nul - alt keycode 180 = nul - control alt keycode 180 = nul -keycode 181 = nul nul nul - control keycode 181 = nul - shift control keycode 181 = nul - alt keycode 181 = nul - control alt keycode 181 = nul -keycode 182 = nul nul nul - control keycode 182 = nul - shift control keycode 182 = nul - alt keycode 182 = nul - control alt keycode 182 = nul -keycode 183 = nul nul nul - control keycode 183 = nul - shift control keycode 183 = nul - alt keycode 183 = nul - control alt keycode 183 = nul -keycode 184 = nul nul nul - control keycode 184 = nul - shift control keycode 184 = nul - alt keycode 184 = nul - control alt keycode 184 = nul -keycode 185 = nul nul nul - control keycode 185 = nul - shift control keycode 185 = nul - alt keycode 185 = nul - control alt keycode 185 = nul -keycode 186 = nul nul nul - control keycode 186 = nul - shift control keycode 186 = nul - alt keycode 186 = nul - control alt keycode 186 = nul -keycode 187 = nul nul nul - control keycode 187 = nul - shift control keycode 187 = nul - alt keycode 187 = nul - control alt keycode 187 = nul -keycode 188 = nul nul nul - control keycode 188 = nul - shift control keycode 188 = nul - alt keycode 188 = nul - control alt keycode 188 = nul -keycode 189 = nul nul nul - control keycode 189 = nul - shift control keycode 189 = nul - alt keycode 189 = nul - control alt keycode 189 = nul -keycode 190 = nul nul nul - control keycode 190 = nul - shift control keycode 190 = nul - alt keycode 190 = nul - control alt keycode 190 = nul -keycode 191 = nul nul nul - control keycode 191 = nul - shift control keycode 191 = nul - alt keycode 191 = nul - control alt keycode 191 = nul -keycode 192 = nul nul nul - control keycode 192 = nul - shift control keycode 192 = nul - alt keycode 192 = nul - control alt keycode 192 = nul -keycode 193 = nul nul nul - control keycode 193 = nul - shift control keycode 193 = nul - alt keycode 193 = nul - control alt keycode 193 = nul -keycode 194 = nul nul nul - control keycode 194 = nul - shift control keycode 194 = nul - alt keycode 194 = nul - control alt keycode 194 = nul -keycode 195 = nul nul nul - control keycode 195 = nul - shift control keycode 195 = nul - alt keycode 195 = nul - control alt keycode 195 = nul -keycode 196 = nul nul nul - control keycode 196 = nul - shift control keycode 196 = nul - alt keycode 196 = nul - control alt keycode 196 = nul -keycode 197 = nul nul nul - control keycode 197 = nul - shift control keycode 197 = nul - alt keycode 197 = nul - control alt keycode 197 = nul -keycode 198 = nul nul nul - control keycode 198 = nul - shift control keycode 198 = nul - alt keycode 198 = nul - control alt keycode 198 = nul -keycode 199 = nul nul nul - control keycode 199 = nul - shift control keycode 199 = nul - alt keycode 199 = nul - control alt keycode 199 = nul -keycode 200 = nul nul nul - control keycode 200 = nul - shift control keycode 200 = nul - alt keycode 200 = nul - control alt keycode 200 = nul -keycode 201 = nul nul nul - control keycode 201 = nul - shift control keycode 201 = nul - alt keycode 201 = nul - control alt keycode 201 = nul -keycode 202 = nul nul nul - control keycode 202 = nul - shift control keycode 202 = nul - alt keycode 202 = nul - control alt keycode 202 = nul -keycode 203 = nul nul nul - control keycode 203 = nul - shift control keycode 203 = nul - alt keycode 203 = nul - control alt keycode 203 = nul -keycode 204 = nul nul nul - control keycode 204 = nul - shift control keycode 204 = nul - alt keycode 204 = nul - control alt keycode 204 = nul -keycode 205 = nul nul nul - control keycode 205 = nul - shift control keycode 205 = nul - alt keycode 205 = nul - control alt keycode 205 = nul -keycode 206 = nul nul nul - control keycode 206 = nul - shift control keycode 206 = nul - alt keycode 206 = nul - control alt keycode 206 = nul -keycode 207 = nul nul nul - control keycode 207 = nul - shift control keycode 207 = nul - alt keycode 207 = nul - control alt keycode 207 = nul -keycode 208 = nul nul nul - control keycode 208 = nul - shift control keycode 208 = nul - alt keycode 208 = nul - control alt keycode 208 = nul -keycode 209 = nul nul nul - control keycode 209 = nul - shift control keycode 209 = nul - alt keycode 209 = nul - control alt keycode 209 = nul -keycode 210 = nul nul nul - control keycode 210 = nul - shift control keycode 210 = nul - alt keycode 210 = nul - control alt keycode 210 = nul -keycode 211 = nul nul nul - control keycode 211 = nul - shift control keycode 211 = nul - alt keycode 211 = nul - control alt keycode 211 = nul -keycode 212 = nul nul nul - control keycode 212 = nul - shift control keycode 212 = nul - alt keycode 212 = nul - control alt keycode 212 = nul -keycode 213 = nul nul nul - control keycode 213 = nul - shift control keycode 213 = nul - alt keycode 213 = nul - control alt keycode 213 = nul -keycode 214 = nul nul nul - control keycode 214 = nul - shift control keycode 214 = nul - alt keycode 214 = nul - control alt keycode 214 = nul -keycode 215 = nul nul nul - control keycode 215 = nul - shift control keycode 215 = nul - alt keycode 215 = nul - control alt keycode 215 = nul -keycode 216 = nul nul nul - control keycode 216 = nul - shift control keycode 216 = nul - alt keycode 216 = nul - control alt keycode 216 = nul -keycode 217 = nul nul nul - control keycode 217 = nul - shift control keycode 217 = nul - alt keycode 217 = nul - control alt keycode 217 = nul -keycode 218 = nul nul nul - control keycode 218 = nul - shift control keycode 218 = nul - alt keycode 218 = nul - control alt keycode 218 = nul -keycode 219 = nul nul nul - control keycode 219 = nul - shift control keycode 219 = nul - alt keycode 219 = nul - control alt keycode 219 = nul -keycode 220 = nul nul nul - control keycode 220 = nul - shift control keycode 220 = nul - alt keycode 220 = nul - control alt keycode 220 = nul -keycode 221 = nul nul nul - control keycode 221 = nul - shift control keycode 221 = nul - alt keycode 221 = nul - control alt keycode 221 = nul -keycode 222 = nul nul nul - control keycode 222 = nul - shift control keycode 222 = nul - alt keycode 222 = nul - control alt keycode 222 = nul -keycode 223 = nul nul nul - control keycode 223 = nul - shift control keycode 223 = nul - alt keycode 223 = nul - control alt keycode 223 = nul -keycode 224 = nul nul nul - control keycode 224 = nul - shift control keycode 224 = nul - alt keycode 224 = nul - control alt keycode 224 = nul -keycode 225 = nul nul nul - control keycode 225 = nul - shift control keycode 225 = nul - alt keycode 225 = nul - control alt keycode 225 = nul -keycode 226 = nul nul nul - control keycode 226 = nul - shift control keycode 226 = nul - alt keycode 226 = nul - control alt keycode 226 = nul -keycode 227 = nul nul nul - control keycode 227 = nul - shift control keycode 227 = nul - alt keycode 227 = nul - control alt keycode 227 = nul -keycode 228 = nul nul nul - control keycode 228 = nul - shift control keycode 228 = nul - alt keycode 228 = nul - control alt keycode 228 = nul -keycode 229 = nul nul nul - control keycode 229 = nul - shift control keycode 229 = nul - alt keycode 229 = nul - control alt keycode 229 = nul -keycode 230 = nul nul nul - control keycode 230 = nul - shift control keycode 230 = nul - alt keycode 230 = nul - control alt keycode 230 = nul -keycode 231 = nul nul nul - control keycode 231 = nul - shift control keycode 231 = nul - alt keycode 231 = nul - control alt keycode 231 = nul -keycode 232 = nul nul nul - control keycode 232 = nul - shift control keycode 232 = nul - alt keycode 232 = nul - control alt keycode 232 = nul -keycode 233 = nul nul nul - control keycode 233 = nul - shift control keycode 233 = nul - alt keycode 233 = nul - control alt keycode 233 = nul -keycode 234 = nul nul nul - control keycode 234 = nul - shift control keycode 234 = nul - alt keycode 234 = nul - control alt keycode 234 = nul -keycode 235 = nul nul nul - control keycode 235 = nul - shift control keycode 235 = nul - alt keycode 235 = nul - control alt keycode 235 = nul -keycode 236 = nul nul nul - control keycode 236 = nul - shift control keycode 236 = nul - alt keycode 236 = nul - control alt keycode 236 = nul -keycode 237 = nul nul nul - control keycode 237 = nul - shift control keycode 237 = nul - alt keycode 237 = nul - control alt keycode 237 = nul -keycode 238 = nul nul nul - control keycode 238 = nul - shift control keycode 238 = nul - alt keycode 238 = nul - control alt keycode 238 = nul -keycode 239 = nul nul nul - control keycode 239 = nul - shift control keycode 239 = nul - alt keycode 239 = nul - control alt keycode 239 = nul -keycode 240 = nul nul nul - control keycode 240 = nul - shift control keycode 240 = nul - alt keycode 240 = nul - control alt keycode 240 = nul -keycode 241 = nul nul nul - control keycode 241 = nul - shift control keycode 241 = nul - alt keycode 241 = nul - control alt keycode 241 = nul -keycode 242 = nul nul nul - control keycode 242 = nul - shift control keycode 242 = nul - alt keycode 242 = nul - control alt keycode 242 = nul -keycode 243 = nul nul nul - control keycode 243 = nul - shift control keycode 243 = nul - alt keycode 243 = nul - control alt keycode 243 = nul -keycode 244 = nul nul nul - control keycode 244 = nul - shift control keycode 244 = nul - alt keycode 244 = nul - control alt keycode 244 = nul -keycode 245 = nul nul nul - control keycode 245 = nul - shift control keycode 245 = nul - alt keycode 245 = nul - control alt keycode 245 = nul -keycode 246 = nul nul nul - control keycode 246 = nul - shift control keycode 246 = nul - alt keycode 246 = nul - control alt keycode 246 = nul -keycode 247 = nul nul nul - control keycode 247 = nul - shift control keycode 247 = nul - alt keycode 247 = nul - control alt keycode 247 = nul -keycode 248 = nul nul nul - control keycode 248 = nul - shift control keycode 248 = nul - alt keycode 248 = nul - control alt keycode 248 = nul -keycode 249 = nul nul nul - control keycode 249 = nul - shift control keycode 249 = nul - alt keycode 249 = nul - control alt keycode 249 = nul -keycode 250 = nul nul nul - control keycode 250 = nul - shift control keycode 250 = nul - alt keycode 250 = nul - control alt keycode 250 = nul -keycode 251 = nul nul nul - control keycode 251 = nul - shift control keycode 251 = nul - alt keycode 251 = nul - control alt keycode 251 = nul -keycode 252 = nul nul nul - control keycode 252 = nul - shift control keycode 252 = nul - alt keycode 252 = nul - control alt keycode 252 = nul -keycode 253 = nul nul nul - control keycode 253 = nul - shift control keycode 253 = nul - alt keycode 253 = nul - control alt keycode 253 = nul -keycode 254 = nul nul nul - control keycode 254 = nul - shift control keycode 254 = nul - alt keycode 254 = nul - control alt keycode 254 = nul -keycode 255 = nul nul nul - control keycode 255 = nul - shift control keycode 255 = nul - alt keycode 255 = nul - control alt keycode 255 = nul -string F1 = "\033[[A" -string F2 = "\033[[B" -string F3 = "\033[[C" -string F4 = "\033[[D" -string F5 = "\033[[E" -string F6 = "\033[17~" -string F7 = "\033[18~" -string F8 = "\033[19~" -string F9 = "\033[20~" -string F10 = "\033[21~" -string F11 = "\033[23~" -string F12 = "\033[24~" -string F13 = "\033[25~" -string F14 = "\033[26~" -string F15 = "\033[28~" -string F16 = "\033[29~" -string F17 = "\033[31~" -string F18 = "\033[32~" -string F19 = "\033[33~" -string F20 = "\033[34~" -string Find = "\033[1~" -string Insert = "\033[2~" -string Remove = "\033[3~" -string Select = "\033[4~" -string Prior = "\033[5~" -string Next = "\033[6~" -string Macro = "\033[M" -string Pause = "\033[P" diff --git a/virtualbox/functions/memory.sh b/virtualbox/functions/memory.sh deleted file mode 100755 index 68cd7a5ba..000000000 --- a/virtualbox/functions/memory.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Copyright 2014 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions to get available memory on host PC - -source ./functions/shell.sh - -get_available_memory() { -local total_memory - case $(execute uname) in - Linux | CYGWIN*) - total_memory=$(execute LANG=C free | grep Mem | awk '{print $2}') - ;; - Darwin) - total_memory=$(execute sysctl -n hw.memsize) - total_memory=$(( $total_memory / 1024 )) - ;; - *) - total_memory="-1" - ;; - esac - echo $total_memory -} diff --git a/virtualbox/functions/network.sh b/virtualbox/functions/network.sh deleted file mode 100755 index 181ac91e3..000000000 --- a/virtualbox/functions/network.sh +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions to manage host-only interfaces in the system - -source ./functions/shell.sh - -get_hostonly_interfaces() { - local ifaces=`execute VBoxManage list hostonlyifs | egrep '^Name' | sed 's/^Name\:[ \t]*//' | uniq | tr "\\n" ","` - echo -e "${ifaces}" -} - -get_fuel_ifaces() { - local fuel_network="" - local fuel_networks="" - local fuel_iface="" - local fuel_ifaces="" - for i in $fuel_master_ips; do - fuel_network=$(echo "${i%.*}") - fuel_networks+="$fuel_network " - done - for ip in $fuel_networks; do - fuel_iface=`execute VBoxManage list hostonlyifs | egrep -B3 $ip | egrep '^Name' | sed 's/^Name\:[ \t]*//' | uniq | tr "\\n" ","` - fuel_ifaces+="$fuel_iface" - done - echo $fuel_ifaces -} - -get_fuel_name_ifaces() { - local fuel_ifaces=$(get_fuel_ifaces) - IFS="," - set -- $fuel_ifaces - j=0 - for i in $fuel_ifaces; do - host_nic_name[$j]=$i - j=$((j+1)); - done - unset IFS -} - -is_hostonly_interface_present() { - name=$1 - # String comparison with IF works different in Cygwin, probably due to encoding. - # So, reduced Case is used. since it works the same way. - # Default divider character change is mandatory for Cygwin. - case "$(execute uname)" in - CYGWIN*) - OIFS=$IFS - IFS="," - ;; - *) - ;; - esac - # Call VBoxManage directly instead of function, due to changed IFS - local found_iface=(`execute VBoxManage list hostonlyifs | egrep "Name: + $name\$" | awk '/Name/ { $1 = ""; print substr($0, 2) }'`) - # Change default divider back - case "$(uname)" in - CYGWIN*) - IFS=$OIFS - ;; - *) - ;; - esac - # Check that the list of interfaces contains the given interface - if [[ "$found_iface" == "$name" ]]; then - return 0 - else - return 1 - fi -} - -check_if_iface_settings_applied() { - name=$1 - ip=$2 - mask=$3 - echo "Verifying interface $name has IP $ip and mask $mask properly set." - case "$(uname)" in - CYGWIN*) - OIFS=$IFS - IFS="," - ;; - *) - ;; - esac - local new_name=(`execute VBoxManage list hostonlyifs | egrep -A9 "Name: + $name\$" | awk '/Name/ { $1 = ""; print substr($0, 2) }'`) - case "$(uname)" in - CYGWIN*) - IFS=$OIFS - ;; - *) - ;; - esac - sleep ${net_sleep} - local new_ip=(`execute VBoxManage list hostonlyifs | egrep -A9 "Name: + $name\$" | awk '/IPAddress:/ { print $2 }'`) - local new_mask=(`execute VBoxManage list hostonlyifs | egrep -A9 "Name: + $name\$" | awk '/NetworkMask:/ { print $2 }'`) - local new_dhcp=(`execute VBoxManage list hostonlyifs | egrep -A9 "Name: + $name\$" | awk '/DHCP:/ { print $2 }'`) - # First verify if we checking correct interface - if [[ "$name" != "$new_name" ]]; then - echo "Checking $name but found settings for $new_name" - return 1 - fi - if [[ $ip != $new_ip ]]; then - echo "New IP address $ip does not match the applied one $new_ip" - return 1 - fi - if [[ $mask != $new_mask ]]; then - echo "New Net Mask $mask does not match the applied one $new_mask" - return 1 - fi - if [[ "Disabled" != $new_dhcp ]]; then - echo "Failed to disable DHCP for network $name" - return 1 - fi - echo "OK." - return 0 -} - -create_hostonly_interfaces() { - # Creating host-only interface - local ip=$1 - echo "Creating host-only interface..." - local id=`execute VBoxManage hostonlyif create | sed "s/'/_/g" | cut -d "_" -f2 | sed "s/^_//" | sed "s/_$//"` - # If it does not exist after creation, let's abort - if ! is_hostonly_interface_present "$id"; then - echo "Fatal error. Interface $id does not exist after creation. Exiting" - exit 1 - else - echo "Interface" $id "was successfully created" - fi - # Disable DHCP - echo "Disabling DHCP server on interface: $name..." - # These magic 1 second sleeps around DHCP config are required under Windows/Cygwin - # due to VBoxSvc COM server accepts next request before previous one is actually finished. - sleep ${net_sleep} - execute VBoxManage dhcpserver remove --ifname "$name" 2>/dev/null - sleep ${net_sleep} - # Set up IP address and network mask - echo "Configuring IP address $ip and network mask $mask on interface: $name..." - execute VBoxManage hostonlyif ipconfig "$id" --ip $ip --netmask $mask - # Check what we have created actually. - # Sometimes VBox occasionally fails to apply settings to the last IFace under Windows - if !(check_if_iface_settings_applied "$id" $ip $mask); then - echo "Looks like VirtualBox failed to apply settings for interface $name" - echo "Sometimes such error happens under Windows." - echo "Please run launch.sh one more time." - echo "If this error remains after several attempts, then something really went wrong." - echo "Aborting." - exit 1 - fi - echo -} - -# Checking that the interface has been removed -check_removed_iface() { - local iface=$1 - if is_hostonly_interface_present "$iface"; then - echo "Host-only interface \"$iface\" was not removed. Aborting..." - exit 1 - fi -} - -delete_fuel_ifaces() { - # Only the interfaces that have IP addresses from the 'fuel_master_ips' - # variable in the config.sh scripts will be removed - local fuel_ifaces=$(get_fuel_ifaces) - if [ ! -z "$fuel_ifaces" ]; then - check_running_vms "$fuel_ifaces" - IFS="," - for interface in $fuel_ifaces; do - echo "Deleting host-only interface: $interface..." - execute VBoxManage hostonlyif remove "$interface" - check_removed_iface "$interface" - done - fi - unset IFS - echo "Done." -} - -delete_all_hostonly_interfaces() { - # All the hostonly interfaces will be removed - local all_hostonly_interfaces=$(get_hostonly_interfaces) - # Checking that the running virtual machines don't use removable host-only interfaces - check_running_vms $all_hostonly_interfaces - IFS="," - # Delete every single hostonly interface in the system - for interface in $all_hostonly_interfaces; do - echo "Deleting host-only interface: ${interface}..." - execute VBoxManage hostonlyif remove "${interface}" - check_removed_iface "${interface}" - done - unset IFS - echo "Done." -} diff --git a/virtualbox/functions/product.sh b/virtualbox/functions/product.sh deleted file mode 100755 index 52cb69f08..000000000 --- a/virtualbox/functions/product.sh +++ /dev/null @@ -1,285 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions for connecting to Fuel VM, checking if the installation process completed -# and Fuel became operational, and also enabling outbound network/internet access for this VM through the -# host system - -source ./functions/shell.sh - -ssh_options='-oConnectTimeout=5 -oStrictHostKeyChecking=no -oCheckHostIP=no -oUserKnownHostsFile=/dev/null -oRSAAuthentication=no -oPubkeyAuthentication=no' - -wait_for_exec_in_bootstrap() { - ip=$1 - username=$2 - password=$3 - prompt=$4 - cmd=$5 - - # Log in into the VM, exec cmd and print exitcode - # Looks a bit ugly, but 'end of expect' has to be in the very beginning of the line - result=$( - execute expect << ENDOFEXPECT - spawn ssh $ssh_options $username@$ip - expect "connect to host" exit - expect "*?assword:*" - send "$password\r" - expect "$prompt" - send "$cmd\r" - expect "$prompt" - send "echo \"rc=\$?\"\r" - expect "$prompt" - send "logout\r" - expect "$prompt" -ENDOFEXPECT - ) - echo "$result" | grep -q "[r]c=0" >&2 && return 0 - return 1 -} - -wait_for_product_vm_to_download() { - ip=$1 - username=$2 - password=$3 - prompt=$4 - - echo -n "Waiting for product VM to download files. Please do NOT abort the script... " - - # Loop until master node booted and wait_for_external_config started - maxdelay=3000 - while ! wait_for_exec_in_bootstrap $ip $username $password "$prompt" "ps xa | grep '\[w\]ait_for_external_config'"; do - sleep 5 - ((waited += 5)) - if (( waited >= maxdelay )); then - echo "Installation timed out! ($maxdelay seconds)" 1>&2 - exit 1 - fi - done - - echo "OK" -} - -wait_for_product_vm_to_install() { - ip=$1 - username=$2 - password=$3 - prompt=$4 - - echo -n "Waiting for product VM to install. Please do NOT abort the script... " - - # Loop until master node gets successfully installed - maxdelay=3000 - while wait_for_exec_in_bootstrap $ip $username $password "$prompt" "ps xa | grep '\[b\]ootstrap_admin_node.sh'"; do - sleep 5 - ((waited += 5)) - if (( waited >= maxdelay )); then - echo "Installation timed out! ($maxdelay seconds)" 1>&2 - exit 1 - fi - done - - echo "OK" -} - -check_internet_connection() { - line=$1 - OIFS="${IFS}" - NIFS=$' ' - IFS="${NIFS}" - for i in $line; do - if [[ "$i" == *% && "$i" != 100* ]]; then - return 0 - fi - done - IFS="${OIFS}" - return 1 -} - -enable_outbound_network_for_product_vm() { - ip=$1 - username=$2 - password=$3 - prompt=$4 - - # Check for internet access on the host system - echo -n "Checking for internet connectivity on the host system... " - check_hosts=`echo google.com wikipedia.com | tr ' ' '\n'` - case $(execute uname) in - Linux | Darwin) - for i in ${check_hosts} ; do - ping_host=`execute ping -c 2 ${i} | grep %` - ping_host_result+=$ping_host - done - ;; - CYGWIN*) - if [ ! -z "`execute type ping | grep system32`" ]; then - for i in ${check_hosts} ; do - ping_host=`execute ping -n 5 ${i} | grep %` - ping_host_result+=$ping_host - done - elif [ ! -z "`execute type ping | grep bin`" ]; then - for i in ${check_hosts} ; do - ping_host=`execute ping ${i} count 5 | grep %` - ping_host_result+=$ping_host - done - else - print_no_internet_connectivity_banner - fi - ;; - *) - print_no_internet_connectivity_banner - ;; - esac - - check_internet_connection "$ping_host_result" - if [[ $? -eq 0 ]]; then - echo "OK" - else - print_no_internet_connectivity_banner - fi - - # Check host nameserver configuration - echo -n "Checking local DNS configuration... " - if execute test -f /etc/resolv.conf ; then - nameserver="$(execute grep '^nameserver' /etc/resolv.conf | grep -v 'nameserver\s\s*127.' | head -3)" - fi - if [ -z "$nameserver" ] && execute test -x /usr/bin/nmcli; then - # Get DNS from network manager - if [ -n "`execute LANG=C nmcli nm | grep \"running\s\+connected\"`" ]; then - nameserver="$(execute nmcli dev list | grep 'IP[46].DNS' | sed -e 's/IP[46]\.DNS\[[0-9]\+\]:\s\+/nameserver /'| grep -v 'nameserver\s\s*127.' | head -3)" - fi - fi - if [ -z "$nameserver" ]; then - echo "/etc/resolv.conf does not contain a nameserver. Using 8.8.8.8 for DNS." - nameserver="nameserver 8.8.8.8" - else - echo "OK" - fi - - # Enable internet access on inside the VMs - echo -n "Enabling outbound network/internet access for the product VM... " - - # Get network settings (ip address and ip network) for eth1 interface of the master node - local master_ip_pub_net=$(echo $fuel_master_ips | cut -f2 -d ' ') - master_ip_pub_net="${master_ip_pub_net%.*}"".1" - local master_pub_net="${master_ip_pub_net%.*}"".0" - - # Convert nameservers list into the one line separated by the comma - dns_upstream="$(echo -e $nameserver | cut -d ' ' -f2 | sed -e':a;N;$!ba;s/\n/,/g')" - - # Log in into the VM, configure and bring up the NAT interface, set default gateway, check internet connectivity - # Looks a bit ugly, but 'end of expect' has to be in the very beginning of the line - result=$( - execute expect << ENDOFEXPECT - spawn ssh $ssh_options $username@$ip - expect "connect to host" exit - expect "*?assword:*" - send "$password\r" - expect "$prompt" - # make backups, remove network manager options, disable defaults, enable boot and disable network manager - send "sed -i.orig '/^UUID=\\\|^NM_CONTROLLED=/d;s/^\\\(.*\\\)=yes/\\\1=no/g;s/^ONBOOT=.*/ONBOOT=yes/;/^ONBOOT=/iNM_CONTROLLED=no' /etc/sysconfig/network-scripts/ifcfg-eth{0,1,2}\r" - expect "$prompt" - # eth1 should be static with private ip address and provided netmask - send "sed -i 's/^BOOTPROTO=.*/BOOTPROTO=static/;/^BOOTPROTO/aIPADDR=${master_ip_pub_net}\\\nNETMASK=${mask}' /etc/sysconfig/network-scripts/ifcfg-eth1\r" - expect "$prompt" - # eth2 should get ip address via dhcp and used default route - send "sed -i 's/^BOOTPROTO=.*/BOOTPROTO=dhcp/;s/^DEFROUTE=.*/DEFROUTE=yes/;/^BOOTPROTO/aPERSISTENT_DHCLIENT=yes' /etc/sysconfig/network-scripts/ifcfg-eth2\r" - expect "$prompt" - # make backup and disable zeroconf at all because we should use only DHCP on eth2 - send "sed -i.orig '/NOZEROCONF/d;aNOZEROCONF=yes' /etc/sysconfig/network\r" - expect "$prompt" - # remove default route from eth0 and system wide settings if exists - send "sed -i '/^GATEWAY=/d' /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0\r" - expect "$prompt" - # fix bug https://bugs.centos.org/view.php?id=7351 - send "sed -i.orig '/^DEVICE=lo/aTYPE=Loopback' /etc/sysconfig/network-scripts/ifcfg-lo\r" - expect "$prompt" - # remove old settings from the resolv.conf and dnsmasq.upstream if exists - send "sed -i.orig '/^nameserver/d' /etc/resolv.conf /etc/dnsmasq.upstream &>/dev/null\r" - expect "$prompt" - # update the resolv.conf and dnsmasq.upstream with the new settings - send "echo -e '$nameserver' | tee -a /etc/dnsmasq.upstream >>/etc/resolv.conf\r" - expect "$prompt" - # update the astute.yaml with the new settings - send "sed -i.orig '/DNS_UPSTREAM/c\\"DNS_UPSTREAM\\": \\"${dns_upstream}\\"' /etc/fuel/astute.yaml\r" - expect "$prompt" - # enable NAT (MASQUERADE) and forwarding for the public network - send "/sbin/iptables -t nat -A POSTROUTING -s $master_pub_net/24 \! -d $master_pub_net/24 -j MASQUERADE\r" - expect "$prompt" - send "/sbin/iptables -I FORWARD 1 --dst $master_pub_net/24 -j ACCEPT\r" - expect "$prompt" - send "/sbin/iptables -I FORWARD 1 --src $master_pub_net/24 -j ACCEPT\r" - expect "$prompt" - send "service iptables save &>/dev/null\r" - expect "$prompt" - # disable NetworkManager and apply the network changes - send "nmcli networking off &>/dev/null ; service network restart &>/dev/null\r" - expect "$prompt" - send "logout\r" - expect "$prompt" -ENDOFEXPECT - ) - echo "OK" - - # Waiting until the network services are restarted. - # 5 seconds is optimal time for different operating systems. - echo -n "Waiting until the network services are restarted... " - sleep 5s - result_inet=$( - execute expect << ENDOFEXPECT - spawn ssh $ssh_options $username@$ip - expect "connect to host" exit - expect "*?assword:*" - send "$password\r" - expect "$prompt" - send "for i in {1..5}; do ping -c 2 google.com || ping -c 2 wikipedia.com || sleep 2; done\r" - expect "*icmp*" - expect "$prompt" - send "logout\r" - expect "$prompt" -ENDOFEXPECT - ) - - # When you are launching command in a sub-shell, there are issues with IFS (internal field separator) - # and parsing output as a set of strings. So, we are saving original IFS, replacing it, iterating over lines, - # and changing it back to normal - # - # http://blog.edwards-research.com/2010/01/quick-bash-trick-looping-through-output-lines/ - OIFS="${IFS}" - NIFS=$'\n' - IFS="${NIFS}" - - for line in $result_inet; do - IFS="${OIFS}" - if [[ $line == *icmp_seq* ]]; then - IFS="${NIFS}" - echo "OK" - wait_for_exec_in_bootstrap $ip $username $password "$prompt" "pkill -f ^wait_for_external_config" - return 0; - fi - IFS="${NIFS}" - done - print_no_internet_connectivity_banner - return 1 -} - -print_no_internet_connectivity_banner() { - echo "FAIL" - echo "############################################################" - echo "# WARNING: some of the Fuel features will not be supported #" - echo "# because there is no Internet connectivity #" - echo "############################################################" -} diff --git a/virtualbox/functions/shell.sh b/virtualbox/functions/shell.sh deleted file mode 100755 index 66f83b535..000000000 --- a/virtualbox/functions/shell.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions, those encapsulate executing of command. -# Each command might be executed on the local machine or on the remote machine -# depending on environment settings - -function execute() { - # use shell substitution pattern ${parameter/pattern/string}, to escape spaces in arguments. - if [ -n "$REMOTE_HOST" ]; then - eval "ssh $shell_ssh_options $REMOTE_HOST \"${@//\ /\\ }\"" - else - eval "${@//\ /\\ }" - fi -} - -# copy file to remote machine if needed -# be careful, do nothing in case if file with same name exists on target machine -function copy_if_required() { - local source_path=$1 - if [ -n "$REMOTE_HOST" ]; then - local local_size=`wc -c <${source_path} 2>/dev/null` - local remote_size=`execute wc -c <${source_path} 2>/dev/null` - if [ "${local_size}" != "${remote_size}" ]; then - # the scripts always find iso in original path - # reconstruct same path on remote machine - local source_dir=$(dirname $source_path) - echo "Copying $source_path to $REMOTE_HOST:$source_path..." - execute mkdir -p $source_dir && copy $source_path $source_path || exit 1 - else - echo "Skip copying the file $source_path, same file already exists on $REMOTE_HOST." - fi - fi -} - -function copy() { - local src=$1 - local dst=$2 - - if [ -n "$REMOTE_HOST" ]; then - eval "scp $shell_scp_options $src $REMOTE_HOST:$dst" - else - cp $src $dst - fi -} - -# Add VirtualBox directory to PATH -function add_virtualbox_path() { - case "$(execute uname 2>/dev/null)" in - CYGWIN*) - execute type VBoxManage &>/dev/null - if [ $? -eq 1 ]; then - if [ -n "$REMOTE_HOST" ]; then - echo "When using the \$REMOTE_HOST it's required to add path to VirtualBox directory" - echo "to your PATH on remote system globaly in the remote system settings. Aborting." - exit 1 - else - # check 64bit Windows registry branch - if [ -f /proc/registry64/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir ]; then - vbox_path_registry=`cat /proc/registry64/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir` - # check 32bit Windows registry branch - elif [ -f /proc/registry32/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir ]; then - vbox_path_registry=`cat /proc/registry32/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir` - # check default Windows registry branch - elif [ -f /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir ]; then - vbox_path_registry=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/VirtualBox/InstallDir` - else - # default override if registry lookup fails - vbox_path_registry='C:\Program Files\Oracle\VirtualBox\' - fi - vbox_path=`cygpath "$vbox_path_registry"| sed -e 's%/$%%'` - export PATH=$PATH:$vbox_path - fi - fi - ;; - *) - ;; - esac -} - -# Check remote host/port settings -function check_remote_settings() { - if [ -n "$REMOTE_HOST" ]; then - echo - echo "WARNING! All the commands will be executed on the remote system: ${REMOTE_HOST}" - echo "WARNING! The remote system should be configured correctly. Please read the README.md file" - echo - fi - # configure ssh/scp options - if [ -n "$REMOTE_PORT" ]; then - shell_ssh_options="-p $REMOTE_PORT $shell_ssh_options" - shell_scp_options="-P $REMOTE_PORT $shell_scp_options" - else - shell_ssh_options="" - shell_scp_options="" - fi -} diff --git a/virtualbox/functions/translate.sh b/virtualbox/functions/translate.sh deleted file mode 100755 index 3a558582c..000000000 --- a/virtualbox/functions/translate.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash -eu - -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions for AT translated set 2 encoder - -type xxd > /dev/null || exit 1 - -if ! test -f dumpkeys.cache; then - sudo dumpkeys --keys-only > dumpkeys.cache -fi - -# XXX: hardcoded values are generated by: -#make_break_shift="$(eval echo \$at_table_$(echo -n Shift | xxd -ps))" -#make_shift="${make_break_shift% *}" -#break_shift="${make_break_shift#* }" - -make_shift=36 -break_shift=b6 - -map_set() { - # $1 - keycode - # $2 - normal value - # $3 - shifted value - [ "${2}${3}" = "nulnul" ] && return 1 - make=$(printf %02x "$1") - break=$(printf %02x "$(($1 | 128))") - eval "at_table_$(echo -n "${3#+}" | xxd -ps)='$make_shift $make $break $break_shift'" - eval "at_table_$(echo -n "${2#+}" | xxd -ps)='$make $break'" -} - -map_alias() { - # $1,$3,$5,... - names - # $2,$4,$6,... - aliases - while [ -n "$1" -a -n "$2" ]; do - eval "at_table_$(echo -n "${2#+}" | xxd -ps)=\${at_table_$(echo -n "${1#+}" | xxd -ps)}" - shift - shift - done -} - -# at_table_$normal = n -# at_table_$shifted = n -while read keycode n _ normal shifted rest; do - [ "$keycode" = "keycode" ] || continue - map_set "${n}" "${normal}" "${shifted}" -done < dumpkeys.cache - -# Extra mapping -map_alias \ - one 1 exclam '!' \ - two 2 at '@' \ - three 3 numbersign '#' \ - four 4 dollar '$' \ - five 5 percent '%' \ - six 6 asciicircum '^' \ - seven 7 ampersand '&' \ - eight 8 asterisk '*' \ - nine 9 parenleft '(' \ - zero 0 parenright ')' \ - minus '-' underscore '_' \ - equal '=' plus '+' - -map_alias \ - bracketleft '[' braceleft '{' \ - bracketright ']' braceright '}' \ - semicolon ';' colon ':' \ - apostrophe "'" quotedbl '"' \ - grave '`' asciitilde '~' \ - backslash "\\" bar '|' \ - comma ',' less '<' \ - period '.' greater '>' \ - slash '/' question '?' \ - space ' ' Return $'\n' - -translate() { - for t in $(echo -n "$*" | xxd -ps | sed -e 's/../& /g'); do - n="at_table_$t" - v="${!n}" - [ -z "$v" ] && echo "$0: unknown char: '$t'." >&2 - echo -n " ${v}" - done - echo -} - -[ "$(basename "$0")" = "translate.sh" ] && translate " vmlinuz initrd=initrd.img biosdevname=0 ks=cdrom:/ks.cfg ip=10.20.0.2 gw=10.20.0.1 dns1=10.20.0.1 netmask=255.255.255.0 hostname=fuel.domain.tld showmenu=no -" diff --git a/virtualbox/functions/vm.sh b/virtualbox/functions/vm.sh deleted file mode 100755 index aa96feb18..000000000 --- a/virtualbox/functions/vm.sh +++ /dev/null @@ -1,243 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This file contains the functions to manage VMs in through VirtualBox CLI - -source ./functions/shell.sh - -get_vm_base_path() { - echo `execute VBoxManage list systemproperties | egrep '^Default machine folder' | sed 's/^Default machine folder\:[ \t]*//'` -} - -get_vms_running() { - echo `execute VBoxManage list runningvms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'` -} - -get_vms_present() { - echo `execute VBoxManage list vms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'` -} - -is_vm_running() { - name=$1 - list=$(get_vms_running) - - # Check that the list of running VMs contains the given VM - for name_in_list in $list; do - if [[ "${name_in_list}" == "${name}" ]]; then - return 0 - fi - done - return 1 -} - -is_vm_present() { - name=$1 - list=$(get_vms_present) - - for name_in_list in $list; do - if [[ "${name_in_list}" == "${name}" ]]; then - return 0 - fi - done - return 1 -} - -check_running_vms() { - OIFS=$IFS - IFS="," - local hostonly_interfaces=$1 - local list_running_vms=$(execute VBoxManage list runningvms | sed 's/\" {/\",{/g') - for vm_name in $list_running_vms; do - vm_name=$(echo $vm_name | grep "\"" | sed 's/"//g') - vm_names+="${vm_name}," - done - for i in $vm_names; do - for j in $hostonly_interfaces; do - running_vm=`execute VBoxManage showvminfo $i | grep "${j}"` - if [[ $? -eq 0 ]]; then - echo "The \"${i}\" VM uses host-only interface \"${j}\" and it cannot be removed...." - echo "You should turn off the \"${i}\" virtual machine, run the script again and then the host-only interface will be deleted. Aborting..." - exit 1 - fi - done - done - IFS=$OIFS -} - -create_vm() { - name=$1 - nic=$2 - cpu_cores=$3 - memory_mb=$4 - disk_mb=$5 - os='RedHat_64' - - # There is a chance that some files are left from previous VM instance - vm_base_path=$(get_vm_base_path | sed 's/\\/\\\\/g') - vm_path="${vm_base_path}/${name}/" - execute rm -rf "${vm_path}" - - # Create virtual machine with the right name and type (assuming CentOS) - execute VBoxManage createvm --name $name --ostype $os --register - - # Set the real-time clock (RTC) operate in UTC time - # Set memory and CPU parameters - # Set video memory to 16MB, so VirtualBox does not complain about "non-optimal" settings in the UI - execute VBoxManage modifyvm $name --rtcuseutc on --memory $memory_mb --cpus $cpu_cores --vram 16 - - # Configure main network interface for management/PXE network - add_hostonly_adapter_to_vm $name 1 "${nic}" - execute VBoxManage modifyvm $name --boot1 disk --boot2 dvd --boot3 net --boot4 none - - # Configure storage controllers - execute VBoxManage storagectl $name --name 'IDE' --add ide --hostiocache on - execute VBoxManage storagectl $name --name 'SATA' --add sata --hostiocache on - - # Create and attach the main hard drive - add_disk_to_vm $name 0 $disk_mb -} - -add_hostonly_adapter_to_vm() { - name=$1 - id=$2 - nic=$3 - echo "Adding hostonly adapter to ${name} and bridging with host NIC ${nic}..." - - # Add Intel PRO/1000 MT Desktop (82540EM) card to VM. The card is 1Gbps. - execute VBoxManage modifyvm $name --nic${id} hostonly --hostonlyadapter${id} "${nic}" --nictype${id} 82540EM \ - --cableconnected${id} on --macaddress${id} auto - execute VBoxManage modifyvm $name --nicpromisc${id} allow-all -} - -add_nat_adapter_to_vm() { - name=$1 - id=$2 - nat_network=$3 - echo "Adding NAT adapter to ${name} for outbound network access through the host system..." - - # Add Intel PRO/1000 MT Desktop (82540EM) card to VM. The card is 1Gbps. - execute VBoxManage modifyvm $name --nic${id} nat --nictype${id} 82540EM \ - --cableconnected${id} on --macaddress${id} auto --natnet${id} "${nat_network}" - execute VBoxManage modifyvm $name --nicpromisc${id} allow-all -} - -add_disk_to_vm() { - vm_name=$1 - port=$2 - disk_mb=$3 - - echo "Adding disk to ${vm_name}, with size ${disk_mb} Mb..." - - vm_base_path=$(get_vm_base_path | sed 's/\\/\\\\/g') - vm_disk_path="${vm_base_path}/${vm_name}" - vm_disk_file="${vm_disk_path}/${vm_name}_${port}.vdi" - - execute VBoxManage createhd --filename "${vm_disk_file}" --size $disk_mb --format VDI - execute VBoxManage storageattach $vm_name --storagectl 'SATA' --port $port --device 0 --type hdd --medium "${vm_disk_file}" - - # Add serial numbers of disks to slave nodes - echo "Adding serial numbers of disks to ${vm_name}..." - execute VBoxManage setextradata $vm_name "VBoxInternal/Devices/ahci/0/Config/Port${port}/SerialNumber" "VBOX-MIRANTIS-VHD${port}" -} - -delete_vm() { - name=$1 - - vm_base_path=$(get_vm_base_path | sed 's/\\/\\\\/g') - vm_path="${vm_base_path}/${name}/" - - # Power off VM, if it's running - count=0 - while is_vm_running $name; do - echo "Stopping Virtual Machine ${name}..." - execute VBoxManage controlvm $name poweroff - if [[ "${count}" != 5 ]]; then - count=$((count+1)) - sleep 5 - else - echo "VirtualBox cannot stop VM ${name}... Exiting" - exit 1 - fi - done - - echo "Deleting existing virtual machine ${name}..." - while is_vm_present $name - do - execute VBoxManage unregistervm $name --delete - done - - # Virtualbox does not fully delete VM file structure, so we need to delete the corresponding directory with files as well - execute rm -rf "${vm_path}" -} - -delete_vms_multiple() { - name_prefix=$1 - list=$(get_vms_present) - - # Loop over the list of VMs and delete them, if its name matches the given refix - for name in $list; do - if [[ $name == $name_prefix* ]]; then - echo "Found existing VM: ${name}. Deleting it..." - delete_vm $name - fi - done -} - -start_vm() { - name=$1 - - # Just start it - if [[ $headless == 1 ]]; then - execute VBoxManage startvm $name --type headless - else - execute VBoxManage startvm $name - fi - - if [ -n "${boot_line}" ]; then - sleep 3 - # Pressing/releasing escape key - execute VBoxManage controlvm ${name} keyboardputscancode 01 81 - - for letter in ${boot_line}; do - execute VBoxManage controlvm ${name} keyboardputscancode ${letter} - done - fi - -} - -mount_iso_to_vm() { - name=$1 - iso_path=$2 - - # Mount ISO to the VM - execute VBoxManage storageattach $name --storagectl 'IDE' --port 0 --device 0 --type dvddrive --medium "${iso_path}" -} - -enable_network_boot_for_vm() { - name=$1 - - # Set the right boot priority - execute VBoxManage modifyvm $name --boot1 net --boot2 disk --boot3 none --boot4 none --nicbootprio1 1 -} - -enable_vrde(){ - name=$1 - port=${2:-$RDPport} - - # Enable VRDE, set port and address - execute VBoxManage modifyvm $name --vrde on - execute VBoxManage modifyvm $name --vrdeport $port -} diff --git a/virtualbox/iso/README.md b/virtualbox/iso/README.md deleted file mode 100644 index 18810903e..000000000 --- a/virtualbox/iso/README.md +++ /dev/null @@ -1 +0,0 @@ -Put ISO in this folder diff --git a/virtualbox/launch.sh b/virtualbox/launch.sh deleted file mode 100755 index b6f0941f7..000000000 --- a/virtualbox/launch.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -source ./functions/shell.sh - -# Check remote host/port settings -check_remote_settings - -# Add VirtualBox directory to PATH -add_virtualbox_path - -echo "Prepare the host system..." -./actions/prepare-environment.sh launch || exit 1 -echo - -echo "Check available memory on the host system..." -./actions/check-available-memory.sh || exit 1 -echo - -echo "Сlean previous installation if exists..." -./actions/clean-previous-installation.sh || exit 1 -echo - -# Сreate host-only interfaces -./actions/create-interfaces.sh || exit 1 - -# Create and launch master node -./actions/master-node-create-and-install.sh || exit 1 - -# Create and launch slave nodes -./actions/slave-nodes-create-and-boot.sh || exit 1 diff --git a/virtualbox/launch_16GB.sh b/virtualbox/launch_16GB.sh deleted file mode 100755 index fc8df86de..000000000 --- a/virtualbox/launch_16GB.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -CONFIG_FOR="16GB" ./launch.sh diff --git a/virtualbox/launch_8GB.sh b/virtualbox/launch_8GB.sh deleted file mode 100755 index d66f2b597..000000000 --- a/virtualbox/launch_8GB.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Copyright 2013 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -CONFIG_FOR="8GB" ./launch.sh