본문 바로가기

CI&CD

(13)
폐쇄망 에어플로우(airflow) 설치 Running Airflow in Docker — Airflow Documentation airflow.apache.org 환경상 폐쇄망에서 에어플로우를 설치하게되었다.폐쇄망에 docker(24.0.9)와 compose가 설치되어있는 상태를 가정했다. 1) 외부망에서 파일 준비# docker image 준비docker pull apache/airflow:2.8.1 #원하는 버전docker pull postgres:13docker pull redis:latestdocker save -o airflow.tar apache/airflow:2.8.1docker save -o postgres.tar postgres:13docker save -o redis.tar redis:latest# docker compose..
ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins Jenkins에서 마이그레이션중 build node 연결 중에 에러 발생[07/30/24 11:13:21] [SSH] Checking java version of java[07/30/24 11:13:21] [SSH] java -version returned 17.0.7.[07/30/24 11:13:21] [SSH] Starting sftp client.[07/30/24 11:13:21] [SSH] Copying latest remoting.jar...Source agent hash is -------------------. Installed agent hash is ---------------------Verified agent jar. No update is necessary.Expanded the c..
[SSH] Exception:channel is not opened. 젠킨스에서 계속 세션 문제로 잡이 진행이 안되던 문제가 있었는데, 감을 못잡고있었더니 차장님이 감을 잡아주셨다. ssh 설정변경 sudo vi /etc/ssh/sshd_config #StrictModes yes #MaxAuthTries 6 #MaxSessions 10 MaxSessions 100 #PubkeyAuthentication yes 최대 세션수를 100으로 늘려주었다.
[jenkins] parameter만 다른 job 병렬실행 테스트를 위해 환경 세팅을 하려면 기존의 가상 머신들을 초기 스냅샷으로 다 되돌려야하는데, job하나에서 파라미터만 변경해서 쓰면 되기때문에 이를 위한 구성을 하였다. MultiJob Project로 신규 job생성 General -> Execute concurrent builds if necessary 체크 Build -> MultiJob Phase 생성 Add jobs를 통해 병렬 빌드할 잡 추가 Job : 빌드 대상 Job Advanced -> Add parameters Current build parameters : 상위 job에서 파라미터를 상속받음 Predefined parameters : VAR=TEST_PARAMETER 처럼 사용해서 파라미터 개별 설정 가능 순서에 유의하여 설정 완료하면 ..
[python] 알고리즘 풀이를 위한 함수 max, min : 최댓값과 최소값 print(max(2, 5)) # => 5 print(max(2, 7, 5)) # => 7 print(min(2, 5)) # => 2 print(min(2, 7, 5, 11, 6)) # => 2 append, insert, del, index, reverse : 리스트 조작 함수 my_list = [7, 5, 2, 3, 6] my_list.append(9) # 끝에 9 추가 print(my_list) # => [7, 5, 2, 3, 6, 9] my_list.insert(2, 11) # 2번 인덱스에 11 추가 print(my_list) # => [7, 5, 11, 2, 3, 6, 9] del my_list[2] # 2번 인덱스 값 삭제 print(my_list) # =..
[python]이메일 발송 배포 관련일 하다보면 필연적으로 이메일 발송해야하는 상황이 생긴다. 쉘로는 한계가 있어서 메일만큼은 파이썬으로 구현해서 처리하는편이다. 지원 라이브러리,모듈,API 등등 지원이나 편의성이나 여러모로 좋다. smtplib, email 라이브러리를 이용하는게 보편적인 방법인것인거같다. 최초 구현이 너무 오랜만이라 찾아봤는데, 여기서 사용되는 라이브러리는 내장 라이브러리라 따로 pip install해서 추가로 설치해야 할것도 없다. import smtplib from email.mime.text import MIMEText to_email = 'to@mail.com' # 받는 사람 from_email = 'from@mail.com' # 보내는사람 password = "password" # 보내는 사람 계정 비..
[jenkins]이중화(백업) 젠킨스 백업하면 일반적으로 ThinBackup 플러그인을 사용한다. Aug 01, 2022 3:35:44 PM SEVERE hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException A thread (ThinBackup Worker Thread thread/153) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code. java.nio.file.AccessDeniedException: /var/lib/..
[Python] 예외처리 Traceback (most recent call last): File "znote.py", line 40, in issue_target = str(issue_contents[19][1][1]) KeyError: 1​ Traceback (most recent call last): File "znote.py", line 40, in issue_target = str(issue_contents[19][1]['name']) TypeError: string indices must be integers 에러가 나도 실행을 멈추면 안될때가 작업을 하다보면 생긴다. 내가 겪은 문제는 딕셔너리 조회 중 타입에러가 나면 조건문을 실행하지 않고 다음 값 조회하는 결과물을 원했다. try: #실행할 코드 except : #..

728x90