warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

S3 stoage under Linux / Ubuntu

Install CLI client
apt install -y s3cmd

Configuration file
s3cmd --configure

s3cmd mb s3://buk1
s3cmd put /tmp/1m.img s3://buk1
s3cmd ls s3://buk1
s3cmd du
s3cmd rm s3://buk1/1m.img
s3cmd rb s3://buk1
s3cmd rb s3://buk1 --recursive

s3cmd rm s3://lfs/ --recursive --force

s3cmd \
--access_key xxxxxxxxxxx \
--secret_key xxxxxxxxxxxxxx \
--host-bucket '%(bucket)' \
--host \
--signature-v2 \
--no-preserve \
ls s3://lpz-duply

# acl

polo - Advanced file manager for Linux



sudo apt-add-repository multiverse
sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install polo-file-manager


LXD: Create container with profile (connect to VLAN)

create profile
lxc profile copy default mgmt-dev
# lxc profile list
lxc profile device set mgmt-dev eth0 nictype macvlan
lxc profile device set mgmt-dev eth0 parent mgmt-dev-v4432
lxc profile show mgmt-dev

create container with profile
lxc launch ubuntu:18.04 bionic-mgmt-dev -p mgmt-dev
lxc ls

Enable container nesting
lxc config set bionic-mgmt-dev security.nesting true

Configure IP
cat < /var/lib/lxd/containers/bionic-mgmt-dev/rootfs/etc/netplan/50-cloud-init.yaml
version: 2

Ubuntu: Instlal lldpd (Link Layer Discovery Protocol)

sudo apt install -y lldpd

# optional: enable Cisco CDP protocol
cat < /etc/default/lldpd
service lldpd restart

# get info

Identify switch port to which the server is connected

# Show LLDP neighbors
networkctl lldp


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

Latest version:

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


kexec (reboot without hardware initialization)

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
path: /etc/default/kexec
regexp: '^LOAD_KEXEC='
line: 'LOAD_KEXEC=true'
when: ('dev' in group_names)


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

Configure proxy

export http_proxy=
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,,localaddress,"

cat <> /etc/environment
export http_proxy="http://${PROXY_USER}:${PROXY_PASS}@"
export https_proxy="http://${PROXY_USER}:${PROXY_PASS}@"
export no_proxy="localhost,,"

cat < /etc/apt/apt.conf.d/12proxy
Acquire::http::Proxy "http://${PROXY_USER}:${PROXY_PASS}@";

Syndicate content