본문 바로가기
[Cloud]/Openwhisk

Rancher2.0 + Kubernetes + longhorn + helm & Openwhisk 구성

by journes 2019. 3. 12.

Rancher2.0 + Kubernetes + longhorn  + helm  & Openwhisk 구성


요즘 잼있게 보고 있는 openwhisk 를 rancher2.0을 통해 구성해 봤습니다. 



[rancher2.0 설정 내역  ]




[ Longhorn 설정 내역 ] 

 -  분산형 블록 스토리지 ( distributed block storage systems ) - 컨테이너 베이스 !

       > 이건 차후. 별도로 정리해 보겠습니다. 





기본  설정 

 

1. WSK INSTALL 

    > Client 쪽에 wsk (Cli command )  Install






2. property 설정 

 

서버 등록 (TEST 서버 등록 )

 > wsk property set --apihost yourIP:Port  

 

Key  등록 (guest 계정용

 > wsk property set --auth your-Key




TEST 방법 

 

1. hello.js  파일  생성 

 

 > hello.js 파일 생성.

----------------------------------------------------

/**

 * Hello world as an OpenWhisk action.

 */

function main(params) {

    var name = params.name || 'World';

    return {payload:  'Hello, ' + name + '!'};

}

-------------------------------------------------------






2. web action 생성 및 확인 

   web action 생성     

    > wsk -i action create /guest/demo/hello hello.js --web true

 

   List 등록 확인 

    > wsk -i list






3. 결과 확인

    Function 실행

    > wsk -i action invoke /guest/demo/hello --result