git.iko.soy/typeable/octopod
on master help sign in
add text editors to DMC image
commit05eeac73bdb3b4a6b4c8ef77d373038a27e4b5ec authorAndrei Orlov <aaorlov1@gmail.com> dateMon 20 Apr 2020, 18:06 (6 years ago) parente9e8934
2 files changed+17−2
README.md+15−1 nix/default.nix+2−1
README.md+15−1
@@ -81,7 +81,7 @@ cd /tmp/b2b-helm/charts/admin && helm install --name dm-pvc-control ./pvc-contro
81814. Deploy DMS
8282
8383```bash
84−./b2b-helm-tool -d deploy dms:dm-v3
84+./b2b-helm-tool -d deploy dms:latest
8585```
8686
8787# How to deploy a new staging
@@ -90,6 +90,11 @@ cd /tmp/b2b-helm/charts/admin && helm install --name dm-pvc-control ./pvc-contro
9090dmc create --name STAGING_NAME -t DOCKER_IMAGE_TAG -e ENV_VAR1=env_val1 -e ENV_VAR2=env_val2
9191```
9292
93+Or use Docker:
94+```bash
95+docker run -ti --rm 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest create --name STAGING_NAME -t DOCKER_IMAGE_TAG -e ENV_VAR1=env_val1 -e ENV_VAR2=env_val2
96+```
97+
9398Note that in our ECR(hosted docker registry) we use a convention of
9499DOCKER_IMAGE_TAG = GIT_SHA. So, if this build was successfully built on github
95100actions CI and docker image was pushed to ECR, you can deploy it without any
@@ -101,6 +106,15 @@ intermediate steps.
101106dmc edit --name STAGING_NAME
102107```
103108
109+Or use Docker:
110+```bash
111+# use Vim
112+docker run -ti --rm 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest edit --name STAGING_NAME
113+
114+# use Emacs
115+docker run -ti -e EDITOR=emacs --rm 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest edit --name STAGING_NAME
116+```
117+
104118`dmc edit` opens an `$EDITOR` where you can override staging variables. To
105119override an environment variable `FOO` with a value `foo`, add a line like this:
106120
nix/default.nix+2−1
@@ -78,7 +78,7 @@ with {
7878
7979 dmc-container = dockerTools.buildImage {
8080 name = "dmc-container-slim";
81− contents = [ dm coreutils bash ];
81+ contents = [ dm coreutils bash emacs vim ];
8282
8383 runAsRoot = ''
8484 mkdir /app
@@ -90,6 +90,7 @@ with {
9090
9191 config = {
9292 Entrypoint = [ "/app/dmc-exe" ];
93+ Env = [ "EDITOR=${vim}/bin/vim" ];
9394 };
9495 };
9596