Vault
Install
wget https://releases.hashicorp.com/vault/0.11.5/vault_0.11.5_linux_amd64.zip -P /tmp/
apt install -y unzip
unzip -d /usr/sbin /tmp/vault_0.11.5_linux_amd64.zip
vault -autocomplete-install
Install
wget https://releases.hashicorp.com/vault/0.11.5/vault_0.11.5_linux_amd64.zip -P /tmp/
apt install -y unzip
unzip -d /usr/sbin /tmp/vault_0.11.5_linux_amd64.zip
vault -autocomplete-install
Install
sudo apt install -y duplicity python-boto
SSH
duplicity incr --log-file /tmp/duplicity.log /etc/ scp://foo@10.0.1.123//media/etc
S3
vi ~/.boto
[Credentials]
aws_access_key_id = KEY_ID
aws_secret_access_key = SECRET_ACCESS_KEY
# create backup to s3
duplicity full --log-file /tmp/duplicity.log /etc/ s3://s3.example.com/backup/host.examp.eocm/etc/
duplicity list-current-files s3+http://bucket/folder
WebDav
export FTP_PASSWORD="pass1234"
Configure CEPH
touch /tmp/placeholder
s3cmd mb s3://gitlab
s3cmd put /tmp/placeholder s3://gitlab
s3cmd ls s3://gitlab
s3cmd du s3://gitlab
Configure GitLab
# /etc/gitlab/gitlab.rb
...
registry_external_url 'https://registry.example.com'
registry_nginx['enable'] = true
registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/registry.example.com.crt"
registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/registry.example.com.key"
#registry['log_level'] = "debug"
#registry['storage_delete_enabled'] = true
...
registry['storage'] = {
sudo apt install -y qemu-kvm cloud-image-utils
wget https://cloud-images.ubuntu.com/releases/18.04/release/ubuntu-18.04-server-cloudimg-amd64.img
# cat seed
#cloud-config
password: ubuntu
chpasswd: { expire: False }
ssh_pwauth: True
ssh_import_id: ${USER}
cloud-localds seed.img seed
sudo kvm-spice -m 2048 -drive file=ubuntu-18.04-server-cloudimg-amd64.img,if=virtio,cache=writeback -cdrom seed.img -net nic,model=virtio -net user,hostfwd=tcp::222-:22
# -balloon virtio
# login credentials:
user: ubuntu
pass: ubuntu
ssh ubuntu@localhost:2222
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
network:
version: 2
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