OperationCode / OperationCode/operationcode_infra
environment promotion strategy
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- HCL
- Star
- 17
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
pybot/ pyback:
- Work locally in development, can target a test slack
- Push to
stagingbranch, targets a test slack but shows what happens when deployed in ECS. - Push to
master, targets prod
@OperationCode/front-end and current frontend:
- Work locally to target whatever we set in environment variables (staging, prod)
- 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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các đường dẫn triển khai staging và master, cách ECS và kubectl xử lý image, cũng như quy trình nguồn dữ liệu RDS được mô tả trong issue. Lập danh mục cách các image frontend và backend hiện đang được gắn tag và triển khai, bao gồm cả những phiên bản khác nhau được hiển thị. Công việc được xem là hoàn tất khi có một chiến lược promotion đã được thống nhất và một phương pháp được xác định, có thể lặp lại để sao chép dữ liệu production sang các môi trường thấp hơn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, docker, kubernetes
- Lĩnh vực
- cloud, databases, devops, infrastructure
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 15/100