Runverter is a toolset for runners that helps to convert metrics, calculate times and speed and much more. For more information about this project please check out the detailed blog post.
$ npm install -g ember-cli
$ npm install -g bower
$ brew install watchman
$ gem install bundler -v 2.2.7
$ git clone https://github.com/krachtstefan/runverter.git
$ cd runverter
$ rvm use
$ bundle install
$ npm install && bower install
Run ember server and open http://localhost:8000.
Run ember test for a one time test and ember test --server to trigger tests on every file change.
The app is hosted on two aws buckets. One serves the main website at runverter.io and the other one provides all assets via s.runverter.io. There's is also an additional staging.runverter.io bucket for testing releases. This also uses the assets from s.runverter.io, since all files have a unique hashed filename.
The deploy process itself is done with ember-cli-deploy and the ember-cli-deploy-s3-pack plugin.
As described in this video the deployment process is a combination of the following steps:
- Compile the ember app locally.
- Upload all files to the Amazon S3 asset bucket.
- upload the index.html with a hidden filename like
index.html:XXXXXX. - Preview the version with a secret url like
https://runverter.io/index.html:XXXXXX. - Activate the deployed version by copying the content of
index.html:XXXXXXto theindex.htmlfile.
- The assets will be uploaded to Amazon S3, so you need a bucket called
s.runverter.io,staging.runverter.io,runverter.io. - All these buckets need to be public and connected with the related domain via amazon cloudfront.
- There are some environment variables that need to be present to deploy the app. Environment variables can be defined by adding lines like
export AWS_SECRET_ACCESS_KEY=XXXXXXto your~/.bash_profileor~/.zshrc.RUNVERTER_AWS_ACCESS_KEY_ID: Access key ID to access all s3 buckets.RUNVERTER_AWS_SECRET_ACCESS_KEY: Access key to access all s3 buckets.
ember deploy stagingwill compile the app, upload the assets and publish the index page on thestaging.runverter.iobucket. It will display the key of the deployed version likeXXXXXXX.- preview the build on http://staging.runverter.io/index.html:XXXXXX.
ember deploy:list staginglists all available revisions.- activate the version with
ember deploy:activate staging --revision=XXXXXXX.
- Repeat the steps described for staging but replace
stagingwithproduction.