forked from tosin2013/redhat-edge-ai-industrial-demo-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-box.sh
executable file
·38 lines (31 loc) · 1.17 KB
/
dev-box.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -x
CHECKLOGGINGUSER=$(whoami)
if [ ${CHECKLOGGINGUSER} == "root" ];
then
echo "login as sudo user to run script."
echo "You are currently logged in as root"
exit 1
fi
if cat /etc/redhat-release | grep "Red Hat Enterprise Linux release 8.[0-9]" > /dev/null 2>&1; then
echo "RHEL 8 is supported"
else
echo "RHEL 8 is not supported"
exit 1
fi
read -p "Would you like to register the system? (y/n): " register_system
if [ "$register_system" == "y" ]; then
sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager attach --auto
sudo subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms --enable=rhel-8-for-x86_64-baseos-rpms
fi
sudo dnf install git vim unzip wget bind-utils tar -y
sudo dnf install ncurses-devel curl -y
curl 'https://vim-bootstrap.com/generate.vim' --data 'editor=vim&langs=javascript&langs=go&langs=html&langs=ruby&langs=python' > ~/.vimrc
if [ ! -f $HOME/edge-anomaly-detection ]; then
git clone https://github.com/tosin2013/redhat-edge-ai-industrial-demo-infra.git
cd redhat-edge-ai-industrial-demo-infra
./hack/setup-bastion.sh
fi
#oc create -k clusters/overlays/aws