Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
1. microservice pattern책의 부록 부분을 참고하여 window에서 리눅스를 사용할 수 있도록(WSL2등) 설치/설정한다.
2. kubernetes로 서비스를 기동할때 몇가지 수정해야할 부분이 있다.
(kubernetes가 버젼이 올라가면서 예제로 만들어진 kubernetes기동용 yaml과 script자체가 잘못되거나 없어진 옵션을 사용하고 있어 몇가지를 수정해야한다.)
가. apps/v1beta1를 apps/v1로 수정
나. extentions/v1beta1를 apps/v1로 수정
다. selector.matchLabels.app에 app이름 추가
라. metadata의 label항목에 app: app이름 추가
3. github소스 받아 build및 docker이미 생성
가. git clone github.com/microservice-patterns/ftgo-application
나. cd ftgo-application
다. ./gradlew buildContracts
라. ./gradlew assemble
4. container 배포
가. cd ~/ftgo-application/deployment/kubernetes/scripts
나. ./kubernetes-deploy-all.sh
gooper@DESKTOP-PJ7F3IU:~/ftgo-application/deployment/kubernetes/scripts$ ./kubernetes-deploy-all.sh
secret/ftgo-db-secret created
service/ftgo-dynamodb-local created
statefulset.apps/ftgo-dynamodb-local created
job.batch/ftgo-dynamodb-local-init created
service/ftgo-kafka created
statefulset.apps/ftgo-kafka created
service/ftgo-mysql created
statefulset.apps/ftgo-mysql created
service/ftgo-zookeeper created
statefulset.apps/ftgo-zookeeper created
....................................................................................................................................connected
service/ftgo-cdc-service created
deployment.apps/ftgo-cdc-service created
5. container삭제
gooper@DESKTOP-PJ7F3IU:~/ftgo-application/deployment/kubernetes/scripts$ ./kubernetes-delete-all.sh
service "ftgo-cdc-service" deleted
deployment.apps "ftgo-cdc-service" deleted
secret "ftgo-db-secret" deleted
service "ftgo-dynamodb-local" deleted
statefulset.apps "ftgo-dynamodb-local" deleted
job.batch "ftgo-dynamodb-local-init" deleted
service "ftgo-kafka" deleted
statefulset.apps "ftgo-kafka" deleted
service "ftgo-mysql" deleted
statefulset.apps "ftgo-mysql" deleted
service "ftgo-zookeeper" deleted
statefulset.apps "ftgo-zookeeper" deleted
6. port forwarding하기 (이거 반드시 실행해줘야 한다)
가. cd ~/ftgo-application/deployment/kubernetes/scripts
나. ./port-forwards.sh
7. swagger ui를 이용한 서비스 테스트
가. consumer controller; http://127.0.0.1:8081/swagger-ui/
나. order controller, restaurant conroller; http://127.0.0.1:8082/swagger-ui/
다. kitchen controller, restaurant conroller; http://127.0.0.1:8083/swagger-ui/
라. basic error controller, operation handler, restaurant conrolle, web-mvc-link-handler ; http://127.0.0.1:8084/swagger-ui/
마. accounts controller; http://127.0.0.1:8085/swagger-ui/
* 수정해야 하는 파일 #1
gooper@DESKTOP-PJ7F3IU:~/ftgo-application/deployment/kubernetes/scripts$ ls -al ~/ftgo-application/*/src/deployment/kubernetes/*.yml
-rw-r--r-- 1 gooper gooper 1820 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-accounting-service/src/deployment/kubernetes/ftgo-accounting-service.yml
-rw-r--r-- 1 gooper gooper 1542 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-api-gateway/src/deployment/kubernetes/ftgo-api-gateway.yml
-rw-r--r-- 1 gooper gooper 1780 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-consumer-service/src/deployment/kubernetes/ftgo-consumer-service.yml
-rw-r--r-- 1 gooper gooper 1802 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-kitchen-service/src/deployment/kubernetes/ftgo-kitchen-service.yml
-rw-r--r-- 1 gooper gooper 2123 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-order-history-service/src/deployment/kubernetes/ftgo-order-history-service.yml
-rw-r--r-- 1 gooper gooper 1931 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-order-service/src/deployment/kubernetes/ftgo-order-service.yml
-rw-r--r-- 1 gooper gooper 1853 Jan 30 10:17 /home/gooper/ftgo-application/ftgo-restaurant-service/src/deployment/kubernetes/ftgo-restaurant-service.yml
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
10 | 호출 url현황 | 2023.02.21 | 177 |
9 | ./gradlew :composeDown 및 ./gradlew :composeUp 를 성공했을때의 메세지 | 2023.02.20 | 165 |
8 | [ftgo_application]Unable to infer base url오류 발생시 조치방법 | 2023.02.20 | 2026 |
7 | 주문히스토리 조회 | 2022.04.30 | 152 |
6 | 주문 생성 데이터 예시 | 2022.04.30 | 206 |
5 | restaurant-controller,에서 등록 예시 | 2022.04.30 | 174 |
4 | [vue storefrontui]외부 API통합하기 참고 문서 | 2022.02.09 | 165 |
3 | vuestorefrontui.io를 이용한 front end project 생성하기 | 2022.02.06 | 209 |
2 | eclipse editor 설정방법 | 2022.02.01 | 576 |
» | windows10 pro에서 microservice pattern책의 예제를 kubernetes에서 기동하는 방법 | 2022.01.30 | 274 |