Bluemix Cloudant 서비스를 위해 Liberty 구성

IBM® Bluemix® 유틸리티 명령행 통합 도구를 사용하면 Bluemix Cloudant® 서비스를 사용하도록 Liberty 서버를 구성할 수 있습니다.

시작하기 전에

Bluemix 서비스를 사용하도록 Liberty 서버를 구성하기 전에 계정을 작성해야 합니다. IBM Bluemix에 가입을 참조하여 Bluemix 계정을 작성하십시오.

이 태스크 정보

Cloudant 서비스를 사용하도록 Liberty 서버를 구성하십시오. Cloudant에 관한 자세한 정보는 Cloudant NoSQL DB 시작하기를 참조하십시오. 추가로, 애플리케이션은 Ektorp 라이브러리를 사용하여 Cloudant 서비스에 액세스해야 합니다. 자세한 정보는 Ektorp 시작을 참조하십시오.

프로시저

  1. bluemixUtility login 명령을 사용하여 로그인하십시오. 초기 로그인 후에는 이 단계를 다시 완료하지 않아도 됩니다.
  2. bluemixUtility marketplace 명령을 실행하여 명령행 유틸리티와 함께 사용할 수 있는 모든 Bluemix 서비스에 대한 세부사항을 나열하십시오. 다음 예를 참조하십시오.
    Service: cloudantNoSQLDB 
    Description: Cloudant NoSQL DB provides access to a fully managed NoSQL JSON data layer that's always on. 
    This service is compatible with CouchDB, and accessible through a simple to use HTTP interface for mobile 
    and web application models. 
    Documentation: https://www.ng.bluemix.net/docs/#services/Cloudant/index.html#Cloudant 
    Plans: Shared, Enterprise SMB, Enterprise Standard
  3. 참고: 인스턴스를 이미 작성한 경우에는 4단계로 건너뛰십시오. Bluemix 대시보드에서 인스턴스를 작성할 수도 있습니다.
    bluemixUtility createService [options] serviceType servicePlan serviceName 명령을 실행하여 사용하려는 Bluemix 서비스의 인스턴스를 작성하십시오. 나열된 서비스에 대한 다음 예 및 설명을 참조하십시오.
    $ bluemixUtility createService cloudantNoSQLDB Shared myCloudantService
  4. 옵션: bluemixUtility listServices 명령을 실행하여 작성한 모든 서비스 인스턴스의 이름, 유형 및 계획을 보십시오. 다음 예제를 참조하십시오.
    myCloudantService cloudantNoSQLDB Shared
  5. bluemixUtility import myCloudantService 명령을 실행하여 구성을 가져오십시오.
    1. 서비스에 액세스하기 위해 필요한 라이브러리의 라이센스 이용 약관에 동의하십시오.
    2. 구성을 가져온 후 애플리케이션에서 가져온 구성을 사용하기 위해 필요한 추가 단계를 완료하십시오(예: 라이브러리에 대한 클래스 로더 참조 추가). 예를 들어, 다운로드되는 Ektorp 라이브러리를 사용하려면 애플리케이션에 대한 다음 클래스 로더 참조를 추가해야 합니다.
      <application id="myCloudantApp">
                      <classloader commonLibraryRef="cloudantNoSQLDB-library"/>
              </application>
  6. 옵션: bluemixUtility listImports 명령을 실행하여 가져온 서비스 구성을 보십시오.
    The following IBM Bluemix service configurations have been imported:
    myCloudantService
  7. bluemixUtility bind [options] serverName serviceName을 실행하여 구성을 Liberty 서버에 바인드하십시오. 프롬프트가 표시되면 라이센스 이용 약관에 동의하십시오. 나열된 서비스에 대한 다음 예 및 설명을 참조하십시오.
    $ bluemixUtility bind defaultServer myCloudantService
    
    Checking if features required for the myCloudantService are installed.
    All required features are installed.
    The myCloudantService is now bound to defaultServer server.
    couchdb-1.0 기능은 필수입니다. Cloudant 데이터베이스의 기본 JNDI 이름은 couchdb/serviceName입니다. 애플리케이션이 다른 JNDI 이름을 사용하여 데이터베이스 인스턴스에 액세스하는 경우에는 --vjndiName 옵션을 사용하여 JNDI 이름을 지정하십시오. 다음 예제를 참조하십시오.
    $ bluemixUtility bind defaultServer myCloudantService --vjndiName=couchdb/connector

결과

이제 Cloudant 서비스를 Liberty 서버와 함께 사용할 수 있습니다.

주제의 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: Tuesday, 6 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twlp_config_blmx_cloudant
파일 이름: twlp_config_blmx_cloudant.html