3Multi-staging Deployment Manager (DM). MD consists of the client and server parts (DMC and DMS accordingly).
10curl https://nixos.org/nix/install | sh
22$ result/bin/dmc-exe --help
25Usage: dmc-exe (create | list | edit | delete | update | info | cleanup |
26 restore | cleanarchive)
29 -h,--help Show this help text
46$ result/bin/dms-exe --help
49Usage: dms-exe --port INT --ui-port INT --db TEXT --db-pool-size INT
50 --tls-cert-path TEXT --tls-key-path TEXT --tls-store-path TEXT
53 -h,--help Show this help text
56# Build and publish docker images to ECR
58For a build and publish of Docker images you must have needed AWS permissions: access to SSM and ECR!
64# Kubernetes installation
69./b2b-helm-tool -d deploy dms-infra
722. Clone b2b-helm to `/tmp`
75git clone https://github.com/Aviora/b2b-helm.git /tmp/b2b-helm
783. Give needed permissions for DMS
81cd /tmp/b2b-helm/charts/admin && helm install --name dm-helm-access ./helm-access
82cd /tmp/b2b-helm/charts/admin && helm install --name dm-pvc-control ./pvc-control
83cd /tmp/b2b-helm/charts/admin && helm install --name dm-cert-control ./cert-control
89./b2b-helm-tool -d deploy dms:latest
92# How to deploy a new staging
95dmc create --name STAGING_NAME -t DOCKER_IMAGE_TAG -e ENV_VAR1=env_val1 -e ENV_VAR2=env_val2
100docker 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
103Note that in our ECR(hosted docker registry) we use a convention of
104DOCKER_IMAGE_TAG = GIT_SHA. So, if this build was successfully built on github
105actions CI and docker image was pushed to ECR, you can deploy it without any
108# How to override an environment variable in an application
111dmc edit --name STAGING_NAME
117docker run -ti --rm 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest edit --name STAGING_NAME
120docker run -ti -e EDITOR=emacs --rm 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest edit --name STAGING_NAME
123`dmc edit` opens an `$EDITOR` where you can override staging variables. To
124override an environment variable `FOO` with a value `foo`, add a line like this:
130To commit the changes, save the file and quit your default `$EDITOR`. `:wq` in
131vim. Note that to discard your changes, you have to exit your `$EDITOR` with a
132not-zero exit code. You can do this by typing `:cq` in vim.
134# How clean up Docker cache
136DMC using a certificate for authentication in DMS.
137After deploy of new DMS's version needs to use a new certificate.
139To make sure the actual image is being used, remove the old docker image and pull the new one before with:
142docker rmi 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest
143docker pull 560065381221.dkr.ecr.us-east-1.amazonaws.com/dmc:latest
150binary-caches = https://cache.nixos.org https://nixcache.reflex-frp.org
151binary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=
152binary-caches-parallel-connections = 40
155Enter shell to work on the backend:
160Enter shell to work on the frontend (with GHC):
165Enter shell to work on the frontend (with GHCJS):
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list