#!/bin/bash
printf "\n===================================================================\n"
printf "============ Configure EPAD node =========\n"
distro='rhel8'
arch='x86_64'

sudo dnf update -y
sudo dnf install -y pciutils net-tools libibverbs tcpdump vim git
sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)
sudo dnf install -y dnf-plugins-core systemd bind-utils

sudo dnf makecache --refresh
sudo dnf -y install iperf3

# apache and port forwarding enabling modules 
sudo dnf -y install httpd
sudo dnf -y install mod_ssl
sudo systemctl enable httpd

sudo dnf install -y mod_authnz_pam mod_proxy_html openldap-clients
sudo dnf -y install firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=http


# Setup Cuda - needed only if GPUs assigned to slice
## ./tools/cuda.sh ***

printf "\n +++ install cloudlet required packages\n"
./tools/cloudlet_tools.sh 

printf "\n ===================== end node configuration ======================\n"

