Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
部署应用程序
209
4.
如果
Dockerfile
不在代码库的根目录下,则需要指定该文件所在的目录,如图
10-5
所示。
10-5:指定Dockerfile所在的目录
这样,构建管道就可以自动为应用程序创建
Docker
镜像,并且随时可以部署到你的平
台上。
部署机制
我们首先要弄清楚服务进入生产环境的机制,换句话说,就是如何告诉平台,让它知道
有一个新的可用版本。一旦你明白了这一点,就可以让
CD
管道自动来执行该操作。
目前的大多数平台,包括
Kubernetes
Amazon
Cloud Foundry
,都提供了
RESTful
API
作为管理部署的主要方式。但是,大多数人不经常使用
API
,因此他们还提供了基
API
的如下工具,以便让交互变得更加容易。
图形界面
通常以网站的形式提供部署操作和管理功能。这有助于你熟悉新平台的工作方式,
或者快速检查平台的状态,但不适合自动化部署。
命令行界面
通常以
Bash
命令行的形式提供,相当于对
RESTful API
的封装。
CLI
的优点是可以
轻松地编写命令行脚本,适合自动化构建。
除此之外,一些平台服务商和第三方利用现有的
RESTful API
或者
CLI
,为不同的自动
化构建工具开发插件,以管道的方式来满足常见需求。
插件示例
Kubernetes
如第
4
章所述,
Kubernetes
是一个编排平台,用来部署封装在容器中的不可变服务。在
8
章中,我们介绍过如何在本地使用
Docker
Kubernetes
来模拟生产环境。现在我
们将介绍如何使用
Jenkins
的插件,自动将镜像部署到生产环境的 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
Java性能优化实践:JVM调优策略、工具与技巧

Java性能优化实践:JVM调优策略、工具与技巧

Benjamin J. Evans, James Gough, Chris Newland
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787121374425