aws 堆栈模板_在AWS上部署LAMP堆栈(第1部分):Atlas工作流程和思维集概述

aws 堆栈模板

Atlas is an application delivery platform built on top of HashiCorp's open source tools Vagrant, Packer, Terraform, and Consul. The goal of Atlas is to enable application development, deployment, and maintenance on any infrastructure provider using one seamless workflow.

Atlas是基于HashiCorp的开源工具VagrantPackerTerraformConsul构建的应用程序交付平台。 Atlas的目标是使用一个无缝的工作流程在任何基础架构提供商上实现应用程序开发,部署和维护。

Scotch has a ton of awesome getting started with Vagrant articles. If you're an avid reader, you're probably even using Scotch Box (a preconfigured Vagrant LAMP stack). In this collection on Getting Started with Atlas, we'll give you a step-by-step guide on everything you need to know to deploy your development changes to production in a professional and easy-to-use workflow.

Scotch有大量关于Vagrant的入门文章。 如果您是一个狂热的读者,甚至可能会使用Scotch Box (预先配置的Vagrant LAMP堆栈)。 在“ Atlas入门”的本系列中,我们将为您提供分步指南,指导您以专业且易于使用的工作流程将开发变更部署到生产中所需的全部知识。

This article will only cover a brief introduction to get you started, but we'll go in depth in the future ones to cover things like setting up Packer to build deployable artifacts and Terraform to create and change server infrastructure.

本文将仅简要介绍以帮助您入门,但在以后的文章中我们将进行更深入的介绍,其中包括设置Packer来构建可部署工件以及Terraform来创建和更改服务器基础结构。

总览 (Overview)

Below is the Atlas process for developers and operators. As you can see, the developer workflow does not change - continue to use your existing version control system and CI tools of choice, and just send the application code to Atlas to kick off the build and deploy process.

以下是针对开发人员和运营商的Atlas流程。 如您所见,开发人员的工作流程不会改变-继续使用现有的版本控制系统和所选的CI工具,只需将应用程序代码发送到Atlas即可启动构建和部署过程。

To setup this developer workflow, operators must write two configurations — a Packer build configuration and a Terraform infrastructure configuration.

要设置此开发人员工作流程,操作员必须编写两个配置 -Packer构建配置和Terraform基础结构配置。

atlas-graphic

工具类 (Tools)

atlas

Each step in Atlas is powered by one of HashiCorp's free and open source tools:

Atlas的每个步骤都由HashiCorp的免费和开源工具之一提供支持:

流浪汉 (Vagrant)

vagrant

Vagrant is a tool for managing development environments that mirror production. Vagrant development environments reduce the friction of developing a project and create greater development/production parity. In the Atlas workflow, Vagrant is used for development environments and for pushing application code to Atlas. If you have an established developer workflow, Atlas also accepts code from popular code repositories (Github, Bitbucket, etc) and continuous integration tools (Travis CI, CircleCI, etc).

Vagrant是用于管理反映生产的开发环境的工具。 无业游民的开发环境减少了开发项目的摩擦,并创造了更大的开发/生产平衡。 在Atlas工作流程中,Vagrant用于开发环境并将应用程序代码推送到Atlas。 如果您已经建立了开发人员工作流程,则Atlas还可以接受来自流行代码存储库(Github,Bitbucket等)和持续集成工具(Travis CI,CircleCI等)的代码。

封隔器 (Packer)

packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. In the Atlas workflow, Packer takes application code and turns it into a deployable artifact (AMI, OpenStack image, VMware image, etc), which is stored in Atlas’s artifact registry.

Packer是一个工具,可从一个源配置为多个平台创建相同的机器映像。 在Atlas工作流程中,Packer提取应用程序代码并将其转换为可部署的工件(AMI,OpenStack映像,VMware映像等),该工件存储在Atlas的工件注册表中。

地貌 (Terraform)

terraform

Terraform is a tool for building, combining, and launching infrastructure. In the Atlas workflow, Terrafom reads from the artifact registry and provisions infrastructure based on those artifacts.

Terraform是用于构建,组合和启动基础结构的工具。 在Atlas工作流程中,Terrafom从工件注册表读取并基于这些工件配置基础结构。

领事 (Consul)

consul

Consul is a tool for service discovery, service registry, and health checking. In the Atlas workflow, Consul is configured in the Packer build stage and identifies the services contained in each artifact. Since all of this logic is held in the build phase with Packer, when the artifact is deployed with Terraform, it is fully configured with dependencies and service discovery pre-baked. There’s no risk of configuration failure at runtime and a misconfigured node in production. Once the nodes are in production, Consul reports the health and service of each node for simple service discovery and monitoring.

Consul是用于服务发现,服务注册和运行状况检查的工具。 在Atlas工作流程中,Consul在Packer构建阶段进行配置,并标识每个工件中包含的服务。 由于所有这些逻辑都由Packer保留在构建阶段,因此,当使用Terraform部署工件时,将完全配置依赖项并预先烘焙服务发现。 没有运行时配置失败和生产中节点配置错误的风险。 节点投入生产后,Consul将报告每个节点的运行状况和服务,以进行简单的服务发现和监视。

结论 (Conclusion)

This rest of this tutorial series will walkthrough how to deploy a LAMP stack to AWS using the Atlas workflow. Get your text editor ready and prepare to write Packer build configs and Terraform infrastructure configs!

本教程系列的其余部分将逐步介绍如何使用Atlas工作流将LAMP堆栈部署到AWS。 准备好您的文本编辑器,并准备编写Packer构建配置和Terraform基础结构配置!

翻译自: https://scotch.io/tutorials/overview-of-the-atlas-workflow-and-mindset

aws 堆栈模板

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是一个部署 Ktor 的 k_server 服务于 AWS EC2 实例上的简单步骤: 1. 创建 AWS EC2 实例并连接到实例上: 首先,您需要在 AWS 上创建 EC2 实例并连接到实例。您可以使用 SSH 客户端连接到实例。对于 Windows 用户,可以使用 PuTTY 连接到实例。 2. 安装 Java: 在连接到实例后,请使用以下命令在 EC2 实例上安装 Java: ```bash sudo apt-get update sudo apt-get install openjdk-8-jdk ``` 3. 上传并运行服务: 将您的 k_server 文件上传到 EC2 实例上。您可以使用 scp 命令将文件从本地系统上传到 EC2 实例上: ```bash scp -i <your-key-pair>.pem k_server.jar ubuntu@<public-dns-name>:~/ ``` 接下来,您可以在 EC2 实例上运行您的 k_server 服务,使用以下命令: ```bash java -jar k_server.jar ``` 4. 使用 Nginx 部署 k_server 服务: 为了更好的性能和安全性,建议使用 Nginx 部署您的 k_server 服务。 首先,安装 Nginx: ```bash sudo apt-get install nginx ``` 然后,配置 Nginx 以反向代理 k_server 服务。在 /etc/nginx/sites-available/default 文件中,添加以下配置: ```nginx server { listen 80; server_name example.com; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } ``` 保存并关闭该文件,然后重启 Nginx 服务: ```bash sudo service nginx restart ``` 现在,您的 k_server 服务已经通过 Nginx 部署AWS EC2 实例上了。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值