분류 전체보기
Network01 :: 서브넷 마스크
Network01 :: 서브넷 마스크
2020.08.22ㅡ. 서브넷마스크 네트워크를 잘게 나눠서 사용하기 위해 만들어졌다. 또, 네트워크 아이디와 호스트 아이디를 구분하기 위해 만들어졌다. 1과 0으로 구성되어있다. 1이 연속으로 나오고 나머지 0으로 나온다. /? ?는 1의 개수를 의미한다. (서브넷 마스크를 기준으로) e.g) IP주소 : 201.222.10.60 -> (60) 0011 1100 서브넷마스크 : 255.255.255.248 -> (248) 1111 1000 서브넷은 201.222.10.56 IP에서 사용자에 따라 네트워크 영역과 호스트영역을 나눠준다고 생각하면 된다. (default) C class 255.255.255.0 ㅡ. 서브네팅 네트워크 관리자가 네트워크 성능을 향상시키기 위해 자원을 효율적으로 분배하는것이다. (자원을 분배한다...
GCP22 :: Web배포시 고려할 점
GCP22 :: Web배포시 고려할 점
2020.08.21본 포스팅은 메모 형식으로 작성된 게시글 입니다. 보시는데 다소 불편하실 수 있습니다. ㅠ private, public subnet-> vm -> 이것저것 -> lb -> lb firewall (외부IP 대역 허용, 443(https), 80(http) filter 추가) -> public 베스천vm -> private subnet 에 nat 로통신해서 외부 library 접속 가능 참고로 베스천vm은 ssh로 내부 ip에 접속하는 용도이다. ㅡ. VPC 생성 ㅡ. 방화벽 규칙 SSH 접속을 하기 위해서 TCP::20 그외에 Load-Balancing TCP::80(http), 443(https) 설정합니다. I. SSH ll. LB ㅡ. vm생성 #! /bin/bash apt-get update apt..
GCP21 :: Nginx 통해 배포된 Compute Engine 에 부하분산기 달기(2)
GCP21 :: Nginx 통해 배포된 Compute Engine 에 부하분산기 달기(2)
2020.08.21ㅡ. 스냅샷 만들기 스냅샷을 가지고 디스크를 생성합니다. ㅡ. 디스크 만들기 스냅샷으로 이미지를 생성합니다. ㅡ. 이미지 만들기 생성된 이미지를 통해서 인스턴스 템플릿을 만들자. ㅡ. 부팅디스크 만들기 ㅡ. 인스턴스템플릿 만들기 인스턴스 템플릿으로 인스턴스 그룹을 생성합니다. ㅡ. 인스턴스 그룹 만들기 다중 영역을 위해서 하나더 만든다. http 를 통해 아이피로 들어가게 되면 로드 밸런싱을 수행한 채로 웹사이트가 동작하는것을 확인할 수 있다.
GCP20 :: Google Cloud Compute Engine 이용해서 Vue.js 배포하기(Nginx)
GCP20 :: Google Cloud Compute Engine 이용해서 Vue.js 배포하기(Nginx)
2020.08.21우선 vue project에서 npm run build 수행하자! 서버를 하나 만들어줬다. GCP에서 Compute Engine 을 다음 스펙으로 만들었다. ssh 로 접속해서 rsa keygen 생성한것을 등록해준다. 2020/08/21 - [Cloud] - bigQuery에서 pub/sub 으로 불러오고, compute engine 에 올려서 event stream 수행하기-1 sudo apt-get install nginx nginx를 설치하자 filezilla를 다운받았습니다. 다운받는경로 : https://filezilla.kr.uptodown.com/mac/download filezilla 이용할때는 Putty도 함께 사용해야 합니다. mac에 putty 까는게 없네... 어찌저찌 옮겼다. (..
GCP19 :: CPU와 메모리 관계(2)
GCP19 :: CPU와 메모리 관계(2)
2020.08.21ㅡ. 메모리 계층 구조 메모리 계층 구조를 보면 : 레지스터>캐시>메모리>하드디스크 순으로 되어있다. 만약 CPU가 한번에 50개 데이터를 처리할 수 있고 메모리가 25개의 데이터를 처리할 수 있다고 가정하면 process : 메모리에서 25개를 처리하고 CPU에서 25개를 처리합니다. CPU가 전부 처리할 수 있지만 전달된 데이터만 처리하기 때문에 CPU가 높은것이 성능에 크게 좌우하지 않는다. CPU와 메모리가 서로 나눠서 처리한다. 결과적으로 연산이 많다면, CPU 사양이 높은것을 고르고 API 로 말아서 데이터를 보내주는 작업이라면, 메모리 사양이 높은것을 고르자.
Spring02 :: Spring boot jar 파일 배포
Spring02 :: Spring boot jar 파일 배포
2020.08.21maven 환경에서 tomcat 이 내장된 spring boot 프로젝트를 jar파일로 바로 배포하는 것을 실습해본다. ㅡ. pom.xml 셋팅 spring-boot-starter-tomcat을 추가해줬습니다. (https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-tomcat/2.3.3.RELEASE) 프로젝트 우클릭 - Maven Build 를 실행합니다. build를 통해서 package 를 진행하자. ㅡ. 테스팅 java -jar [jar파일명.jar] jar 파일이 있는곳으로 가서 위 명령어를 실행하게 되면 아래와 같이 동작하는것을 확인할 수 있습니다.
GCP18 :: LB(Load-Balancer)
GCP18 :: LB(Load-Balancer)
2020.08.21workflow는 다음과 같다. VM인스턴스 -> 스냅샷 -> 디스크 -> 이미지 -> 인스턴스템플릿 -> 인스턴스 그룹 -> 로드 밸런서 #! /bin/bash apt-get update apt-get install -y apache2 cat [ 부하 분산 ] 탭이 있다. 인터넷 트래픽 부하분산을 선택했다. 백엔드 서비스를 생성하고 새백엔드 옵션을 이렇게 주었다. 백엔드를 하나 더 추가하자. 유럽 인스턴스 그룹을!! 그 다음에 해야할것은 상태 확인 부분에서 상태 확인 생성이다. 이제 생성을 누르면 백엔드 구성이 완료된다. 그 다음에 호스트및 경로규칙을 누른다. [ 호스트 및 경로규칙 ] 은 규칙에 따라 라우팅 방식을 지정할 수 있지만! 지정하지 않을 수 도 있다. 그 다음에 프론트엔드 구성을 누른다. ..
Linux03 :: bash, update, cat
Linux03 :: bash, update, cat
2020.08.21ㅡ. #! /bin/bash 쉘 스크립트 작성시에 첫 라인에 #! /bin/bash를 기재합니다. 이 의미는 스크립트 파일을 bash shell로 실행시킨다는 의미입니다. e.g)tcsh로 실행시킨다. #! /bin/tcsh 로 시작 또다른 의미는 !/bin/bash 로 지정해서 다른 쉘 간의 오류를 방지합니다. ㅡ. apt-get update 사용 가능한 패키지와 그 버전들의 리스트를 업데이트 합니다. 최신 버전 패키지 확인해서 우분투내에 알려주는 역할을 수행합니다. cat 다음에 EOF > > EOF
bigQuery에서 pub/sub 으로 불러오고, compute engine 에 올려서 event stream 수행하기
bigQuery에서 pub/sub 으로 불러오고, compute engine 에 올려서 event stream 수행하기
2020.08.21bigQuery table 에서 event stream 을 수행하면서 publisher 의 topic에 message를 전송하고 이를 apache-beam 상에서 코드로 동작시켜 ETL을 수행하는것까지 진행!! event stream은 local에서 compute engine 동작시켜서 stream이 끝날 때까지 수행하는것을 역할로 잡았습니다. 미리 public-data-set 의 stackoverflow dataset을 bigQuery table로 Import 했습니다. 제가 이 테스팅을 진행하는건 tags 와 view_count를 가지고 중복되는 tags 이름에 총 몇번의 view_count를 가지고 있는지 확인하려고 합니다. (물론 | 기준으로 split 해야합니다.) pub/sub에서 stream..
데이터 스튜디오 이용해 bigQuery 시각화
데이터 스튜디오 이용해 bigQuery 시각화
2020.08.20dataStudio 가 bigQuery에 접근할 때 bigQuery connector 를 사용하게 됩니다. 이후에 약관동에에 대해서 전부 동의해줍니다. 보고서에 데이터를 추가하고, 검색어에 bigQuery를 입력합니다. 권한에 대해 승인하고 [Project선택] - [Public Dataset 선택] - [tableset 선택] 이후 보고서에 데이터를 추가합니다. natality에 대한 테이블 정보를 확인해보겠습니다. 레포트가 생성되면 데이터소스를 클릭해서 구글 docs에 나와있는 1단계는 모두 끝났습니다. ㅡ. 막대 그래프 생성하기 차트에서 막대그래프를 선택합니다. 이후에 측정기준에 source_year 을 찾고, 측정항목에 birth_count 를 생성 후 COUNT(is_male)을 입력하면 이와 ..
ISSUE12 :: git commit message
ISSUE12 :: git commit message
2020.08.20최근에 git-cz 를 받고 어떻게 message 를 작성할까 고민을 많이 했다. *ref ; https://djkeh.github.io/articles/How-to-write-a-git-commit-message-kor/ 단순하게 몇가지 example을 보면서 좋은 commit message를 확인해보자. 제목을 명령문으로 쓰는것은 git's built-in convention 을 따른다고 소개되어 있습니다. e.g) Fixed bug with apache-beam 본문은 평서문으로 작성한다고 합니다. (본문을 구체적으로 써본적은 없네....) 가장 흥미롭게 읽었던것은 이슈번호이다. {동작} #번호 - 내용 e.g) Test #30 - [Context] 이슈 번호와 연결할 수 있는 링크가 생성된다고 합..
ISSUE11 :: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
ISSUE11 :: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
2020.08.20Google Cloud Pub/Sub 을 쓰다가 해당 이슈를 만났다. 나는 PipelineOptions 에다 return_immediately=True 옵션을 주었다. 우선은 publisher 에서 topic으로 message를 전송할때 dataflow에서 pub/sub을 잘 읽어오긴한다.. *ref : https://github.com/googleapis/python-pubsub/issues/36 google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded · Issue #36 · googleapis/python-pubsub Hi We are using google pub sub api for implementing the publisher /..