Last active
November 28, 2023 17:52
-
-
Save netravnen/6cbc3f681a47a2b85cfb7e4daa654031 to your computer and use it in GitHub Desktop.
Install FRR and Proxmox repositories on non-proxmox and proxmox hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### Install the PIMD-DENSE repository hosted by troglobit - https://github.com/troglobit/pimd-dense | |
### | |
REL=$(lsb_release -sc); | |
ARCH="amd64"; | |
apt-get install --yes lsb-release gpg curl wget; | |
if [[ "${ARCH}" == "amd64" ]]; then | |
curl -s "https://deb.troglobit.com/pubkey.gpg" | \ | |
gpg --dearmor | \ | |
tee /usr/share/keyrings/troglobit.gpg > /dev/null | |
cat <<EOF> /etc/apt/sources.list.d/troglobit.list | |
deb [arch=${ARCH} signed-by=/usr/share/keyrings/troglobit.gpg] https://deb.troglobit.com/debian stable main | |
EOF | |
cat <<EOF> /etc/apt/preferences.d/troglobit | |
Package: * | |
Pin: release o=Troglobit Software,l=deb.troglobit.com | |
Pin-Priority: 1 | |
EOF | |
fi | |
apt-get update; | |
apt-cache policy; | |
apt-get install --yes pimdd pimctl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REL=$(lsb_release -sc); | |
ARCH="amd64"; | |
apt-get install --yes lsb-release gpg curl wget; | |
if [[ ! -f "/usr/bin/pveversion" ]]; then | |
if [[ -f "/etc/apt/trusted.gpg.d/proxmox-release-${REL}.gpg" ]]; then | |
rm -f "/etc/apt/trusted.gpg.d/proxmox-release-${REL}.gpg"; | |
fi | |
if [[ ! -f "/usr/share/keyrings/proxmox-release-${REL}.gpg" ]]; then | |
curl -s "https://enterprise.proxmox.com/debian/proxmox-release-${REL}.gpg" | \ | |
gpg --dearmor | \ | |
tee "/usr/share/keyrings/proxmox-release-${REL}.gpg" > /dev/null; | |
fi | |
fi | |
if [[ ! -f "/usr/share/keyrings/frrouting.gpg" ]]; then | |
curl -s "https://deb.frrouting.org/frr/keys.gpg" | \ | |
gpg --dearmor | \ | |
tee "/usr/share/keyrings/frrouting.gpg" > /dev/null; | |
fi | |
cat <<EOF> /etc/apt/sources.list.d/frr.list | |
deb [arch=${ARCH} signed-by=/usr/share/keyrings/frrouting.gpg] https://deb.frrouting.org/frr ${REL} frr-stable | |
EOF | |
cat <<EOF> /etc/apt/sources.list | |
deb [arch=${ARCH}] http://ftp.dk.debian.org/debian ${REL} main contrib non-free non-free-firmware | |
deb [arch=${ARCH}] http://ftp.dk.debian.org/debian ${REL}-updates main contrib non-free | |
deb [arch=${ARCH}] http://ftp.dk.debian.org/debian ${REL}-backports main contrib non-free | |
deb [arch=${ARCH}] http://security.debian.org ${REL}-security main contrib non-free | |
EOF | |
cat <<EOF> /etc/apt/sources.list.d/pve-enterprise.list | |
deb [arch=${ARCH} signed-by=/usr/share/keyrings/proxmox-release-${REL}.gpg] http://download.proxmox.com/debian/pve ${REL} pve-no-subscription | |
EOF | |
if [[ -f "/usr/bin/pveversion" ]]; then | |
cat <<EOF> /etc/apt/sources.list.d/ceph.list | |
deb [arch=${ARCH}] http://download.proxmox.com/debian/ceph-quincy ${REL} no-subscription | |
EOF | |
else | |
cat <<EOF> /etc/apt/sources.list.d/ceph.list | |
# deb [arch=${ARCH} signed-by=/usr/share/keyrings/proxmox-release-${REL}.gpg] http://download.proxmox.com/debian/ceph-quincy ${REL} no-subscription | |
EOF | |
fi | |
cat <<EOF> /etc/apt/sources.list.d/testing.list | |
# deb [arch=${ARCH}] http://ftp.dk.debian.org/debian testing main contrib non-free | |
# deb [arch=${ARCH}] http://ftp.dk.debian.org/debian testing-updates main contrib non-free | |
# deb [arch=${ARCH}] http://ftp.dk.debian.org/debian testing-backports main contrib non-free | |
# deb [arch=${ARCH}] http://security.debian.org testing-security main contrib non-free | |
EOF | |
cat <<EOF> /etc/apt/sources.list.d/experimental.list | |
# deb [arch=${ARCH}] http://ftp.dk.debian.org/debian experimental main contrib non-free | |
EOF | |
cat <<EOF> /etc/apt/preferences.d/stable | |
Package: * | |
Pin: release o=Debian,a=stable* | |
Pin-Priority: 500 | |
EOF | |
cat <<EOF> /etc/apt/preferences.d/testing | |
Package: * | |
Pin: release o=Debian,a=testing* | |
Pin-Priority: 20 | |
EOF | |
cat <<EOF> /etc/apt/preferences.d/experimental | |
Package: * | |
Pin: release o=Debian,a=experimental* | |
Pin-Priority: 10 | |
EOF | |
if [[ -f "/usr/bin/pveversion", ]]; then | |
cat <<EOF> /etc/apt/preferences.d/pve-enterprise | |
Package: * | |
Pin: release o=Proxmox | |
Pin-Priority: 500 | |
EOF | |
else | |
cat <<EOF> /etc/apt/preferences.d/pve-enterprise | |
Package: ifupdown2 | |
Pin: origin download.proxmox.com | |
Pin-Priority: 500 | |
Package: * | |
Pin: origin download.proxmox.com | |
Pin-Priority: 15 | |
EOF | |
fi | |
cat <<EOF> /etc/apt/preferences.d/frr | |
Package: * | |
Pin: release o=frr | |
Pin-Priority: 100 | |
Package: frr frr-doc frr-pythontools frr-rpki-rtrlib frr-snmp librtr0 libyang2 | |
Pin: release c=frr-stable | |
Pin-Priority: 999 | |
EOF | |
apt-get update && apt-get install --yes frr frr-doc frr-pythontools frr-rpki-rtrlib frr-snmp librtr0 libyang2; | |
systemctl stop frr.service; | |
systemctl disable frr.service; | |
systemctl mask frr.service; | |
apt-get update; | |
apt-cache policy; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment