当前位置:网站首页>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
边栏推荐
- QT学习日记9——对话框
- Solution to long waiting time of SSH connection to remote host
- The third day of writing C language by Yabo people
- 毕业总结
- 【JokerのZYNQ7020】DDS_ Compiler。
- An example of HP array card troubleshooting
- Leetcode540: a single element in an ordered array
- Graduation summary
- Test your trained model
- Select 3 fcpx plug-ins. Come and see if you like them
猜你喜欢
STM32实现74HC595控制
Vs2013 has blocked the installer, and ie10 needs to be installed
Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
设计电商秒杀
Golang单元测试、Mock测试以及基准测试
2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
1146_ SiCp learning notes_ exponentiation
鸿蒙第三次培训
[RT thread] NXP rt10xx device driver framework -- Audio construction and use
1164 Good in C
随机推荐
数学公式(测试)
STM32实现74HC595控制
[combinatorics] recursive equation (general solution structure of recursive equation with multiple roots | linear independent solution | general solution with multiple roots | solution example of recu
MinGW compile boost library
Introduction to SolidWorks gear design software tool geartrax
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
Assignment examination questions of advanced English (III) for the course examination of Fujian Normal University in February 2022
Detailed explanation of common network attacks
UE4 official charging resources, with a total price of several thousand
互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码
Kotlin learning quick start (7) -- wonderful use of expansion
Internet Hospital his Management Platform source, online Inquiry, appointment Registration Smart Hospital Small program source
PHP processing - watermark images (text, etc.)
Cross border e-commerce: advantages of foreign trade enterprises in overseas social media marketing
i++与++i的区别:通俗易懂的讲述他们的区别
Servlet specification Part II
Assembly for unloading Loadfrom() loaded assembly - unloading the assembly loaded with assembly LoadFrom()
Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
[combinatorics] recursive equation (case where the non-homogeneous part is exponential | example where the non-homogeneous part is exponential)
New library online | cnopendata China bird watching record data