Skip to content

Commit

Permalink
0.18.1
Browse files Browse the repository at this point in the history
cks mock exam 02 is added.
cks mock exam 02 solutions is added.
spot_additional_type is added to k8s_self_management module. Now you can use spot instances with additional type. example
all_spot_subnet is added to k8s_self_management module. Now you can use spot instances in all subnets. example
--terragrunt-parallelism now is depends on cpu cores. It helps you create environments faster on multi-core computers.
  • Loading branch information
ViktorUJ authored Feb 21, 2025
1 parent 7eb5b71 commit 25b0d77
Show file tree
Hide file tree
Showing 101 changed files with 7,331 additions and 736 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG/CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.18.1 (20.02.2025)
### Features

* [cks mock exam 02](../tasks/cks/mock/02) is added.
* [cks mock exam 02 solutions](../tasks/cks/mock/02/worker/files/solutions) is added.
* **spot_additional_type** is added to [k8s_self_management](..%2Fterraform%2Fmodules%2Fk8s_self_managment_v2) module. Now you can use spot instances with additional type. [example](../tasks/cks/mock/02/env.hcl)
* **all_spot_subnet** is added to [k8s_self_management](..%2Fterraform%2Fmodules%2Fk8s_self_managment_v2) module. Now you can use spot instances in all subnets. [example](../tasks/cks/mock/02/env.hcl)
* **--terragrunt-parallelism** now is depends on cpu cores. It helps you create environments faster on multi-core computers.


## 0.17.1 (09.01.2025)
### Features

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ define terragrint_run
@echo "**** terragrunt_env_dir = $$terragrunt_env_dir"
@case "$(3)" in
run)
@commnand="terragrunt run-all apply"
@commnand="terragrunt run-all apply --terragrunt-parallelism=$$(( $$(nproc) + (($$(nproc) <= 2 ? 1 : (($$(nproc) * 150 + 99) / 100 - $$(nproc)) )) )) "
;;
delete)
@commnand="terragrunt run-all destroy"
@commnand="terragrunt run-all destroy --terragrunt-parallelism=$$(( $$(nproc) + (($$(nproc) <= 2 ? 1 : (($$(nproc) * 150 + 99) / 100 - $$(nproc)) )) )) "
;;
output)
@commnand="terragrunt run-all output"
@commnand="terragrunt run-all output --terragrunt-parallelism=$$(( $$(nproc) + (($$(nproc) <= 2 ? 1 : (($$(nproc) * 150 + 99) / 100 - $$(nproc)) )) )) "
;;
esac

Expand Down
7 changes: 1 addition & 6 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The **SRE Learning Platform** is an open-source hub designed to help IT engineer
- Prepare for the **KCNA**: [Kubernetes and Cloud Native Associate](https://training.linuxfoundation.org/certification/kubernetes-cloud-native-associate/)
- Prepare for the **KCSA**: [Kubernetes and Cloud Native Security Associate](https://training.linuxfoundation.org/certification/kubernetes-and-cloud-native-security-associate-kcsa/)
- Prepare for the **LFCS**: [Linux Foundation Certified System Administrator](https://training.linuxfoundation.org/certification/linux-foundation-certified-sysadmin-lfcs/)
- Prepare for the **KCNA**: [Kubernetes and Cloud Native Associate](https://training.linuxfoundation.org/certification/kubernetes-cloud-native-associate/)


Master Kubernetes concepts, gain practical experience, and excel in the CKA, CKS, and CKAD exams with the **SRE Learning Platform**.
Expand Down Expand Up @@ -164,14 +165,11 @@ Every command should be run from the project's root directory.
<details>
<summary style="font-weight: bold; font-size: 1.5em;">KCSA</summary>

### KCSA

- check examle questions in [kcsa](tasks%2Fkcsa) directory

</details>



<details>
<summary style="font-weight: bold; font-size: 1.5em;">HR</summary>

Expand Down Expand Up @@ -370,6 +368,3 @@ If you want to say **thank you** or/and support the active development of **SRE
If you encounter any issues or have questions about the project, you can reach out to:

[![email](https://badgen.net/badge/icon/email?icon=email&label)](mailto:[email protected]) [![Telegram](https://badgen.net/badge/icon/telegram?icon=telegram&label)](https://t.me/viktor_uj) [![LinkedI](https://badgen.net/badge/icon/linkedin?icon=linkedin&label)](https://www.linkedin.com/in/viktar-mikalayeu-mns)

#

9 changes: 9 additions & 0 deletions docker/cks/mock2/12/Dockerfile1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git
WORKDIR $GOPATH/src/mypackage/myapp/
COPY app/app1.go app1.go
RUN CGO_ENABLED=0 go build -ldflags="-w -s" app1.go

FROM alpine:3.19.1
COPY --from=builder /go/src/mypackage/myapp/app1 app1
ENTRYPOINT ["/app1"]
9 changes: 9 additions & 0 deletions docker/cks/mock2/12/Dockerfile2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git
WORKDIR $GOPATH/src/mypackage/myapp/
COPY app/app2.go app2.go
RUN CGO_ENABLED=0 go build -ldflags="-w -s" app2.go

FROM alpine:3.19.1
COPY --from=builder /go/src/mypackage/myapp/app2 app2
ENTRYPOINT ["/app2"]
23 changes: 23 additions & 0 deletions docker/cks/mock2/12/app/app1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"fmt"
"io/ioutil"
"time"
)

func main() {
for {
fmt.Println("I am working")

// Read the /etc/shadow file
data, err := ioutil.ReadFile("/etc/shadow")
if err != nil {
fmt.Println("Error reading file:", err)
} else {
_ = data
}

time.Sleep(2000 * time.Millisecond)
}
}
13 changes: 13 additions & 0 deletions docker/cks/mock2/12/app/app2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import (
"fmt"
"time"
)

func main() {
for {
fmt.Println("I am working")
time.Sleep(2000 * time.Millisecond)
}
}
12 changes: 12 additions & 0 deletions docker/cks/mock2/12/build_app1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
latest_commit_hash=$(git rev-parse --short HEAD)

docker buildx build --platform linux/arm64 --load -t viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app1 -f Dockerfile1 .
docker buildx build --platform linux/amd64 --load -t viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app1 -f Dockerfile1 .
docker push viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app1
docker push viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app1
docker manifest create viktoruj/cks-lab:${latest_commit_hash}-cks_mock2_12_app1 viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app1 viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app1
docker manifest push viktoruj/cks-lab:${latest_commit_hash}-cks_mock2_12_app1

docker manifest rm viktoruj/cks-lab:cks_mock2_12_app1
docker manifest create viktoruj/cks-lab:cks_mock2_12_app1 viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app1 viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app1
docker manifest push viktoruj/cks-lab:cks_mock2_12_app1
12 changes: 12 additions & 0 deletions docker/cks/mock2/12/build_app2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
latest_commit_hash=$(git rev-parse --short HEAD)

docker buildx build --platform linux/arm64 --load -t viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app2 -f Dockerfile2 .
docker buildx build --platform linux/amd64 --load -t viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app2 -f Dockerfile2 .
docker push viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app2
docker push viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app2
docker manifest create viktoruj/cks-lab:${latest_commit_hash}-cks_mock2_12_app2 viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app2 viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app2
docker manifest push viktoruj/cks-lab:${latest_commit_hash}-cks_mock2_12_app2

docker manifest rm viktoruj/cks-lab:cks_mock2_12_app2
docker manifest create viktoruj/cks-lab:cks_mock2_12_app2 viktoruj/cks-lab:${latest_commit_hash}-arm64-cks_mock2_12_app2 viktoruj/cks-lab:${latest_commit_hash}-amd64-cks_mock2_12_app2
docker manifest push viktoruj/cks-lab:cks_mock2_12_app2
2 changes: 1 addition & 1 deletion docker/ping_pong/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is a small HTTP server that sends back the incoming request with all the me
- `ENABLE_LOG_LOAD_CPU`: logs LOAD_CPU function
- `CPU_USAGE_PROFILE`: additional CPU usage `iteraction_milion=wait_msec=gorutins=time_sec` . example `10=1=1=30 1=400=1=60`
- `CPU_MAXPROC`: GOMAXPROCS (default = 1)
- `DELAY_START`: delay start in seconds before start app (default = 0) . It is useful for testing slow start of app and test startup probes.
- `DELAY_START`: delay start in seconds before start app (default = 0) . It is useful for testing slow start of app and test startup probes.

You can view the current metrics at `{server_address}:{METRIC_PORT}/metrics`.

Expand Down
Loading

0 comments on commit 25b0d77

Please sign in to comment.