ironic / bifrost

# 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

Install OpenStack with Kolla-ansible under Ubuntu

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/* .

GitLab runner

Install
wget https://packages.gitlab.com/runner/gitlab-runner/gpgkey -O - | apt-key add -
cat < /etc/apt/sources.list.d/gitlab-runner.list
deb https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ xenial main
EOF
apt update
apt install gitlab-runner

Instlal with Ansible
https://github.com/panticz/ansible/tree/master/roles/gitlab-runner
https://github.com/haroldb/ansible-gitlab-runner

Get token from GitLab server
http:///admin/runners

# configure DNS for GitLab server

OpenStack diskimage-builder

Install
sudo apt install -y curl python-pip qemu-utils
pip install diskimage-builder

# packages
dib/elements/my_pkg/package-installs.yaml
...
vlan:
wget:
linux-image-generic:
uninstall: True

Options
https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/lib/disk-image-create#L52

Elements
https://docs.openstack.org/diskimage-builder/latest/elements.html

Documentation
https://docs.openstack.org/diskimage-builder/latest/elements/package-installs/README.html

Configure proxy

export http_proxy=http://10.203.0.1:5187/
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"

cat <> /etc/environment
export http_proxy="http://${PROXY_USER}:${PROXY_PASS}@192.168.0.222:8080"
export https_proxy="http://${PROXY_USER}:${PROXY_PASS}@192.168.0.222:8080"
export no_proxy="localhost,127.0.0.1,foo.example.com"
EOF

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

LVM: remove PV from VG

#
# Create test LV
#
for i in {1..3}; do
truncate -s 1G disk${i}.img
losetup /dev/loop${i} disk${i}.img
pvcreate /dev/loop${i}
done

pvs

vgcreate vg0 /dev/loop1 /dev/loop2 /dev/loop3

vgs

lvcreate -n lv0 -l 100%FREE vg0

lvs

mkfs.ext4 /dev/vg0/lv0

mount /dev/vg0/lv0 /mnt/

df -h /mnt/

for i in {1..15}; do
dd if=/dev/urandom of=/mnt/file${i} bs=1M count=100
done

md5sum /mnt/file?

Grafana

Install from repository
curl https://packagecloud.io/gpg.key | sudo apt-key add -
echo "deb https://packagecloud.io/grafana/stable/debian/ stretch main" | tee /etc/apt/sources.list.d/grafana_stable.list
sudo apt-get update
sudo apt install -y grafana

Credentials
http://SERVER_IP:3000/

Docker container
docker run -i -p 3000:3000 -e "GF_SERVER_ROOT_URL=http://10.0.3.164" -e "GF_SECURITY_ADMIN_PASSWORD=admin" grafana/grafana
user: admin
pass: admin

Configure Graphite datasource
Name: Graphite
Type: Graphite