forked from inovex/lfs458-course-prep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d795098
commit f54426a
Showing
9 changed files
with
116 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ mail/mail_template.txt | |
mail/mail_template_en.txt | ||
mail/mail_info.yaml | ||
passwords | ||
solutions.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,33 @@ users: | |
ssh_authorized_keys: | ||
- ${SSH_PUB_KEY} | ||
write_files: | ||
%{ if SOLUTIONS_PATCH != "" } | ||
- path: "/tmp/solutions.patch" | ||
permissions: "0666" | ||
encoding: b64 | ||
content: ${SOLUTIONS_PATCH} | ||
%{ endif } | ||
- path: "/tmp/download_solutions.sh" | ||
permissions: "0700" | ||
content: | | ||
#!/bin/bash | ||
if [[ "${SOLUTIONS_URL}" =~ https://.+:[email protected]/cm/.+SOLUTIONS.tar.+ ]] | ||
then | ||
echo "downloading solutions from ${SOLUTIONS_URL}" | ||
wget -P /tmp -q ${SOLUTIONS_URL} | ||
echo "unpack solutions" | ||
tar -xvf /tmp/*SOLUTIONS.tar* -C /home/${DEFAULT_USER}/ | ||
echo "chown solutions to ${DEFAULT_USER}" | ||
chown -R ${DEFAULT_USER}:users /home/${DEFAULT_USER}/LF* | ||
if [[ -f /tmp/solutions.patch ]] | ||
then | ||
echo "trying to patch solutions" | ||
patch -d /home/${DEFAULT_USER} -p0 < /tmp/solutions.patch | ||
fi | ||
else | ||
echo "SOLUTIONS_URL invalid or username password part missing" | ||
fi | ||
- path: "/etc/vim/vimrc.local" | ||
permissions: "0744" | ||
content: | | ||
|
@@ -36,6 +63,9 @@ write_files: | |
set shiftwidth=2 | ||
set softtabstop=2 | ||
runcmd: | ||
- /tmp/download_solutions.sh | ||
|
||
power_state: | ||
mode: reboot | ||
timeout: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff -ruN LFD459/SOLUTIONS/s_02/k8sWorker.sh LFD459p/SOLUTIONS/s_02/k8sWorker.sh | ||
--- LFD459/SOLUTIONS/s_02/k8sWorker.sh 2022-02-24 20:24:03.000000000 +0000 | ||
+++ LFD459p/SOLUTIONS/s_02/k8sWorker.sh 2022-05-20 12:33:07.621080542 +0000 | ||
@@ -47,7 +47,7 @@ | ||
sudo apt-get update | ||
|
||
# Install cri-o | ||
-sudo apt-get install -y cri-o cri-o-runc podman buildah | ||
+sudo apt-get install -y cri-o cri-o-runc podman | ||
|
||
sleep 3 | ||
|
||
diff -ruN LFD459/SOLUTIONS/s_02/k8scp.sh LFD459p/SOLUTIONS/s_02/k8scp.sh | ||
--- LFD459/SOLUTIONS/s_02/k8scp.sh 2022-02-24 20:24:03.000000000 +0000 | ||
+++ LFD459p/SOLUTIONS/s_02/k8scp.sh 2022-05-20 12:32:55.557075552 +0000 | ||
@@ -48,7 +48,7 @@ | ||
sudo apt-get update | ||
|
||
# Install cri-o | ||
-sudo apt-get install -y cri-o cri-o-runc podman buildah | ||
+sudo apt-get install -y cri-o cri-o-runc podman | ||
|
||
sleep 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,8 @@ course_type = "lfs458" | |
instances = ["cp", "worker"] | ||
# instances = ["cp", "secondcp", "thirdcp", "ha-proxy", "worker"] | ||
network_range = "172.128.0.0/24" | ||
wetty_config = { enabled = false, | ||
trainer_email = "[email protected]" | ||
} | ||
|
||
#solutions_url = "https://username:[email protected]/cm/LFD459/LFD459_V1.23.1-u1_SOLUTIONS.tar.xz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters