SpectroCloud/RaspberryPiEdge: Difference between revisions

From DER's LLC
Jump to navigation Jump to search
Line 49: Line 49:
   
   
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.31.4.bin
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
  bash /nfs/Download/airgap-vertex-pack-edge-native-byoi-2.1.0.bin
  bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
  bash /nfs/Download/airgap-vertex-pack-edge-rke2-1.31.4.bin


== Install Palette Agent ==
== Install Palette Agent ==

Revision as of 14:46, 29 January 2025

Raspberry Pi Edge Install

Install OS

# Connnect Network, Keyboard, HDMI, and Power
# Boot to Network by pressing and holding SHIFT
############################################################
# Raspberry Pi Device: RASPBERRY PI 5
# Operating System:    Ubuntu Desktop 24.04.1 LTS (64-BIT)
# Storage:             Internal SD CARD READER
############################################################
# Finish the Setup Wizard
# Modify Settings before completion
# -  Complete the Hostname
# -  Add a user and pass
# -  Enable SSH with password auth

Prepare Environment

##################################
# Setup NFS Mount (NOT REQUIRED) #
##################################
apt update -y
apt install nfs-common -y
snap install oras --classic
snap install docker
echo "172.16.85.15:/Download      /nfs/Download    nfs vers=4.0    0 0" >> /etc/fstab
systemctl daemon-reload
mkdir -p /nfs/Download
mount -a

##########################
# Download Edge Binaries #
##########################
# Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge-k8s -> <k8s_version>
# Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge-rke2 -> <k8s_version>
# Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge-native-byoi

###########################################
# Upload the Binaries into AirGapped Repo #
###########################################
# SET VARIABLES
export OCI_IMAGE_REGISTRY=harbor.dersllc.com
export OCI_IMAGE_BASE=spectro-images
export OCI_PACK_REGISTRY=harbor.dersllc.com
export OCI_PACK_BASE=spectro-packs

docker login $OCI_IMAGE_REGISTRY -u admin -p '<Password>'
oras login $OCI_IMAGE_REGISTRY --username 'admin' --password '<Password>'

bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.29.12.bin
bash /nfs/Download/airgap-vertex-pack-edge-k8s-1.31.4.bin
bash /nfs/Download/airgap-vertex-pack-edge-native-byoi-2.1.0.bin
bash /nfs/Download/airgap-vertex-pack-edge-rke2-1.31.4.bin

Install Palette Agent

#############################
# Install Required Software #
#############################
sudo snap install docker
sudo snap install curl
sudo apt-get install jq zstd rsync conntrack -y

##############################################################
# Export the Palette Stylus ARM Agent Container (Air-Gapped) #
##############################################################
# Note: The version needed can be found in RETOOL (Palette Release -> Vertex Info -> Components -> stylus)
export EDGE_API_VERSION='v4.5.14'
docker pull  us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$EDGE_API_VERSION
docker save us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$EDGE_API_VERSION > arm-agent-$EDGE_API_VERSION.tar

##################################
# Download the palette-agent CLI #
##################################
export URL=https://github.com/spectrocloud/agent-mode/releases/download/v4.5.5/palette-agent-linux-arm64
curl --verbose --location $URL --output palette-agent

##############################################
## TRUST DERS CA CERTS (Specific to my Lab) ##
##############################################
sudo curl --insecure https://ders-gitlab.dersllc.com/ders/ders-proxy/-/raw/master/AddTrustExternalCARoot.crt > /usr/local/share/ca-certificates/ders-star-ca.crt
sudo curl --insecure https://ders-gitlab.dersllc.com/ders/vmware-se/-/raw/main/HomeLab/DERS-CA-CERT/ders-ca.cer > /usr/local/share/ca-certificates/ders-ssca.crt
sudo update-ca-certificates

#####################
# Install the Agent #
#####################
curl --insecure https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/edge/user-data.yaml > user-data
chmod +x palette-agent
./palette-agent install --source ./arm-agent-$EDGE_API_VERSION.tar  --config "./user-data" --local

Appendix

Set Static IP Address (NOT WORKING)

# SSH to the Raspberry Pi or use the console.
# Set Static IP Address by running the following:
cat > /etc/netplan/50-cloud-init.yaml << "EOF"
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      addresses:
      - 172.16.84.33/22
      nameservers:
        addresses:
        - 172.16.84.10
        search:
         - dersllc.com
      routes:
      -   to: default
          via: 172.16.84.1
EOF

netplan apply