当前位置:网站首页>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
边栏推荐
- Golang单元测试、Mock测试以及基准测试
- 【RT-Thread】nxp rt10xx 设备驱动框架之--Pin搭建和使用
- 【RT-Thread】nxp rt10xx 设备驱动框架之--Audio搭建和使用
- The difference between get and post
- Simple configuration of postfix server
- Installation and configuration of network hard disk NFS
- Financial management (Higher Vocational College) financial management online Assignment 1 in autumn 20
- Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
- Hongmeng third training
- SVN完全备份svnadmin hotcopy
猜你喜欢

kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)

1164 Good in C

问题随记 —— 在 edge 上看视频会绿屏

Great changes! National housing prices fell below the 10000 yuan mark
![[UE4] brush Arctic pack high quality Arctic terrain pack](/img/e7/bc86bd8450b0b2bdec8980a2aa1a10.jpg)
[UE4] brush Arctic pack high quality Arctic terrain pack

鸿蒙第三次培训

互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码

Kubernetes resource object introduction and common commands (III)

PS screen printing brush 131, many illustrators have followed suit

The third day of writing C language by Yabo people
随机推荐
Introduction to SolidWorks gear design software tool geartrax
Managing multiple selections with MVVM - managing multiple selections with MVVM
kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
毕业总结
Kotlin学习快速入门(7)——扩展的妙用
【RT-Thread】nxp rt10xx 设备驱动框架之--Audio搭建和使用
Unity notes unityxr simple to use
Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
互聯網醫院HIS管理平臺源碼,在線問診,預約掛號 智慧醫院小程序源碼
Leetcode540: a single element in an ordered array
RedHat 6.2 configuring ZABBIX
【RT-Thread】nxp rt10xx 设备驱动框架之--hwtimer搭建和使用
[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
An example of HP array card troubleshooting
[combinatorics] recursive equation (case where the non-homogeneous part is exponential | example where the non-homogeneous part is exponential)
PR second time
AcWing 3438. Number system conversion
AcWing 4489. Longest subsequence
Leetcode 669 pruning binary search tree -- recursive method and iterative method
[RT thread] NXP rt10xx device driver framework -- RTC construction and use