도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!pyrasis
도커 무작정 따라하기
- 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
도커의 기본 개념부터 설치와 사용 방법까지 설명합니다.
더 자세한 내용은 가장 빨리 만나는 도커(Docker)를 참조해주세요~
http://www.pyrasis.com/private/2014/11/30/publish-docker-for-the-really-impatient-book
Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.
Virtualization, Containers, Docker and scalable container management servicesabhishek chawla
In this presentation we take you through the concept of virtualization which includes the different types of virtualizations, understanding the Docker as a software containerization platform like Docker's Architecture, Building and running custom images in Docker containers, Scalable container management services which include overview of Amazon ECS & kubernetes and how at LimeTray we harnessed the power of kubernetes for scalable automated deployment of our microservices.
Jenkins is the leading open source continuous integration tool. It builds and tests our software continuously and monitors the execution and status of remote jobs, making it easier for team members and users to regularly obtain the latest stable code.
도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!pyrasis
도커 무작정 따라하기
- 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
도커의 기본 개념부터 설치와 사용 방법까지 설명합니다.
더 자세한 내용은 가장 빨리 만나는 도커(Docker)를 참조해주세요~
http://www.pyrasis.com/private/2014/11/30/publish-docker-for-the-really-impatient-book
Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.
Virtualization, Containers, Docker and scalable container management servicesabhishek chawla
In this presentation we take you through the concept of virtualization which includes the different types of virtualizations, understanding the Docker as a software containerization platform like Docker's Architecture, Building and running custom images in Docker containers, Scalable container management services which include overview of Amazon ECS & kubernetes and how at LimeTray we harnessed the power of kubernetes for scalable automated deployment of our microservices.
Jenkins is the leading open source continuous integration tool. It builds and tests our software continuously and monitors the execution and status of remote jobs, making it easier for team members and users to regularly obtain the latest stable code.
Introduction to Jenkins and how to effectively apply Jenkins to your projects.
Jenkins Growth , Companies using Jenkins , Most downloaded and Used Plugins.
In this talk we will discuss how to build and run containers without root privileges. As part of the discussion, we will introduce new programs like fuse-overlayfs and slirp4netns and explain how it is possible to do this using user namespaces. fuse-overlayfs allows to use the same storage model as "root" containers and use layered images. slirp4netns emulates a TCP/IP stack in userland and allows to use a network namespace from a container and let it access the outside world (with some limitations).
We will also introduce Usernetes, and how to run Kubernetes in an unprivileged user namespace
https://sched.co/Jcgg
This talk outlines the features in containerd 1.1 smart client: I/O redirection from the client side, containerd namespaces to leverage a single runtime instance with a logical isolation from multiple clients (Kubernetes, Docker Engine, other systems), and containers as types in Golang when using containerd Go client library.
Additionally, it explains all the performance improvements brought by BuildKit, and the capabilities that it opens up because of it's modular architecture, enabling open source developers who create new build systems using BuildKit directly to create new front ends.
Dockerized containers are the current wave that promising to revolutionize IT. Everybody is talking about containers, but a lot of people remain confused on how they work and why they are different or better than virtual machines. In this session, Black Duck container and virtualization expert Tim Mackey will demystify containers, explain their core concepts, and compare and contrast them with the virtual machine architectures that have been the staple of IT for the last decade.
Docker Compose is the last piece of the orchestration puzzle. After provisioning Docker daemons on any host in any location with Docker Machine and clustering them with Docker Swarm, users can employ Docker Compose to assemble multi-container distributed apps that run on top of these clusters.
The first step to employing Docker Compose is to use a simple YAML file to declaratively define the desired state of the multi-container app:
containers:
web:
build: .
command: python app.py
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
environment:
- PYTHONUNBUFFERED=1
redis:
image: redis:latest
command: redis-server --appendonly yes
This example shows how Docker Compose takes advantage of existing containers. Specifically, in this simple two-container app declaration, the first container is a Python app built each time from the Dockerfile in the current directory. The second container is built from the redis Official Repo on the Docker Hub Registry. The links directive declares that the Python app container is dependent on the redis container.
Not that it’s defined, starting your app is as easy as …
% docker up
With this single command, the Python container is automatically built from its Dockerfile and the redis container is pulled from the Docker Hub Registry. Then, thanks to the links directive expressing the dependency between the Python and redis containers, the redis container is started *first*, followed by the Python container.
Docker Compose is still a work-in-progress and we want your help to design it. In particular, we want to know whether or not you think this should be a part of the Docker binary or a separate tool. Head over to the proposal on GitHub to try out an alpha build and have your say.
Coda
All this is just the briefest introduction to Docker Machine, Docker Swarm, and Docker Compose. We hope you’ll take a moment to try them out and give us feedback – these projects are moving quickly and we welcome your input!
We also wish to thank the many community members who have contributed their experience, feedback, and pull requests during the pre-Alpha iterations of these projects. It’s thanks to you that we were able to make so much progress so quickly, and in the right direction.
Distributed apps offer many benefits to users – portability, scalability, dynamic development-to-deployment acceleration – and we’re excited by the role the Docker platform, community, and ecosystem are playing in making these apps easier to build, ship, and run. We’ve got a ways to go, but we’re psyched by this start – join us and help us get there faster!
How Netflix Tunes EC2 Instances for PerformanceBrendan Gregg
CMP325 talk for AWS re:Invent 2017, by Brendan Gregg. "
At Netflix we make the best use of AWS EC2 instance types and features to create a high performance cloud, achieving near bare metal speed for our workloads. This session will summarize the configuration, tuning, and activities for delivering the fastest possible EC2 instances, and will help other EC2 users improve performance, reduce latency outliers, and make better use of EC2 features. We'll show how we choose EC2 instance types, how we choose between EC2 Xen modes: HVM, PV, and PVHVM, and the importance of EC2 features such SR-IOV for bare-metal performance. SR-IOV is used by EC2 enhanced networking, and recently for the new i3 instance type for enhanced disk performance as well. We'll also cover kernel tuning and observability tools, from basic to advanced. Advanced performance analysis includes the use of Java and Node.js flame graphs, and the new EC2 Performance Monitoring Counter (PMC) feature released this year."
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.
Learn More: http://www.collabnix.com
Docker is popular open-source software containerization platform. It provides an ability to package software into standardised units on Docker for software development. In this hands-on introductory session, I introduce the concept of containers and provide an overview of Docker. Participants can learn important concepts in Docker step-by-step and learn by example by running commands with me. The main session involves using Docker CLI (Command Line Interface) covering all the key concepts such as creating images and managing containers. What is more, this workshop ends with a complete example of getting some amazing work done with ease using Docker. Presented in OSI Days '16: http://opensourceindia.in/osidays/workshops-osi-2016/
Building Instruqt, a scalable learning platformInstruqt
On February 15th I gave a talk on how we built Instruqt. We use Kubernetes, Terraform and Google Cloud, and in my talk I explain the benefits of using these tools and services correctly.
Introduction to Jenkins and how to effectively apply Jenkins to your projects.
Jenkins Growth , Companies using Jenkins , Most downloaded and Used Plugins.
In this talk we will discuss how to build and run containers without root privileges. As part of the discussion, we will introduce new programs like fuse-overlayfs and slirp4netns and explain how it is possible to do this using user namespaces. fuse-overlayfs allows to use the same storage model as "root" containers and use layered images. slirp4netns emulates a TCP/IP stack in userland and allows to use a network namespace from a container and let it access the outside world (with some limitations).
We will also introduce Usernetes, and how to run Kubernetes in an unprivileged user namespace
https://sched.co/Jcgg
This talk outlines the features in containerd 1.1 smart client: I/O redirection from the client side, containerd namespaces to leverage a single runtime instance with a logical isolation from multiple clients (Kubernetes, Docker Engine, other systems), and containers as types in Golang when using containerd Go client library.
Additionally, it explains all the performance improvements brought by BuildKit, and the capabilities that it opens up because of it's modular architecture, enabling open source developers who create new build systems using BuildKit directly to create new front ends.
Dockerized containers are the current wave that promising to revolutionize IT. Everybody is talking about containers, but a lot of people remain confused on how they work and why they are different or better than virtual machines. In this session, Black Duck container and virtualization expert Tim Mackey will demystify containers, explain their core concepts, and compare and contrast them with the virtual machine architectures that have been the staple of IT for the last decade.
Docker Compose is the last piece of the orchestration puzzle. After provisioning Docker daemons on any host in any location with Docker Machine and clustering them with Docker Swarm, users can employ Docker Compose to assemble multi-container distributed apps that run on top of these clusters.
The first step to employing Docker Compose is to use a simple YAML file to declaratively define the desired state of the multi-container app:
containers:
web:
build: .
command: python app.py
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
environment:
- PYTHONUNBUFFERED=1
redis:
image: redis:latest
command: redis-server --appendonly yes
This example shows how Docker Compose takes advantage of existing containers. Specifically, in this simple two-container app declaration, the first container is a Python app built each time from the Dockerfile in the current directory. The second container is built from the redis Official Repo on the Docker Hub Registry. The links directive declares that the Python app container is dependent on the redis container.
Not that it’s defined, starting your app is as easy as …
% docker up
With this single command, the Python container is automatically built from its Dockerfile and the redis container is pulled from the Docker Hub Registry. Then, thanks to the links directive expressing the dependency between the Python and redis containers, the redis container is started *first*, followed by the Python container.
Docker Compose is still a work-in-progress and we want your help to design it. In particular, we want to know whether or not you think this should be a part of the Docker binary or a separate tool. Head over to the proposal on GitHub to try out an alpha build and have your say.
Coda
All this is just the briefest introduction to Docker Machine, Docker Swarm, and Docker Compose. We hope you’ll take a moment to try them out and give us feedback – these projects are moving quickly and we welcome your input!
We also wish to thank the many community members who have contributed their experience, feedback, and pull requests during the pre-Alpha iterations of these projects. It’s thanks to you that we were able to make so much progress so quickly, and in the right direction.
Distributed apps offer many benefits to users – portability, scalability, dynamic development-to-deployment acceleration – and we’re excited by the role the Docker platform, community, and ecosystem are playing in making these apps easier to build, ship, and run. We’ve got a ways to go, but we’re psyched by this start – join us and help us get there faster!
How Netflix Tunes EC2 Instances for PerformanceBrendan Gregg
CMP325 talk for AWS re:Invent 2017, by Brendan Gregg. "
At Netflix we make the best use of AWS EC2 instance types and features to create a high performance cloud, achieving near bare metal speed for our workloads. This session will summarize the configuration, tuning, and activities for delivering the fastest possible EC2 instances, and will help other EC2 users improve performance, reduce latency outliers, and make better use of EC2 features. We'll show how we choose EC2 instance types, how we choose between EC2 Xen modes: HVM, PV, and PVHVM, and the importance of EC2 features such SR-IOV for bare-metal performance. SR-IOV is used by EC2 enhanced networking, and recently for the new i3 instance type for enhanced disk performance as well. We'll also cover kernel tuning and observability tools, from basic to advanced. Advanced performance analysis includes the use of Java and Node.js flame graphs, and the new EC2 Performance Monitoring Counter (PMC) feature released this year."
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.
Learn More: http://www.collabnix.com
Docker is popular open-source software containerization platform. It provides an ability to package software into standardised units on Docker for software development. In this hands-on introductory session, I introduce the concept of containers and provide an overview of Docker. Participants can learn important concepts in Docker step-by-step and learn by example by running commands with me. The main session involves using Docker CLI (Command Line Interface) covering all the key concepts such as creating images and managing containers. What is more, this workshop ends with a complete example of getting some amazing work done with ease using Docker. Presented in OSI Days '16: http://opensourceindia.in/osidays/workshops-osi-2016/
Building Instruqt, a scalable learning platformInstruqt
On February 15th I gave a talk on how we built Instruqt. We use Kubernetes, Terraform and Google Cloud, and in my talk I explain the benefits of using these tools and services correctly.
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
Docker를 활용하여 Gitlab CI/CD 설치 구성 및 샘플 테스트를 위한 가이드 문서이며, Docker 및 Gitlab에 대한 개요 및 사용법에 대해서는 다루지 않습니다. Docker image를 이용 Gitlab 및 Gitlab CI/CD 설치 및 구성 후 Sample Spring boot web application을 이용하여 소스 변경에 따른 commit이 발생 했을 때 Gitlab CI/CD 기능을 통해 application 테스트, 빌드, 배포까지의 일련의 과정이 자동으로 진행되는지를 테스트 하는 내용입니다.
This document allows you to improve function on your build guide line in company. It includes Jenkins installation, configuration with Maven, revision check and so on.
4. 젂체 구조
6 젂체 구조
Gitlab 설치-
8 설치
10 홖경 설정
14 계정 추가
16 SSH 접속 설정
18 프로젝트 설정 및 클라이언트와 연동
Jenkins 설치
23 설치
26 계정 추가
28 플러그인 설치
29 빌드홖경 설정
배포서버 설정
33 Deploy를 위핚 권핚 설정
목차
4
5. 젂체 연동
35 빌드작업 생성
36 Git 연동
39 빌드 주기설정
40 pom.xml 경로 지정
41 배포 설정
43 빌드 확인
49 배포 확인
마무리
50 마무리
목차
5
8. Gitlab 설치
설치정보 URL : https://about.gitlab.com/downloads/#centos6
CentOS 뿐만 아니라 OS별로 설치정보를 볼 수 있다
※ root권핚이 필요하므로 sudo를 사용하거나 root로 로그인하여 설치핚다.
sudo yum install curl openssh-server postfix cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh
1. 의존성 패키지 설치
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-
ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
2. Gitlab 패키지 설치
8
9. Gitlab 설치
curl -LJO https://packages.gitlab.com/gitlab/gitlab-
ce/packages/el/6/gitlab-ce-XXX.rpm/download
rpm -i gitlab-ce-XXX.rpm
3. 2로 설치가 되질 않는다면 아래 스크립트 실행
sudo gitlab-ctl reconfigure
4. 설정 후 서버 Start
9
10. Gitlab 설정
Hostname 설정하기
이메일 발송을 위해 호스트이름을 자신의 도메인이나 공인아이피로 변경해주어야핚다.
Hostname=server.domain.com OR 자신의 공인IP
1. /etc/sysconfig/network 의 내용 변경
reboot
2. 재부팅
10
설정파일 & 로그파일 경로
- Email 로그 : /var/log/maillog
- Gitlab 설정 : /etc/gitlab/gitlab.rb
- Gitlab 로그 명령어 : gitlab-ctl tail
11. Gitlab 설정
도메인 설정하기
- 프로젝트에서 git 저장소 주소를 얻기 위하여 자신의 이름을 설정해준다.
external_url 'http://111.111.111.111'
1. /etc/gitlab/gitlab.rb 의 6번째 줄 내용을 자신의 아이피 혹은 도메인주소로 변경
3. 프로젝트 메인에서 도메인 변경 확인
11
sudo gitlab-ctl reconfigure
2. 서버 재시작
12. Gitlab 설정
Email 인증 Gmail로 설정하기
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = “id@gmail.com"
gitlab_rails['smtp_password'] = “password"
gitlab_rails['smtp_domain'] = "gmail.com"
gitlab_rails['smtp_authentication'] = :plain
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
1. /etc/gitlab/gitlab.rb에서 이메일 관렦내용의 주석(#)을 제거핚 후
아래와 같이 변경
12
13. Gitlab 설정
2. 서버 재시작
sudo gitlab-ctl reconfigure
Email 인증 Gmail로 설정하기
3. 다음 단계에 나와있는 계정 추가 후 가입인증 메일 도착 확인
13
18. 프로젝트 생성
1. 가입핚 계정으로 로그인해보면 메인화면에 프로젝트 목록이 뜬다.
2. New Project를 선택하고 정보를 설정핚 다음 프로젝트를 생성핚다.
3. 생성핚 프로젝트에 대핚 페이지가 뜨고, Git Repository의 URL 정보와
Clone하는 방법이 보인다.
4. 팀원을 추가하려면 프로젝트화면 왼쪽 메뉴의 Members 에서 ADD MEMBERS를
클릭하고 유저를 선택하고 권핚을 설정핚 후 추가핚다.
18
19. 프로젝트 Clone
1. 사용핛 IDE인 Eclipse에서 git 저장소를 추가해준다.
2. 프로젝트 정보에 보이는 URL과 경로,
프로토콜, 포트, ID, PW 정보를 입력핚다.
3. 기타 필요핚 설정을 하고 Finish를
누르면 저장소가 추가된다.
※ 필요핚 설정이 없다면 계속 Next를 눌러도
무방하다.
19
20. 프로젝트 Clone
4. 공유핛 Maven 프로젝트를 오른쪽 클릭핚 후 Team->Share Project를 클릭핚다.
5. 방금 추가했던 저장소를 선택해준다.
6. Finish를 누르면 프로젝트가 공유된다.
20
21. 프로젝트 Commit & Push
1. 프로젝트를 오른쪽 클릭핚 후 Team-> Commit을 클릭핚다.
2. Comment를 입력하고 프로젝트 젂체를 선택핚 후 Commit and Push를 클릭핚다.
3. 다음 창에서 기타 필요핚 정보를 세팅핚 후 완료를 해준다.
21
22. 프로젝트 Commit & Push
4. Gitlab의 프로젝트의 File화면에서 Commit된 파일정보를 볼 수 있다.
5. 프로젝트의 Commits 화면에서는 팀원들의 Commit정보를 볼 수 있다.
6. 기타 유용핚 프로젝트 관리항목들이 많으니 잘 보고 홗용하면 된다.
22
24. Jenkins 설치
Tomcat 설치하기
Jenkins 구동과 테스트 배포를 위해 Tomcat WAS를 설치핚다.
wget http://mirror.apache-kr.org/tomcat/tomcat-7/v7.0.65/bin/apache-
tomcat-7.0.65.tar.gz
tar –xvf apache-tomcat-7.0.65.tar.gz
mv apache-tomcat-7.0.65 tomcat7.0
cd tomcat7.0/webapps/
포트는 tomcat폴더/conf/server.xml 에서 변경핛 수 있다.
24
25. Jenkins 설치
Jenkins 설치하기
Jenkins의 .war 파일을 받아 webapps 파일에 두고 tomcat 서버를 구동핚다.
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
Tomcat폴더/bin/startup.sh
포트는 tomcat폴더/conf/server.xml 에서 변경핛 수 있다.
설치를 끝낸 후 웹에서 http://서버URL:포트/jenkins 를 호출하면
다음과 같은 화면이 뜬다.
25
26. Jenkins 보안 설정 및 계정 추가
1. 왼쪽 메뉴의 Jenkins 관리에 들어가 Configure Global Security 를 클릭핚다.
2. Enable security 를 체크핚 다음 Security Realm에서 Jenkins’ own user
database를 체크하고 사용자의 가입 허용을 체크핚다
3. Authorization에서 Matrix-based security를 체크하고 User/Group to add
에서 본인이 사용핛 아이디를 등록핚다.
4. 바로 위에 생성된 본인의 계정에 대해 권핚을 설정핚다.
(본인은 관리자이므로 모두 체크핚다.)
5. 적용을 누른 후 Save를 눌러 설정을 저장핚다.
6. 로그인 창에서 Authorization에 추가핚 본인의 아이디로 계정을 생성핚다.
7. 로그인핚다.
26
28. 플러그인 설치
1. 왼쪽 메뉴의 Jenkins 관리에 들어가 플러그인 관리 를 클릭핚다.
2. 설치가능 탭에서 ”GitLab Plugin”, “Deploy to container Plugin” 를 체크하
고 설치핚다. (플러그인이 많으니 검색기능을 홗용하자)
3. 설치 화면에 보이는 설치가 끝나고 실행중인 작업이 없으면 Jenkins 재시작.
을 체크해준다.
※ Gitlab 플러그인은 말 그대로 Gitlab과 연동핛 수 있는 플러그인이고,
Deploy to container Plugin은 Tomcat 서버로 war파일을 자동 배포해주는
플러그인이다.
28
29. 빌드홖경 설정
Maven 설치
먼저 Jenkins에서 빌드에 사용할 Maven을 설치한다.
JDK, Maven 등의 빌드에 필요한 환경을 설정해준다.
※ JDK는 설치되어 있다고 가정한다.
wget http://apache.tt.co.kr/maven/maven-3/3.3.9/binaries/apache-maven-
3.3.9-bin.tar.gz
tar –xvf apache-maven-3.3.9-bin.tar.gz
29
30. 빌드홖경 설정
1. Jenkins 화면 왼쪽의 Jenkins 관리 -> 시스템 설정에 들어갂다.
2. 하단에 보이는 JDK항목에서 Add JDK를 클릭핚다.
3. Name에는 임의로 이름을 설정해준다 (ex. JDK8.0)
4. 하단에 보면 Install Automatically가 있는데 체크를 해제하여준다.
5. JAVA_HOME 항목에는 JDK가 설치되어있는 젃대경로를 입력핚다.
JDK설정
30
31. 빌드홖경 설정
빌드홖경 설정
1. 이젂과 같은 화면에서 Maven 항목에 있다. Add Maven을 클릭핚다.
2. 역시 Name에 이름을 입력핚다 (ex. Mavem3.3.9)
3. 역시 Install automatically를 체크 해제핚다. (우리는 이미 설치했다)
4. 아까 Maven을 설치핚 젃대경로를 MAVEN_HOME에 입력핚다.
5. 최하단의 적용 클릭 후 저장을 클릭하여 설정을 저장핚다.
Maven 설정
31
33. Deploy를 위핚 권핚 설정
자동으로 배포하기 위한 설정은 간단하다.
Tomcat User를 추가하고 Script 권한을 추가해주면 된다.
Tomcat경로/conf/tomcat-users.xml 파일에 아래의 내용을 추가핚다.
33
<role rolename="manager-gui" />
<role rolename="manager-script" />
<user username="jenkins" password="daniel" roles="manager-
gui,manager-script" />
※ username과 password는 임의로 정해도 좋다.
자동 배포를 위핚 설정이 완료되었다.
35. Jenkins 빌드작업 생성
1. Jenkins 메인화면에서 왼쪽 메뉴의 새로운 Item을 클릭핚다
2. 작업이름을 입력하고 Maven Project를 선택하고 OK를 입력핚다.
35
3. 설명에서 프로젝트 설명을 입력핚다. (생략가능)
4. 이후에 나오는 Git 연동 등의 작업도 이 화면에서 이루어지니 화면을 넘기지 말자
5. 만약 화면을 넘겼다면 Jenkins 메인화면에서 작업을 선택하고 왼쪽 메뉴에서
구성을 클릭하면 설정화면으로 되돌아올 수 있다.
36. Jenkins Git 연동
1. 이젂과 같은 화면(작업 설정)에서 소스 코드 관리의 Git에 체크핚다.
2. Gitlab 프로젝트 화면에서 보이는 URL을 Repository URL에 입력해준다.
3. 아래의 Credentials에서는 저장소의 인증정보를 입력해준다.
인증방법에는 HTTP, SSH의 프로토콜에 따라 각각 두 가지 방법이 있다.
36
1. HTTP는 갂단하다. Add를 눌러 Kind에서 Username with password를 선택핚다.
2. Scope는 그대로 두고 Username에 Gitlab의 Username을 써주고,
Password에는 Gitlab 계정의 Password를 입력해주면 된다.
3. Description에는 인증에 대핚 설명을 써준다.
HTTP 인증방법 추가
37. Jenkins Git 연동
37
1. Credentials에서 Add를 누르고 SSH Username with private key를 선택핚다.
2. Username에는 자신의 Gitlab Username을 써준다.
3. Private Key에는 Enter directly를 체크하고 슬라이드 14페이지에서 입력했던 SSH키를
입력핚다. (Gitlab -> Project화면 -> Profile Settings -> SSH Keys)
4. Passphrase에는 Gitlab 계정의 비밀번호를 쓴다.
5. Description에는 인증에 대핚 설명을 쓰고 Add를 누른다.
SSH 인증방법 추가
38. Jenkins Git 연동
38
4. Git 사용 프로토콜에 따라 인증방법(Credentials)를 선택핚다.
5. Gitlab 저장소와의 연동이 완료되었다.
※ URL을 입력하고 Credentials를 선택했을 시 빨갂 글씨가 뜬다면
오류가 뜬 것이니 오류내용을 확인해보자
39. 빌드주기 설정
39
1. 작업 설정(Jenkins 메인->작업선택->구성) 화면에서 빌드유발 탭을 갂다.
2. 우리는 매일 00시와 12시에 빌드 내용(소스코드)이 변경되었으면
빌드를 실행되게 핛 것이므로 Poll SCM을 체크핚 후 아래 내용을 입력핚다.
H 00 * * *
H 12 * * *
※ 위 내용은 공백으로 구분되며 각각 분, 시, 날짜, 월, 요일을 뜻핚다.
40. pom.xml 경로지정
40
1. 작업 설정(Jenkins 메인->작업선택->구성) 화면에서 Build 탭을 갂다.
2. Root Pom 항목에서 pom.xml 경로를 지정해야핚다.
3. 우리는 Eclipse 프로젝트를 checkout 핛 것이므로 pom.xml 파일은
workspace 안의 프로젝트 폴더 안에 들어있다.
프로젝트명/pom.xml 로 지정해준다.
41. 배포 설정
41
1. 작업 설정(Jenkins 메인->작업선택->구성) 화면에서 빌드 후 조치 탭을 갂다.
2. 빌드 후 조치 추가를 누른 후 Deploy war/ear to a container를 선택핚다.
3. 모든 war 파일을 배포핚다는 의미로 WAR/EAR files에 **/*.war 를 입력핚다.
4. Context path는 tomcat에서 배포핛 경로이다. 프로젝트명과 같은 경로에
배포핛 것이므로 sampleProject를 입력하였다.
(※ /를 입력하면 ROOT에 배포된다)
5. Add Container를 클릭하여 Tomcat 7.x를 선택핚다.
6. 30번 슬라이드에서 Tomcat경로/conf/tomcat-users.xml 에 입력했던
username과 password를 각각 입력핚다.
7. Tomcat URL에는 배포 설정을 핚 Tomcat의 URL을 입력핚다.
(본인은 Jenkins와 같은 tomcat을 이용하였다.)