Ubuntu: Instlal lldpd (Link Layer Discovery Protocol)
sudo apt-add-repository universe
sudo apt install -y lldpd
# optional: enable Cisco CDP protocol
cat < /etc/default/lldpd
DAEMON_ARGS="-c"
EOF
service lldpd restart
# get info
lldpctl
sudo apt-add-repository universe
sudo apt install -y lldpd
# optional: enable Cisco CDP protocol
cat < /etc/default/lldpd
DAEMON_ARGS="-c"
EOF
service lldpd restart
# get info
lldpctl
ceph status
ceph health detail
ceph df detail
ceph osd lspools
osd pool ls detail
Monitoring
https://github.com/ceph/ceph-nagios-plugins/releases
Build nagios-plugins-ceph
sudo apt-get install -y devscripts fakeroot build-essential dh-python
git clone https://github.com/ceph/ceph-nagios-plugins.git
cd ceph-nagios-plugins#
make deb
sudo dpkg -i nagios-plugins-ceph_*_all.deb
# create wrapper for kolla-ansible installation
cat < /usr/bin/ceph
#!/bin/bash
docker exec -it ceph_mon ceph $@
EOF
chmod +x /usr/bin/ceph
# Show LLDP neighbors
networkctl lldp
lldpctl
http://www.panticz.de/lldpd
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"
done
Latest version:
https://kszaq.libreelec.tv/s905/
wget https://kszaq.libreelec.tv/s905/8.2/8.2.3.1/LibreELEC-S905.arm-8.2-8.2.3.1.img.gz -P /tmp/
gzip -d /tmp/LibreELEC-S905.arm-8.2-8.2.3.1.img.gz -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
Links
BMC_IP=10.0.1.123
BMC_USER=ADMIN
BMC_PASS=ADMIN
# Install redfishtool (CLI)
git clone https://github.com/DMTF/Redfishtool.git
cd Redfishtool/
python3 redfishtool.py -r ${BMC_IP} -u ${BMC_USER} -p ${BMC_PASS} Systems -F
for BMC_IP in 10.0.1.11 10.0.1.12 10.0.1.13; do
python3 redfishtool.py -r ${BMC_IP} -u ${BMC_USER} -p ${BMC_PASS} Systems -F | jq .SerialNumber
python3 redfishtool.py -r $BMC_IP -u $BMC_USER -p $BMC_PASS Systems -F | jq .IndicatorLED
done
python3 redfishtool.py -r $BMC_IP -u $BMC_USER -p $BMC_PASS Chassis list
lxc launch ubuntu:20.04 tftp lxc config device add tftp eth0 nic nictype=physical parent=enp0s25 lxc file push Downloads/RT-N66U_3.0.0.4_382_52272-g73d3ea2.trx tftp/tmp/ lxc shell tftp apt update apt install -y tftp ip l set dev eth0 up ip a add 192.168.1.111/24 dev eth0 # ping 192.168.1.1 # tftp tftp> connect (to) 192.168.1.1 put RT-N66U_3.0.0.4_382_52272-g73d3ea2.trx
Links
https://chrishardie.com/2013/02/asus-router-firmware-windows-mac-linux/
echo "kexec-tools kexec-tools/load_kexec select true" | 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
sudo kexec -l /vmlinuz --initrd=/initrd.img --reuse-cmdline && sudo systemctl kexec
- name: Enable kexec
lineinfile:
path: /etc/default/kexec
regexp: '^LOAD_KEXEC='
line: 'LOAD_KEXEC=true'
when: ('dev' in group_names)
# load env
. /opt/stack/bifrost/env-vars
# list nodes
ironic node-list
# remove / shutdown existing node
ironic node-set-provision-state foo.example.com deleted
# load node configuration
export BIFROST_INVENTORY_SOURCE=/opt/openstack-prepare-baremetal/bifrost/json/foo.example.com.json
# add new node
ansible-playbook -i inventory/bifrost_inventory.py enroll-dynamic.yaml
ironic node-update foo.example.com add properties/capabilities='boot_mode:uefi'
# deploy
ansible-playbook -v -i inventory/bifrost_inventory.py deploy-dynamic.yaml
# show node details
Docu
https://docs.openstack.org/releasenotes/kolla-ansible/
https://docs.openstack.org/project-deploy-guide/kolla-ansible/latest/quickstart.html
https://docs.openstack.org/kolla-ansible/latest/reference/index.html
Repository
https://github.com/openstack/kolla-ansible
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/* .
Install with Ansible/
https://github.com/panticz/ansible/tree/master/roles/terraform
- hosts: localhost
roles:
- role: terraform
tags: terraform
Terraform/
https://www.terraform.io/
https://www.youtube.com/watch?v=TFLQcgZr0no#t=1318.264795
https://releases.hashicorp.com/index.json
https://releases.hashicorp.com/