mumoshu / kodedeploy

CodeDeploy for EKS. Parallel and Continuous (re)delivery to multiple EKS clusters. Blue-green deployment "of" EKS clusters.
29 stars 5 forks source link

Refactor `kode init` and add dry-run mode #8

Closed foostan closed 5 years ago

foostan commented 5 years ago

This PR includes

Refactor kode init

Summarize kode init flow used by mixins like https://github.com/mumoshu/variant/blob/v0.18.1/test/integration/script-header-reuse/test

   script:
    - *check_version
    - *get_parames
    - *make_etc_codedeploy_agent_conf
    - *make_opt_codedeploy_agent_conf
    - *make_cloudwatch_agent_conf
    - *apply

Add dry-run mode

Implement dry-run mode based on the kode init task as kode init plan.

kode init plan --environment staging --namespace default --cluster cluster-1
kode ≫ starting task init.plan
aws deploy "staging-default-cluster-1" registered (dry run)
namespace "default" created (dry run)
secret "etc-codedeploy-agent-conf" created (dry run)
configmap "opt-codedeploy-agent-conf" created (dry run)
secret "cloudwatch-agent-aws" created (dry run)
configmap "cloudwatch-agent-conf" created (dry run)
deployment.extensions "aws-codedeploy-agent" configured (dry run)
NAME                               TYPE                                  DATA      AGE
<secrets>
kode.init.plan ≫
NAME                                  DATA      AGE
<configmaps>
kode.init.plan ≫
NAME                                        READY     STATUS    RESTARTS   AGE
<pods>
foostan commented 5 years ago

Thanks!