谈论云原生DevOps
演讲者:Jessica Deen,云开发倡导者@Azure和Baruch Sadogursky,开发运维倡导者@JFrog的负责人
上课了!加入DevOps的Deen,微软的Jessica Deen和JFrog的Baruch Sadogursky教授,因为他们展示了一些工具来帮助你使用Azure和JFrog简化和自动化你的DevOps管道。Jessica和Baruch将演示如何轻松地将应用容器化,使用Helm管理Kubernetes依赖项,自动化构建,管理容器映像和Helm图表,创建和发布构建信息(相关元数据),将管道推广到开发,测试,阶段和生产等各个阶段,如何检查安全漏洞和开源合规性。以及如何通过完全管理服务在集群环境中编排和管理容器化应用程序。
2022世界杯阿根廷预选赛赛程资源:
视频记录
巴鲁克Sadogursky
大家好,欢迎来到Jeff frog cloud DevOps日。今天的主题是Azure。我很荣幸请到真正的蔚蓝复仇者。我亲爱的朋友,杰西卡·迪恩。杰西卡,对我们来说你是一只真正的超级青蛙。青蛙的好朋友。谢谢你再次来到我们的节目。再提一下,杰西卡是沼泽一般用户会议的校友,多年来她一直被评为最佳演讲者和最佳演讲。伙计们,你们有好戏看了。非常感谢。 And well,
杰西卡·迪恩
非常感谢。谢谢你们邀请我。今天来到这里真是太棒了。好了,这就是我们要讨论的对象。今天,我们要讨论的是,即使在一个抽象的世界里,即使在一个微服务、Kubernetes与整体解耦的世界里,这些都是常见的话题,我们也要自信地开发。但这真的很难让人有信心。我首先要做的一件事就是定义DevOps到底是什么?DevOps是如何在这种信心循环中发挥作用并获得信心的呢?现在,rukh,你和我在这一年中有过几次谈话,确切地说,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中编程。所以我也可以将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芯片,实际上不支持运行Docker,也不支持本地容器,由于Docker工作的结构和底层硬件,你必须将其更新为arm容器。在考德威尔,推特上的水实际上有一个完整的线索,他们进入了所有这些。
巴鲁克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
真是双赢,双赢,对吧?所以你确实掌握了现实世界生产的大事件的所有背景。但你也可以使用你自己的组件,而不是像在你的应用程序中运行gobblegum和调用。
杰西卡·迪恩
没错,你得到了两者的好处,你得到了本地和远程,给你一个更流畅的开发体验,即使在这个阻碍重重的世界。因此,使用bridge to Kubernetes,这是一个可以在Visual Studio代码中使用的扩展,你可以减少开发和测试的时间,因为你不需要专门的Kubernetes沙盒环境。实际上,您可以通过扩展本身创建自己的扩展。您可以使用Azure Kubernetes服务直接调试和迭代代码。因此,现在您可以利用云的力量来创建您的多微服务解决方案。更简单,对吧?这是一件大事。正如我们所提到的,您现在可以远程调试您的容器。但是您可以使用本地代码。我会在演示中解释。 But it’s really, really cool. And it’s super, super simple.
巴鲁克Sadogursky
是的。所以我们将拭目以待。在纽约,这应该是一件非常非常令人兴奋的事情。所以,是的,所以
杰西卡·迪恩
你从之前的幻灯片中得到的任何东西,最重要的是要记住,因为这是一个轻量级的解决方案,因为它只是一个扩展,可以帮助你更好更快地开发,更快地迭代,Kubernetes环境实际上没有永久性的变化。这一切都是为了在混合场景中拥有一个本地沙箱,依赖于远程API,但仍然使用本地代码。所以没有永久性的改变,这是完美的。现在,我不需要担心建立一个永久隔离的开发环境沙箱,或者我不需要担心在不同环境中保持保真度,因为我只使用本地代码,使用远程运行的现有API。这是我们今天要做的演示。我们已经向您展示了架构的外观。但本质上,我作为开发者会进入,我会进入我们应用的前端,我会被重路由到单车API,当我发出请求时,你会看到为什么我们一直叫它单车,这是一个单车应用。然后从那里,那个API会被重定向到我的工作站到我的代码,但它会以一种孤立的方式这样做。如果我通常会去单车。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.
是的。好的,所以
我们还有照片,对吧?这个应用中确实有一个bug我们应该得到一个图片因为我们可以在缩略图上看到它。但当我们深入到项目本身时,我们并没有看到更大的图景。为了修复这个,我们将进入Visual Studio代码。我已经在我的自行车服务。给你们看一下下面,我的终端,我知道我有很漂亮的颜色。但是如果我回去做。哎呀,实际上,我完全备份了目录本身。我清除一下,回到共享单车应用。在这里,现在我做一个ls,我们应该看到我有一堆不同的文件夹,我有资产,我有单车共享,web单车,账单,数据库,网关,所有这些不同的子文件夹对应于我们不同的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
我想说这很简单。对你来说,这很容易,因为你很看重结果。但是作为一个
杰西卡·迪恩
不是开发人员,不是。我发现我越投入开发,我就越会忘记,这是一个完全不同的问题。但你可以看到,现在我的调试器启动了。您可以看到应用程序的容器端口通常是端口80。但是在本地主机3000上是可用的。它只是重定向,你可以看到我有所有不同的服务。我甚至在服务器上有兔子和Q,我有用户和我正在运行的任何东西,都被重新路由到1到7。x。x。x,所以我可以在本地访问它。这是什么意思呢?这意味着我们甚至可以设置一个断点,并在访问应用程序时到达断点。
巴鲁克Sadogursky
这正是我们想要的,因为我们需要弄清楚为什么我们没有我们的图像。
杰西卡·迪恩
完全正确。我将进入我的服务器JavaScript文件,我们将滚动到这里,这样我们就能看到发生了什么,我们有Express,我们有MongoDB。我可以看到我们设置的一些变量一些函数,有一个我们在做app。get,我们会找到我们的自行车,它可能不在那里,我们有一个新自行车,我们有一个更新自行车,它可能会在间隙中,我们需要列出。这是我们的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
这就是我想说的。现在你修复了它,你知道你在做什么,你对你的提交很有信心。但是你现在所做的并不是,你所承诺的,掌握或主要分支,然后它直接进入生产。相反,您是一个好公民,打开了pull请求。
杰西卡·迪恩
是的。我们要到这里,现在我要说比较和创建拉请求,你要从我的自行车修理到master,我要去创建拉请求。
巴鲁克Sadogursky
现在我是你的同事了,我想审查一下你的撤回请求。我看到了变化。我尽我最大的努力去理解这些常见的解决方法是否真的能解决问题。坦白地说,我不知道,我很想看到它,去理解它是否被修复了,而不是仅仅试图理解这句话是如何出来的,修复我们之前的氛围。问题是,我看到它的唯一方法是批准拉请求,让它运行并在生产中看到它。
杰西卡·迪恩
我的意思是,另一个更痛苦的部分是让你拉下我的拉取请求,在本地测试所有东西,在你自己的环境中,使用Kubernetes的辫子。
巴鲁克Sadogursky
我很懒,我已经准备好让它运行到生产环境中来查看更改,而不是尝试在我的机器上重新创建您的环境。因为坦率地说,这两种选择都很可怕。
杰西卡·迪恩
是的,这两个都很糟糕,你不应该做任何一个。相反,您应该做的是确保在您的DevOps管道中内置了信心检查。你可以这样做,你可以使用JFrog管道。你可以看到我实际上有一个pull request bikes API管道之前是成功的。剧透一下,我们已经测试过了,虽然并不总是成功,但我确实有两次失败。现在我们有一个在运行。这是由GitHub自动触发的,当我把它推送到我的GitHub仓库时,然后打开拉取请求,这就自动启动了。
巴鲁克Sadogursky
在我们开始深入研究之前,让我们先谈谈不同的管道,然后再弄清楚。这也是其他东西之一,一个CI服务器,一个构建服务器,我们可以我们有一个提交,它正在运行,并试图构建它。这是你应该马上认出来的,比如,嘿,我知道那是什么?这是一个它是一个运行的CI,它实际上是,但把它带到一个更高的水平。通用管道是产品内部不同的平台之一。hth华体会最新官方网站如你所见,杰西卡现在就是这样。它的目的不仅仅是构建代码。它实际上是一个编排工具。最重要的是,它意味着您可以构建管道,最终是管道的管道,这将把您的代码从开发一直带到生产,包括分发,无论您的代码应该在哪里分发。很明显,最常见的做法就是我们现在所做的,我们正在构建一些代码,然后将其容器化,然后构建一个Helm图表,最后把它拉到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中有集成,我们把图像放进去,我们要用它来解决我们想要解决的安全问题。然后Kubernetes为我的集群运行在Azure上,这让我可以登录到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.