当前位置:网站首页>Getting started with deops
Getting started with deops
2022-07-03 17:34:00 【yolo2016】
Deops introduction
DevOps What is it? ?
DevOps, Literally means Development &Operations Abbreviation , That's development & Operation and maintenance .
Software development process
The overall software development process includes :
- PLAN: The development team makes the development plan according to the customer's goals
- CODE: according to PLAN Start the coding process , You need to store different versions of code in a library .
- BUILD: After coding , You need to build and run the code .
- TEST: After successfully building the project , You need to test whether the code exists BUG Or error .
- DEPLOY: After manual and automated testing of the code , Confirm that the code is ready to be deployed and handed over to the operation and maintenance team .
- OPERATE: The operation and maintenance team deploys the code into the production environment .
- MONITOR: After the project is deployed online , Need continuous monitoring of products .
- INTEGRATE: Then send the feedback received in the monitoring phase back to PLAN Stage , The whole iterative process is DevOps At the heart of , That is to say, to continue to integrate into 、 Continuous deployment .
CI/CD
CI/CD It can be understood as :
- CI The process is through Jenkins Pull the code 、 structure 、 Make an image and give it to the tester to test .
- Continuous integration : So that the software code can be continuously integrated into the backbone , And automatically build and test .
- CD The process is through Jenkins Pull the labeled release code 、 structure 、 Make the image and hand it to the operation and maintenance personnel for deployment .
- Continuous delivery : Allow continuously integrated code to be deployed manually .
- Continuous deployment : Automated deployment of continuously deliverable code anytime, anywhere .
1) coder Put the code push To gitlab Warehouse
2)jenkins take gitlab Pull the warehouse code , plug-in unit maven Used to build , The code is packaged into an application
3)jenkis Put the program push To the server environment , With docker How to run .
Tool introduction and environment deployment
docker Environmental preparation
yum -y install yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl start docker
systemctl enable docker
docker version
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF' { "exec-opts": ["native.cgroupdriver=systemd"], "registry-mirrors": ["https://du3ia00u.mirror.aliyuncs.com"], "live-restore": true, "log-driver":"json-file", "log-opts": {"max-size":"500m", "max-file":"3"}, "max-concurrent-downloads": 10, "max-concurrent-uploads": 5, "storage-driver": "overlay2" } EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
curl -L https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod 777 /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose -version
chmod a+x docker-compos
Code Stage
gitlab install
docker search gitlab
docker pull gitlab/gitlab-ce
[[email protected] gitlab]# cat docker-compose.yml
version: '3.7'
services:
gitlab:
image: gitlab/gitlab-ce
container_name: gitlab
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.3.80:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '8929:8929'
- '2224:2224'
volumes:
- './config:/etc/gitlab'
- './logs:/var/log/gitlab'
- './data:/var/opt/gitlab'
docker-compose up -d
docker exec -it gitlab cat /etc/gitlab/initial_root_password
git Use
git add .
git commit -m 'update'
git push -u origin --all
Integrate Tools
jenkins install
[[email protected]_host81 docker-jenkis]# cat docker-compose.yml
version: "3"
services:
jenkins:
image: jenkins/jenkins:lts-jdk11
container_name: jenkins
ports:
- 8080:8080
- 50000:50000
volumes:
- ./data/:/var/jenkins_home/
docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
Maven Environmental preparation
https://maven.apache.org/download.cgi
jdk Download address http://www.codebaoku.com/jdk/jdk-oracle-jdk11.html
take jdk as well as maven Put it in jekins Under the directory of , In order to jenkins Can access .
Maven Set private address and jdk edition
[[email protected]_host81 conf]# ll -d settings.xml
-rw-r–r–. 1 root root 11088 7 month 2 17:27 settings.xml
<!-- Alibaba cloud image address -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- JDK1.8 Compile the plug-in -->
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
Case study
边栏推荐
- SQL injection database operation foundation
- ArrayList analysis 3: delete elements
- [combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
- [RT thread] NXP rt10xx device driver framework -- Audio construction and use
- [RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
- Loop through JSON object list
- POM in idea XML graying solution
- 简单配置PostFix服务器
- Embedded-c language-7
- Where is the monitoring page of RDS database?
猜你喜欢
互聯網醫院HIS管理平臺源碼,在線問診,預約掛號 智慧醫院小程序源碼
kubernetes资源对象介绍及常用命令(四)
Life is still confused? Maybe these subscription numbers have the answers you need!
Golang单元测试、Mock测试以及基准测试
PS screen printing brush 131, many illustrators have followed suit
Simple use of unity pen XR grab
Kubernetes resource object introduction and common commands (4)
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
1147_ Makefile learning_ Target files and dependent files in makefile
2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
随机推荐
kubernetes资源对象介绍及常用命令(三)
[combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
What is the difference between cloud server and cloud virtual machine
Type conversion, variable
Notes on problems -- watching videos on edge will make the screen green
Servlet specification Part II
SQL injection database operation foundation
POM in idea XML graying solution
Leetcode Valentine's Day Special - looking for a single dog
Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
c# .net 工具生态
Kotlin学习快速入门(7)——扩展的妙用
Kubernetes resource object introduction and common commands (III)
TCP拥塞控制详解 | 3. 设计空间
QT学习日记9——对话框
简单配置PostFix服务器
Brief introduction to the core functions of automatic penetration testing tool
Qt调节Win屏幕亮度和声音大小
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
IntelliJ 2021.3 short command line when running applications