목록분류 전체보기 (65)
개발그래머

1. Ansible 서버 등록 젠킨슨관리 -> 시스템 -> publish over ssh 2. Ansible project item 생성(기존 docker project를 카피하여 생성) 3. ssh publishers 변경 4. 지금 빌드 실행 -> Ansible 서버에서 war파일 생성되었는지 확인 5. ansible 서버에서 playbook 생성 vi first-devops-playbook.yml //플레이북 생성 - hosts: all # become: true tasks: - name: build a docker image with deployed war file command: docker build -t cicd-project-ansible . //Docker파일과 war를 이용하여 dock..

사용자가 원하는 내용을 미리 작성해 놓은 파일 설치, 파일전송, 서비스 재시작 다수의 서버에 반복 작업을 처리하는 경우 1. hosts 파일에 그룹 및 host 추가 vi first-playbook.yml //playbook 파일 생성 --- - name: Add an ansible hosts hosts: localhost tasks: - name: Add an ansible hosts blockinfile: path: /etc/ansible/hosts block: | [mygroup] 172.17.0.5 ansible-playbook first-playbook.yml // playbook 실행 cat /etc/ansible/hosts //추가되었는지 확인 2. 파일 이동 vi playbook-sampl..

ansible 명령어 실행옵션 -i(--inventory-file) 적용될 호스트들에 대한 파일정 -m(--module-name) 모듈 선택 -k(--ask-pass) 관리자 암호 요청 -K(--ask-become-pass) 관리자 권한 상승 --list-hosts 적용되는 호스트 목록 ansible의 중요한 특성 = 멱등성 같은 설정을 여러 번 적용하더라도 결과가 달라지지 않는 성질 1. 서버 연결 확인 ansible all -m ping 2. 메모리 용량 확인 ansible all -m shell -a "free -h" 3. 파일 전송 테스트 touch test.txt //파일 생성 echo "Hi,there" >> test.txt cat test.txt ansible all -m copy -a "s..

1. ansible 도커 이미지 다운(실습용 이미지 만들어진게 있음, ubuntu나 centos안에 ansible을 설치하여 실행해도 무방) docker pull edowon0623/ansible-server:m1 2. ansible 도커 실행 docker run --privileged --name ansible-server -itd -p 20022:22 -p 8082:8080 -e container=docker -v /sys/fs/cgroup:/sys/fs/cgroup --cgroupns=host edowon0623/ansible-server:m1 /usr/sbin/init 3. 컨테이너 ip 확인 docker network inspect bridge 4. 호스트네임, ansible 버전 확인 host..

Infrastructure as Code(IaC) 시스템, 하드웨어 또는 인터페이스의 구성정보를 파일(스크립트)을 통해 관리 및 프로비저닝 프로비저닝 사용자의 요구에 맞게 시스템 자원을 할당, 배치, 배포해 두었다가 필요 시 시스템을 즉시 사용할 수 있는 상태로 미리 준비해 두는 것 IT 인프라스트럭쳐, 베어 메탈 서버 등의 물리 장비 및 가상 머신과 관련된 구성 리소스를 관리 버전 관리를 통한 리소스 관리 구성 관리 도구, 빠르고 가벼움, 문제점을 해결하는 용도, 문제 대응 작업 등 Ansible, Terraform, AWS CloudFormation, CHEF, puppet Ansible vs Terraform Ansible : 이미 구축되어 있는 서버들의 구성정보를 변경하거나 관리하는 용도로 많이 ..

https://gradle-ssh-plugin.github.io/ Gradle SSH Plugin — Deploy your App from Gradle Intuitive DSL Desinated DSL for SSH operations, integrated with Gradle. Remote command execution and file transfer. Interaction with standard I/O of remote command or shell. gradle-ssh-plugin.github.io 로컬에서 빌드 후 파일질라를 이용하여 빌드된 파일을 옮긴 후 putty를 이용해 해당 서버로 접속한 다음 디렉터리에 찾아가 스크립트를 실행하는 반복작업이 불편하신 분들 젠킨슨 서버를 구성할 환경이 안..

1. 프로젝트 생성 -> 기존 maven-project를 카피해서 사용 2. 빌드유발 -> Poll SCM 체크해제 3. 빌드 후 조치 -> Send build artifacts over SSH 설정 4. 지금 빌드 후 success 확인 및 해당 서버에 war파일 생성 되었는지 확인 5. 도커로 빌드 후 실행 -> localhost:8081/hello-world 들어가 실행 확인 vi Dockerfile //Docker파일 설정 변경 FROM tomcat:9.0 COPY ./hello-world.war /usr/local/tomcat/webapps //docker 빌드 docker build -t docker-server -f Dockerfile . //docker 실행 docker run --priv..

실습 환경 MacOS m1 실습 과정 1. war 파일을 SSH를 이용해서 복사 (젠킨슨 서버) 2. Dockerfile + war -> Docker image 빌드 (타 서버) 3. Docker image -> 컨테이너생성 (타 서버) 실습 1. Manage Jenkins -> Jenkins Plugins -> available -> publish over ssh -> Install without restart 2. ssh 서버 생성 (docker에 ssh 용 테스트 서버 생성) //테스트 서버 설치, 이도원님 강의 전용 이미지 docker run --privileged --name docker-server -itd -p 10022:22 -p 8081:8080 -e container=docker -v ..