-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying to Production
As of July 28th (Pre-alpha) our production environment consist of one azure VM using CoreOS. We do not yet have a fully usable deploy script to interact with the VM, so you will have to manually ssh and run the deploy script on the box. (This will be fixed during the alpha roadmap).
First you need the VM IP and username/password (Will not post here please look here )
In Alpha you will be required to upload your SSH key to the VM so you don't need to use credentials.
You can start by ssh'ing into the VM running leanworkbench.com
with the user lwbadmin
:
$ ssh [email protected]
For CoreOS you'll need to elevate your privileges to access the docker
binary:
$ sudo su
Now you're ready to continue with the deployment process.
For every change you want to deploy you will need to rebuild the prod image every time.
Once you're in the VM navigate to the min-bench/infra/bin
folder. To rebuild the prod image run the build-prod
script.
$ cd min-bench/infra/bin && ./build-prod
When you run that script it will prompt you for input on bumping the image version for each image.
This uses typical semver to indicate which version bump you would like to give to the image.
Resolving new image version...
The current version is 0.1.2.
What level of this version should be bumped?
(0) None
(1) Major
(2) Minor
(3) Patch
Selected Level [3]:
By default if you press enter it will assume
3
, and only provide a minor patch. In most cases this is probably what you want.
Again, this will ask you for each image we have in prod. We currently have two web
and db
.
You can list all the images built on our prod environment with this command:
$ docker image ls
After the build process for the images is complete you're ready to run the containers.
Simply run the start-prod
script and you should be good to go.
You can list all the running containers with this command:
$ docker ps
If for some reason you need to stop the containers, just run the stop-prod
script.
$ ./stop-prod