본문 바로가기

Infra System22

Common Lib Stub - Inner Architecture Inner Architecture에 속하는 애플리케이션으로, Kafka Management를 수행하는 프로젝트입니다. ManagementTopicListener 비즈니스 어플리케이션명으로 시작하는 카프카 토픽을 구독합니다. [KafkaListener] @Component class ManagementTopicListener { @KafkaListener(topics = ["\${spring.application.name}.management.topic"]) fun listen(message: ManagedMessage) { println("received : $message") } 자식 어플리케이션에서 설정 (1) yml 설정 어플리케이션명을 기준으로 토픽을 구독하기 때문에 yml 설정에서 애플리케이션명.. 2020. 10. 14.
Application Dependency Declaration 아래는 Application Dependency Declaration입니다. 1. Starter - 0 depth 0 depth dependencies를 의존하고 있는 프로젝트로, 아키텍처의 최상위 부모 프로젝트. 하위 Eureka-Client Starter와 MongoDB Starter, MariaDB Starter를 모듈로 가지고 있습니다. spring-boot-starter-parent를 부모로 의존하고 있으며, 해당 프로젝트를 maven install 후 pom에서 아래와 같이 parent로 지정하여 사용할 수 있습니다. kr.kellis.air air-starter {latest version} 2. Eureka-Server - 1 depth 1 depth dependencies에서 Eureka.. 2020. 10. 14.
nexus install on kubernetes How To Setup Latest Nexus OSS On Kubernetes를 참고하여 설치하였으며, 부분적으로 누락된 내용이 있어 다시 정리하였습니다. 설치 방법 1. namespace 생성 kubectl create namespace devops-tool 2. Deployment.yaml 파일 생성 vi Deployment.yaml Deployment.yaml의 내용은 아래와 같습니다. apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nexus namespace: devops-tool spec: replicas: 1 template: metadata: labels: app: nexus-server spec: containers: - .. 2020. 10. 13.
nexus install on ec2 How To Install Latest Sonatype Nexus 3 on Linux을 참고하여 설치하였으며, 자세한 내용은 링크를 확인해 주시기 바랍니다. 설치 방법 1. ec2 인스턴스를 생성합니다. 그러나 Nexus가 2GB Memory를 요구하기 때문에 free tier로는 설치가 안돼서 small 인스턴스를 생성했습니다. 2. wget, jdk1.8을 설치. sudo yum update -y sudo yum install wget -y sudo yum install java-1.8.0-openjdk.x86_64 -y 3. nexus 설치를 위해, root directory에 app을 생성. sudo mkdir /app && cd /app 4. nexus를 wget으로 다운로드. sudo wget.. 2020. 10. 13.
mongodb install on kubernetes helm을 이용하여 설치했으므로, helm이 설치되어 있어야 합니다. 1. 설치 방법 1. helm으로 mongodb 설치 helm install --name air-mongodb --namespace persistence -f ./mongodb/values.yaml stable/mongodb 이때, name과 namespace의 순서가 중요합니다. namespace가 먼저 나오면 적용되지 않고 default로 지정됩니다. 이때 사용한 values.yaml은 아래와 같습니다. 더보기 ## Global Docker image parameters ## Please, note that this will override the image parameters, including dependencies, confi.. 2020. 10. 13.
mongodb install using docker(standalone) Secure mongodb setup using Docker을 참고하여 docker image로 mongodb를 설치하였습니다. 자세한 내용은 링크를 참고하시기 바랍니다. 1.mongodb의 데이터를 저장할 directory 생성 왜 생성해야하는지는 docker volume에 대해서 알아야 이해할 수 있는 부분인데, 이에 대한 자세한 내용은 공식 문서를 참고하시기 바랍니다. mkdir ~/mongodb-volume 2. docker로 mongodb 실행 docker run -d --name mongodb -p 27017:27017 -v ~/mongodb-volume:/data/db mongo --auth 마지막에 --auth 옵션은 mongodb를 authentication 가능하도록 하는 옵션으로, 이.. 2020. 10. 13.
mongodb install on ec2 How to Install Mongodb With Authentication on EC2 AMI Linux를 참고하여, EC2에 Mongodb를 설치했습니다. 이 포스트에서는 직접 실행했던 명령어와 설치&테스트를 하면서 겪었던 문제를 정리해 보겠습니다. 설치방법 1. mongodb yum repository 등록 vi /etc/yum.repos.d/mongodb-org-3.0.repo 등록 내용은 아래와 같습니다. [mongodb-org-3.0.repo] [mongodb-org-3.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.0/x86_64/ gpgcheck=0 enabled=1 2... 2020. 10. 13.
mariadb cluster install on kubernetes helm으로 설치하였으며, 따라서 helm이 설치되어 있어야 합니다. 1. 설치 방법 1. helm으로 mariadb 설치 helm install --name air-mariadb --namespace persistence --set rootUser.password=root#,db.user=air,password=air# -f values.yaml stable/mariadb 이때 사용한 values.yaml은 아래와 같으며, 여기에서 가장 중요한 것은 외부 포트 오픈을 위해 service: NodePort를 지정해주었다는 것입니다. 더보기 ## Global Docker image parameters ## Please, note that this will override the image parameter.. 2020. 10. 13.
kafka cluster installation on kubernetes Kafka on kubernetes를 참고하여, kafka cluster를 설치하였으며, 실제로 수행한 명령어만 이 포스트에 기재되어 있습니다. 자세한 설명은 링크를 참고하시기 바랍니다. 또한, helm을 이용하여 설치하였으므로 helm이 설치되어 있어야 합니다. 1. 설치 방법 1. helm repository 추가 helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator 2. helm으로 kafka cluster 설치 helm install --name air-kafka --namespace message-broker incubator/kafka -f values.yaml values.yaml을 옵션으로 넘겨주지.. 2020. 10. 13.
jenkins install on kubernetes Helm chart Github을 참고하여 설치하였으며, 이 포스트에서는 실제로 수행한 명령어만 정리했습니다. 자세한 설명은 링크를 참고하시기 바랍니다. 1. 설치 방법 helm install --name air-jenkins --namespace devops-tools stable/jenkins -f values.yaml values.yaml은 다음과 같습니다. 더보기 # Default values for jenkins. # This is a YAML-formatted file. # Declare name/value pairs to be passed into your templates. # name: value ## Overrides for generated resource names # See tem.. 2020. 10. 13.