SpectroCloud/RaspberryPiEdge: Difference between revisions
Jump to navigation
Jump to search
(28 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
############################################################ | ############################################################ | ||
# Raspberry Pi Device: RASPBERRY PI 5 | # Raspberry Pi Device: RASPBERRY PI 5 | ||
# Operating System: Ubuntu | # Operating System: Ubuntu Server 24.04.2 LTS (64-BIT) | ||
# Storage: Internal SD CARD READER | # Storage: Internal SD CARD READER | ||
############################################################ | ############################################################ | ||
Line 20: | Line 20: | ||
# Download Edge Binaries # | # Download Edge Binaries # | ||
########################## | ########################## | ||
# Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge- | # Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge-k3s -> <k8s_version> | ||
# Location: RETOOL | # Location: RETOOL -> Airgap Binaries -> edge-native-byoi (latest) | ||
############################# | ############################# | ||
Line 35: | Line 35: | ||
# SET VARIABLES | # SET VARIABLES | ||
export OCI_IMAGE_REGISTRY=harbor.dersllc.com | export OCI_IMAGE_REGISTRY=harbor.dersllc.com | ||
export OCI_IMAGE_BASE=spectro-images | export OCI_IMAGE_BASE=airgap-spectro-images | ||
export OCI_PACK_REGISTRY=harbor.dersllc.com | export OCI_PACK_REGISTRY=harbor.dersllc.com | ||
export OCI_PACK_BASE=spectro-packs | export OCI_PACK_BASE=airgap-spectro-packs | ||
export AGENT_VERSION="v4. | export K8S_VERSION="1.32.1" | ||
export AGENT_VERSION="v4.6.12" | |||
############################# | |||
# Install Required Software # | |||
############################# | |||
sudo apt-get install jq zstd rsync conntrack docker.io -y | |||
snap install oras --classic | snap install oras --classic | ||
oras login $OCI_IMAGE_REGISTRY --username 'admin' --password '<Password>' | oras login $OCI_IMAGE_REGISTRY --username 'admin' --password '<Password>' | ||
docker login $OCI_IMAGE_REGISTRY -u admin -p '<Password>' | docker login $OCI_IMAGE_REGISTRY -u admin -p '<Password>' | ||
bash /nfs/Download/airgap-pack-edge-k3s-$K8S_VERSION.bin --target ./trash | |||
export IMAGES=`cat ./trash/docker/images.lst | cut -d ',' -f 2` | |||
for i in $IMAGES; \ | |||
do \ | |||
docker pull --platform arm64 $i; \ | |||
docker tag $i $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/$i; \ | |||
docker push --platform arm64 $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/$i; \ | |||
done | |||
rm -rf ./trash | |||
bash /nfs/Download/airgap-vertex-pack-edge-native-byoi-2.1.0.bin | bash /nfs/Download/airgap-vertex-pack-edge-native-byoi-2.1.0.bin | ||
########################### | ########################### | ||
# Sync the Repo in Vertex # | # Sync the Repo in Vertex # | ||
########################### | ########################### | ||
# Navigate to: https:// | # Navigate to: https://paas.dersllc.com/admin/settings/registries/oci | ||
# | # DER's Spectro-Packs -> sync | ||
################################################ | ################################################ | ||
# Pull the arm64 agent and push to Airgap Repo # | # Pull the arm64 agent and push to Airgap Repo # | ||
################################################ | ################################################ | ||
docker pull us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | docker pull --platform arm64 us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | ||
docker tag us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | docker tag us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | ||
docker push $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | docker push --platform arm64 $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION | ||
############################### | ############################### | ||
Line 68: | Line 82: | ||
== Install Palette Agent == | == Install Palette Agent == | ||
############################################################## | ############################################################## | ||
# Export the Palette Stylus ARM Agent Container (Air-Gapped) # | # Export the Palette Stylus ARM Agent Container (Air-Gapped) # | ||
############################################################## | ############################################################## | ||
# Note: The version needed can be found in RETOOL (Palette Release -> Vertex Info -> Components -> stylus) | # Note: The version needed can be found in RETOOL (Palette Release -> Vertex Info -> Components -> stylus) | ||
docker pull us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v$AGENT_VERSION | |||
docker pull us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$ | docker save us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v$AGENT_VERSION > arm-agent-$AGENT_VERSION.tar | ||
docker save us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$ | |||
################################## | ################################## | ||
# Download the palette-agent CLI # | # Download the palette-agent CLI # | ||
################################## | ################################## | ||
export URL=https://github.com/spectrocloud/agent-mode/releases/download/ | export URL=https://github.com/spectrocloud/agent-mode/releases/download/v$AGENT_VERSION/palette-agent-linux-arm64 | ||
curl --verbose --location $URL --output palette-agent | curl --verbose --location $URL --output palette-agent | ||
chmod +x palette-agent | chmod +x palette-agent | ||
Line 93: | Line 100: | ||
##################### | ##################### | ||
curl --insecure https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/edge/user-data.yaml > user-data | curl --insecure https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/edge/user-data.yaml > user-data | ||
#./palette-agent install --source ./arm-agent-$ | #./palette-agent install --source ./arm-agent-$AGENT_VERSION.tar --config "./user-data" --local | ||
./palette-agent install --source $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images | ./palette-agent install --source $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION --config "./user-data" | ||
== Create a Cluster Profile for the Edge Node == | == Create a Cluster Profile for the Edge Node == | ||
Line 108: | Line 115: | ||
# OS Layer: BYOS Edge OS | # OS Layer: BYOS Edge OS | ||
# - Check the Preset radio button for edge | # - Check the Preset radio button for edge | ||
# - Values: | |||
# Add the following to the yaml | |||
# stylusPackage: harbor.dersllc.com/spectro-images/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v4.5.14 | |||
# options: | |||
# system.uri: "NA" | |||
# Add the following: | |||
# K8s Layer: Palette Optimized RKE2 | # K8s Layer: Palette Optimized RKE2 | ||
# - Version: 1.31.4 | # - Version: 1.31.4 | ||
Line 141: | Line 154: | ||
== Appendix == | == Appendix == | ||
=== Troubleshooting === | ===Troubleshooting=== | ||
Error: | |||
time="2025-04-11T16:25:35Z" level=error msg="system image is not defined cannot apply upgrade" version=v4.6.12 | |||
Fix: | |||
export VERTEX_ENDPOINT="paas.dersllc.com" | |||
export IMG_HOST_ENDPOINT="us-docker.pkg.dev/palette-images/edge" | export IMG_HOST_ENDPOINT="us-docker.pkg.dev/palette-images/edge" | ||
export STYLUS_IMG_ENDPOINT="harbor.dersllc.com/spectro-images/us-docker.pkg.dev/palette-images-fips/edge" | export STYLUS_IMG_ENDPOINT="harbor.dersllc.com/airgap-spectro-images/us-docker.pkg.dev/palette-images-fips/edge" | ||
export AUTH_TOKEN=`curl --insecure -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"<password>"}' https://api. | export AUTH_TOKEN=`curl --insecure -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"{{highlight|<password>}}"}' https://api.$VERTEX_ENDPOINT/v1/auth/syslogin | jq -r '.Authorization'` | ||
#echo $AUTH_TOKEN | #echo $AUTH_TOKEN | ||
echo "curl --insecure -X GET -H 'Authorization: $AUTH_TOKEN' https://api. | echo "curl --insecure -X GET -H 'Authorization: $AUTH_TOKEN' https://api.$VERTEX_ENDPOINT/v1/system/config/edgeNative/image" | bash - | ||
echo "curl --insecure -X PUT -H 'Authorization: $AUTH_TOKEN' -H 'Content-Type: application/json' -d '{\"spec\":{\"imagesHostEndpoint\":\"$IMG_HOST_ENDPOINT\",\"stylusImagesEndpoint\":\"$STYLUS_IMG_ENDPOINT\"}}' https://api. | echo "curl --insecure -X PUT -H 'Authorization: $AUTH_TOKEN' -H 'Content-Type: application/json' -d '{\"spec\":{\"imagesHostEndpoint\":\"$IMG_HOST_ENDPOINT\",\"stylusImagesEndpoint\":\"$STYLUS_IMG_ENDPOINT\"}}' https://api.$VERTEX_ENDPOINT/v1/system/config/edgeNative/image" | bash - | ||
Latest revision as of 16:38, 11 April 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 Server 24.04.2 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
########################## # Download Edge Binaries # ########################## # Location: RETOOL -> Palette Release -> Vertex Info -> Airgap Binaries -> edge-k3s -> <k8s_version> # Location: RETOOL -> Airgap Binaries -> edge-native-byoi (latest) ############################# ## TRUST HomeLab CA CERTS ## ############################# curl --insecure https://ders-gitlab.dersllc.com/ders/ders-proxy/-/raw/master/AddTrustExternalCARoot.crt > /usr/local/share/ca-certificates/ders-star-ca.crt 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 update-ca-certificates ########################################### # Upload the Binaries into AirGapped Repo # ########################################### # SET VARIABLES export OCI_IMAGE_REGISTRY=harbor.dersllc.com export OCI_IMAGE_BASE=airgap-spectro-images export OCI_PACK_REGISTRY=harbor.dersllc.com export OCI_PACK_BASE=airgap-spectro-packs export K8S_VERSION="1.32.1" export AGENT_VERSION="v4.6.12" ############################# # Install Required Software # ############################# sudo apt-get install jq zstd rsync conntrack docker.io -y snap install oras --classic oras login $OCI_IMAGE_REGISTRY --username 'admin' --password '<Password>' docker login $OCI_IMAGE_REGISTRY -u admin -p '<Password>' bash /nfs/Download/airgap-pack-edge-k3s-$K8S_VERSION.bin --target ./trash export IMAGES=`cat ./trash/docker/images.lst | cut -d ',' -f 2` for i in $IMAGES; \ do \ docker pull --platform arm64 $i; \ docker tag $i $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/$i; \ docker push --platform arm64 $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/$i; \ done rm -rf ./trash bash /nfs/Download/airgap-vertex-pack-edge-native-byoi-2.1.0.bin ########################### # Sync the Repo in Vertex # ########################### # Navigate to: https://paas.dersllc.com/admin/settings/registries/oci # DER's Spectro-Packs -> sync ################################################ # Pull the arm64 agent and push to Airgap Repo # ################################################ docker pull --platform arm64 us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION docker tag us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION docker push --platform arm64 $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION ############################### # Enable Pause Agent Upgrades # ############################### # Navigate to: edge-pi Project -> Project Settings -> Platform -> Platform Settings -> Pause Agent Upgrades
Install Palette Agent
############################################################## # Export the Palette Stylus ARM Agent Container (Air-Gapped) # ############################################################## # Note: The version needed can be found in RETOOL (Palette Release -> Vertex Info -> Components -> stylus) docker pull us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v$AGENT_VERSION docker save us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v$AGENT_VERSION > arm-agent-$AGENT_VERSION.tar ################################## # Download the palette-agent CLI # ################################## export URL=https://github.com/spectrocloud/agent-mode/releases/download/v$AGENT_VERSION/palette-agent-linux-arm64 curl --verbose --location $URL --output palette-agent chmod +x palette-agent ##################### # Install the Agent # ##################### curl --insecure https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/edge/user-data.yaml > user-data #./palette-agent install --source ./arm-agent-$AGENT_VERSION.tar --config "./user-data" --local ./palette-agent install --source $OCI_IMAGE_REGISTRY/$OCI_IMAGE_BASE/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:$AGENT_VERSION --config "./user-data"
Create a Cluster Profile for the Edge Node
########################### # Create New Edge Profile # ########################### # Name: EDGE BASE RKE2 # Version: 1.31.4 # Type: Infrastructure ## # Cloud Type: Edge Native ## # OS Layer: BYOS Edge OS # - Check the Preset radio button for edge # - Values: # Add the following to the yaml # stylusPackage: harbor.dersllc.com/spectro-images/us-docker.pkg.dev/palette-images/edge/stylus-agent-mode-linux-arm64:v4.5.14 # options: # system.uri: "NA" # Add the following: # K8s Layer: Palette Optimized RKE2 # - Version: 1.31.4 # - Values: # Modify all occurrences of docker.io with harbor.dersllc.com/spectro-images/docker.io # Network Layer: Calico # - Values: # Modify all occurrences of us-docker.pkg.dev with harbor.dersllc.com/spectro-images/us-docker.pkg.dev
Create Cluster on Edge Node
################################### # Create Cluster on the Edge Node # ################################### # Navigate to: Clusters -> Create Cluster ## # Cluster Type: Edge Native ## # Name: edge-pi ## # Add Profile: EDGE BASE RKE2 ## # SSH Keys: opsman # NTP Server: 172.16.84.21 # VIP: 172.16.84.35 ## # control-plane-pool configuration # - Allow worker capability (Optional): TRUE # - Architecture: arm64 # - Edge Hosts: edge-pi # DELETE worker-pool configuration ## # FINISH CONFIGURATION
Appendix
Troubleshooting
Error:
time="2025-04-11T16:25:35Z" level=error msg="system image is not defined cannot apply upgrade" version=v4.6.12
Fix:
export VERTEX_ENDPOINT="paas.dersllc.com" export IMG_HOST_ENDPOINT="us-docker.pkg.dev/palette-images/edge" export STYLUS_IMG_ENDPOINT="harbor.dersllc.com/airgap-spectro-images/us-docker.pkg.dev/palette-images-fips/edge" export AUTH_TOKEN=`curl --insecure -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"<password>"}' https://api.$VERTEX_ENDPOINT/v1/auth/syslogin | jq -r '.Authorization'` #echo $AUTH_TOKEN echo "curl --insecure -X GET -H 'Authorization: $AUTH_TOKEN' https://api.$VERTEX_ENDPOINT/v1/system/config/edgeNative/image" | bash - echo "curl --insecure -X PUT -H 'Authorization: $AUTH_TOKEN' -H 'Content-Type: application/json' -d '{\"spec\":{\"imagesHostEndpoint\":\"$IMG_HOST_ENDPOINT\",\"stylusImagesEndpoint\":\"$STYLUS_IMG_ENDPOINT\"}}' https://api.$VERTEX_ENDPOINT/v1/system/config/edgeNative/image" | bash -