谈论云原生DevOps
演讲者:Jessica Deen,云开发倡导者@Azure和Baruch Sadogursky, DevOps倡导负责人@JFrog
上课了!加入DevOps的Deen,微软的Jessica Deen和JFrog的教授Baruch Sadogursky,他们演示了一些工具,可以帮助您使用Azure和JFrog简化和自动化您的DevOps管道。Jessica和Baruch将演示如何轻松地容器化你的应用程序,使用Helm来管理你的Kubernetes依赖,自动化你的构建,管理你的容器图像和Helm图表,创建和发布构建信息(相关元数据),促进管道到各个阶段,如开发,测试,登台和生产,如何检查安全漏洞和开源合规,以及如何通过全管理服务在集群环境中编排和管理容器化应用程序。
2022世界杯阿根廷预选赛赛程资源:
视频记录
巴鲁克Sadogursky
大家好,欢迎来到杰夫青蛙云DevOps日。今天是Azure的节日。我很荣幸能请到真正的天蓝复仇者。我亲爱的朋友,杰西卡·迪恩。杰西卡,你对我们来说是一只真正的超级青蛙。青蛙的好朋友。谢谢你再次来到我们的节目。再提一下杰西卡是普通用户大会的校友,多年来她一直被评为最佳演讲者和最佳演讲者。伙计们,你们会有收获的。非常感谢。 And well,
杰西卡·迪恩
非常感谢。谢谢你们邀请我。今天来到这里真是太棒了。好了,这就是我们要讨论的人。今天,我们将讨论如何在一个抽象的世界中自信地开发,即使在一个微服务、Kubernetes解耦整体的世界中,所有这些都是常见的主题。但是很难对此有信心。我喜欢从定义DevOps开始的第一件事是什么?DevOps是如何真正参与这个信心循环并获得信心的呢?rukh,你和我在这一年中有过几次关于DevOps的讨论,你对DevOps的定义是什么?有趣的是,我认为,你可以问五个不同的人,你会得到五个不同的答案。 They all ultimately kind of go to the same end goal, but it’s hard to kind of put it into an actual definition, right?
巴鲁克Sadogursky
好吧,我希望为什么现在在DevOps工作了10年,人们有点像在一个版本中有很多人是DevOps工程的,这个标题实际上,可能暗示的是相反的,实际上,有些人认为它是一个工程学科?很明显,这不是可乐,这是一套合作实践。对的,不同部门的愿景,或者不同专业的专业人员一起工作,通过协作,朝着一个目标前进,这个目标最终是软件是否更快。
杰西卡·迪恩
绝对的。所以我刚刚提到了你所说的,那就是合作,与专业人士和人们一起朝着一个共同的目标努力。再说一遍,这有点有趣,因为你和我。我们有过很多这样的对话。我喜欢的是当人们真正接受了DevOps Curley采用了那种思维方式,因为就像你说的,
这不是一份工作
标题。你不喜欢把它当做一门工程学科。这不是说,我可以在节点中编程。所以我也可以把node和DevOps捆绑在一起。现在我是一名DevOps工程师,不是那样的。相反,它实际上是一套实践的采用。这也符合微软的定义,是由微软的多诺万·布朗写的。DevOps是人的结合,用于使用的东西,人员流程和产品,以实现持续交付价值,这是我们最终用户的共同目标。hth华体会最新官方网站我喜欢这个定义,因为这张幻灯片上最重要的词是价值。因为真的,就像你说的,我们想要提供更好的软件,我们想要做得更快。 Well, we can’t do that if what we’re delivering isn’t valuable. And then in an obstructive world, it gets a little harder, because how do we define value? What does it mean? And if we’re not delivering value, that begs the question, what are we doing and why are we doing it? So that’s really kind of the entire goal of DevOps is to enable continuous delivery of value and to be able to do so confidently. volunteen gooeys? Why are we doing what we are doing? Exactly, so Okay, if we’ve died if I doubt if we’ve identified the definition of DevOps, we now know what exactly DevOps is, what is the problem we’re trying to solve in an abstracted world in a microservice world and a container filled world after we’ve moved more cloud native, we’ve broken out the model if we have our different API’s and services. What What could possibly go wrong? What’s the problem?
巴鲁克Sadogursky
是的,一个开发人员遇到了一个问题,他们决定把它带到微服务中。现在他们的市场服务有99个大问题。正确的。
杰西卡·迪恩
完全正确。我认为我听到的最大的问题之一,这甚至是来自我自己的个人经验,以及我从客户那里听到的是,在本地编写代码或调试代码,同时仍然满足这些微服务需求是很难的,如果不是痛苦的话。你如何调试或理解问题在哪里,在一个API中,当你真的需要更大的应用程序的上下文时,你可以要求获得访问Kubernetes测试环境的权限,你可以坐在那里随便看看。但如果你能在本地测试,即使有了上下文,不是更好吗,另一个大问题是,通常只有团队成员只有那些在你的团队中负责API,服务和应用程序的人,知道发生了什么。因此,如果你试图与团队中的其他人合作,可能是不会讲代码的人,可能是他们的设计师或项目经理,你如何真正地解释或错误的问题,并让他们相信问题已经解决了,以确保我们真正专注于交付价值并对价值交付有信心。
巴鲁克Sadogursky
这个信心问题很严重,对吧?因为在一天结束的时候,你的应用程序越复杂,你对移动的部分就越没有信心。我会告诉你们,我会给你们一个例子,这个例子是完美的。我最近在一个大型会议的座谈小组上做了发言,这个座谈都是关于编程语言,函数式以及它被称为类型系统和不被称为类型系统。其中一个被抛出的想法是我们现在不应该为API定义类型吗。因此,我们将达到一个信心水平,如果你试图使用我们自己的API,它甚至不会编译。显然,我们可以用这个类型系统解决很多问题。但我们离这种信心还很远很远。这意味着我们需要猜测,它是否真的可以工作,我们可以在一定程度上测试它,我们可以审查代码,并尝试从上帝那里推断它是否可以工作,在一天结束的时候,唯一重要的质量是我们为客户提供的产品质量,坐在我们的桌子后面,在我们的机器上工作。我们离我们所做的任何事情都能在生产中发挥作用的信心还很远很远。
杰西卡·迪恩
绝对的。我认为其中一件重要的事情是有信心,因为我们在我们的办公桌上做出了改变,我们可以把它投入生产。我以前和开发人员谈过,我甚至感到内疚的是,我在本地做了一个改变。为了测试它,我做了本地测试,对吧,我确保所有的东西都列出来了。所有这些看起来都不错。但是为了用更大的应用程序来测试它,我继续,我把它推到PR分支,让PR和所有东西运行,并将它部署到我的测试环境中。我依赖DevOps流程来进行测试,但实际上,如果我能够在本地进行测试,然后将DevOps流程作为信任和验证步骤,不是更好吗?这是额外的。这是额外的信心水平,我们要确保在生产中运行的是质量,因为如你所说,这是所有的问题。
巴鲁克Sadogursky
这让我们想起了15年前,如果你想记住我们是如何讨论的,我们是否应该在提交之前在我们的机器上本地运行单元测试?或者我们是否应该相信CI服务器能够发现我们所犯的所有错误?我认为现在的共识是,你尽可能多地尝试和测试,在提交前运行用户测试,只有在提交之后,你的CI服务器是额外的一步。
杰西卡·迪恩
完全正确。因为不仅仅是质量,或者,质量,你作为开发者的责任。所以你必须确保你所推动的东西,你对它有信心,但是你也必须更加注意安全。这是另一个阻碍容器的灰色地带你如何对安全性有信心,也许对Docker容器图像中的依赖关系有信心,即使你是开发人员,你也没有真正进入Docker或Helm图表或Kubernetes的实际结构,你放在那里的所有代码仍然被烘焙到一个小容器中。我们怎么能有额外的工具来验证这些包,这些依赖项,一切都是安全的,对吧?我们可能会根据政策进行提取,我们会从安全存储库或位置提取,对吧?这是另一个很大的区域。所以我们发现了很多问题。现在我们来谈谈我们可以用什么不同的方法来解决这个问题。首先,我们可以在本地编写代码。 And as we’ve talked about, it’s hard to satisfy those micro service requirements. We want to be able to build quickly, we want to be able to test. We want to debug, we want to cycle, but we need to make sure that we still have fidelity to all deployed environments, right? regardless of the fact that it’s in production. How can I make sure it’s still in alignment with everything else?
巴鲁克Sadogursky
是的。做完了。你就完成了。这就是问题所在。你,你真的不能
杰西卡·迪恩
知道。我的意思是,容器解决了这个问题。但这不是万能的解决方案。它不是通用的,好吧,我是云原生的。现在,我所有的问题都解决了,对吧?
巴鲁克Sadogursky
但你已经没有容器了。他们不想那么就不做新的mac了。所以我们不再有容器了。好吧,
杰西卡·迪恩
如果有的话,他们会这么做,但那完全是两码事。你可以用arm更新你所有的图像,我的意思是,这是不同的,它们不是实时虚拟化,
正确的。这就是问题所在。但是,不好意思。他们只是没能阻止。没有其他人
世界在这里永远是有限的。顺便说一下,对于那些没有理解这个笑话的人,苹果电脑的新mone芯片,因为它是苹果的arm芯片,它实际上不支持运行Docker,也不支持本地容器,你必须将它更新为arm容器,因为Docker的结构和底层硬件是如何工作的。在考德威尔,推特上的水实际上有一个完整的线索,他们讨论了所有这些。
巴鲁克Sadogursky
不管怎样,本地的事情对,专注于本地的发展,这对我们来说很方便。不太好,你能预测它在生产中的表现吗,即使是容器,这肯定是朝着这个方向迈出的一步,但并不是一直都在走。尤其是微服务。
杰西卡·迪恩
尤其是从当地的角度来看。所以这实际上是从开发人员的角度来看,作为开发人员,你如何简化你的本地工作流程,以获得信心,这样当它进入你的pull request,并最终进入生产时,每个人都有和你一样的信心水平。这就是你的意思,我们讲过如何在本地做事情,如何远程做事情,甚至可以混合做事情。有很多不同的事情,如果你能以混合的能力做事情,你实际上可以选择所有的特征框,你可以快速构建,你可以有更多的保真度,你可以扩展不同的应用组件,你可以有一些易于使用的东西。现在,什么是混合解决方案。这是我们Azure使用的一种混合解决方案,并在今年早些时候宣布了一种被称为Kubernetes桥梁的东西。我们将讨论这个问题。首先,在我们真正描述到Kubernetes的桥梁之前,我想谈谈这个问题和我们将要使用的应用程序。最终用户在左边。然后我们有一堆不同的服务在Azure中运行。 So we have different API’s that’s running in Azure Kubernetes service, that’s everything that we’ve decoupled, we’ve adopted the cloud world, we have different languages, dotnet core react, we have different services that we’re going to need to try to troubleshoot. It turns out that there’s a bug in the bikes application. And we’ll show you what that problem is that the services also use other services within Azure such as Azure SQL Database, and Cosmos dB. This is a very real world application, which in very real world scenarios, there’s very real world problems. One of the biggest issues is routing, how we actually test things, again, from that local environment. So we’re going to do is we’re going to take the bikes API, and we’re going to test that single API in the context of that larger application and that larger architecture and infrastructure. So you can see here in a little routing example, I’m going to be able to have an isolated API, that’s that purple bike’s version down there at the bottom, and still be able to communicate to the external, that’s where the hybrid comes in, or the remote services running in Kubernetes. So that’s where we have hybrid, right, I’m going to be able to use both my local and my remote API’s to work together to gain that confidence from a local experience. And I’ll be able to do so seamlessly. That’s
巴鲁克Sadogursky
完全是双赢双赢,对吧?所以你确实了解了现实世界生产过程中所有重要的事情的背景。但你也可以使用你自己的组件,而不是像在你的应用程序中运行官话和调用。
杰西卡·迪恩
正是如此,你同时获得了这两种权利的好处,你获得了本地和远程的权利,从而获得了更顺畅的开发体验,即使是在这个阻碍重重的世界中。所以使用桥接Kubernetes,这是一个可以在Visual Studio代码中使用的扩展,你可以减少开发和测试的时间,因为你不需要专门的Kubernetes沙盒环境。您实际上可以通过扩展本身创建自己的。您可以使用Azure Kubernetes服务直接调试和迭代代码。所以现在你可以利用云的力量来制定你的多微服务解决方案。更简单,对吧?这是一件大事。正如我们提到的,你现在可以远程调试你的容器。但是使用本地代码。我会在演示中解释。 But it’s really, really cool. And it’s super, super simple.
巴鲁克Sadogursky
是的。我们会看到的。它应该是,在纽约应该是非常非常令人兴奋的。是的,所以
杰西卡·迪恩
你们从上一张幻灯片中学到的东西,最重要的是要记住,因为这是一个轻量级的解决方案,因为它只是一个扩展,帮助你更好,更快,更快地开发,快速迭代,实际上没有对Kubernetes环境做永久性的改变。这一切都是为了让您在混合场景中拥有一个本地沙盒,依赖于远程API,但仍然使用您的本地代码。所以没有永久性的改变,这是完美的。现在,我不需要担心建立一个永久隔离的开发环境沙盒,或者我不需要担心在不同的环境中有那种保真度,因为我只是在本地使用实际的代码,使用远程运行的现有API。这是我们今天要做的演示。我们已经向您展示了架构的样子。但本质上,我作为开发者会进入,我将进入应用的前端,我将被重路由到bikes API,当我发出请求时,你会明白为什么我们一直叫它bikes,这是一个bike应用。然后从那里,那个API实际上会被重定向到我的工作站到我的代码,但它会以一种隔离的方式这样做。如果我通常会去bikes。Jessica Dean comm,而不是URL。但如果我是,这就会给我test或Jessica test。bikes。Jessica Dean comm它会自动给我一个前缀。 And I can go through and I can I can change whatever that prefix is. But the cool thing is, it’s going to handle all of that routing, and all that testing for me. So I can work on just one that one API and still see how it’s performing in again, in the context of the full application.
巴鲁克Sadogursky
这对于调试问题很有帮助,或者试图弄清楚那里有什么。但我认为我们可以,我们可以进行下一步。我们可以这样做,在我们推出网站之前先看看你的网站。我们可以,我们可以让它进入进程,我们可以让它成为进程,我们实际上可以做它,或者对每一个即将到来的变化的每一个拉请求。我们可以查看它,并决定是否要在实际运行的应用程序的其余部分中继续使用它。
杰西卡·迪恩
是的,当然。当你真正开始看到它的动作时,你会觉得很酷。因为我的意思是,我已经在Kubernetes上工作了四年。即使是看这个,也有很多活动的部分。即使对于有经验的人来说,特别是当你是新人的时候,或者即使你有经验,尤其是当你是新人的时候,真的很难知道从哪里开始,当你有你的团队和领导推行这些新流程和新工具时,你如何继续成为一个有效的开发人员?你怎么能找到一个中庸之道呢,老实说,这真的是一个中庸之道。我们最后会讲到这个。我先暂停一下我们要跳过visual Studio代码,我们要跳过PowerPoint。打开浏览器,这是我的应用程序。这是自行车应用程序。 It’s called adventure work cycles. And I feel like this is a perfect application for the fact that we’re all in quarantine right now, right? Because we can’t really leave our homes or we shouldn’t be leaving our homes, especially if you live in the United States in California. And we’re still trying to find things that we can do that’s safe, that’s socially distant, but also fun and active, right? Something that still gets those endorphins going. I talked about fitness a lot. We, Brooke and I have have had some fun conversations. But this is a perfect application. So let’s say that I’m a user and I want to run a bicycle. So I’m going to go ahead and log in as a relic brakes. You can also log in as parents if you’d like. But I’ll log into a relah. And I’ll start finding a bicycle click on a women’s cruiser here. It’s the top suggestion. And I like to look at pictures, but unfortunately, there isn’t a picture of the bike. Now there could be just this one item, but let’s keep using the application. I’ll try to find a different women’s cruiser. This one has orange tires, so I like that one. So click on that one. So no image. Let’s find one for brick and see if maybe for a men’s bike. Seabrook Do you like Do you like red? Yeah, red is fine. Red, fine. Okay, so green green for J. Exactly.
是的。好的,所以
我们还有照片,对吧?看起来,这个应用程序确实有一个错误,我们应该得到一张图片,因为我们可以在缩略图上看到。但当我们真正深入到项目本身时,我们并没有看到更大的画面。为了解决这个问题,我们会用到Visual Studio代码。我已经有自行车服务了。给你们看看下面,我的终端,我知道我有漂亮的颜色。但是如果我回去做,哎呀,实际上,我完全从目录本身备份了。我把这个擦掉,回到自行车共享应用程序。这里,现在我写ls,我们应该看到我有很多不同的文件夹,我有资产,我有自行车共享,网络自行车,账单,数据库,网关,所有这些不同的子文件夹对应不同的API。现在我是微服务路线,准确的微服务概念,因为我已经在骑自行车了。 Let me clear this. Clear. I’m already in bikes in Visual Studio code, you can see I’m just in one folder, so that I can work on just the API with the issue. Now, you can see that I do have a charts folder, here, I have a Docker file, I don’t actually need those, um, just know that I’m not going to touch them today. We can use good debit, specifically to get refund. And then I’m also going to be using an extension, as we talked about, called bridge to Kubernetes. So you can get that from the extension marketplace in Visual Studio code, you just go and install it, I already have it installed. Now after you install it, you’ll want to configure it right. So let’s close this out. We’ll go back over here. And I already have an existing debugger for locally debugging with NPM, and node. But how do I add in the Kubernetes part? Very simple. I simply open up my command palette, that would be Command Shift p on Mac or Ctrl, Shift p on Windows, I search for Ridge to Kubernetes. You can see I have configure, I click on Configure. From there, it’s going to find the different services in my Kubernetes cluster. As long as my system has access to the clustering question, I can start to test this. So I go I find the service, which we know that it’s a bike service. And then I’m going to specify a local port. And this is going to be the port that I want to test on locally. Since it’s known, I’m going to use traditional 3000. And I’ll hit enter. Now I use the existing debugger, the same configuration that I would use for my local, I’m going to use that but it’s Kubernetes is going to bridge a fire, right. So I’ll click this. And now I’m asked if I want to isolate. And this is important, because if I selected No, it would actually redirect all incoming requests for the service to my machine, which would affect production or dev or whatever the cluster is, of course, you don’t want to do that. So instead, I’m going to select Yes. So it’s only going to redirect requests from the and it gives me a made up random URL. We’re subdomain of Jessica d dash 4495. And this actually uses header propagation. So you have to make sure that your application has headers and everything in the application. That’s a conversation for a different time. But once you do that the configuration is created. You can see right here, it actually updated my VS code, launch file. And right here, now I have a configuration for launch NPM with Kubernetes, it’s virtually the same as my launch via NPM. So using the same port, only now it’s also using a pre launch task. If you go take a look at the task, I have a bridge to Kubernetes service, I have the service name, I have the ports. And I have an isolate as this is where if you wanted to change the isolate as prefix or subdomain you could. But that’s that’s how that part’s working that it did everything for you, you don’t have to worry about it. Now that we have that working, let’s go ahead and test it. So I want to make sure I select my launch via NPM with Kubernetes, the debugger and I’ll go ahead and start the debugger. And this is where really all the magic starts happening. Okay, I don’t have to do anything at this point, you’ll notice that the task bridge to Kubernetes service starts, it starts redirecting services, it starts taching to the cluster, it knows the current namespace, the target service, the service for, and it’s isolating the service with the header that we give. Now I have to make sure that I give it administrative permissions to my machine, because it’s actually going to even temporarily modify the hosts for the service. So now what’s going to bring every reservation API, the other API’s, it’s going to bring all of that to a one to seven dot x x x local address
只在你的机器上只在我的机器上。所以我需要再次输入密码来进行修改。
所以你可以听到我的老板,我的狗也在背景里说话。你可以看到它正在启动端点管理器顺便说一下,这也能工作,因为它有路由服务。这就是你的Kubernetes集群。但你不需要部署它。如果该pod或部署不存在,扩展将为您安装它。除了安装扩展和配置你想要使用的集群,你真的什么都不用做。这是很棒的用户体验或者开发者体验,开发者体验和用户体验。我的意思是,它真的,特别是因为作为开发人员,理解,网络,路由,主机文件和IPS,这不是我们真正做的事情。这是我的背景,我明白。这就是
巴鲁克Sadogursky
我想说这很简单。对你来说,这很简单,因为你很看重结果。但是作为一个
杰西卡·迪恩
不是开发者,它不是。我了解到,我越深入开发,我就越忘记of,这是一个完全不同的问题。但是你可以看到现在我的调试器启动了。您可以看到应用程序的容器端口通常是端口80。但是localhost 3000是可用的。重定向,你可以看到所有不同的服务。我甚至在服务器上有rabbit和Q,我有用户和任何正在运行的东西,都被重新路由到1到7点x点x点x,所以我可以在本地访问它。这是什么意思呢?这意味着我们甚至可以设置断点,并在访问应用程序时命中断点。
巴鲁克Sadogursky
这正是我们想要的,因为我们需要弄清楚为什么我们没有我们的图像。
杰西卡·迪恩
完全正确。我将进入服务器JavaScript文件,往上滚动,这样我们就能看到发生了什么,我们有Express,我们有MongoDB。我可以看到一些我们设置的变量一些函数,其中一个我们在做app。get,我们会找到我们的bike,它可能不在那里,我们有一个new bike,我们有update bike,它可能会在一个间隙中,我们需要list。这就是我们的gap自行车。如果我们继续滚动,我们可以看到我们有一个变量bike = result。我要在这里设置断点这样我就能看到结果了,对吧?现在我已经设置好了,我仍然可以在Visual Studio代码中,点击底部这里,这里写着Kubernetes。这是调试器所建立的连接。当我选择它时,它会为我可以连接到的所有不同API提供所有不同的url,我想去隔离的共享单车网络,对吧?这是我个人的环境。 Now when I go to that, here’s my own login. This is different than anything that’s running in our dev or production or whatever you want to call that other environment. This is me locally. And you’ll find that out because we set that breakpoint when I sign in again, when I click on any bike, I’ve taken back over to Visual Studio code where I’ve hit that breakpoint, I can hover over result, and I even have IntelliSense. Like I can see everything that’s being called I can see the object, I can look things up, see the ID object, I can see anything, I can see that there is an image URL that’s supposed to be used, I can even if I want it to go back over to the actual debugger itself, I can see my call stack and I can start dropping down into different files. I mean, this is true development, right? Like I can use to finding the problem. Now in this instance, because it’s not so much about how to develop, right, like we all we all know that part. Instead, I want to actually fix the problem. So it turns out that somebody hard coded the image URL as we can see this bike dot image URL, so I’m simply going to comment that out. Okay. And I’ll remove the breakpoint here, we’ll restart the debugger. Okay. And now we’ll go back over to our browser here. And I’ll simply refresh that page. And now I’m able to see a picture. Okay. And again, this is still local. Now just to prove that if I delete this prefix and hit enter, it’s still broken. Going back to mine, it’s not broken. And again, this is not running a container in a container. The bikes API right now code is not I didn’t have to push anything over. I didn’t have to deal with Docker help. This bikes API that you’re seeing is the native code that’s running on my system the same way it would if I were just doing NPM start. Yep. It’s just native code. So now that I’ve fixed the problem, I have confidence, right? I’m I’m glad that I was able to fix my own error that I probably hard coded, I’m confident in this fix will stop the debugger. And now I want to go ahead and check in these changes. I don’t want to check in the launch and tasks, because that’s stuff that was specific to my system. But what I do want to check in is the server change, where we can see where we actually commented out that hard code image URL, right, we don’t need a static file. So I’m going to say, fixed hard code link. I’m going to go ahead and commit and see I’m still on my bike image fix branch, right? And we’re going to go ahead and push that up over into by local repo and then we’ll go take a look at how we can now use DevOps, or specifically JFrog pipelines to fix this even further and give everyone else confidence. Exactly.
巴鲁克Sadogursky
这就是我想说的。所以现在你解决了问题,你知道你在做什么,你对你的承诺有信心。但你现在所做的不是,不是你所承诺的,主分支或主分支,然后它直接进入生产。相反,您将作为一个好公民打开拉请求。
杰西卡·迪恩
是的。我们会到这里,现在我会说比较并创建拉请求,你会从我的自行车修理器和master,我将继续创建拉请求。
巴鲁克Sadogursky
现在我是你的同事,我想审查一下你的拉取请求。我看着变化。我尽我所能去了解这些共同点是否真的能解决问题。现在,坦率地说,我不知道,我很想看到它,去了解它是否被固定,而不是仅仅试图理解如何走出这条线,修复我们曾经拥有的氛围。问题是,我看到它的唯一方法是批准拉请求,让它运行,并在生产中看到它。
杰西卡·迪恩
我的意思是,另一个更痛苦的部分是你拉下我的pull request,在你自己的环境中测试所有东西,使用Kubernetes。
巴鲁克Sadogursky
我很懒,我已经准备好让它运行到生产环境来查看更改,而不是试图在我的机器上重新创建您的环境。因为坦白地说,这两种选择都很糟糕。
杰西卡·迪恩
是的,这两个都很糟糕,你不应该做任何一个。相反,你应该做的是确保你在DevOps管道中有一个信心检查。你可以用JFrog管道来实现。你可以看到我有一个pull request bikes API管道之前是成功的。剧透一下,我们已经测试过了,但并不总是成功,我确实失败了两次。现在我们有一个正在运行的。这是由GitHub自动触发的,当我把推入到我的GitHub回购中,然后打开拉请求,这就自动启动了。
巴鲁克Sadogursky
在我们开始深入研究之前,让我们先谈谈不同的管道,然后找出答案。这也是一个CI服务器,一个构建服务器,我们可以我们有一个提交,它正在运行,并试图构建它。这是你应该马上意识到的,就像,嘿,我知道那是什么?它是一个运行的CI,它实际上是,但把它提升到一个更高的水平。一般管道是产品内部不同平台的一种。hth华体会最新官方网站如你所见,杰西卡现在就是这样。它的目的不仅仅是构建代码。它实际上是一个编排工具。最重要的是,它意味着你可以构建管道,最终管道的管道,这将把你的代码从开发,一直到生产,包括分发,无论你的代码应该在哪里,它都应该分发。显然,最常见的做法就是我们现在所做的,我们正在构建一些代码,然后将其容器化,然后构建一个赫尔姆图,最终将它拉到Kubernetes。 And that’s obviously as of today, as of 2020. Probably the most popular use case when we’re talking about tooling for enabling DevOps. But it’s not limited to that you can actually have a very sophisticated pipelines or five lines that go all the way to distribute to remote for computing, cloud computing, IoT, and whatnot, and the scenarios are limited. So we’re going to show you a little bit of how pipelines work on this particular example. A but keep in mind, it’s it’s actually much wider than that. And it’s also support, tons of other difference.
杰西卡·迪恩
它的功能。JFrog管道的一个很酷的地方是,它是CI服务器解决方案中非常独特的,它的每一步都不是运行在传统的构建服务器上。传统上,ci系统总是运行在某种类型的服务器上。所以你必须用你需要的所有工具建立一个构建服务器,或者把你需要的所有工具放入你的管道中。数据管道就像容器一样工作。这是一个基于容器的管道解决方案。因此,每个步骤都在容器中运行,这现在意味着,我一直在管理自己的构建服务器,或者确保我有自己的工具来运行每个步骤,我只是运行一个非常小的容器来运行一个作业,使用它所需的单个工具。它更有效,更快,你可以看到整个PR管道在两分钟内运行,因为我们能够缓存图层。顺便说一下,这不是我自己的建筑。这是JFrog解决方案的免费层如果你还有缓存,没有多少提供商会在免费层给你缓存,这很好。
巴鲁克Sadogursky
是的。与其他选择相比,这实际上是非常非常慷慨的。但是在现实中,在现实中,你有那些不是傻瓜的人,你可以决定,你想要如何运行这个容器环境。我们实际上有一组选项,你可以带你自己的Kubernetes集群,在这个集群的节点上运行你的构建,你可以选择你想要运行的映像,你可以带你自己的映像,就像你刚刚提到的,我们在一天结束的时候,你可以只连接裸机,四种类型的字段,不能被容器化。
杰西卡·迪恩
你甚至可以添加它,你可以看到这是动态笔记池,同样是作为JFrog的一部分提供的。你可以启用你的缓存,你可以启用你的设置,你可以让它每周清理你的缓存,或者任何你想做的,然后让它对你的不同管道可用,这实际上非常容易设置,特别是因为它们有集成。你可以看到我把GitHub和Azure集成在artifactory中,我们把图像放在一起,我们要用它来解决我们想要修复的安全问题。然后是运行在Azure中的集群的Kubernetes,它让我可以登录到Azure,并获得关于Azure资源的信息,因为我们有一个更大的应用程序。2022世界杯阿根廷预选赛赛程这让我可以访问我实际的Kubernetes集群。
巴鲁克Sadogursky
这些集成由hashicorp提供支持。事实上,狼。所以你可以知道,你放在AWS集成中的凭证也是安全的,你不会把它们暴露在环境变量中,特别是在容器环境中实际上可以从文件中写入。所以什么都没有。这是一场幕后的硬核之旅。很快,您就可以使用现有的凭证创建自己的世界,并将它们作为不同管道的集成进行公开。
杰西卡·迪恩
是的。现在我们来讲讲不同的步骤。我想我可以放大这里。这就是搜索,把它放大。是的,没错。是的。现在你可以放大,就像这样。我在用苹果鼠标。这就像怎么放大一样。现在,为什么? I don’t know. So you can see that we’re doing the normal steps that we would do To test right. And again, from a developer perspective, we might not so much care about this. But this is more from the DevOps concept of how do we make sure again, that everyone has that confidence, we’re taking our changes, we’re building it into a Docker image. But we also talked about how we want to make sure that all the packages and everything we put in Docker is also secure. So we’ll take a look at that in a second. We push that over into our Container Registry, which we’re using JFrog artifactory, we make sure that we create a valid branch name. And what that means is we already have a branch that we push to well, we need to make sure we’re going to take the name of that branch and use it in Kubernetes. And Kubernetes has a max character limit. So we’re going to make sure that we slim a Fae that down to where that we don’t exceed those characters. And therefore we don’t have any unforeseen errors that we don’t need.
巴鲁克Sadogursky
在我们继续之前,让我们讨论一下这些小圆圈,它们在每一步都是正确的。这些就是声明性的收入投入,以及每一步的产出。例如,你可以看到Docker构建和Docker池是如何生成这个小函数的。试着描述一下我在图片中看到的东西。这可不是开玩笑。谢谢你!所以你看不出来。这实际上是我们在整个建造过程中收集并发布到artifactory的材料清单的视觉表现的最终描述。这里我们说的是下一步,整个下一个管道将依赖于这个材料清单,它实际上在接下来的步骤中对我们可用,如果我们想使用任何信息现在你可以看到这里的小图标作为输入,这是我们实际上需要从GitHub中输入的东西作为每一步的输入。为了创建名称,有效分支,我们需要来自提交的信息,或者创建Helm PR安装,我们需要来自提交的信息。 So this is where we can declare what we need for these build, and what this bill produces as an element.