Github Your repository -> Settings Integrations & services tab Click 'Add service' -> Jenkin (Github plugin) Jenkins hook url: http://github-webhook/ Hooks tab Click 'Add webhook' Payload URL: https:///ghprbhook/ Content type: application/x-www-form-urlencoded Check 'Jeus the push event'
Chrome Browser Download url: https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm $ sudo yum localinstall google-chrome-stable_current_x86_64.rpm # command $ google-chromeChrome Driver Download url: http://chromedriver.chromium.org/downloads https://chromedriver.storage.googleapis.com/75.0.377..
증상 Jenkins 실행하면 Permission denied 가 발생한다. Terminal 로 접속하여 직접 ansible command를 실행하면 정상 접근이 된다. Terminal 에서 수동 실행 후 Jenkins 에서 실행하면 또 된다. 확인 내용 구글링을 했더니 ssh 관련 로그 위치를 알 수 있었다. 위치는 /var/log/secure 접근 안될 때 내용을 보니 아래와 같다. Apr 26 12:14:45 XXXXX sshd[74792]: Authentication refused: bad ownership or modes for file /home/xxxxx/.ssh/authorized_keys Apr 26 12:14:45 XXXXX sshd[74795]: Connection closed by 1..
"스크린샷" 을 다른 문구로 변경 터미널 (Terminal)을 엽니다. iTerm2 사용하시면 iTerm2을 사용하셔도 되구요. defaults write com.apple.screencapture name "" ex) defaults write com.apple.screencapture name "screen_capture" && killall SystemUIServer 여기서 "&&" 는 앞에꺼 실행 후에 곧바로 뒤에꺼 연속으로 실행하는 옵션입니다. 예) defaults write com.apple.screencapture name "screen_capture" && killall SystemUIServer 이렇게 할 경우 아래와 같은 형태로 생성이 됩니다. 그러나 "오전/오후"가 아직도 한글이죠. ..
Document: https://help.sonatype.com/repomanager2/configuration/security-setup-with-user-tokens Security Setup with User Tokens Resetting user tokens forces the users to update the settings.xml with the newly created tokens and potentially breaks any command line builds using the tokens until this change is carried out. This specifically also applies to continuous integration serve help.sonatype...
Jenkins 에서 빌드 시 아래와 같은 오류 발생하면서 빌드가 실패하곤 하는데요. Couldn't find any revision to build. Verify the repository and branch configuration for this job 그럴 경우, Jenkins 에서 해당 잡 설정으로 가서 Git 설정을 수정합니다. Refspec 란에 `+refs/pull/*:refs/remotes/origin/pr/*` 을 설정합니다.
If you install yum with yum, you may get the following error. yum 으로 특정 패키지 설치 시 아래와 같이 에러가 발생하는 경우가 있다. $ sudo yum install telegraf rpmdb: Thread/process 62517/140235890440096 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 - (-30974) error: cannot open Package..
@Autowired private Environment env; public void method() { String url = env.getProperty("memcached.url"); } @Value("${memcached.url}") String memcachedUrl; public void method() { String url = memcachedUrl; }
import socket import sys import os try: hosts = os.environ['hosts'] print('=============================================') for host in hosts.replace('\n',' ').replace(',', ' ').split(): ip = socket.gethostbyname(host) print('{}\t{}'.format(host, ip)) print('=============================================') except IndexError as idxErr: print('Usage : python3 get_ip.py ')
Search full (전체 조회)$ sysctl -a Find specific values only (특정 파라미터만 조회)# use option 'grep' $ sysctl -a | grep keepalive_time Change the value (값 수정)# use option '-w' (-w 옵션 사용) ex) sysctl -w net.ipv4.tcp_keepalive_time="240"
total - free - buffers - cached
# 힙메모리 설정-Xms8g -Xmx8g # GC 설정-XX:+UseG1GC -verbose:gc -Xloggc:/kakao/logs/gc/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps # 힙덤프 설정-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/kakao/logs/heapdump/ # JMX 관련-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticat..
Swap 메모리 초기화 스왑 모드를 껐다(OFF)가 다시 켜면(ON) 된다.$ swapoff -a && swapon -a # root 계정이 아닐 경우$ sudo swapoff -a && sudo swapon -a * 기존 swap을 많이 사용중이었다면 위 명령어를 실행 후 다소 시간이 소요된다.* swapoff 를 하면 swap 에 있던 것을 physical memory 에 옮겨지기 때문에 physical memory 사용량이 좀 더 증가할 수 있다.
Environment variablesenvironment 에다가 설정하면 된다.사용할 때는 $변수명 형태로 사용하면 된다.예제pipeline { environment { PROJECT = "my_project" PHASE = "alpha" } agent { label "BUILD"} stages { stage("START") { steps { sh 'echo "project: $PROJECT, phase: $PHASE"' } } }}
참고자료- Declarative Pipeline: Notifications and Shared Libraries : https://jenkins.io/blog/2017/02/15/declarative-notifications/- Extending with Shared Libraries: https://jenkins.io/doc/book/pipeline/shared-libraries/ 저장소를 만들자공유 라이브러리를 저장할 저장소를 생성한다.디렉토리 구성은 아래와 같이 한다. vars 밑에 넣어두면 된다. (root) +- src # Groovy source files | +- org | +- foo | +- Bar.groovy # for org.foo.Bar class +- vars | +- foo.gr..
common.yml 이라는 playbook 파일이 있다는 과정에서 다른 playbook 에서 common.yml 을 Include 하는 방법은 아주 간단한다. ---- include: common.yml vars: param1: "param1_value" param2: "param2_value" 위와 같이 작성하면 되고 파라미터 전달 시 vars 구문을 이용하면 된다.공통적인건 common에 하드코딩하고 각 playbook 마다 다르게 적용하고 싶으면 vars 로 전달 후 common.yml 에서 {{param1}}, {{param2}} 형태로 사용하면 된다.
크게 2가지 1.$ kill -3 - 실행한 경로에서 덤프 파일 생성- 만약 -3 을 생략할 경우 프로세스가 종료되므로 조심 2.$ jstack > jstack 경우 부하가 kill -3 보다 있음.CPU 가 100% 인 상황에선 아무래도 kill -3 이 더 나음 PID 확인 방법$ ps -ef | grep java 아래와 같이 awk 를 사용해서 pid만 추출할 수 있다.$ ps -ef | grep java | grep -v grep | awk '{print $2}' * grep -v grep 은 지금 실행하는 명령도 프로세스로 표시 되기 때문에 제외 처리
출저: 자바 개발자와 시스템 운영자를 위한 트러블 슈팅 이야기 (http://www.yes24.com/24/Goods/5209760?Acode=101) 쓰레드 상태NEW- 쓰레드가 아직 시작 되지 않는 상태 RUNNABLE- 쓰레드가 수행 중인 상태 BLOCKED- 쓰레드가 잠겨 있어서 풀리기만 기다리는 상태 WAITING- 다른 쓰레드가 특정 작업을 수행하여 깨울 때까지 무한정 기다리는 상태- 별다른 요청이 없는 상황에서도 대부분 WAITING 상태 TIMED_WAITING- 다른 쓰레드가 특정 작업을 수행하여 꺠울 때까지 지정된 시간만큼 기다리고 있는 상태 TERMINATED- 쓰레드가 종료된 상태 * 유심히 봐야할 상태는 RUNNABLE 과 BLOCKED
2개의 세션으로 나누어져 있습니다. Ansible 교육 자료 - 01. Introduction: http://mcpaint.tistory.com/277Ansible 교육 자료 - 02. Playbooks: http://mcpaint.tistory.com/278https://github.com/mcpaint/learning-ansible/tree/master/02_Playbooks PlaybooksPlaybook 이란?Playbooks - play - tasks 구조 #1Playbooks - play - Roles 구조Playbooks - Hosts - Roles 관계문법의 변화특정 버전에서 부터 문법이 달라졌다. 두개 모두 사용이 가능하다.file 모듈을 예로 들자면변경 전- file: path=/etc..
2개의 세션으로 나누어져 있습니다. Ansible 교육 자료 - 01. Introduction: http://mcpaint.tistory.com/277Ansible 교육 자료 - 02. Playbooks: http://mcpaint.tistory.com/278 https://github.com/mcpaint/learning-ansible/tree/master/01_Introduction Introduction왜 Ansible 인가?다음과 같은 니즈가 있을 경우 어떻게 처리할 것인가?우리팀 전체 서버의 PING을 체크하고 싶다.우리팀 전체 서버의 OS 버전을 알고 싶다.A라는 프로젝트에 10대의 신규 서버가 추가 투입되어 서버 셋팅이 필요하다.어제날짜 기준 Nginx Access Log 건수를 알고 싶다...
- Total
- Today
- Yesterday
- 쉘스크립트
- groovy
- Jenkins
- iTerm2
- Shell Script
- vagrant
- PostgreSQL
- Linux
- Docker
- DevOps
- 젠킨스
- 쓰레드덤프
- 파이프라인
- Thread Dump
- Password manager
- Playbook
- Ansible
- Nexus
- 엔서블
- 데브옵스
- nginx
- URL Encoding
- 리눅스
- 플레이북
- JVM
- 엔시블
- openssl
- Config History
- ssl
- rsync
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |