Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ROS-Kubernetes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
ROS-Kubernetes
Commits
59a8d1bd
Commit
59a8d1bd
authored
3 years ago
by
Larkin Heintzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general clean up and ssh serving
parent
28b3b53d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
25 deletions
+28
-25
clusterStartup.sh
clusterStartup.sh
+1
-1
Dockerfile
docker/base/Dockerfile
+4
-14
selfkey.pub
docker/base/selfkey.pub
+0
-1
Dockerfile
docker/drone/Dockerfile
+20
-6
base-deployment.yaml
kubernetes/base-deployment.yaml
+1
-1
drone-deployment.yaml
kubernetes/drone-deployment.yaml
+2
-2
No files found.
clusterStartup.sh
View file @
59a8d1bd
...
@@ -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
=
master
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
...
...
This diff is collapsed.
Click to expand it.
docker/base/Dockerfile
View file @
59a8d1bd
...
@@ -2,7 +2,7 @@ ARG from=ros:noetic
...
@@ -2,7 +2,7 @@ ARG from=ros:noetic
FROM
${from}
FROM
${from}
RUN
apt-get update
&&
apt-get
install
-y
python3-pip git ca-certificates
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
sudo
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
RUN
pip3
install
git+https://github.com/catkin/catkin_tools.git
RUN
pip3
install
git+https://github.com/catkin/catkin_tools.git
...
@@ -23,13 +23,10 @@ RUN catkin config \
...
@@ -23,13 +23,10 @@ RUN catkin config \
--extend
/opt/ros/
$ROS_DISTRO
&&
\
--extend
/opt/ros/
$ROS_DISTRO
&&
\
catkin build
--cmake-args
-DCMAKE_CXX_FLAGS
=
"-std=c++17"
catkin build
--cmake-args
-DCMAKE_CXX_FLAGS
=
"-std=c++17"
# might need something different in the bash script
# COPY bashCheckRoscore.sh /usr/local/bin/bashCheckRoscore.sh
COPY
ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
COPY
ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
RUN
useradd
-m
-s
/bin/bash
-p
$(
openssl passwd
-1
password
)
webssh
RUN
useradd
-m
-s
/bin/bash
-p
$(
openssl passwd
-1
password
)
webssh
RUN
chmod
755 /usr/local/bin/ros_entrypoint.sh
&&
\
RUN
chmod
755 /usr/local/bin/ros_entrypoint.sh
/usr/local/bin/ros_entrypoint.sh
# make ssh-ing easier
# make ssh-ing easier
RUN
echo
"source /opt/ros/noetic/setup.bash"
>>
/home/webssh/.bashrc
RUN
echo
"source /opt/ros/noetic/setup.bash"
>>
/home/webssh/.bashrc
...
@@ -37,12 +34,9 @@ RUN echo "source /opt/ros_ws/devel/setup.bash" >> /home/webssh/.bashrc
...
@@ -37,12 +34,9 @@ RUN echo "source /opt/ros_ws/devel/setup.bash" >> /home/webssh/.bashrc
# put rsa key in image
# put rsa key in image
RUN
mkdir
-p
/home/webssh/.ssh
RUN
mkdir
-p
/home/webssh/.ssh
COPY
selfkey.pub /home/webssh/.ssh/authorized_keys
#
COPY selfkey.pub /home/webssh/.ssh/authorized_keys
RUN
chown
-R
webssh:webssh /home/webssh/.ssh
RUN
chown
-R
webssh:webssh /home/webssh/.ssh
RUN
chmod
600 /home/webssh/.ssh/authorized_keys
# RUN chmod 600 /home/webssh/.ssh/authorized_keys
# RUN echo "Host remotehost\n\tStrictHostKeyChecking no\n" >> /home/webssh/.ssh/config
RUN
service ssh start
RUN
service ssh start
EXPOSE
22
EXPOSE
22
...
@@ -50,9 +44,5 @@ ENTRYPOINT ["/usr/local/bin/ros_entrypoint.sh"]
...
@@ -50,9 +44,5 @@ ENTRYPOINT ["/usr/local/bin/ros_entrypoint.sh"]
CMD
["/usr/sbin/sshd","-D"]
CMD
["/usr/sbin/sshd","-D"]
CMD
["bash"]
CMD
["bash"]
# CMD ["service ssh start"]
# run ros package launch file
# run ros package launch file
# CMD ["roslaunch", "roscpp_tutorials", "talker_listener.launch"]
# CMD ["roslaunch", "roscpp_tutorials", "talker_listener.launch"]
This diff is collapsed.
Click to expand it.
docker/base/selfkey.pub
deleted
100644 → 0
View file @
28b3b53d
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC+1wxuQlF2SEKtg7g2KllzaBp7Fx3bbkrdNVeMtbthr63CLsqane27yCKV2xCbQbn5BTBbyhjPFI3yJL2ohYH3POMqBRl/QriJ9a8ATDC2TofMKIBJrtZXbLCg8exQvHwJbtVnKZk7IBmySDl8lVEtPbAyvbDt15bHcDVdc7hOQBV5u7nAAQAZTBwmf8bDywrri0bX2ZPuFgtFHKoVV2HrB7gY+xghlkXaYtf1I37T9dFEOHy7RUA2q6ykBlGQBr/2vOKuvKa+QkpWVz5R3EHkaK7Xqsxv20VAceIo9h+RMoW/e1T+RJmQKm5JpeBC1Io5KYzKoHzDb1wd48vPZtqtD9kVrC97pvLMhaUcPk3WPP1TWxr9j+drUMMOLnY6JjrLTOKB6bO/AIfFTXIFY9L6zDEibFJOnMOvLNgf8dsF72qQFpBE4rAeVUTwYjvj2QRtHMIiAYjh4ieE1qHiwERYKsjUNvsKAihvo+v+TbwLSwj97ZAsH3KEvjjmpFAnY3k= llh@pop-os
This diff is collapsed.
Click to expand it.
docker/drone/Dockerfile
View file @
59a8d1bd
...
@@ -5,10 +5,9 @@ FROM ${from}
...
@@ -5,10 +5,9 @@ FROM ${from}
# python-catkin-tools \
# python-catkin-tools \
# && rm -rf /var/lib/apt/lists/*
# && 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
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
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
RUN
apt-get update
&&
apt-get
install
-y
ros-noetic-tf
RUN
apt-get update
&&
apt-get
install
-y
ros-noetic-tf
RUN
pip3
install
git+https://github.com/catkin/catkin_tools.git
RUN
pip3
install
git+https://github.com/catkin/catkin_tools.git
# set up udev and usb stuff
# set up udev and usb stuff
...
@@ -35,14 +34,13 @@ RUN cmake .. \
...
@@ -35,14 +34,13 @@ RUN cmake .. \
# clone eigen into correct location and rename
# clone eigen into correct location and rename
WORKDIR
/usr/local/include/
WORKDIR
/usr/local/include/
RUN
git clone https://git
lab.com/libeigen/eigen.git
&&
mv
eigen/ Eigen3
/
RUN
git clone https://git
hub.com/libigl/eigen.git
&&
mv
eigen/ Eigen3/
&&
cp
-r
./Eigen3/Eigen/ ./Eigen
/
# clone ros package repo
# clone ros package repo
RUN
echo
"test"
ENV
ROS_WS /opt/ros_ws
ENV
ROS_WS /opt/ros_ws
RUN
mkdir
-p
$ROS_WS
/src
RUN
mkdir
-p
$ROS_WS
/src
WORKDIR
$ROS_WS
WORKDIR
$ROS_WS
RUN
git
-C
src clone http
s://git.caslab.ece.vt.edu/hlarkin3/drone-ros-packages/
-b
replicants
RUN
git
-C
src clone http
://git.caslab.ece.vt.edu/hlarkin3/drone-ros-packages.git
-b
replicants
# install ros package dependencies
# install ros package dependencies
RUN
apt-get update
&&
\
RUN
apt-get update
&&
\
...
@@ -60,10 +58,26 @@ RUN catkin config \
...
@@ -60,10 +58,26 @@ RUN catkin config \
COPY
bashCheckRoscore.sh /usr/local/bin/bashCheckRoscore.sh
COPY
bashCheckRoscore.sh /usr/local/bin/bashCheckRoscore.sh
COPY
ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
COPY
ros_entrypoint.sh /usr/local/bin/ros_entrypoint.sh
RUN
useradd
-m
-s
/bin/bash
-p
$(
openssl passwd
-1
password
)
ssher
RUN
chmod
755 /usr/local/bin/bashCheckRoscore.sh
&&
chmod
755 /usr/local/bin/ros_entrypoint.sh
RUN
chmod
755 /usr/local/bin/bashCheckRoscore.sh
&&
chmod
755 /usr/local/bin/ros_entrypoint.sh
# make ssh-ing easier
RUN
echo
"source /opt/ros/noetic/setup.bash"
>>
/home/ssher/.bashrc
RUN
echo
"source /opt/ros_ws/devel/setup.bash"
>>
/home/ssher/.bashrc
# also need to put env variables in here
RUN
echo
"export ROS_MASTER_URI=http://service-master:11311"
>>
/home/ssher/.bashrc
RUN
echo
"export ROS_HOSTNAME=service-drone"
>>
/home/ssher/.bashrc
# 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
sudo
service ssh start
EXPOSE
22
ENTRYPOINT
["/usr/local/bin/ros_entrypoint.sh"]
ENTRYPOINT
["/usr/local/bin/ros_entrypoint.sh"]
# CMD ["
"]
CMD
["/usr/sbin/sshd","-D
"]
CMD
["bash"]
CMD
["bash"]
# run ros package launch file
# run ros package launch file
...
...
This diff is collapsed.
Click to expand it.
kubernetes/base-deployment.yaml
View file @
59a8d1bd
...
@@ -28,7 +28,7 @@ spec:
...
@@ -28,7 +28,7 @@ spec:
-
containerPort
:
11311
-
containerPort
:
11311
name
:
baseport
name
:
baseport
nodeSelector
:
nodeSelector
:
name
:
master
name
:
base
---
---
...
...
This diff is collapsed.
Click to expand it.
kubernetes/drone-deployment.yaml
View file @
59a8d1bd
...
@@ -30,7 +30,7 @@ spec:
...
@@ -30,7 +30,7 @@ spec:
name
:
ttydji
name
:
ttydji
image
:
llh/drone:v0
image
:
llh/drone:v0
command
:
[
"
/bin/bash"
]
command
:
[
"
/bin/bash"
]
args
:
[
"
-c"
,
"
source
/opt/ros_ws/devel/setup.bash
&&
/usr/local/bin/bashCheckRoscore.sh
&&
rostopic
pub
-r
1
armReady
std_msgs/String
'ready'"
]
args
:
[
"
-c"
,
"
source
/opt/ros_ws/devel/setup.bash
&&
/usr/local/bin/
ros_entrypoint.sh
&&
sudo
service
ssh
restart
&&
/usr/local/bin/
bashCheckRoscore.sh
&&
rostopic
pub
-r
1
armReady
std_msgs/String
'ready'"
]
# args: ["-c", "source /opt/ros_ws/devel/setup.bash && /usr/local/bin/bashCheckRoscore.sh"]
# args: ["-c", "source /opt/ros_ws/devel/setup.bash && /usr/local/bin/bashCheckRoscore.sh"]
ports
:
ports
:
-
containerPort
:
11311
-
containerPort
:
11311
...
@@ -41,7 +41,7 @@ spec:
...
@@ -41,7 +41,7 @@ spec:
-
name
:
ROS_HOSTNAME
-
name
:
ROS_HOSTNAME
value
:
service-drone
value
:
service-drone
nodeSelector
:
nodeSelector
:
name
:
plath
name
:
base
volumes
:
volumes
:
-
name
:
ttyacm
-
name
:
ttyacm
hostPath
:
hostPath
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment