반응형
- 기본설치 + docker 설치
- 기본설치 : http://{gitlab ip}:8080/Ansible-Project/Ansible/tree/master/roles/CentOS_Init_Install
- docker 설치 : http://{gitlab ip}:8080/Ansible-Project/Ansible/blob/master/playbook/05.docker_install_20.10.5.yml - jenkins 설치
## jenkins home directory 생성
mkdir /opt/docker/jenkins
chmod 666 /opt/docker/jenkins
## jenkins 설치
## 기본포트 연결 8080->8080
## 홈디렉토리 연결 : /var/jenkins_home -> /opt/docker/jenkins
## root로 실행
docker run -itd --name jenkins -p 8080:8080 -p 50000:50000 -v /opt/docker/jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -e TZ=Asia/Seoul -u root jenkins/jenkins:latest
## docker ps
[root@localhost jenkins]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fdc02cc4e89a jenkins/jenkins:latest "/sbin/tini -- /usr/…" About an hour ago Up About an hour 0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp jenkins
## docker log
[root@localhost jenkins]# docker logs jenkins
...
2021-03-08 07:16:51.513+0000 [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
2021-03-08 07:16:51.839+0000 [id=33] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2021-03-08 07:17:00.218+0000 [id=37] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2021-03-08 07:17:00.228+0000 [id=37] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2021-03-08 07:17:01.772+0000 [id=40] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2021-03-08 07:17:01.817+0000 [id=32] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
2021-03-08 07:17:01.817+0000 [id=32] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
2021-03-08 07:17:01.817+0000 [id=32] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2021-03-08 07:17:01.820+0000 [id=43] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2021-03-08 07:17:01.853+0000 [id=58] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
2021-03-08 07:17:01.858+0000 [id=58] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 4 ms
2021-03-08 07:17:01.971+0000 [id=36] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2021-03-08 07:17:02.132+0000 [id=22] INFO hudson.WebAppMain$3#run: Jenkins is fully up and runnin
## 초기 패스워드
[root@localhost secrets]# pwd
/opt/docker/jenkins/secrets
[root@localhost secrets]# cat initialAdminPassword
2186259faef742d89f3163fc0f682afc
반응형
'Automation Tools > Ansible' 카테고리의 다른 글
8.1 ansible | [playbook] Linux user 추가 (0) | 2021.03.16 |
---|---|
7. ansible inventory 설정 과 playbook 실행 (0) | 2021.03.16 |
5. ansible 예약 변수(ansible_facts) (0) | 2021.03.16 |
4.2 ansible | [gitlab] awx 연동 설정 (0) | 2021.03.16 |
4.1 ansible | [gitlab] docker를 이용한 설치 (0) | 2021.03.16 |