OperationCode / OperationCode/operationcode_infra

environment promotion strategy

未关闭
#63 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
HCL
星标
17
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

pybot/ pyback:

  1. Work locally in development, can target a test slack
  2. Push to staging branch, targets a test slack but shows what happens when deployed in ECS.
  3. Push to master, targets prod

@OperationCode/front-end and current frontend:

  1. Work locally to target whatever we set in environment variables (staging, prod)
  2. Create pull request, which on merge promotes the production to this

Backend does the same as front-end, both front-end and backend you can go into kubectl and manually target whatever container tag you'd like. When I request the current images for all pods, we'll see some oddities:

C:\Users\wimo7\Desktop> kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" | tr [:space:] '\n'
operationcode/operationcode_frontend:latest
operationcode/operationcode_frontend:latest
... supporting containers...
operationcode/operationcode_backend:1245
operationcode/operationcode_backend:latest
operationcode/operationcode_backend:1245
operationcode/operationcode_backend:latest
operationcode/operationcode_frontend:2327
operationcode/operationcode_backend:1269
operationcode/operationcode_backend:1269
operationcode/operationcode_backend:1269
operationcode/operationcode_backend:1269
operationcode/operationcode_frontend:2334
operationcode/operationcode_frontend:2334
bitnami/redis:3.2.9-r2
operationcode/town-crier:latest

In the above case, we see that frontend is using both 2334and latest. while backend is using 1269, 1245 and latest.

I don't know the correct command to list the namespace for each of these. But I remember find out that we are setting staging cube as "latest" and the prod as a numerical value. I don't know why we have 3 different backend image versions.

After talking with @kylemh (IIRC) he doesn't need a way to promote a deployed code instance to staging. For their purposes it's fine to have staging only running locally. But I think going to a strategy where we promote to staging on merge to master, by tags, and then manually promote by adding a production tag would be more ideal, or automatically based on some criteria.

Our initial concern was having k instances of staging for k developers. But I don't see that as a current problem.

Lastly, we need a way that data sources (backend, pyback) RDS instances, have data in production that propagate down so that when we update those instances we can easily carry that over. I think for the time being a nightly copy over, plus ability to manually trigger, would be fine. With the knowledge that if you are working on something that requires database migrations you'll have to perform the migration again with the updated data.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先查看 staging 和 master 的部署路径、ECS 和 kubectl 的镜像行为,以及 issue 中描述的 RDS 数据源流程。盘点 frontend 和 backend 镜像当前的标记和部署方式,包括所显示的不同版本。只有在达成一致的 promotion 策略,并定义出一种将 production 数据复制到较低环境的可重复方法后,才算完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, docker, kubernetes
领域
cloud, databases, devops, infrastructure
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
15/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。