ddrescue

Install

#wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gddrescue/gddrescue_1.22-1_amd64.deb
apt install -y gddrescue
dpkg -i gddrescue_1.22-1_amd64.deb

Rescue

ddrescue /dev/sda sda.dd sda.ddrescue.log

OpenStack: project

Create project

openstack project create foo-project --domain bar
 
ROLES="
creator
heat_stack_owner
load-balancer_member
member
"
 
for ROLE in ${ROLES}; do
    openstack role add --user ${USER_ID} --project ${PROJECT_ID} ${ROLE}
done
 
openstack role assignment list --names --user ${USER_ID}

OpenStack: Horizon

List templates

docker exec -it horizon bash
ls -l /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/themes

Configure theme
/etc/kolla/horizon/custom_local_settings

AVAILABLE_THEMES = [
    ('default', 'Default', 'themes/default'),
    ('foo_bar', 'Foo bar', 'themes/foo_bar')
]
 
SELECTABLE_THEMES = [
    ('foo_bar', 'Foo bar', 'themes/foo_bar')
]
 
DEFAULT_THEME = 'foo_bar'

podman

Install

sudo apt-get install -y software-properties-common uidmap
sudo add-apt-repository -y ppa:projectatomic/ppa
sudo apt-get -y install podman

Container

podman run --name nginx -v /tmp/html:/usr/share/nginx/html:ro -d -p 8080:80 docker://nginx
 
podman run \
    -dt \
    -p 8080:8080/tcp \
    -e HTTPD_VAR_RUN=/var/run/httpd \
    -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
    -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
    -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
    registry.fedoraproject.org/f27/

Links
https://podman.io/

Floating IPs

https://docs.openstack.org/ocata/user-guide/cli-manage-ip-addresses.html

openstack floating ip list
openstack floating ip create public-net
FLOATING_IP=$(openstack floating ip create public -c floating_ip_address -f value --floating-ip-address 10.11.12.13)
 
openstack floating ip show 1.2.3.4
openstack floating ip list --project ${PROJECT_ID} --long
 
openstack floating ip create --floating-ip-address 1.2.3.4 public
 
# request specific floating IP for a project
openstack floating ip create public --floating-ip-address 1.2.3.4 --project foo-project

s3cmd

Install s3cmd (s3 CLI client)

apt install -y s3cmd

Configuration file

s3cmd --configure
${HOME}/.s3cfg

CLI

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)s.s3.example.com' \
  --host s3.example.com \
  --signature-v2 \
  --no-preserve \
  ls s3://lpz-duply

ACL

s3cmd setacl s3://bucket/path/to/file --acl-public
s3cmd info s3://bucket/path/to/file
s3cmd setacl s3://bucket/path/to/file --acl-private

Links
https://lollyrock.com/articles/s3cmd-with-radosgw/
https://linuxconfig.org/getting-started-with-aws-s3cmd-command-by-examples

s3fs

Install

sudo apt install -y s3fs

Create credentials

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs

Mount s3 bucket

s3fs backups /media/backup \
  -o url=https://s3.example.com \
  -o passwd_file=~/.passwd-s3fs

Parameter

-o url=https://s3.example.com,allow_other,umask=0000
-o use_cache=/tmp/cache

/etc/fstab

mybucket1.mydomain.org /mnt/mybucket1 fuse.s3fs _netdev,allow_other,passwd_file=/home/ftpuser/.passwd-aws-s3fs,default_acl=public-read,uid=1001,gid=65534   0 0

Links
https://github.com/s3fs-fuse/s3fs-fuse
https://gridscale.io/community/tutorials/s3-fuse-ubuntu/