-
Notifications
You must be signed in to change notification settings - Fork 1
K3D based cluster with ServiceLB #7
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
Changes from all commits
b09bb2a
4bf0307
61be48e
b019444
6f6ea42
4eab4ee
2b54b04
55a3726
bc2318d
3ece3c8
40db7bf
39f6ede
c3c13bb
3b6b28c
78a83fd
db30032
cccd979
e724e3e
4d18878
b9edba4
8bfb58f
981cb5c
818aa38
89e051b
e021f8f
9109cd8
956c9b8
549f962
6041ada
3702fc2
ffa99b4
9569f6e
45bbac7
62a90c1
fe65bf8
c67d6bb
7f12c10
5f248b8
2c50c85
e20e60d
a54575b
7fe14df
6b1c751
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| FROM public.ecr.aws/docker/library/debian:bookworm-slim | ||
|
|
||
| ARG EDA_VERSION=25.12.1 | ||
| ARG EDA_PLAYGROUND_REPO=kaelemc/playground | ||
| ARG EDA_PLAYGROUND_REPO=nokia-eda/playground | ||
| ARG EDA_PLAYGROUND_DIR=/home/vscode/.playground | ||
|
|
||
| ENV EDA_VERSION=${EDA_VERSION//./-} | ||
|
|
@@ -21,8 +21,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-instal | |
| iproute2 \ | ||
| procps \ | ||
| vim \ | ||
| fontconfig \ | ||
| xz-utils \ | ||
| net-tools \ | ||
| iputils-ping \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN useradd -m -s /bin/zsh vscode && \ | ||
|
|
@@ -33,15 +34,17 @@ RUN useradd -m -s /bin/zsh vscode && \ | |
|
|
||
| COPY --chmod=755 scripts/ /usr/local/bin/. | ||
| COPY codespaces-4vcpu-kpt-setters.yaml /eda-codespaces/codespaces-4vcpu-kpt-setters.yaml | ||
| COPY engine-config-patch.yaml /eda-codespaces/engine-config-patch.yaml | ||
|
|
||
| # install k3d | ||
| RUN curl -fsSL --retry 3 https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.8.3 bash | ||
|
|
||
| # Add EDA Playground tools to PATH (zsh) | ||
| RUN echo 'export PATH="$PATH:$EDA_PLAYGROUND_DIR/tools"' >> /etc/zsh/zshrc | ||
|
|
||
| USER vscode | ||
|
|
||
| RUN git clone --depth 1 --branch v0.0.1 "https://github.com/$EDA_PLAYGROUND_REPO" $EDA_PLAYGROUND_DIR && cd $EDA_PLAYGROUND_DIR && \ | ||
| RUN git clone --depth 1 --branch main "https://github.com/$EDA_PLAYGROUND_REPO" $EDA_PLAYGROUND_DIR && cd $EDA_PLAYGROUND_DIR && \ | ||
|
||
| make download-tools | ||
|
|
||
| RUN curl -o $HOME/.bundle.yaml "https://raw.githubusercontent.com/nokia-eda/edaadm/refs/heads/main/bundles/eda-bundle-core-$EDA_VERSION.yaml" && \ | ||
|
|
@@ -55,12 +58,6 @@ RUN SRL=$(curl -s "https://raw.githubusercontent.com/nokia-eda/playground/refs/h | |
| RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
| RUN curl -sS https://starship.rs/install.sh | sudo sh -s -- -y | ||
|
|
||
| # Install Nerd Font for terminal icons (starship, etc.) | ||
| RUN mkdir -p /home/vscode/.local/share/fonts && \ | ||
| curl -fsSL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz | \ | ||
| tar -xJf - -C /home/vscode/.local/share/fonts && \ | ||
| fc-cache -fv | ||
|
|
||
| # copy shell files | ||
| COPY --chown=vscode:vscode shell/ /home/vscode/ | ||
| COPY --chown=vscode:vscode shell/starship.toml /home/vscode/.config/starship.toml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| customSettings: | ||
| - applicationName: cx | ||
| settings: | ||
| - name: SrlCpuRequest | ||
| value: 1m | ||
| - name: CxdpCpuRequest | ||
| value: 1m |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/bash | ||
| sudo sysctl -w fs.inotify.max_user_watches=1048576 | ||
| sudo sysctl -w fs.inotify.max_user_instances=512 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,6 @@ | ||||||||||||||||||||||
| KPT_RETRY ?= 5 | ||||||||||||||||||||||
| KPT_LIVE_APPLY_ARGS += --reconcile-timeout=3m | ||||||||||||||||||||||
| KPT_RECONCILE_TIMEOUT ?= 3m | ||||||||||||||||||||||
| KPT_LIVE_APPLY_ARGS += --reconcile-timeout=$(KPT_RECONCILE_TIMEOUT) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Override the INSTALL_KPT_PACKAGE macro | ||||||||||||||||||||||
| # | ||||||||||||||||||||||
|
|
@@ -24,10 +25,53 @@ define INSTALL_KPT_PACKAGE | |||||||||||||||||||||
| echo -e "--> INSTALL: [\033[1;31m$2\033[0m] - Failed after $(KPT_RETRY) attempts" ;\ | ||||||||||||||||||||||
| exit 1 ;\ | ||||||||||||||||||||||
| fi ;\ | ||||||||||||||||||||||
| echo -e "--> INSTALL: [\033[1;33m$2\033[0m] - Attempt $$attempt failed, retrying..." ;\ | ||||||||||||||||||||||
| echo -e "--> INSTALL: [\033[1;33m$2\033[0m] - Attempt $$attempt failed after $(KPT_RECONCILE_TIMEOUT), retrying..." ;\ | ||||||||||||||||||||||
| sleep 2 ;\ | ||||||||||||||||||||||
| done ;\ | ||||||||||||||||||||||
| popd &>/dev/null || (echo "[ERROR]: Failed to switch back from $2" && exit 1) ;\ | ||||||||||||||||||||||
| echo -e "--> INSTALL: [\033[0;32m$2\033[0m] - Applied and reconciled package" ;\ | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| endef | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| CODESPACES_ENGINECONFIG_CUSTOM_SETTINGS_PATCH := /eda-codespaces/engine-config-patch.yaml | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: patch-codespaces-engineconfig | ||||||||||||||||||||||
| patch-codespaces-engineconfig: | $(YQ) $(KPT_PKG) ## Patch the EngineConfig manifest to add codespaces custom settings | ||||||||||||||||||||||
| @{ \ | ||||||||||||||||||||||
| echo "--> INFO: Patching EngineConfig manifest for codespaces" ;\ | ||||||||||||||||||||||
| ENGINE_CONFIG_FILE="$(KPT_CORE)/engine-config/engineconfig.yaml" ;\ | ||||||||||||||||||||||
| if [[ ! -f "$$ENGINE_CONFIG_FILE" ]]; then (echo "[ERROR] EngineConfig manifest not found at $$ENGINE_CONFIG_FILE" && exit 1); fi ;\ | ||||||||||||||||||||||
| $(YQ) eval '.spec.customSettings = load("$(CODESPACES_ENGINECONFIG_CUSTOM_SETTINGS_PATCH)").customSettings' -i "$$ENGINE_CONFIG_FILE" ;\ | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: configure-try-eda-params | ||||||||||||||||||||||
| configure-try-eda-params: | $(BASE) $(BUILD) $(KPT) $(KPT_SETTERS_TRY_EDA_FILE) patch-codespaces-engineconfig ## Configure parameters specific to try-eda | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: ls-ways-to-reach-api-server | ||||||||||||||||||||||
| ls-ways-to-reach-api-server: | $(KUBECTL) configure-codespaces-keycloak | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: configure-codespaces-keycloak | ||||||||||||||||||||||
| configure-codespaces-keycloak: | $(KUBECTL) ## Configure Keycloak frontendUrl for GitHub Codespaces | ||||||||||||||||||||||
| @if [ -n "$(CODESPACE_NAME)" ] && [ -n "$(GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN)" ]; then \ | ||||||||||||||||||||||
| CODESPACE_URL="https://$(CODESPACE_NAME)-$(EDA_PORT).$(GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN)" ;\ | ||||||||||||||||||||||
| KC_URL="https://eda-keycloak:9443/core/httpproxy/v1/keycloak" ;\ | ||||||||||||||||||||||
| echo "--> INFO: Configuring Keycloak frontendUrl for Codespaces..." ;\ | ||||||||||||||||||||||
| $(KUBECTL) wait --for=condition=ready pod -l eda.nokia.com/app=keycloak -n $(EDA_CORE_NAMESPACE) --timeout=300s ;\ | ||||||||||||||||||||||
| TOKEN=$$($(KUBECTL) exec -n $(EDA_CORE_NAMESPACE) deploy/eda-toolbox -- curl -sk -X POST \ | ||||||||||||||||||||||
| "$${KC_URL}/realms/master/protocol/openid-connect/token" \ | ||||||||||||||||||||||
| -d "username=admin" -d "password=admin" -d "grant_type=password" -d "client_id=admin-cli" | jq -r '.access_token') ;\ | ||||||||||||||||||||||
| $(KUBECTL) exec -n $(EDA_CORE_NAMESPACE) deploy/eda-toolbox -- curl -sk -X PUT \ | ||||||||||||||||||||||
| "$${KC_URL}/admin/realms/eda" \ | ||||||||||||||||||||||
| -H "Authorization: Bearer $${TOKEN}" \ | ||||||||||||||||||||||
| -H "Content-Type: application/json" \ | ||||||||||||||||||||||
| -d "{\"attributes\": {\"frontendUrl\": \"$${CODESPACE_URL}/core/httpproxy/v1/keycloak\"}}" ;\ | ||||||||||||||||||||||
| echo "--> INFO: Keycloak frontendUrl set to: $${CODESPACE_URL}/core/httpproxy/v1/keycloak" ;\ | ||||||||||||||||||||||
| else \ | ||||||||||||||||||||||
| echo "--> INFO: Not running in Codespaces, skipping Keycloak frontendUrl configuration" ;\ | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: start-ui-port-forward | ||||||||||||||||||||||
| start-ui-port-forward: | ||||||||||||||||||||||
| @{ \ | ||||||||||||||||||||||
| echo "--> Triggering browser window open 0.0.0.0:9443" ;\ | ||||||||||||||||||||||
|
||||||||||||||||||||||
| echo "--> Triggering browser window open 0.0.0.0:9443" ;\ | |
| URL="https://0.0.0.0:9443" ;\ | |
| echo "--> INFO: Opening browser window at $$URL" ;\ | |
| if command -v xdg-open >/dev/null 2>&1; then \ | |
| xdg-open "$$URL" >/dev/null 2>&1 || echo "--> WARNING: Failed to open browser with xdg-open" ;\ | |
| elif command -v open >/dev/null 2>&1; then \ | |
| open "$$URL" >/dev/null 2>&1 || echo "--> WARNING: Failed to open browser with open" ;\ | |
| else \ | |
| echo "--> INFO: Could not find a supported browser opener (xdg-open/open). Please open $$URL manually." ;\ | |
| fi ;\ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| #!/bin/bash | ||
|
|
||
| printf " | ||
| \033[38;2;255;124;88m⢀\033[38;2;255;218;152m⢀\033[38;2;255;115;123m⡄\033[38;2;255;197;123m⣠\033[38;2;255;179;106m⣦\033[38;2;252;111;48m⣴\033[38;2;255;195;123m⣎\033[38;2;255;197;129m⣤\033[38;2;255;197;128m⠖\033[38;2;255;170;142m⢀\033[38;2;255;136;135m⡀\033[0m \033[0m | ||
| \033[38;2;255;167;7m⢠\033[38;2;252;185;65m⣤\033[38;2;253;143;93m⣿\033[38;2;252;195;143m⣿\033[38;2;246;128;79m⣿\033[38;2;229;121;83m⣿\033[38;2;244;150;123m⣿\033[38;2;244;164;137m⣿\033[38;2;243;170;132m⣿\033[38;2;253;183;152m⣶\033[38;2;255;162;126m⣿\033[38;2;255;81;63m⣯\033[38;2;255;131;41m⣴\033[38;2;254;122;52m⡶\033[38;2;255;75;14m⠂\033[0m \033[0m | ||
| \033[38;2;249;168;21m⣼\033[38;2;238;76;97m⣿\033[38;2;246;198;130m⣿\033[38;2;216;171;144m⣿\033[38;2;225;181;79m⣿\033[38;2;232;145;43m⣿\033[38;2;218;95;66m⣿\033[38;2;221;179;132m⣿\033[38;2;239;203;163m⣿\033[38;2;228;143;121m⣿\033[38;2;252;193;144m⣿\033[38;2;251;202;165m⣿\033[38;2;251;164;159m⣿\033[38;2;252;150;151m⣿\033[38;2;253;140;132m⣟\033[38;2;253;147;108m⣁\033[38;2;255;89;1m⡀\033[0m \033[0m \033[38;2;128;20;216m⢸\033[38;2;124;23;217m⣿\033[38;2;121;26;218m⣿\033[38;2;118;30;219m⣿\033[38;2;114;33;220m⣿\033[38;2;111;37;221m⣿\033[38;2;108;40;222m⣿\033[38;2;104;43;223m⣿\033[0m \033[38;2;91;57;227m⣿\033[38;2;88;60;228m⣿\033[38;2;84;64;229m⣿\033[38;2;81;67;230m⣿\033[38;2;78;70;231m⣿\033[38;2;74;74;232m⣿\033[38;2;71;77;233m⣶\033[38;2;68;80;234m⣦\033[38;2;64;84;235m⣄\033[0m \033[38;2;44;104;241m⣼\033[38;2;41;107;242m⣿\033[38;2;38;111;243m⣿\033[38;2;34;114;244m⣿\033[38;2;31;117;245m⡆\033[0m \033[0m | ||
| \033[38;2;197;102;56m⣿\033[38;2;207;125;120m⣿\033[38;2;180;125;117m⣿\033[38;2;201;136;38m⣿\033[38;2;193;106;54m⣿\033[38;2;182;86;90m⣿\033[38;2;171;121;83m⣿\033[38;2;170;111;44m⣿\033[38;2;176;101;32m⣿\033[38;2;185;112;62m⣿\033[38;2;214;111;104m⣿\033[38;2;203;96;113m⣿\033[38;2;194;85;115m⣿\033[38;2;229;115;109m⣿\033[38;2;253;150;101m⣿\033[38;2;254;162;87m⣿\033[38;2;255;213;58m⣦\033[38;2;255;208;68m⡀\033[0m \033[38;2;128;20;216m⢸\033[38;2;124;23;217m⣿\033[38;2;121;26;218m⣿\033[0m \033[38;2;91;57;227m⣿\033[38;2;88;60;228m⣿\033[38;2;84;64;229m⡇\033[0m \033[38;2;74;74;232m⠈\033[38;2;71;77;233m⠻\033[38;2;68;80;234m⣿\033[38;2;64;84;235m⣿\033[38;2;61;87;236m⣦\033[0m \033[38;2;48;101;240m⣰\033[38;2;44;104;241m⣿\033[38;2;41;107;242m⣿\033[38;2;38;111;243m⢻\033[38;2;34;114;244m⣿\033[38;2;31;117;245m⣿\033[38;2;28;121;246m⡀\033[0m \033[0m | ||
| \033[38;2;170;74;77m⢻\033[38;2;98;44;105m⣿\033[38;2;164;169;186m⣿\033[38;2;194;206;228m⣿\033[38;2;178;180;222m⣿\033[38;2;163;167;212m⣿\033[38;2;126;69;136m⣿\033[38;2;83;27;100m⣿\033[38;2;78;29;102m⣿\033[38;2;117;19;97m⣿\033[38;2;119;38;111m⣿\033[38;2;160;59;91m⣿\033[38;2;146;51;121m⣿\033[38;2;180;30;96m⣿\033[38;2;211;28;83m⣿\033[38;2;219;17;71m⣿\033[38;2;245;1;64m⣦\033[38;2;255;0;43m⡀\033[0m \033[38;2;128;20;216m⢸\033[38;2;124;23;217m⣿\033[38;2;121;26;218m⣿\033[38;2;118;30;219m⣶\033[38;2;114;33;220m⣶\033[38;2;111;37;221m⣶\033[38;2;108;40;222m⣶\033[38;2;104;43;223m⡆\033[0m \033[38;2;91;57;227m⣿\033[38;2;88;60;228m⣿\033[38;2;84;64;229m⡇\033[0m \033[38;2;68;80;234m⣿\033[38;2;64;84;235m⣿\033[38;2;61;87;236m⣿\033[0m \033[38;2;51;97;239m⢠\033[38;2;48;101;240m⣿\033[38;2;44;104;241m⣿\033[38;2;41;107;242m⠇\033[0m \033[38;2;34;114;244m⢿\033[38;2;31;117;245m⣿\033[38;2;28;121;246m⣧\033[0m \033[0m | ||
| \033[38;2;160;194;230m⣸\033[38;2;201;216;234m⣿\033[38;2;168;190;223m⡿\033[38;2;174;197;222m⠿\033[38;2;186;196;217m⠿\033[38;2;84;95;111m⢿\033[38;2;73;84;100m⣿\033[38;2;24;34;48m⣿\033[38;2;40;50;120m⣿\033[38;2;109;61;131m⣿\033[38;2;205;4;55m⣿\033[38;2;147;39;63m⣿\033[38;2;247;66;57m⣿\033[38;2;223;27;71m⣿\033[38;2;216;96;96m⣿\033[38;2;244;53;97m⣿\033[38;2;202;9;103m⢧\033[38;2;218;4;70m⡉\033[0m \033[38;2;128;20;216m⢸\033[38;2;124;23;217m⣿\033[38;2;121;26;218m⣿\033[38;2;118;30;219m⠉\033[38;2;114;33;220m⠉\033[38;2;111;37;221m⠉\033[38;2;108;40;222m⠉\033[38;2;104;43;223m⠁\033[0m \033[38;2;91;57;227m⣿\033[38;2;88;60;228m⣿\033[38;2;84;64;229m⡇\033[0m \033[38;2;71;77;233m⢀\033[38;2;68;80;234m⣿\033[38;2;64;84;235m⣿\033[38;2;61;87;236m⣿\033[0m \033[38;2;51;97;239m⣾\033[38;2;48;101;240m⣿\033[38;2;44;104;241m⣿\033[38;2;41;107;242m⣤\033[38;2;38;111;243m⣤\033[38;2;34;114;244m⣼\033[38;2;31;117;245m⣿\033[38;2;28;121;246m⣿\033[38;2;24;124;247m⣇\033[0m \033[0m | ||
| \033[38;2;146;185;216m⣴\033[38;2;161;196;235m⡾\033[38;2;61;94;140m⠛\033[38;2;17;29;52m⠁\033[0m \033[38;2;4;225;255m⢀\033[38;2;3;111;152m⣿\033[38;2;19;41;69m⣿\033[38;2;1;54;134m⣿\033[38;2;17;59;134m⣿\033[38;2;191;12;63m⣿\033[38;2;213;68;78m⣿\033[38;2;186;8;96m⣿\033[38;2;243;17;84m⣿\033[38;2;227;6;50m⣿\033[38;2;143;12;78m⣟\033[38;2;15;0;27m⠧\033[0m \033[0m \033[38;2;128;20;216m⢸\033[38;2;124;23;217m⣿\033[38;2;121;26;218m⣿\033[38;2;118;30;219m⣤\033[38;2;114;33;220m⣤\033[38;2;111;37;221m⣤\033[38;2;108;40;222m⣤\033[38;2;104;43;223m⣤\033[0m \033[38;2;91;57;227m⣿\033[38;2;88;60;228m⣿\033[38;2;84;64;229m⣧\033[38;2;81;67;230m⣤\033[38;2;78;70;231m⣤\033[38;2;74;74;232m⣴\033[38;2;71;77;233m⣿\033[38;2;68;80;234m⣿\033[38;2;64;84;235m⠿\033[38;2;61;87;236m⠁\033[0m \033[38;2;54;94;238m⣼\033[38;2;51;97;239m⣿\033[38;2;48;101;240m⣿\033[38;2;44;104;241m⠛\033[38;2;41;107;242m⠛\033[38;2;38;111;243m⠛\033[38;2;34;114;244m⠛\033[38;2;31;117;245m⠻\033[38;2;28;121;246m⣿\033[38;2;24;124;247m⣿\033[38;2;21;128;248m⡄\033[0m \033[0m | ||
| \033[38;2;115;238;254m⣠\033[38;2;28;174;254m⣾\033[38;2;0;148;238m⣿\033[38;2;0;95;235m⣿\033[38;2;0;101;222m⣿\033[38;2;15;90;194m⣿\033[38;2;111;20;86m⣿\033[38;2;219;18;51m⣿\033[38;2;45;37;95m⣿\033[38;2;158;0;69m⣿\033[38;2;15;0;29m⣿\033[38;2;36;35;100m⠙\033[0m \033[0m \033[38;2;128;20;216m⠘\033[38;2;124;23;217m⠛\033[38;2;121;26;218m⠛\033[38;2;118;30;219m⠛\033[38;2;114;33;220m⠛\033[38;2;111;37;221m⠛\033[38;2;108;40;222m⠛\033[38;2;104;43;223m⠛\033[0m \033[38;2;91;57;227m⠛\033[38;2;88;60;228m⠛\033[38;2;84;64;229m⠛\033[38;2;81;67;230m⠛\033[38;2;78;70;231m⠛\033[38;2;74;74;232m⠛\033[38;2;71;77;233m⠉\033[38;2;68;80;234m⠁\033[0m \033[38;2;58;91;237m⠐\033[38;2;54;94;238m⠛\033[38;2;51;97;239m⠛\033[38;2;48;101;240m⠃\033[0m \033[38;2;28;121;246m⠛\033[38;2;24;124;247m⠛\033[38;2;21;128;248m⠛\033[0m \033[0m | ||
| \033[38;2;136;239;251m⠭\033[38;2;98;228;253m⢿\033[38;2;40;200;254m⣿\033[38;2;52;178;245m⣿\033[38;2;6;82;178m⣿\033[38;2;26;44;115m⣿\033[38;2;50;37;110m⣿\033[38;2;30;4;41m⣿\033[38;2;133;11;57m⣿\033[38;2;12;20;68m⠋\033[38;2;17;0;32m⡏\033[38;2;16;0;30m⠈\033[0m \033[0m | ||
| \033[38;2;109;240;255m⠉\033[38;2;105;231;245m⠛\033[38;2;24;75;129m⠉\033[38;2;44;12;58m⠙\033[38;2;55;26;87m⠋\033[38;2;15;0;29m⠘\033[38;2;16;0;31m⠁\033[38;2;16;0;29m⠉\033[0m \033[0m | ||
| " | ||
| echo " | ||
| .:.... | ||
| .:=**+--:. _____ ____ _ ___ ____ _ _ ____ | ||
| :=*******##**+-:.. | ____| _ \ / \ |_ _/ ___| | | | | _ \ | ||
| .=+******###*++=-::. | _| | | | |/ _ \ | |\___ \ | | | | |_) | | ||
| -+++******######***=... | |___| |_| / ___ \ | | ___) | | |_| | __/ | ||
| -++++******#######+----. |_____|____/_/ \_\ |___|____/ \___/|_| | ||
| .-++++++******#########*-:::. | ||
| .++++++++******########=:=:. | ||
| ..-=---=++++******#########+ .. | ||
| .. -++++=-:::-=+####::*= URL: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} | ||
| =++: +##* . | ||
| .:. .-: | ||
| " | ||
| ⚡ EDA UI: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,10 +3,15 @@ source .devcontainer/utils.sh | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| cd $EDA_PLAYGROUND_DIR | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ensure-docker-is-ready | ||||||||||||||||||||||||||||||
| # get token | ||||||||||||||||||||||||||||||
| encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//') | ||||||||||||||||||||||||||||||
| prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) | ||||||||||||||||||||||||||||||
| suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n') | ||||||||||||||||||||||||||||||
| TOKEN="${prefix}${suffix}" | ||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+10
|
||||||||||||||||||||||||||||||
| # get token | |
| encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//') | |
| prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) | |
| suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n') | |
| TOKEN="${prefix}${suffix}" | |
| # get token from environment (prefer GH_PKG_TOKEN, fallback to GITHUB_TOKEN) | |
| if [ -n "$GH_PKG_TOKEN" ]; then | |
| TOKEN="$GH_PKG_TOKEN" | |
| elif [ -n "$GITHUB_TOKEN" ]; then | |
| TOKEN="$GITHUB_TOKEN" | |
| else | |
| echo "Error: GitHub token not set. Please set GH_PKG_TOKEN or GITHUB_TOKEN in the environment." >&2 | |
| exit 1 | |
| fi |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command has no error handling. If the docker exec fails (e.g., if the k3d cluster isn't ready yet or the container name is incorrect), the script will continue silently. Consider adding error checking with set -e at the start of the script or explicitly checking the exit status of this command.
| docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}" | |
| if ! docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}"; then | |
| echo "Error: failed to preload images into the k3d cluster" >&2 | |
| exit 1 | |
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| # Nokia EDA in Codespaces | ||
|
|
||
| [![Codespaces][codespaces-4vcpu-svg]][codespaces-4vcpu-url] | ||
| [![Codespaces][codespaces-8vcpu-svg]][codespaces-8vcpu-url] | ||
| [![Discord][discord-svg]][discord-url] | ||
| [Learn more about EDA in Codespaces](https://docs.eda.dev/getting-started/codespaces) | ||
| <!-- TODO:rdodin: change for tour of eda url for codespaces in the main readme --> | ||
|
|
||
| [codespaces-4vcpu-svg]: https://gitlab.com/-/project/7617705/uploads/3f69f403e1371b3b578ee930df8930e8/codespaces-btn-4vcpu-export.svg | ||
| [codespaces-4vcpu-url]: https://github.com/codespaces/new?repo=1129099670&ref=main | ||
| [codespaces-8vcpu-svg]: https://gitlab.com/-/project/7617705/uploads/81362429e362ce7c5750bc51d23a4905/codespaces-btn-8vcpu-export.svg | ||
| [codespaces-8vcpu-url]: https://github.com/codespaces/new?machine=premiumLinux&repo=1129099670&ref=main | ||
| <!-- [codespaces-8vcpu-svg]: https://gitlab.com/-/project/7617705/uploads/81362429e362ce7c5750bc51d23a4905/codespaces-btn-8vcpu-export.svg | ||
| [codespaces-8vcpu-url]: https://github.com/codespaces/new?machine=premiumLinux&repo=1129099670&ref=main --> | ||
| [discord-svg]: https://gitlab.com/rdodin/pics/-/wikis/uploads/b822984bc95d77ba92d50109c66c7afe/join-discord-btn.svg | ||
| [discord-url]: https://eda.dev/discord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of net-tools and iputils-ping packages is undocumented. Consider adding a comment explaining why these networking diagnostic tools are needed (e.g., for debugging k3d networking issues).