Publishing npm packages to multiple registries with Projen
Construct Hub is a web portal to collect the constructs for AWS CDK, CDK8s and CDKtf. The construct could support multiple programming languages, such as Javascript/TypeScript, Python, Java and C#. Actually the construct is developed by TypeScript, then it's compiled as across languages library by jsii! Any npm/pypi …
Read MoreLast year I shared the production-ready, cloud native solution to deploy Sonatype Nexus Repository OSS on AWS. The solution has an update with below notable changes, support specifying EKS version, v1.20, v1.19, and v1.18 are supported versions support provisioning to existing VPC support provisioning to existing …
Read More本方案的起因是,一个源代码托管在Github上的项目fix一个重要的bug后,在AWS上的持续部署流水线一直失败。分析日志后,发现流水线中的数个步骤需要克隆源代码,但是访问Github的网络非常不稳定,这数个流水线任务持续因连接超时,连接拒绝等网络错误而失败。而流水线任务大量使用了CodeBuild, Lambda等AWS托管服务,无法为执行环境配置可靠的网络连接。 本方案思路如下, 在 VPC public subnets 中创建 NAT instance 即 EC2 虚拟机, 配置 NAT instance,使用 tunnel 网络访问 github, 修改 private subnets 的路由表,添加 github …
Read MoreInfrastructure as Code is the trend to manage the resources of application. AWS CloudFormation is the managed service offering the IaC capability on AWS since 2011. CloudFormation uses the declarative language to manage your AWS resources with the style what you get is what you declare. However there are cons of …
Read MoreAWS CDK是编排部署AWS云上资源最佳的工具之一。基于AWS CDK的应用应该如何实践DevOps持续集成和部署呢? 通常我们有下面几种方法, 使用AWS CodePipeline来完成DevOps pipeline搭建。CodePipeline是AWS Code系列服务中的持续集成编排工具,它可以集成CodeBuild项目,在CodeBuild项目build中安装cdk,并执行cdk deploy命令来实现应用部署。 这种方法简单直接的实现了DevOps部署流水线。但缺少staging,将最新提交直接部署到生产是一种非常高风险的做法。 CDK近期发布了体验性的新特性CDK Pipelines来封装CDK应用持续部署流水线的配 …
Read MoreSonatype Nexus repository OSS is an artifact repository that supports most software repositories such as Maven, Pypi, Npmjs, Rubygems, Yum, Apt, Docker registry and etc. In the enterprise Nexus repository is widely used for storing proprietary artifacts and caching the artifacts for speeding up the devops. Building a …
Read MoreInfrastructure as Code(架构即代码)一直是衡量公有云是否支持良好运维能力的重要指标。作为云计算领先的AWS,通过服务CloudFormation来编排云环境中的基础设施资源。不过由于CloudFormation是使用YAML/JSON编写的声明式语言,不善于处理逻辑,编写繁琐且不利于调试排错,对于新上手的Devops工程师来说也有不小的学习曲线。三方开源的工具Terraform同样没有很好解决CloudFormation存在的这些问题。 AWS CDK的出现解决了目前CloudFormation存在的绝大部分问题,极大的提升基础设施编排代码的开发和维护效率。 AWS CDK是一种开源软件开发框架,开发者可以用自 …
Read More业务时常有需求将某个域名(A)的访问重定向到其他域名(B),即使实现这样一个很简单的需求通常也需要部署Web服务器(例如Nginx),为域名A的请求返回302响应,并提供新的Location地址重定向到域名B。现在基于云计算服务,我们可以使用一些托管服务来实现同样的事情,无需管理服务器和维护应用,同时做到最低成本实现该需求。 接下来将介绍如何利用AWS上的服务实现该需求。 使用AWS S3和AWS CloudFront实现域名重定向 创建一个新的S3 bucket,例如 redirect.domain.com 配置新bucket属性,开启静态网站托管, …
Read More