Commit 72441f27 authored by Larkin Heintzman's avatar Larkin Heintzman

dorknet ssh updates for remote roslaunch

parent 158d44ab
......@@ -3,7 +3,7 @@ FROM nvcr.io/nvidia/l4t-base:r32.4.3
ENV DEBIAN_FRONTEND="noninteractive"
# ros install, since we need to start with nvcr
RUN apt-get update && apt-get install -y lsb-release curl gnupg ca-certificates nano net-tools
RUN apt-get update && apt-get install -y lsb-release curl gnupg ca-certificates nano net-tools openssh-server
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
#RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
......@@ -14,6 +14,14 @@ RUN apt-get update && apt-get install -y ros-melodic-ros-base python3-catkin-too
# copy over entrypoint
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
# set up ssh server for remote roslaunch option
RUN mkdir /var/run/sshd
RUN echo 'root:Meepp973' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
EXPOSE 22
# and dont forget to run sshd on starting: CMD ["/usr/sbin/sshd", "-D"]
# opencv install
RUN apt-get update && \
apt-get install -y opencv-data libopencv-dev
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: dorknet
labels:
app: cluster
node: dorknet
spec:
replicas: 1
selector:
matchLabels:
node: dorknet
app: cluster
template:
metadata:
labels:
node: dorknet
app: cluster
spec:
hostname: dorknet
tolerations:
- key: "node-role.kubernetes.io/master"
effect: "NoSchedule"
operator: "Exists"
- key: "node-role.kubernetes.io/control-plane"
effect: "NoSchedule"
operator: "Exists"
- key: "node.kubernetes.io/disk-pressure"
effect: "NoSchedule"
operator: "Exists"
volumes:
- name: image-storage
hostPath:
path: /home/larkin/Downloads
terminationGracePeriodSeconds: 3
containers:
- name: dorknet
securityContext:
privileged: true
volumeMounts:
- name: image-storage
mountPath: /tmp
image: localhost:5000/dorknet:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "source /opt/ros/noetic/setup.bash && source /catkin_ws/devel/setup.bash && echo ready && /usr/sbin/sshd -D"]
ports:
- containerPort: 11311
name: dorkport
nodeSelector:
kubernetes.io/hostname: mario
# kubernetes.io/hostname: neruda
# kubernetes.io/hostname: sentinel
---
apiVersion: v1
kind: Service
metadata:
name: service-dorknet
labels:
app: cluster
node: dorknet
spec:
clusterIP: None
ports:
- port: 11311
name: dorkport
selector:
node: dorknet
app: cluster
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