identify switch port to which the server is connected

for NIC in $(find /sys/class/net -type l -not -lname "*virtual*" -printf "%f\n" | sort); do
echo "NIC: ${NIC}"
echo "NIC MAC: $(ethtool -P ${NIC})"
timeout 300 tcpdump -nn -v -i ${NIC} -s 1500 -c 1 "ether[20:2] == 0x2000"

Flash LibreELEC to S905X

wget -P /tmp/
gzip -d /tmp/LibreELEC-S905.arm-8.2- -C /tmp
dd if=/tmp//tmp/LibreELEC.USB-SD.Creator.Linux-64bit.bin of=/dev/mmcblk0

1. remove power connector from the box
2. insert sd card to to the box
3. press button inside aux connector and connect power to the box
4. enable ssh service on the box
5. ssh root@your_box_ip (pass: libreelec)
6. installtointernal




# Install redfishtool (CLI)
git clone
cd Redfishtool/
python3 -r ${BMC_IP} -u ${BMC_USER} -p ${BMC_PASS} Systems -F

for BMC_IP in; do
python3 -r $BMC_IP -u $BMC_USER -p $BMC_PASS Systems -F | jq .SerialNumber
python3 -r $BMC_IP -u $BMC_USER -p $BMC_PASS Systems -F | jq .IndicatorLED

python3 -r $BMC_IP -u $BMC_USER -p $BMC_PASS Chassis list

kexec (reboot without hardware initialization)

echo "kexec-tools kexec-tools/load_kexec select false" | sudo debconf-set-selections
sudo apt install -y kexec-tools
sudo kexec -l /boot/vmlinuz-4.15.0-32-generic --initrd=/boot/initrd.img-4.15.0-32-generic --reuse-cmdline
sudo kexec -e
systemctl kexec

ironic / bifrost

# load env
. /opt/stack/bifrost/env-vars

# list nodes
ironic node-list

# remove / shutdown existing node
ironic node-set-provision-state deleted

# load node configuration
export BIFROST_INVENTORY_SOURCE=/opt/openstack-prepare-baremetal/bifrost/json/

# add new node
ansible-playbook -i inventory/ enroll-dynamic.yaml
ironic node-update add properties/capabilities='boot_mode:uefi'

# deploy
ansible-playbook -v -i inventory/ deploy-dynamic.yaml

# show node details

Install OpenStack with Kolla-ansible under Ubuntu

Install all-in-one
apt-get install python-dev libffi-dev gcc libssl-dev python-selinux python-setuptools ansible pip
pip install kolla-ansible
cp -r /usr/local/share/kolla-ansible/etc_examples/kolla /etc/
cp /usr/local/share/kolla-ansible/ansible/inventory/* .
cp /etc/kolla/globals.yml{,org}
vi /etc/kolla/globals.yml
sed -i 's|#kolla_base_distro: "centos"|kolla_base_distro: "ubuntu"|g' /etc/kolla/globals.yml
sed -i 's|#kolla_install_type: "binary"|kolla_install_type: "source"|g' /etc/kolla/globals.yml

GitLab runner

wget -O - | apt-key add -
cat < /etc/apt/sources.list.d/gitlab-runner.list
deb xenial main
apt update
apt install gitlab-runner

Instlal with Ansible

Get token from GitLab server

# configure DNS for GitLab server
echo " gitlab" >> /etc/hosts

Go language

# hello.go
package main

import "fmt"

func main() {
fmt.Println("Hello, World")

# run source
go run hello.go

# build
go build hello.go

Syndicate content