博文

目前显示的是 2020的博文

aws ec2 install jenkins

1. add jenkins yum source: sudo wget -O /etc/yum.repos.d/jenkins.repo  http://jenkins-ci.org/redhat/jenkins.repo 2. add jenkins key: sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key 3. install jenkins: yum install jenkins --nogpgcheck 4. start jenkins & check status: service jenkins start service jenkins status 5. expose jenkins UI via aws alb: 1) create aws ALB 2) create target group, protocol as TCP or HTTP, port as 8080 3) register the target as EC2 instance or ip 4) append the target group to ALB 5) in ALB security group, add inbound rules with the internet ip address where will access ALB 6. launch ALB's dns address to launch jenkins GUI 7. as the very first time launch jenkins GUI, follow UI's initial administrator password retrieval method to cat initial password from EC2 file system 8. install jenkins plugins 9. from EC2, install jdk(not jre!), maven, docker 10. for docker, if error raise as: docker: Got permission denied while trying to connect to the...

查看docker日志的方法

1. 获得container的name或id docker container ls -a 2. 用如下命令获得docker container runtime log的路径 docker inspect --format='{{.LogPath}}' <container_name_or_id> 3. tail -f <log的路径>查看实时日志