forked from bn222/cluster-deployment-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.sh
executable file
·58 lines (49 loc) · 1.46 KB
/
dependencies.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
if [ "$(which python)" = "$(pwd)/ocp-venv/bin/python" ]; then
PYTHON_CMD="python"
else
PYTHON_CMD="python3.11"
# Install Python 3.11 if not using the virtual environment interpreter
sudo dnf install -y python3.11
fi
$PYTHON_CMD -m ensurepip --upgrade
$PYTHON_CMD -m pip install PyYAML --ignore-installed
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
#exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
EOF
dnf install -y \
bash-completion \
cockpit-composer \
composer-cli \
coreos-installer \
dhcp-server \
dnsmasq \
firewalld \
git \
golang-bin \
kubectl \
libvirt \
lorax \
make \
osbuild-composer \
podman \
qemu-img \
qemu-kvm \
rust \
virt-install \
virt-viewer \
wget
systemctl enable osbuild-composer.socket cockpit.socket --now
if ! command -v -- oc; then
export OPENSHIFT_CLIENT_TOOLS_URL=https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz
curl $OPENSHIFT_CLIENT_TOOLS_URL | sudo tar -U -C /usr/local/bin -xzf -
fi
cat requirements.txt | xargs -n1 $PYTHON_CMD -m pip install
sudo activate-global-python-argcomplete