#IDIC
idic repo is platform development kit that is used for creating virtual compute node and virtual PDU(power distribution unit) for building virtual infrastructure. Reference infrasim document for more details.
#Build idic image
##Setup environment Prior to building idic, you should have Ubuntu 14.04 installed, and have the following packages installed on OS:
sudo apt-get install -y mkisofs autoconf pkg-config libtool nsis bison flex libncurses5 libncurses5-dev
sudo apt-get install -y zlib1g-dev libglib2.0-dev libpopt-dev libssl-dev python-dev git libdumbnet1 libdumbnet-dev tclsh
Note: If you already cloned idic repo, you can just get into the idic project, and then run:
sudo make setupenv
##Configure idic There is already one default configuration file: vcompute/<node name>/.config or vpdu/<pdu name>/.config. You could use that default for config.
If you want to change default configuration, two ways could achieve that:
-
Clone idic repo and under idic foler, run below command to change configuration for virtual compute node:
fakeroot make menuconfig NODE=vnode
-
To make the configuration to build a virtual PDU:
fakeroot make menuconfig PDU=vpdu
-
Or, under specific virtual compute node directory (idic/vcomptue/<node name>/), or virtual pdu directory (idic/vpdu/<pdu name>/), and run
fakeroot make menuconfig
##Build idic
Use below command in idic directory to build kernel and ramfs which are base binaries for all virtual compute nodes and PDUs that infraSIM supported
`fakeroot make vnode`
Or, use below command in folder of specific virtual node to build base binaries for that node only, for example, build binaries for virtual dell r630:
cd vcompute/dell_r630
make
Note: Once the build is completed successfully, you will find all binaries at pdk/linux/dell_r630:
- ramfs.lzma
- config-x.xx
- System.map-x.xx
- vmlinuz-x.xx
Filename surfix x.xx is version number which is subject to change. All these 4 binaries are required in order to generate virtual machine images for different hypervisors in next step: OVA file for VMWare product; QCOW2 images for KVM; VDI image for virtulbox, etc.
Tools repository contains all utilities for converting base binaries to virtual machine images. Here's example on how to create a VMWare OVA image:
Before creating ova image, you should have the following tools installed:
- ovftool
- extlinux
- qemu
Then you can run the ova builder script to create the ova.
cd tools/ova_builder sudo ./ova_builder.sh -d your_idic_directory/pdk/linux/dell_r630 -t dell_r630.ova
Folder your_idic_directory/pdk/linux/dell_r630 is supposed to contain those base binaries. You can refer to Build Package and Deployment for help to build virtual machine images for more types of hypervisor.
##How to run idic
Regarding how to load idic ova image, please reference idic user guide for more help.
#How to emulate virtual node in idic
##How to add virtual compute node
-
Retrieve BMC data
- Retrive sdr data:
ipmitool sdr dump rj_sensors; sensor_sort rj_sensors
- Retrive fru data:
impitool fru read fru.bin
; dump fru.bin to hex format
- Retrive sdr data:
-
Retrieve smbios data, dump smbios table into a file
dmidecode --dump-bin <target file>
Once you get data from physical server, then you can follow below steps to add a virtual node:
-
Create a directory named node name at idic/vcompute
-
Copy the conf and .config from other virtual directory
-
Copy the data you retrieved from physical server to data directory
-
Copy the Makefile from other virtual directory, and Update the target name in Makefile and .config
If you want to retrieve PDU MIB data, you should have snmpsim installed on your environment.
Then run the following command to produce MIB snapshot for the PDU:
snmprec.py --agent-udpv4-endpoint=<PDU IP address> --start-oid=1.3.6
--output-file=/path/<target snmprec file> --variation-module=sql
--variation-module-options=dbtype:sqlite3,database:/path/<target pdu database file>,dbtable:snmprec
For more details of how to use snmprec.py, please go to section Producing SNMP snapshots at snmpsim home page for more help.
Once you retrieved data from physical PDU, the next step is to add a virtual PDU in idic for this physical server. The folllowing steps will guide you how to do:
-
Create a directory named PDU name at idic/vpdu
-
Creat a directory data at idic/vpdu/<PDU name>/data, and copy the data you get from physical server into data directory.
-
Copy .config and Makefile into idic/vpdu/<PDU name>, and update target name in Makefile and .config