Skip to content

Proposed RKE to RKE2 changes from the dropped Mentor #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ENV["TERM"]="linux"
Vagrant.configure("2") do |config|

# Use any version shown here https://app.vagrantup.com/opensuse/boxes/Leap-15.4.x86_64
config.vm.box = "opensuse/Leap-15.4.x86_64"
config.vm.box_version = "15.4.13.7"
config.vm.box = "opensuse/Leap-15.6.x86_64"
config.vm.box_version = "15.6.13.356"

# st the static IP for the vagrant box
config.vm.network "private_network", ip: "192.168.50.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ LABEL maintainer="[email protected]"
#define version
LABEL version="V1"

# create a directory to work in
RUN mkdir udacity \
&& cd udacity
# create a directory to work in (using mkdir -p to avoid errors)
RUN mkdir -p /udacity

# Set the working directory for subsequent instructions
WORKDIR /udacity

#install zypper
RUN zypper refs && zypper refresh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ENV["TERM"]="linux"
Vagrant.configure("2") do |config|

# Use any version shown here https://app.vagrantup.com/opensuse/boxes/Leap-15.4.x86_64
config.vm.box = "opensuse/Leap-15.4.x86_64"
config.vm.box_version = "15.4.13.7"
config.vm.box = "opensuse/Leap-15.6.x86_64"
config.vm.box_version = "15.6.13.356"

# st the static IP for the vagrant box
config.vm.network "private_network", ip: "192.168.50.4"
Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ Vagrant.configure("2") do |config|
# set base image for the vagrant box
# config.vm.box = "opensuse/Leap-15.2.x86_64"
# Use any version shown here https://app.vagrantup.com/opensuse/boxes/Leap-15.4.x86_64
config.vm.box = "opensuse/Leap-15.4.x86_64"
config.vm.box_version = "15.4.13.7"
config.vm.hostname = "node#{i}"
config.vm.box = "opensuse/Leap-15.6.x86_64"
config.vm.box_version = "15.6.13.356"

# Set a unique hostname for each node
node.vm.hostname = "node#{i}"

# set the static IP for the vagrant box
node.vm.network "private_network", ip: "192.168.50.10#{i}"
# configure the parameters for VirtualBox provider
node.vm.provider "virtualbox" do |v|
v.name = "node#{i}"
v.memory = 2048
v.memory = 4096
v.cpus = 2
end
# Bootstrap the machine
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
token: YOUR_SHARED_TOKEN
server: https://192.168.50.101:9345
node-name: node2
node-ip: 192.168.50.102
# profile: cis
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ systemctl enable docker
usermod -G docker -a $USER
systemctl restart docker

echo "[TASK 2] Disable firewalld"
systemctl stop firewalld
systemctl disable firewalld
# echo "[TASK 2] Disable firewalld"
# systemctl stop firewalld
# systemctl disable firewalld

echo "[TASK 3] Disable apparmor"
systemctl stop apparmor
systemctl disable apparmor
echo "[TASK 3] Install apparmor"
zypper --non-interactive install apparmor-parser

echo "[TASK 4] Set up rke user"
useradd rke
usermod -a -G docker rke
systemctl restart docker
# echo "[TASK 4] Set up rke user"
# useradd rke
# usermod -a -G docker rke
# systemctl restart docker

echo "[TASK 5] Copy auth_keys for rke user"
mkdir -p /home/rke/.ssh
usermod -d /home/rke/ rke
cp /root/.ssh/authorized_keys /home/rke/.ssh
chown rke /home/rke -R
# echo "[TASK 5] Copy auth_keys for rke user"
# mkdir -p /home/rke/.ssh
# usermod -d /home/rke/ rke
# cp /root/.ssh/authorized_keys /home/rke/.ssh
# chown rke /home/rke -R

echo "[TASK 6] Install kubectl"
# Download and install kubectl
curl -LO "https://dl.k8s.io/release/v1.32.2/bin/linux/amd64/kubectl"
sudo mv kubectl /usr/local/bin/
sudo chmod +x /usr/local/bin/kubectl
echo "kubectl installed successfully."
Loading
Loading