aws ec2 变更pem_用aws和jira建立一个连续的变更日志

aws ec2 变更pem

So you’ve decided to go CI/CD. You read all about the org changes, understand the ins and outs of the development pipeline, and feel confident you can get it done.

因此,您决定使用CI / CD。 您阅读了有关组织更改的所有内容 ,了解了开发流程的来龙去脉,并充满信心地将其完成。

Congratulations!

恭喜你!

After you set up your pipelines, document your dev practices, and start pushing to prod, there’s still a major piece of the puzzle that needs addressing: the changelog.

设置好管道,记录开发实践并开始推向生产之后,仍然需要解决一个主要难题:变更日志。

How do you do it? Do you add a tech writer to your development team who can keep up with five, ten, 20 pushes to production a day? You could. But what if there was a way to automate it?

你怎么做呢? 您是否在开发团队中增加了一名技术撰稿人,他们每天可以完成五,十,二十次推送? 你可以。 但是,如果有一种自动化的方法呢?

You already have an issue tracking system. We use Jira at my office. Whether you use Jira, GitHub, or Trello to track issues, they all have one thing in common: webhooks.

您已经有一个问题跟踪系统。 我们在办公室使用吉拉。 无论您使用JiraGitHub还是Trello来跟踪问题,它们都有一个共同点:webhooks。

Each one of these systems fires events when certain actions take place in the system. And we’re going to use them to automate our changelog.

当系统中发生某些动作时,这些系统中的每一个都会触发事件。 我们将使用它们来自动化变更日志。

架构 (The Architecture)

There are three systems in play for a continuous changelog:

连续更改日志有三个系统在起作用:

  • The issue tracking system (in this walkthrough, Jira)

    问题跟踪系统(在本演练中,Jira)
  • The back-end API to collect, store, and retrieve the changelog (built in AWS)

    用于收集,存储和检索变更日志的后端API(内置于AWS中)
  • The user interface

    用户界面
Image for post
Photo by the author.
图片由作者提供。

In our automation, the events flow like this:

在我们的自动化中,事件的流动如下:

  1. Dev team moves Jira issue to Done status. Jira publishes to a webhook containing details about the closed issue.

    开发团队将Jira问题更改为“完成”状态。 Jira发布到一个包含有关已解决问题的详细信息的webhook。

  2. AWS API Gateway proxies directly to DynamoDB to store the details.

    AWS API Gateway直接代理到DynamoDB以存储详细信息。

  3. End-user loads the changelog page. The page makes a request to load recent changes.

    最终用户加载变更日志页面。 该页面请求加载最近的更改。
  4. AWS API Gateway proxies directly to DynamoDB to load the details from the database and return them in the response.

    AWS API Gateway直接代理到DynamoDB,以从数据库加载详细信息并在响应中返回它们。

Seem simple? It is!

看起来很简单? 它是!

This is the kind of integration that pays off 1,000 times over in the long run. It is a low cost to implement with a high return on value integration.

从长远来看,这种集成可以带来1000倍的回报。 具有高价值回报率的实施成本低。

AWS配置 (AWS Configuration)

In my GitHub repo, I provide the source to deploy the microservice from the architecture diagram above. It uses AWS API Gateway and DynamoDB as the two primary services for storing and retrieving data.

我的GitHub存储库中 ,我提供了从上面的架构图部署微服务的源代码。 它使用AWS API Gateway和DynamoDB作为存储和检索数据的两个主要服务。

The back end only has two endpoints: one to create an item in the changelog and another to load items from it.

后端只有两个端点:一个用于在变更日志中创建项目,另一个用于从中加载项目。

Saving and loading are done in VTL, omitting the need for lambda functions entirely. This gives us the fastest response times possible.

保存和加载是在VTL中完成的,完全不需要lambda函数。 这为我们提供了最快的响应时间。

Since we don’t want malicious users discovering our API and posting bogus or inappropriate changes to our changelog, we need to add an API key. We can’t add standard auth to verify our users since these requests are going to be coming through a webhook.

由于我们不希望恶意用户发现我们的API并将虚假或不适当的更改发布到我们的变更日志中,因此我们需要添加一个API密钥。 由于这些请求将通过Webhook发出,因此我们无法添加标准身份验证来验证用户。

Jira provides the ability to include headers when publishing to a webhook, so we will take advantage of this and include an AWS API key. This key is included in the CloudFormation script in the repository.

Jira提供了在发布到Webhook时包含标头的功能,因此我们将利用这一点并包含一个AWS API密钥。 该密钥包含在存储库的CloudFormation脚本中。

If you follow the README in the GitHub repo, you will be up and running with minimal effort. It comes all pre-wired, so no setup is necessary besides deploying into your AWS account.

如果您遵循GitHub存储库中的README,那么您将可以轻松启动并运行。 它都是预先连接的,因此除了部署到您的AWS账户外,无需任何设置。

Jira配置 (Jira Configuration)

Now that we have our API up and running, it’s time to configure Jira to feed the changelog data.

现在我们的API已启动并正在运行,是时候配置Jira来提供变更日志数据了。

添加自定义字段 (Add a custom field)

We need to add a custom field to our Jira issues. From within Jira, navigate to Settings > Jira Administration > Issues.

我们需要为Jira问题添加一个自定义字段。 在Jira中,导航至“设置”>“ Jira管理”>“问题”。

Once you are viewing the issues admin page, navigate to Fields > Custom Fields > Add custom field.

查看问题管理员页面后,导航至字段>自定义字段>添加自定义字段。

Image for post
Available custom field types in Jira.
Jira中可用的自定义字段类型。

Changelog descriptions can get a little wordy, so select a Text Field (multi-line), give it the name Changelog, and add a description that lets the users know the format they should type in their change details.

更改日志描述可能会有些冗长,因此请选择一个文本字段(多行),将其命名为Changelog ,并添加一个描述,以使用户知道应在其更改详细信息中键入的格式。

Next, choose your screens you want the changelog field visible on. If you want it in all your Jira projects, select them all!

接下来,选择要在其上显示更改日志字段的屏幕。 如果您希望在所有Jira项目中使用它,请全部选择!

建立网络挂钩 (Build the webhook)

With the custom field in place, it’s time to build the automation trigger that posts to the webhook.

使用自定义字段后,就可以构建发布到网络挂接的自动化触发器了。

In your Jira project, go to Project Settings > Project Automation > Create Rule.

在您的Jira项目中,转到项目设置>项目自动化>创建规则。

Image for post
Available trigger types.
可用的触发器类型。

Select the Issue transitioned trigger type and optionally set the From status and To status on the next screen.

选择“ 问题已转换”触发器类型,并在下一屏幕上选择“ 从”状态和“ 到”状态

Note: The To status field should be set to whatever the final status is in your workflow. On my project, our final workflow status is Done.

注意:“ 到状态”字段应设置为工作流中的最终状态。 在我的项目中,我们最终的工作流程状态为完成

Once you have configured the trigger, it’s time to set up the action for Jira to take. Click on New Action to bring up the list of options.

一旦配置了触发器,就可以为Jira设置动作了。 单击“ 新建操作”以显示选项列表。

Image for post
Available notification action types.
可用的通知操作类型。

Select the Send web request action to bring up the configuration screen.

选择发送Web请求操作以调出配置屏幕。

从AWS获取您的API详细信息 (Get your API details from AWS)

Now we need to take a trip back into the AWS console. First, we need to get the URL of the webhook we created.

现在,我们需要回到AWS控制台。 首先,我们需要获取所创建的Webhook的URL。

  1. Navigate to the API Gateway console and select the Changelog API.

    导航到API Gateway控制台,然后选择Changelog API。

  2. Click on the Stages link on the left-hand navigation, then the dev stage.

    单击左侧导航上的“ 阶段”链接,然后单击“ 开发”阶段。

  3. There will be an Invoke URL on the top of the page. Grab that value and add it to the Webhook URL field in Jira. Be sure to add /details at the end.

    页面顶部将有一个Invoke URL。 获取该值并将其添加到Jira中的Webhook URL字段。 确保在末尾添加/details

  4. Next, click on the API Keys link on the left-hand navigation, then the cicd-ApiKey… value.

    接下来,单击左侧导航上的“ API密钥”链接,然后单击cicd-ApiKey…值。

  5. Click on the Show link and copy the value displayed on the screen.

    单击显示链接,然后复制屏幕上显示的值。

  6. Back in Jira, add a header of x-api-key and paste the API key in the value field.

    返回Jira,添加x-api-key的标头并将API密钥粘贴到value字段中。

  7. Next, configure the webhook body to match the image below and hit Save.

    接下来,配置webhook主体以匹配下面的图像,然后点击Save

Image for post
Complete webhook configuration in Jira.
在Jira中完成webhook的配置。

Give your automation a meaningful name on the next screen and hit the Turn it on button to complete your integration!

在下一个屏幕上为您的自动化系统起一个有意义的名称,然后点击“ 打开”按钮完成集成!

查看您的新变更日志 (View Your New Changelog)

At this point, the integration and API are connected and you can start closing issues! It will automatically add changelog details along with the issue type and date when it was completed.

至此,集成和API已连接,您可以开始解决问题了! 它将自动添加变更日志详细信息以及问题类型和完成日期。

Once you have some issues moved over, let’s take a peek at what it looks like. I have provided a skeleton Angular front end in the GitHub repo so you can view the changelog right away.

解决了一些问题后,让我们看一下它的外观。 我在GitHub存储库中提供了一个基本的Angular前端,因此您可以立即查看更改日志。

Image for post

The changelog is grouped by day and has an icon next to the details based on the Jira type that was closed. For my project, a New Feature Jira type will display the NEW icon, while a Bug issue type displays a bug icon.

变更日志按天分组,并根据关闭的Jira类型在详细信息旁边显示一个图标。 对于我的项目,“ 新功能” Jira类型将显示NEW图标,而“ Bug问题”类型则显示一个Bug图标。

These are customizable to your project, so feel free to play around with icons and issue types.

这些可以根据您的项目进行自定义,因此可以随意使用图标和问题类型。

获得组织的支持 (Get Your Organization’s Support)

I could cut you loose right here, but what kind of responsible writer would I be if I didn’t talk about the organizational governance needed for this?

我可以在这里放松一下,但是如果我不谈论为此所需的组织治理,我将是什么样的负责任作家?

Following this route leaves a few questions you need to have answered by your organization:

按照这条路线,您的组织需要回答一些问题:

  • Who writes the changelog details? Tech writers? Developers?

    谁编写变更日志详细信息? 科技作家? 开发人员?
  • Does the changelog detail need to be reviewed before closing an issue?

    解决问题之前是否需要检查变更日志详细信息?
  • Can you trust developers to write the customer-facing notes?

    您可以信任开发人员编写面向客户的说明吗?
  • What issue types do you want to include in the changelog?

    您想在变更日志中包括哪些问题类型?
  • Should you display major features differently?

    您应该以不同的方式显示主要功能吗?

These are for you and your org to figure out. Sure, it’s easiest to let the developers add in the details and be done with it, but is it the safest? Do you want all changes to be logged for the public to see?

这些供您和您的组织找出。 当然,最简单的方法是让开发人员添加细节并进行处理,但这是最安全的吗? 您是否希望所有更改都记录下来以供公众查看?

试试吧! (Try It!)

This is a fast integration to set up and leads to some pretty fun results. I hope you give it a try and bring a continuous changelog to your project.

这是一个快速的集成设置,可以带来一些非常有趣的结果。 希望您能尝试一下并为您的项目带来持续的变更日志。

Do you do something like this? Do you do something totally different? Let me know your thoughts and opinions!

你这样做吗? 你做了完全不同的事情吗? 让我知道您的想法和意见!

Thanks for reading!

谢谢阅读!

翻译自: https://medium.com/better-programming/build-a-continuous-changelog-with-aws-and-jira-cbf0f10776bb

aws ec2 变更pem

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值