openstack

Ironic

Log
/var/log/ansible.log

Delete node
ironic node-set-provision-state ${NODE} deleted
ironic node-set-maintenance ${NODE} on
ironic node-delete ${NODE}
https://docs.openstack.org/tripleo-docs/latest/install/advanced_deployment/node_states.html

Rebuild Bifrost PXE boot image
mkdir /tmp/ansible_ubuntu
cd /tmp/ansible_ubuntu
xzcat /httpboot/ansible_ubuntu.initramfs | cpio -idmv
# apply changes
mv /httpboot/ansible_ubuntu.initramfs /httpboot/ansible_ubuntu.initramfs.$(date -I)

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

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

OpenStack

Create VM
openstack keypair create foo-key \
--public-key ~/.ssh/id_rsa.pub

openstack floating ip create --floating-ip-address 1.2.3.4 public

Releases
https://releases.openstack.org/
https://releases.openstack.org/stein/index.html

Change user / admin password
. /etc/kolla/admin-openrc.sh
openstack user password set --password new-password --original-password current-admin-password

CLI
source /etc/kolla/admin-openrc.sh
https://docs.openstack.org/ocata/user-guide/cli-cheat-sheet.html