Commit 01ed2a3d authored by Larkin Heintzman's avatar Larkin Heintzman

initial working nfs solution

parent 040f522b
......@@ -2,8 +2,7 @@ ARG from=ros:noetic
FROM ${from}
RUN apt-get update && apt-get install -y python3-pip git ca-certificates
RUN apt-get update && apt-get install -y libsdl2-dev libusb-1.0-0-dev build-essential cmake && apt-get install -y openssh-server iputils-ping net-tools sudo nano ros-noetic-cv-bridge
RUN echo "el freshen up"
RUN apt-get update && apt-get install -y libsdl2-dev libusb-1.0-0-dev build-essential cmake && apt-get install -y openssh-server iputils-ping net-tools sudo nano ros-noetic-cv-bridge v4l-utils
RUN pip3 install git+https://github.com/catkin/catkin_tools.git
RUN pip install opencv-python
......
......@@ -5,9 +5,8 @@ FROM ${from}
# python-catkin-tools \
# && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3-pip git ca-certificates
RUN apt-get update && apt-get install -y libsdl2-dev libusb-1.0-0-dev build-essential cmake ffmpeg python3-opencv libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev iputils-ping net-tools openssh-server sudo nano ros-noetic-cv-bridge
RUN apt-get update && apt-get install -y libsdl2-dev libusb-1.0-0-dev build-essential cmake ffmpeg python3-opencv libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev iputils-ping net-tools openssh-server sudo nano ros-noetic-cv-bridge v4l-utils
RUN apt-get update && apt-get install -y ros-noetic-tf
# RUN echo "blah"
RUN pip3 install git+https://github.com/catkin/catkin_tools.git
RUN pip install opencv-python
......
......@@ -6,10 +6,7 @@ metadata:
app: cluster
node: base
spec:
# serviceName: service-master # must match metadata-name on headless service below
# statefulset.kubernetes.io/pod-name: service-master
replicas: 1
# The deployment handles all matching templated pods
selector:
matchLabels:
node: base
......@@ -21,20 +18,31 @@ spec:
node: base
spec:
hostname: service-master
volumes:
- name: image-storage
persistentVolumeClaim:
claimName: image-volume-claim
# nfs:
# server: service-nfs # nfs server ip
# path: /
# hostPath:
# path: /home/llh/imageDump
containers:
- name: base
securityContext:
privileged: true
volumeMounts:
- name: image-storage
mountPath: /home/ssher/imageNFS
image: llh/basestation:v0
command: ["/bin/bash"]
args: ["-c", "source /opt/ros_ws/devel/setup.bash && /usr/local/bin/ros_entrypoint.sh && roscore"]
ports:
- containerPort: 11311
name: baseport
# env:
# - name: ROS_IP
# value: service-master
nodeSelector:
name: base
---
apiVersion: v1
......@@ -45,11 +53,6 @@ metadata:
app: cluster
node: base
spec:
# type: LoadBalancer
# externalTrafficPolicy: Local
selector:
# statefulset.kubernetes.io/pod-name: service-master
node: base
clusterIP: None
ports:
- port: 11311
......
......@@ -6,10 +6,7 @@ metadata:
app: cluster
node: drone
spec:
# serviceName: "service-drone"
# statefulset.kubernetes.io/pod-name: service-drone
replicas: 1
# The deployment handles all matching templated pods
selector:
matchLabels:
node: drone
......@@ -17,29 +14,34 @@ spec:
template:
metadata:
labels:
app: cluster
node: drone
app: cluster
spec:
hostname: service-drone
volumes:
- name: image-storage
persistentVolumeClaim:
claimName: image-volume-claim
- name: ttyacm
hostPath:
path: /dev/ttyACM0
- name: ttydji
hostPath:
path: /dev/dji_usb
containers:
- name: drone
securityContext:
privileged: true
volumeMounts:
- mountPath: /dev/ttyACM0
name: ttyacm
- mountPath: /dev/dji_usb
name: ttydji
- mountPath: /dev/video0
name: devvideo0
- mountPath: /dev/video1
name: devvideo1
- name: ttyacm
mountPath: /dev/ttyACM0
- name: ttydji
mountPath: /dev/dji_usb
- name: image-storage
mountPath: /home/ssher/imageNFS
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
# args: ["-c", "source /opt/ros_ws/devel/setup.bash && /usr/local/bin/ros_entrypoint.sh"]
# command: ["/bin/bash"]
# not running && /usr/local/bin/bashCheckRoscore.sh AND && sudo service ssh restart
ports:
- containerPort: 11311
name: droneport
......@@ -49,21 +51,8 @@ spec:
- name: ROS_HOSTNAME
value: service-drone
nodeSelector:
name: base # temp for testing purposes
volumes:
- name: ttyacm
hostPath:
path: /dev/ttyACM0
- name: ttydji
hostPath:
path: /dev/dji_usb
- name: devvideo0
hostPath:
path: /dev/video0
- name: devvideo1
hostPath:
path: /dev/video1
kubernetes.io/hostname: neruda
# kubernetes.io/hostname: neruda # temp for testing purposes
---
apiVersion: v1
......@@ -74,11 +63,8 @@ metadata:
app: cluster
node: drone
spec:
# type: LoadBalancer
# externalTrafficPolicy: Local
selector:
app: cluster
# statefulset.kubernetes.io/pod-name: service-drone
node: drone
clusterIP: None
ports:
......
apiVersion: v1
kind: PersistentVolume
metadata:
name: image-volume
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: nfs
mountOptions:
- hard
- nfsvers=3
nfs:
path: /home/llh/imageNFS
server: 192.168.1.230
readOnly: false
# nodeAffinity:
# required:
# nodeSelectorTerms:
# - matchExpressions:
# - {key: kubernetes.io/hostname, operator: In, values: [pop-os]}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: image-volume-claim
spec:
storageClassName: nfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
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