Commit efa90a1c authored by Your Name's avatar Your Name

image pipeline readme updates

parent 39f8ecc5
This diff is collapsed.
......@@ -29,7 +29,7 @@ kubeadm token create --print-join-command | xclip -selection clipboard
# save that file to clipboard
# cat ./tmpJoinCommand.txt | xclip -selection clipboard
# rm ./tmpJoinCommand.txt
echo "set up done, join command copied (can ctrl-c now)"
echo "set up done, join command copied"
exit 0
# dang pod cidr decided not to be assigned correctly, so follow links to assign it manually:
......
......@@ -7,6 +7,8 @@ RUN apt-get update && apt-get install -y libsdl2-dev libusb-1.0-0-dev build-esse
RUN pip3 install git+https://github.com/catkin/catkin_tools.git
RUN pip install opencv-python
RUN echo "freshenst"
# clone ros package repo
ENV ROS_WS /opt/ros_ws
RUN mkdir -p $ROS_WS/src
......@@ -32,6 +34,9 @@ COPY ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
RUN useradd -m -s /bin/bash -p $(openssl passwd -1 password) ssher
RUN usermod -aG sudo ssher
# add ssher user to the video group to allow streaming
RUN adduser ssher video
RUN usermod -a -G video ssher
RUN chmod 755 /usr/local/bin/ros_entrypoint.sh
......@@ -44,9 +49,7 @@ RUN echo "ssh-keyscan -H service-drone >> /home/ssher/.ssh/known_hosts" >> /home
# put rsa key in image
RUN mkdir -p /home/ssher/.ssh
# COPY selfkey.pub /home/ssher/.ssh/authorized_keys
RUN chown -R ssher:ssher /home/ssher/.ssh
# RUN chmod 600 /home/ssher/.ssh/authorized_keys
RUN service ssh start
EXPOSE 22
......
......@@ -38,6 +38,8 @@ RUN cmake .. \
WORKDIR /usr/local/include/
RUN git clone https://github.com/libigl/eigen.git && mv eigen/ Eigen3/ && cp -r ./Eigen3/Eigen/ ./Eigen/
RUN echo "refreshest"
# clone ros package repo
ENV ROS_WS /opt/ros_ws
RUN mkdir -p $ROS_WS/src
......@@ -68,6 +70,10 @@ COPY ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
RUN useradd -m -s /bin/bash -p $(openssl passwd -1 password) ssher
RUN usermod -aG sudo ssher
# add ssher user to the video group to allow streaming
RUN adduser ssher video
RUN usermod -a -G video ssher
RUN chmod 755 /usr/local/bin/bashCheckRoscore.sh && chmod 755 /usr/local/bin/ros_entrypoint.sh
# make ssh-ing easier
......@@ -100,9 +106,7 @@ RUN chown ssher /opt/ros/noetic/kube_setup.sh \
# set up ssh stuff
RUN mkdir -p /home/ssher/.ssh
# COPY selfkey.pub /home/ssher/.ssh/authorized_keys
RUN chown -R ssher:ssher /home/ssher/.ssh
# RUN chmod 600 /home/ssher/.ssh/authorized_keys
RUN service ssh start
EXPOSE 22
......
......@@ -22,14 +22,9 @@ spec:
- name: image-storage
persistentVolumeClaim:
claimName: image-volume-claim
# - name: video-source
# persistentVolumeClaim:
# readOnly: true
# claimName: video-volume-claim
- name: video-source
hostPath:
path: /dev/video0
- name: ttyacm
hostPath:
path: /dev/ttyACM0
......@@ -49,11 +44,6 @@ spec:
mountPath: /home/ssher/imageNFS
- name: video-source
mountPath: /dev/video99
# volumeDevices:
# - name: video-source
# devicePath: /dev/videoSource
# - name: video-source
# mountPath: /home/ssher/videoSource
image: llh/drone:v0
command: [ "/bin/bash"] # You need to run some task inside a
args: ["-c", "source /opt/ros_ws/devel/setup.bash && sudo service ssh restart && /usr/local/bin/ros_entrypoint.sh && while true; do sleep 10; done;"] # Our simple program just sleeps inside
......@@ -66,8 +56,8 @@ spec:
- name: ROS_HOSTNAME
value: service-drone
nodeSelector:
kubernetes.io/hostname: pop-os
# kubernetes.io/hostname: neruda # temp for testing purposes
# kubernetes.io/hostname: pop-os # to run on control plane
kubernetes.io/hostname: neruda
---
apiVersion: v1
......
apiVersion: v1
kind: PersistentVolume
metadata:
name: video-volume
spec:
storageClassName: video
volumeMode: Block
capacity:
storage: 500Gi
local:
path: /dev/video0
accessModes:
- ReadOnlyMany
persistentVolumeReclaimPolicy: Retain
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- pop-os
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: video-volume-claim
spec:
storageClassName: video
accessModes:
- ReadOnlyMany
volumeName: video-volume
volumeMode: Block
resources:
requests:
storage: 500Gi
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: video
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment