Skip to main content
본 한국어 번역은 사용자 편의를 위해 제공되는 기계 번역입니다. 영어 버전과 한국어 버전이 서로 어긋나는 경우에는 언제나 영어 버전이 우선합니다.

Trident를 구축합니다

기여자 juliantap netapp-aruldeepa joan-ing netapp-mwallis

Trident for Docker는 NetApp 스토리지 플랫폼을 위한 Docker 에코시스템과 직접 통합됩니다. 또한 향후 추가 플랫폼을 추가할 수 있도록 스토리지 플랫폼에서 Docker 호스트에 이르는 스토리지 리소스의 프로비저닝 및 관리를 지원합니다.

Trident의 여러 인스턴스를 동일한 호스트에서 동시에 실행할 수 있습니다. 이를 통해 여러 스토리지 시스템 및 스토리지 유형에 동시에 연결할 수 있으며, Docker 볼륨에 사용되는 스토리지를 사용자 지정할 수 있습니다.

필요한 것

를 "배포를 위한 사전 요구 사항"참조하십시오. 사전 요구 사항이 충족되었는지 확인한 후 Trident를 배포할 준비가 된 것입니다.

Docker 관리형 플러그인 방법(버전 1.13/17.03 이상)

참고
시작하기 전에
기존 데몬 메서드에서 Trident pre Docker 1.13/17.03을 사용한 경우 관리되는 플러그인 방법을 사용하기 전에 Trident 프로세스를 중지하고 Docker 데몬을 다시 시작해야 합니다.
  1. 실행 중인 모든 인스턴스 중지:

    pkill /usr/local/bin/netappdvp
    pkill /usr/local/bin/trident
  2. Docker를 다시 시작합니다.

    systemctl restart docker
  3. Docker Engine 17.03(새로운 1.13) 이상이 설치되어 있는지 확인합니다.

    docker --version

    버전이 최신 버전이 아니면 "설치를 설치하거나 업데이트합니다".

단계
  1. 구성 파일을 생성하고 다음과 같이 옵션을 지정합니다.

    • config 기본 파일 이름은 config.json 이지만 원하는 이름은 파일 이름으로 config 옵션을 지정하여 사용할 수 있습니다. 구성 파일은 호스트 시스템의 '/etc/netapdvp' 디렉토리에 있어야 합니다.

    • 로그 수준: 로깅 수준(debug, info, warn, error, fatal)을 지정합니다. 기본값은 '정보'입니다.

    • debug: 디버그 로깅을 사용할 수 있는지 여부를 지정합니다. 기본값은 false 입니다. TRUE인 경우 로그 수준을 재정의합니다.

      1. 구성 파일의 위치를 생성합니다.

        sudo mkdir -p /etc/netappdvp
      2. 구성 파일을 생성합니다.

        cat << EOF > /etc/netappdvp/config.json
        {
          "version": 1,
          "storageDriverName": "ontap-nas",
          "managementLIF": "10.0.0.1",
          "dataLIF": "10.0.0.2",
          "svm": "svm_nfs",
          "username": "vsadmin",
          "password": "password",
          "aggregate": "aggr1"
        }
        EOF
  2. 관리되는 플러그인 시스템을 사용하여 Trident를 시작합니다. `<version>`사용 중인 플러그인 버전(xxx.xx.x)으로 바꿉니다.

    docker plugin install --grant-all-permissions --alias netapp netapp/trident-plugin:<version> config=myConfigFile.json
  3. Trident를 사용하여 구성된 시스템에서 스토리지를 소비합니다.

    1. "firstVolume"이라는 이름의 볼륨을 생성합니다.

      docker volume create -d netapp --name firstVolume
    2. 컨테이너가 시작될 때 기본 볼륨을 생성합니다.

      docker run --rm -it --volume-driver netapp --volume secondVolume:/my_vol alpine ash
    3. "firstVolume" 볼륨을 제거합니다.

      docker volume rm firstVolume

기존 방법(버전 1.12 이하)

시작하기 전에
  1. Docker 버전 1.10 이상이 설치되어 있는지 확인합니다.

    docker --version

    버전이 최신 버전이 아니면 설치를 업데이트하십시오.

    curl -fsSL https://get.docker.com/ | sh
  2. 시스템에 NFS 및/또는 iSCSI가 구성되어 있는지 확인합니다.

단계
  1. NetApp Docker Volume Plugin 설치 및 구성:

    1. 응용 프로그램 다운로드 및 압축 풀기:

      ----trident-installer-26.10.1.tar.gz
      wget https://github.com/NetApp/trident/releases/download/10.0/
      tar zxf trident-installer-26.10.1.tar.gz
.. Move to a location in the bin path:
+
[source,console]

sudo mv trident-installer/extras/bin/trident /usr/local/bin/ sudo chown root:root /usr/local/bin/trident sudo chmod 755 /usr/local/bin/trident

.. Create a location for the configuration file:
+
[source,console]

sudo mkdir -p /etc/netappdvp

.. Create the configuration file:
+
[source,console]

cat << EOF > /etc/netappdvp/ontap-nas.json

+
[source,json]

{ "version": 1, "storageDriverName": "ontap-nas", "managementLIF": "10.0.0.1", "dataLIF": "10.0.0.2", "svm": "svm_nfs", "username": "vsadmin", "password": "password", "aggregate": "aggr1" } EOF

. After placing the binary and creating the configuration file, start the Trident daemon using the desired configuration file.
+
[source,console]

sudo trident --config=/etc/netappdvp/ontap-nas.json

+
NOTE: Unless specified, the default name for the volume driver is "netapp".
+
After the daemon is started, you can create and manage volumes by using the Docker CLI interface.

. Create a volume:
+
[source,console]

docker volume create -d netapp --name trident_1

. Provision a Docker volume when starting a container:
+
[source,console]

docker run --rm -it --volume-driver netapp --volume trident_2:/my_vol alpine ash

. Remove a Docker volume:
+
[source,console]

docker volume rm trident_1

+
[source,console]

docker volume rm trident_2

== Start Trident at system startup

A sample unit file for systemd based systems can be found at `contrib/trident.service.example` in the Git repo. To use the file with RHEL, do the following:

. Copy the file to the correct location.
+
You should use unique names for the unit files if you have more than one instance running.
+
[source,console]

cp contrib/trident.service.example /usr/lib/systemd/system/trident.service

. Edit the file, change the description (line 2) to match the driver name and the configuration file path (line 9) to reflect your environment.
. Reload systemd for it to ingest changes:
+
[source,console]

systemctl daemon-reload

. Enable the service.
+
This name varies depending on what you named the file in the `/usr/lib/systemd/system` directory.
+
[source,console]

systemctl enable trident

. Start the service.
+
[source,console]

systemctl start trident

. View the status.
+
[source,console]

systemctl status trident

NOTE: Any time you modify the unit file, run the `systemctl daemon-reload` command for it to be aware of the changes.