Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hhk7734 committed Feb 10, 2025
1 parent 8c617d6 commit f4e5bad
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 58 deletions.
78 changes: 48 additions & 30 deletions docs/lang/etc/command-line-tools/asdf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ import TabItem from "@theme/TabItem";

## 설치

- https://asdf-vm.com/guide/getting-started.html
:::info[Reference]

- [Getting Started](https://asdf-vm.com/guide/getting-started.html)

:::

<Tabs
groupId="os"
defaultValue="arch"
values={[
{label: 'Arch Linux', value: 'arch',},
{label: 'Debian', value: 'debian',}
{label: 'Debian', value: 'debian',},
{label: 'macOS', value: 'mac',}
]}
>

Expand All @@ -31,6 +36,11 @@ import TabItem from "@theme/TabItem";
sudo pacman -S curl git
```

```shell
curl -L https://github.com/asdf-vm/asdf/releases/download/v0.16.2/asdf-v0.16.2-linux-amd64.tar.gz \
| sudo tar xz -C /usl/local/bin
```

</TabItem>

<TabItem value="debian">
Expand All @@ -39,14 +49,23 @@ sudo pacman -S curl git
sudo apt install curl git
```

```shell
curl -L https://github.com/asdf-vm/asdf/releases/download/v0.16.2/asdf-v0.16.2-linux-amd64.tar.gz \
| sudo tar xz -C /usl/local/bin
```

</TabItem>

</Tabs>
<TabItem value="mac">

```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
brew install asdf
```

</TabItem>

</Tabs>

<Tabs
defaultValue="zsh"
values={[
Expand All @@ -57,10 +76,18 @@ git clone https://github.com/asdf-vm/asdf.git ~/.asdf

<TabItem value="zsh">

```shell
mkdir -p "${ASDF_DATA_DIR:-$HOME/.asdf}/completions"
```

```shell
asdf completion zsh > "${ASDF_DATA_DIR:-$HOME/.asdf}/completions/_asdf"
```

```shell title=".zshrc"
# asdf
. $HOME/.asdf/asdf.sh
fpath=(${ASDF_DIR}/completions $fpath)
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
fpath=(${ASDF_DATA_DIR:-$HOME/.asdf}/completions $fpath)

# 마지막 줄에 추가
autoload -Uz compinit && compinit
Expand All @@ -70,10 +97,14 @@ autoload -Uz compinit && compinit

<TabItem value="bash">

```shell title=".bash_profile"
# asdf
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
```

```shell title=".bashrc"
# asdf
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
. <(asdf completion bash)
```

</TabItem>
Expand All @@ -84,12 +115,6 @@ autoload -Uz compinit && compinit
asdf info
```

## 업그레이드

```shell
asdf update
```

## 플러그인

- https://asdf-vm.com/manage/plugins.html
Expand All @@ -108,17 +133,15 @@ asdf plugin add <plugin> [<url>]
asdf plugin list [<flag>]
```

- `<flag>`
- `--urls`: 플러그인 URL 출력
- `--urls`: 플러그인 URL 출력

### 업그레이드

```shell
asdf plugin update [<plugin>] [<flag>]
```

- `<flag>`
- `--all`: 모든 플러그인 업그레이드
- `--all`: 모든 플러그인 업그레이드

### 삭제

Expand Down Expand Up @@ -149,28 +172,23 @@ asdf list <plugin>
### 설치 위치 확인

```shell
asdf which <plugin>
asdf where <plugin>
```

### 버전 설정

```shell
asdf global <plugin> <version>
asdf which <command>
```

전역 버전은 `$HOME/.tool-versions`에 저장됩니다.
### 버전 설정

```shell
asdf local <plugin> <version>
asdf set [<flags>] <plugin> <version>
```

로컬 버전은 `$PWD/.tool-versions`에 저장되지만 해당 경로의 하위 경로에도 적용됩니다.

```shell
asdf shell <plugin> <version>
```
`$PWD/.tool-versions`에 설정을 저장하지만 해당 경로의 하위 경로에도 적용됩니다.

특정 쉘에서만 일시적으로 사용할 버전은 `ASDF_${TOOL}_VERSION` 환경 변수값으로 결정됩니다.
- `--home | -u`: `$HOME/.tool-versions`에 설정을 저장합니다.
- `--parent | -p`: 부모 디렉토리 중 가장 가까운 `.tool-versions` 파일을 찾아 설정을 저장합니다.

```shell
asdf current [<plugin>]
Expand Down
2 changes: 1 addition & 1 deletion docs/lang/etc/command-line-tools/git/git.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ git config --global core.autocrlf input \
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux',},
{label: 'Mac OS', value: 'mac',}
{label: 'macOS', value: 'mac',}
]}
>

Expand Down
76 changes: 60 additions & 16 deletions docs/lang/etc/command-line-tools/remote/ssh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,75 @@ ssh <flag> <user>@<host> [<command>]

## SSH Tunnel

```shell title="/etc/ssh/sshd_config"
AllowTcpForwarding yes
PermitTunnel yes
```
:::info[Reference]

```shell
ssh -f -N \
-L <localPort>:<host>:<port> \
-p <tunnelPort> <tunnelUser>@<tunnelHost>
```
- [A Visual Guide to SSH Tunnels](https://iximiuz.com/en/posts/ssh-tunnels/)

:::

암호 입력이 나오면 `<tunnelHost>`의 암호를 입력합니다.
### Local Port Forwarding

```shell
lsof -i4 -P | grep -i "listen" | grep <localPort>
ssh [-f] -N \
-L [<localHost>:]<localPort>:<remoteHost>:<remotePort> \
[-p <sshdPort>] <user>@<host>
```

```shell
nc -zv 127.0.0.1 <localPort>
```mermaid
sequenceDiagram
participant client as 클라이언트
box rgb(130, 160, 200)
participant ssh as SSH 클라이언트
participant sshd as SSH 서버
participant server as 서버
end
client->>ssh: Request to [<localHost>:]<localPort>
ssh->>sshd: SSH Tunnel (Forwarding)
sshd->>server: Request to <remoteHost>:<remotePort>
server-->>sshd: Response
sshd-->>ssh: SSH Tunnel (Forwarding)
ssh-->>client: Response
```

- `-f`: 백그라운드로 실행합니다.
- `-L [<localHost>:]<localPort>:<remoteHost>:<remotePort>`
- `<localHost>`: 생략되면 `localhost`로 설정됩니다.
- `<remoteHost>`
- sshd가 접근 가능한 호스트를 설정하면됩니다.
- sshd가 bastion 서버와 같은 역할을 할 수 있습니다.

### Remote Port Forwarding

```shell
ps -lef | grep ssh | grep "\-L \?<localPort>" \
| awk '{print $4}' | xargs kill -9
```
ssh [-f] -N \
-R [<remoteHost>:]<remotePort>:<localHost>:<localPort> \
[-p <sshdPort>] <user>@<host>
```

```mermaid
sequenceDiagram
box rgb(130, 160, 200)
participant server as 서버
participant ssh as SSH 클라이언트
participant sshd as SSH 서버
end
participant client as 클라이언트
client->>sshd: Request to [<remoteHost>:]<remotePort>
sshd->>ssh: SSH Tunnel (Forwarding)
ssh->>server: Request to <localHost>:<localPort>
server-->>ssh: Response
ssh-->>sshd: SSH Tunnel (Forwarding)
sshd-->>client: Response
```

- `-f`: 백그라운드로 실행합니다.
- `-R [<remoteHost>:]<remotePort>:<localHost>:<localPort>`
- `<remoteHost>`: 생략되면 `0.0.0.0`으로 설정됩니다.
- `<localHost>`
- SSH 클라이언트가 접근 가능한 호스트를 설정하면됩니다.
- SSH 클라이언트가 bastion 서버와 같은 역할을 할 수 있습니다.

## SSH ProxyJump

Expand Down
11 changes: 10 additions & 1 deletion docs/lang/etc/command-line-tools/utility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ im-config
defaultValue="arch"
values={[
{label: 'Arch Linux', value: 'arch',},
{label: 'Debian', value: 'debian',}
{label: 'Debian', value: 'debian',},
{label: 'macOS', value: 'mac',}
]}
>

Expand All @@ -80,6 +81,14 @@ sudo apt install fzf

</TabItem>

<TabItem value="mac">

```shell
brew install fzf
```

</TabItem>

</Tabs>

```shell title=".zshrc"
Expand Down
2 changes: 1 addition & 1 deletion docs/lang/etc/vim/nvim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import TabItem from "@theme/TabItem";
values={[
{label: 'Arch Linux', value: 'arch',},
{label: 'Debian', value: 'debian',},
{label: 'Mac OS', value: 'mac',}
{label: 'macOS', value: 'mac',}
]}
>

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/python/env/version.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import TabItem from "@theme/TabItem";
values={[
{label: 'Arch Linux', value: 'arch',},
{label: 'Debian', value: 'debian',},
{label: 'Mac OS', value: 'mac',}
{label: 'macOS', value: 'mac',}
]}
>

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/shellscript/getopt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ getopt -o <shortOptString> -l <longOptString> -- <parameters>
- `-n | --name <name>`: 프로그램 이름을 설정합니다

:::warning
Mac OS에서는 `gnu-getopt`를 설치하거나 GNU getopt가 없는 경우에 대한 처리를 해야합니다.
macOS에서는 `gnu-getopt`를 설치하거나 GNU getopt가 없는 경우에 대한 처리를 해야합니다.

```shell
if ! getopt -T >/dev/null; then
Expand Down
1 change: 1 addition & 0 deletions docs/mlops/mlops/auth/authn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ users:
- `--password=<password>`
- 설정하지 않으면 사용자에게 입력을 받습니다.
- `--oidc-extra-scope='openid profile email groups'`
- `--oidc-auth-request-extra-params=<key>=<value>[,<key>=<value>]`

:::warning

Expand Down
10 changes: 5 additions & 5 deletions docs/mlops/mlops/workflow/argo-cd/argo-cd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ helm repo update argo \
```

```shell
helm pull argo/argo-cd --version 7.2.1
helm pull argo/argo-cd --version 7.7.23
```

```shell
helm show values argo/argo-cd --version 7.2.1 \
> argo-cd-7.2.1.yaml
helm show values argo/argo-cd --version 7.7.23 \
> argo-cd-7.7.23.yaml
```

```yaml title="argo-cd-values.yaml"
Expand Down Expand Up @@ -63,14 +63,14 @@ kubectl create namespace argo-cd
```

```shell
helm template argo-cd argo-cd-7.2.1.tgz \
helm template argo-cd argo-cd-7.7.23.tgz \
-n argo-cd \
-f argo-cd-values.yaml \
> argo-cd.yaml
```

```shell
helm upgrade argo-cd argo-cd-7.2.1.tgz \
helm upgrade argo-cd argo-cd-7.7.23.tgz \
--install \
--history-max 5 \
-n argo-cd \
Expand Down
2 changes: 1 addition & 1 deletion docs/mlops/network/wireguard/wireguard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ flowchart LR
defaultValue="debian"
values={[
{label: 'Debian', value: 'debian',},
{label: 'Mac OS', value: 'mac',}
{label: 'macOS', value: 'mac',}
]}
>

Expand Down
2 changes: 1 addition & 1 deletion sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ const sidebars: SidebarsConfig = {
},
{
type: "category",
label: "AWS Load BAlancer",
label: "AWS Load Balancer",
items: [
"mlops/network/aws-load-balancer/aws-load-balancer",
"mlops/network/aws-load-balancer/create",
Expand Down

0 comments on commit f4e5bad

Please sign in to comment.