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

Go language

# hello.go
package main

import "fmt"

func main() {
fmt.Println("Hello, World")
}

# run source
go run hello.go

# build
go build hello.go

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

Install prometheus under Ubuntu

Install from repository
sudo apt-get install -y prometheus
# optional
sudo apt-get install -y prometheus-node-exporter
sudo apt-get install -y prometheus-alertmanager
sudo apt-get install -y prometheus-pushgateway

Ansible installation
https://github.com/panticz/ansible/tree/master/roles/prometheus
- hosts: localhost
roles:
- prometheus

Login
http://SERVER_IP:9090/

Commands
avg_over_time(node_memory_MemAvailable[5m])/1024/1024

Repositroy

Syndicate content