Infrared and the Fantabulous Emancipation of One OSP Lab Alex Callejas Senior Technical Support Engineer November 2019
About Me Alex Callejas Senior Technical Support Engineer @Red Hat @dark_axl /rootzilopochtli www.rootzilopochtli.com OSP Lab: Infrared
Warning! DISCLAIMER Esta presentación es realizada con fines estrictamente educativos ● El método presentado se encuentra en constante desarrollo ● La infraestructura de laboratorio generada no está soportada , incluyendo la que contempla el ● uso de suscripciones Bajo ninguna condición se recomienda el uso en ambientes diferentes al de laboratorio de ● pruebas El presentador se deslinda de cualquier responsabilidad sobre las decisiones tomadas como ● resultado de esta presentación OSP Lab: Infrared
What is OpenStack? What is OpenStack? x Infraestructura programable que presenta un Una plataforma para máquinas virtuales, conjunto común de API’s, además de recursos de contenedores y baremetal cómputo, redes y almacenamiento para proporcionar una infraestructura como servicio en la nube (IaaS) Source: https:/ /www.openstack.org/marketing OSP Lab: Infrared
What is OpenStack? What is OpenStack used for? NETWORK DEVELOPER EDGE AI/ML/HPC SERVICE FUNCTION CLOUD COMPUTING PROVIDER VIRTUALIZATION OSP Lab: Infrared
What is OpenStack? En serio, ¿qué es OpenStack? Source:http:/ /vmartinezdelacruz.com/in-a-nutshell-how-openstack-works/ OSP Lab: Infrared
What is OpenStack? En serio, ¿qué es OpenStack? Tipos de nodos: Controller 1 ▸ DB’s y API’s ・ Compute 1 ▸ Hypervisor ・ Storage 2 ▸ [1] Infraestructura mínima soportada: 3 controllers, 2 computes [2] Opcional OSP Lab: Infrared
OSP Lab Test Deployments OSP Lab: Infrared
TripleO TripleO TripleO se refiere a “ O penStack O n O penStack” Objetivo oficial del proyecto OpenStack ▸ Capacidad para desplegar y administrar la ・ nube de producción en bare-metal hardware utilizando un subconjunto de componentes de OpenStack OSP Lab: Infrared
OSP Lab Infrared InfraRed is a plugin based system that aims to provide an easy-to-use CLI for Ansible based projects. It aims to leverage the power of Ansible in managing / deploying systems, while providing an alternative, fully customized, CLI experience that can be used by anyone, without prior Ansible knowledge. The project originated from Red Hat OpenStack infrastructure team that looked for a solution to provide an “easier” method for installing OpenStack from CLI but has since grown and can be used for any Ansible based projects. Source: https:/ /infrared.readthedocs.io/ OSP Lab: Infrared
Infrared Infrared Requerimientos Un servidor físico con al menos: ▸ 48 GB de RAM ・ Disco duro de 150 GB ・ Puede sobrevivir con 70 GB si se usa la compresión ・ btrfs y zlib para /var/lib/libvirt/images Virtualización de CPU habilitada en BIOS / UEFI ・ Fedora Server >25 , CentOS o RHEL 7 con: ▸ ・ git gcc libffi-devel openssl-devel python-virtualenv libselinux-python redhat-rpm-config screen Source Photo: https:/ /twitter.com/base2wave/status/1197223104457715712 OSP Lab: Infrared
Infrared OSP Lab Lab deployment Instalar infrared: git clone https://github.com/redhat-openstack/infrared.git cd infrared virtualenv .venv && source .venv/bin/activate pip install --upgrade pip pip install --upgrade setuptools pip install --upgrade infrared pip install . echo ". $(pwd)/etc/bash_completion.d/infrared" >> ${VIRTUAL_ENV}/bin/activate infrared plugin list OSP Lab: Infrared
Infrared Lab deployment Recomendaciones screen y/o tlog ▸ http:/ /www.rootzilopochtli.com/2019/02/tlog-grabar-sesiones-en-la-terminal/ ・ ▸ time Destruir VM’s y restaurar la configuración original ▸ kill ・ time infrared virsh -v -o cleanup.yml --host-address $HOST --host-key $HOST_KEY --kill yes cleanup ・ time infrared virsh --cleanup True --host-address $HOST --host-key $HOST_KEY OSP Lab: Infrared
Infrared OSP Lab Lab deployment Network layout: OSP Lab: Infrared
Infrared OSP Lab Lab deployment Infra deployment: time infrared virsh -v --host-memory-overcommit True \ --host-address $HOST --host-key $HOST_KEY --host-user root \ --topology-nodes "undercloud:1,controller:3,compute:2" \ -e override.controller.cpu=2 -e override.controller.memory=8192 \ -e override.controller.disks.disk1.size=60G -e override.compute.disks.disk1.size=60G \ -e override.compute.memory=16384 -e override.undercloud.memory=16384 \ --image-url https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 OSP Lab: Infrared
Infrared OSP Lab Lab deployment Instalar undercloud (director): time infrared tripleo-undercloud --version queens --images-task build --ssl no Si el tamaño del lab es menor a 64 Gb de RAM, se recomienda reducir los workers a 1. Se puede utilizar el script: curl -L -O https://raw.githubusercontent.com/mrVectorz/snips/master/osp/low_memory_uc.sh OSP Lab: Infrared
Infrared OSP Lab Lab deployment Instalar overcloud (controllers y computes): time infrared tripleo-overcloud --version queens --deployment-files virt \ --introspect yes --tagging yes --deploy yes \ --containers yes --registry-mirror docker.io --registry-namespace tripleoqueens \ --registry-tag current-tripleo-rdo --registry-prefix='centos-binary-' \ --registry-skip-puddle yes Toma 2: --overcloud-templates sahara,disable-telemetry,docker-queens_image OSP Lab: Infrared
Infrared OSP Lab Lab deployment Infra deployment: --image-url http://hakke.rootzilopochtli.com/rhel-guest-image-7-6-210-x86-64-qcow2 Instalar undercloud (director): time infrared tripleo-undercloud --build GA --version 10 --images-task rpm --ssl true --cdn cdn_creds.yml OSP Lab: Infrared
Infrared OSP Lab Lab deployment cdn_creds.yml: username: rhn_user password: ********** pool_ids: 8a85f99a6d1c4218016e3c1611ab0a32 Instalar overcloud (controllers y computes): time infrared tripleo-overcloud --deployment-files virt --version 10 \ --introspect yes --tagging yes --postreboot yes --deploy yes \ --network-backend vxlan --overcloud-ssl true OSP Lab: Infrared
Infrared OSP Lab Deployment test create a few networks ▸ create respective subnets ▸ create routers ▸ add router ports to the router ▸ 1 download cirros guest image ▸ http:/ /download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img ・ download centos guest image ▸ https:/ /cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 ・ create images and flavors ▸ create security groups ▸ create instances ▸ boot a couple instances ▸ [1] OpenStack Images:https:/ /docs.openstack.org/image-guide/obtain-images.html OSP Lab: Infrared
Infrared OSP Lab Lab customization Personalizar infra domain: plugins/tripleo-undercloud/hypervisor.yml : {{ item }}. redhat.local {{ item }}" plugins/tripleo-undercloud/init.yml : name: "{{ inventory_hostname }}. redhat.local " plugins/tripleo-undercloud/init.yml : line: "127.0.0.1 {{ inventory_hostname }}. redhat.local {{ inventory_hostname }}" plugins/tripleo-undercloud/plugin.spec : default: ' redhat.local ' plugins/tripleo-undercloud/restore.yml : {{ groups['undercloud'][0] }}. redhat.local \ OSP Lab: Infrared
Infrared OSP Lab Horizon Dashboard Localizar las IP’s de los nodos en undercloud: ▸ [stack@undercloud-0 ~]$ openstack server list +--------------------------------------+--------------+--------+------------------------+----------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+--------------+--------+------------------------+----------------+ | 6f7ed9fd-1a3a-46e8-940b-a0e3555f6273 | controller-2 | ACTIVE | ctlplane= 192.168.24.6 | overcloud-full | | 183ce9a1-73d8-4782-8d92-79b6e52ccf6f | compute-0 | ACTIVE | ctlplane= 192.168.24.12 | overcloud-full | | 37c7df4e-2c75-424e-a41b-909bb0b623ef | controller-1 | ACTIVE | ctlplane= 192.168.24.17 | overcloud-full | | 6bf8c568-b53b-4c0f-8fd1-247857cb4529 | compute-1 | ACTIVE | ctlplane= 192.168.24.15 | overcloud-full | | 7a51c36b-3feb-4f36-8d70-51ca2114e859 | controller-0 | ACTIVE | ctlplane= 192.168.24.16 | overcloud-full | +--------------------------------------+--------------+--------+------------------------+----------------+ Localizar la url del dashboard en algún controller:: ▸ [heat-admin@controller-0 ~]$ grep -A2 horizon /etc/haproxy/haproxy.cfg |grep bind\ 10 bind 10.0.0.101:443 transparent ssl crt /etc/pki/tls/private/overcloud_endpoint.pem bind 10.0.0.101:80 transparent OSP Lab: Infrared
Infrared OSP Lab Horizon Dashboard Configurar ~/.ssh/config : ▸ # openstack@home infrared Host compute-1.redhat.local Host undercloud-0.redhat.local HostName 192.168.24.15 User stack Host compute-0.redhat.local HostName undercloud-0 HostName 192.168.24.12 ForwardAgent yes Host controller-2.redhat.local HostName 192.168.24.6 Host *.redhat.local Host controller-1.redhat.local User heat-admin HostName 192.168.24.17 ProxyJump dell-per720-4 Host controller-0.redhat.local IdentityFile /root/.ssh/id_rsa HostName 192.168.24.16 DynamicForward localhost:65432 OSP Lab: Infrared
Recommend
More recommend