====== Frontend ====== Para frontend se usa una maquina virtual. ===== Preparación del host ===== ==== Bridge para la VM ==== * Debian -> [[https://wiki.debian.org/BridgeNetworkConnections]] * Ubuntu Server -> [[https://ubuntu.com/server/docs/network-configuration]] victor@cerebro:~/bin/qemu$ cat /etc/netplan/01-netcfg.yaml network: version: 2 renderer: networkd ethernets: enp2s0: dhcp4: no bridges: br0: addresses: [192.168.1.10/24] gateway4: 192.168.1.1 nameservers: addresses: [208.67.222.222, 208.67.220.220] interfaces: - enp2s0 ==== Invocación VM ==== victor@cerebro:~/bin/qemu$ cat start_openNebula_frontend_bridge.sh #!/bin/bash exec qemu-system-x86_64 -enable-kvm \ -cpu host \ -drive file=DISKS/OpenNebula_Frontend_amd64.qcow2,if=virtio \ -device e1000,netdev=net0,mac=DE:AD:BE:EF:00:FA \ -netdev tap,id=net0,script=/home/victor/bin/qemu/SCRIPTS/kvm-ifup,downscript=/home/victor/bin/qemu/SCRIPTS/kvm-ifdown \ -m 2G \ -smp 2 \ -nographic \ -serial mon:stdio \ -name "Open Nebula Frontend" \ #$@ cat kvm-ifup #!/bin/sh set -x switch=br0 if [ -n "$1" ];then # tunctl -u `whoami` -t $1 (use ip tuntap instead!) ip tuntap add $1 mode tap user `whoami` ip link set $1 up sleep 0.5s # brctl addif $switch $1 (use ip link instead!) ip link set $1 master $switch exit 0 else echo "Error: no interface specified" exit 1 fi cat kvm-ifdown #!/bin/sh # # Script called by kvm on tap interface deletion # basename $0 -ifdown|sed -e 's/^[^-]*-\?//' KVM_BR=`basename $0 -ifdown|sed -e 's/^[^-]*-\?//'` KVM_BRIDGE=${KVM_BR:-$KVM_BRIDGE} echo "$0:" echo "Removing $1 from bridge $KVM_BRIDGE" ip link set "$1" down brctl delif "$KVM_BRIDGE" "$1" ===== Instalación Frontend ===== Recommends y suggested desactivados en apt.conf apt-get -y install gnupg wget apt-transport-https net-tools wget -q -O- https://downloads.opennebula.io/repo/repo.key | apt-key add - echo "deb https://downloads.opennebula.io/repo/6.2/Debian/11 stable opennebula" > /etc/apt/sources.list.d/opennebula.list apt update apt-get -y install opennebula opennebula-sunstone opennebula-gate opennebula-flow opennebula-provision opennebula-fireedge opennebula-guacd echo "deb https://deb.nodesource.com/node_12.x bullseye main" >/etc/apt/sources.list.d/nodesource.list wget -q -O- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - systemctl start opennebula opennebula-sunstone opennebula-fireedge opennebula-gate opennebula-flow systemctl enable opennebula opennebula-sunstone opennebula-fireedge opennebula-gate opennebula-flow En /etc/one/sunstone-server.conf :public_fireedge_endpoint: http://192.168.1.13:2616 Cambiar por ip o dominio para que no aparezca error en sunstone. ====== Backend ====== ====== Storage ======