Commit 39f8ecc5 authored by Larkin Heintzman's avatar Larkin Heintzman

working video stream

parent 01ed2a3d
...@@ -20,7 +20,7 @@ chown $(id -u):$(id -g) $HOME/.kube/config ...@@ -20,7 +20,7 @@ chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f flannel.yml kubectl apply -f flannel.yml
kubectl taint nodes --all node-role.kubernetes.io/master- kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl label nodes $HOSTNAME name=base # kubectl label nodes $HOSTNAME name=base
# print join command again to clipboard # print join command again to clipboard
# kubeadm token create --print-join-command > ./tmpJoinCommand.txt # kubeadm token create --print-join-command > ./tmpJoinCommand.txt
......
...@@ -95,6 +95,9 @@ RUN touch /opt/ros/noetic/kube_setup.sh \ ...@@ -95,6 +95,9 @@ RUN touch /opt/ros/noetic/kube_setup.sh \
RUN chown ssher /opt/ros/noetic/kube_setup.sh \ RUN chown ssher /opt/ros/noetic/kube_setup.sh \
&& chmod +x /opt/ros/noetic/kube_setup.sh && chmod +x /opt/ros/noetic/kube_setup.sh
# make spot for the video feed to come in
# RUN mkdir -p /dev/videoSource
# set up ssh stuff # set up ssh stuff
RUN mkdir -p /home/ssher/.ssh RUN mkdir -p /home/ssher/.ssh
# COPY selfkey.pub /home/ssher/.ssh/authorized_keys # COPY selfkey.pub /home/ssher/.ssh/authorized_keys
......
...@@ -22,11 +22,6 @@ spec: ...@@ -22,11 +22,6 @@ spec:
- name: image-storage - name: image-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: image-volume-claim claimName: image-volume-claim
# nfs:
# server: service-nfs # nfs server ip
# path: /
# hostPath:
# path: /home/llh/imageDump
containers: containers:
- name: base - name: base
securityContext: securityContext:
...@@ -42,7 +37,7 @@ spec: ...@@ -42,7 +37,7 @@ spec:
- containerPort: 11311 - containerPort: 11311
name: baseport name: baseport
nodeSelector: nodeSelector:
name: base kubernetes.io/hostname: pop-os
--- ---
apiVersion: v1 apiVersion: v1
......
...@@ -22,6 +22,14 @@ spec: ...@@ -22,6 +22,14 @@ spec:
- name: image-storage - name: image-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: image-volume-claim claimName: image-volume-claim
# - name: video-source
# persistentVolumeClaim:
# readOnly: true
# claimName: video-volume-claim
- name: video-source
hostPath:
path: /dev/video0
- name: ttyacm - name: ttyacm
hostPath: hostPath:
path: /dev/ttyACM0 path: /dev/ttyACM0
...@@ -39,6 +47,13 @@ spec: ...@@ -39,6 +47,13 @@ spec:
mountPath: /dev/dji_usb mountPath: /dev/dji_usb
- name: image-storage - name: image-storage
mountPath: /home/ssher/imageNFS 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 image: llh/drone:v0
command: [ "/bin/bash"] # You need to run some task inside a 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 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
...@@ -51,7 +66,7 @@ spec: ...@@ -51,7 +66,7 @@ spec:
- name: ROS_HOSTNAME - name: ROS_HOSTNAME
value: service-drone value: service-drone
nodeSelector: nodeSelector:
kubernetes.io/hostname: neruda kubernetes.io/hostname: pop-os
# kubernetes.io/hostname: neruda # temp for testing purposes # kubernetes.io/hostname: neruda # temp for testing purposes
--- ---
......
...@@ -17,8 +17,3 @@ spec: ...@@ -17,8 +17,3 @@ spec:
path: /home/llh/imageNFS path: /home/llh/imageNFS
server: 192.168.1.230 server: 192.168.1.230
readOnly: false readOnly: false
# nodeAffinity:
# required:
# nodeSelectorTerms:
# - matchExpressions:
# - {key: kubernetes.io/hostname, operator: In, values: [pop-os]}
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