Docker에 cRPD 설치
이 섹션은 다음 주제를 포함합니다.
설치하기 전에
Linux 컨테이너 환경에서 라우팅 기능을 구현하기 위해 cRPD를 라우팅 서비스로 설치하기 전에 다음을 확인하십시오.
-
Linux 서버에 대한 시스템 요구 사항 사양을 확인하여 cRPD를 배포하려면 Linux 서버에 cRPD를 배포하기 위한 요구 사항을 참조하십시오.
Docker 설치 및 확인
Linux 컨테이너 환경을 구현하기 위해 Linux 호스트 플랫폼에 Docker를 설치 및 구성하려면 지원되는 Linux 호스트 운영 체제에 대한 설치 지침은 Docker 설치를 참조하세요.
Docker 설치를 확인합니다. cRPD 애플리케이션 디버그를 참조하십시오.
최신 Docker를 설치하려면 다음을 수행합니다.
root@ubuntu-vm18:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
root@ubuntu-vm18:~# lsb_release -cs
focal
root@ubuntu-vm18:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB] Get:3 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB] Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease Get:5 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages [50.2 kB] Get:6 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [128 kB] Get:7 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3,563 kB] Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [550 kB] Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.7 kB] Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3,236 kB] Get:11 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [453 kB] Get:12 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,230 kB] Get:13 http://us.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [295 kB] Get:14 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [3,195 kB] Get:15 http://us.archive.ubuntu.com/ubuntu focal-security/main Translation-en [472 kB] Get:16 http://us.archive.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [3,117 kB] Get:17 http://us.archive.ubuntu.com/ubuntu focal-security/restricted Translation-en [436 kB] Fetched 16.9 MB in 8s (2,172 kB/s) Reading package lists... Done
root@ubuntu-vm18:~# apt update
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB] Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease Get:5 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [128 kB] Get:6 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [14.3 kB] Fetched 270 kB in 1s (198 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 67 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@ubuntu-vm18:~# apt install docker-ce
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: containerd.io docker-buildx-plugin docker-ce-cli docker-ce-rootless-extras docker-compose-plugin pigz slirp4netns Suggested packages: aufs-tools cgroupfs-mount | cgroup-lite The following NEW packages will be installed: containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin pigz slirp4netns 0 upgraded, 8 newly installed, 0 to remove and 67 not upgraded. Need to get 122 MB of archives. After this operation, 440 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB] Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 slirp4netns amd64 0.4.3-1 [74.3 kB] Get:3 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.7.22-1 [29.5 MB] Get:4 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-buildx-plugin amd64 0.16.2-1~ubuntu.20.04~focal [29.9 MB] Get:5 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-cli amd64 5:27.2.1-1~ubuntu.20.04~focal [15.0 MB] Get:6 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:27.2.1-1~ubuntu.20.04~focal [25.6 MB] Get:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:27.2.1-1~ubuntu.20.04~focal [9,577 kB] Get:8 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-compose-plugin amd64 2.29.2-1~ubuntu.20.04~focal [12.5 MB] Fetched 122 MB in 4s (29.5 MB/s) Selecting previously unselected package pigz. (Reading database ... 71975 files and directories currently installed.) Preparing to unpack .../0-pigz_2.4-1_amd64.deb ... Unpacking pigz (2.4-1) ... Selecting previously unselected package containerd.io. Preparing to unpack .../1-containerd.io_1.7.22-1_amd64.deb ... Unpacking containerd.io (1.7.22-1) ... Selecting previously unselected package docker-buildx-plugin. Preparing to unpack .../2-docker-buildx-plugin_0.16.2-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-buildx-plugin (0.16.2-1~ubuntu.20.04~focal) ... Selecting previously unselected package docker-ce-cli. Preparing to unpack .../3-docker-ce-cli_5%3a27.2.1-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-ce-cli (5:27.2.1-1~ubuntu.20.04~focal) ... Selecting previously unselected package docker-ce. Preparing to unpack .../4-docker-ce_5%3a27.2.1-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-ce (5:27.2.1-1~ubuntu.20.04~focal) ... Selecting previously unselected package docker-ce-rootless-extras. Preparing to unpack .../5-docker-ce-rootless-extras_5%3a27.2.1-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-ce-rootless-extras (5:27.2.1-1~ubuntu.20.04~focal) ... Selecting previously unselected package docker-compose-plugin. Preparing to unpack .../6-docker-compose-plugin_2.29.2-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-compose-plugin (2.29.2-1~ubuntu.20.04~focal) ... Selecting previously unselected package slirp4netns. Preparing to unpack .../7-slirp4netns_0.4.3-1_amd64.deb ... Unpacking slirp4netns (0.4.3-1) ... Setting up slirp4netns (0.4.3-1) ... Setting up docker-buildx-plugin (0.16.2-1~ubuntu.20.04~focal) ... Setting up containerd.io (1.7.22-1) ... Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service. Setting up docker-compose-plugin (2.29.2-1~ubuntu.20.04~focal) ... Setting up docker-ce-cli (5:27.2.1-1~ubuntu.20.04~focal) ... Setting up pigz (2.4-1) ... Setting up docker-ce-rootless-extras (5:27.2.1-1~ubuntu.20.04~focal) ... Setting up docker-ce (5:27.2.1-1~ubuntu.20.04~focal) ... Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service. Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket. Processing triggers for man-db (2.9.1-1) ... Processing triggers for systemd (245.4-4ubuntu3.20) ...
root@ubuntu-vm18:~# docker version
Client: Docker Engine - Community Version: 27.2.1 API version: 1.47 Go version: go1.22.7 Git commit: 9e34c9b Built: Fri Sep 6 12:08:15 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 27.2.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 8b539b8 Built: Fri Sep 6 12:08:15 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.22 GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c runc: Version: 1.1.14 GitCommit: v1.1.14-0-g2c9f560 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker 레지스트리에서 cRPD 소프트웨어 다운로드
cRPD 소프트웨어는 주니퍼 도커 레지스트리에서 cRPD 도커 파일로 제공됩니다.
다음 두 가지 방법으로 소프트웨어를 다운로드할 수 있습니다.
-
Juniper Docker 레지스트리
-
주니퍼 소프트웨어 다운로드 페이지
-
cRPD 소프트웨어를 가져오기 전에 Linux 호스트에 Docker가 설치되어 있고 Docker 엔진이 실행 중인지 확인합니다.
-
cRPD 소프트웨어를 다운로드하기 전에 주니퍼 지원 에 등록해야 합니다.
Docker 엔진이 호스트에 설치되면 다음을 수행하여 cRPD 이미지를 다운로드하고 사용을 시작합니다.
Juniper Docker 레지스트리를 사용하여 cRPD 소프트웨어를 다운로드하려면 다음을 수행합니다.
주니퍼 URL에서 cRPD 소프트웨어 다운로드
데이터 볼륨 생성
데이터 볼륨을 생성하려면:
호스트 네트워킹 모드에서 cRPD를 시작하려면 다음을 수행합니다.
-
호스트 모드에서는 네트워크 네임스페이스가 공유됩니다. 예를 들어, 인터페이스가 Pod 내에 정의된 경우 호스트에서도 동일한 인터페이스를 볼 수 있습니다. Docker 컨테이너는 호스트 네트워크 네임스페이스를 사용합니다. 명령을 실행하여 호스트 네트워킹 모드에서 cRPD를 시작합니다.
root@ubuntu-vm18:~# docker run --rm --detach --name crpd01 -h crpd01 --privileged --net=host -v crpd01-config:/config -v crpd01-varlog:/var/log -it crpd:24.2R1.14
메모리 구성
다음 명령에서 메모리 크기를 지정하여 cRPD에 할당되는 메모리 양을 제한할 수 있습니다.
-
root@ubuntu-vm18:~# docker run --rm --detach --name crpd01 -h crpd01 --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -m 2048MB --memory-swap=2048MB -it crpd:24.2R1.14
CLI를 사용하여 cRPD 구성
cRPD는 라우팅 서비스를 위한 Junos 명령줄 구성 및 운영 명령을 제공합니다. 노드가 토폴로지 및 라우팅에 참여할 수 있도록 라우팅 프로토콜 구성의 하위 집합을 제공합니다.
Linux 셸에서 인터페이스를 구성할 수 있습니다. 인터페이스 구성은 ISO 주소에만 사용할 수 있습니다.
CLI를 사용하여 cRPD 컨테이너를 구성하려면 다음을 수행합니다.