Skip to content

Commit

Permalink
Feature/add node red (#16)
Browse files Browse the repository at this point in the history
* Node-RED WIP

* Docker drag doesn't appear to be working

* Bump image size to 12 GB

* Do correct volume mapping

* Clone main

* Grab from Dropbox since docker-drag fails a good bit
  • Loading branch information
dbaldwin authored Nov 9, 2024
1 parent 52f8007 commit 96b5b79
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 3 additions & 1 deletion resources/first_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ chown -R dexi:dexi /home/dexi

# Load DroneBlocks image from provision script since Docker isn't readily available during provisioning
docker load < /home/dexi/docker-drag/droneblocks_dexi-droneblocks.tar
docker run -d --restart unless-stopped -p 80:80 droneblocks/dexi-droneblocks:latest
docker load < /home/dexi/docker-drag/droneblocks_dexi-node-red.tar
docker run -d --restart unless-stopped -p 80:80 --name dexi-droneblocks droneblocks/dexi-droneblocks:latest
docker run -d --restart unless-stopped -p 1880:1880 -v /home/dexi/node-red-dexi/flows:/data --name dexi-node-red droneblocks/dexi-node-red:latest
rm -rf /home/dexi/docker-drag

# Boot faster
Expand Down
24 changes: 21 additions & 3 deletions resources/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ colcon build --packages-select web_video_server # To make pi camera available on
colcon build --packages-select apriltag_ros
#######################################################################################

################ clone node-red project for use in first_boot.sh ######################
git clone https://github.com/DroneBlocks/node-red-dexi /home/dexi/node-red-dexi
#######################################################################################

#################################### clone ark repo ###################################
git clone https://github.com/DroneBlocks/ark_companion_scripts.git /home/dexi/ark_companion_scripts
cd /home/dexi/ark_companion_scripts
Expand All @@ -142,10 +146,24 @@ pip3 install adafruit-circuitpython-neopixel
pip3 install adafruit-circuitpython-led-animation
#######################################################################################

pip3 install requests
git clone https://github.com/NotGlop/docker-drag /home/dexi/docker-drag
# For some reason this is continuously failing but works fine standalone
# pip3 install requests
# git clone https://github.com/NotGlop/docker-drag /home/dexi/docker-drag
# cd /home/dexi/docker-drag
# python3 docker_pull.py droneblocks/dexi-droneblocks:latest
# python3 docker_pull.py droneblocks/dexi-node-red:latest

mkdir /home/dexi/docker-drag
cd /home/dexi/docker-drag
python3 docker_pull.py droneblocks/dexi-droneblocks:latest
curl -L -o droneblocks_dexi-droneblocks.tar "https://www.dropbox.com/scl/fi/ag6tml3hpqtg4g0olrkcc/droneblocks_dexi-droneblocks.tar?rlkey=yzr631iv0dv0dgjtzcolbozmg&st=eeaigvva&dl=1"
curl -L -o droneblocks_dexi-node-red.tar "https://www.dropbox.com/scl/fi/a51ndr8s8xgz5swqu0rp8/droneblocks_dexi-node-red.tar?rlkey=2lphmkcbgcwtebws75mh40lbr&st=jmk2s8tc&dl=1"
#######################################################################################

########################## PX4 ROS Node for Navigation ################################
# git clone https://github.com/dbaldwin/PX4-ROS-Node /home/dexi/PX4-ROS-Node
# pip3 install pysm
# pip3 install flask
#######################################################################################

############################### provision runonce daemon ##############################
# creates a job that only runs once (AKA on first boot)
Expand Down
2 changes: 1 addition & 1 deletion ubuntu_server_22.04_arm64.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source "arm" "ubuntu" {
file_unarchive_cmd = ["xz", "--decompress", "$ARCHIVE_PATH"]
image_build_method = "resize"
image_path = "dexi_ubuntu_22.img"
image_size = "10G"
image_size = "12G"
image_type = "dos"
image_partitions {
name = "boot"
Expand Down

0 comments on commit 96b5b79

Please sign in to comment.