Skip to content

Commit

Permalink
Merge pull request newrelic#7 from tkrajcar/heroku-deploy-button
Browse files Browse the repository at this point in the history
Add Heroku deploy button and update instructions.
  • Loading branch information
benweint committed Aug 7, 2014
2 parents f86aecd + 94e5338 commit 1b250e3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 30 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
newrelic-ruby-kata
==================

Using New Relic and Heroku see how many things you can find and fix to make this app perform fast!
Using New Relic and Heroku, see how many things you can find and fix to make this app perform fast!

Step 1
-------
Get the code. The code is waiting to be forked on [github](https://github.com/newrelic/newrelic-ruby-kata)
Get the code. The code is waiting to be forked on [Github](https://github.com/newrelic/newrelic-ruby-kata)

Step 2
-------
Load the sample DB locally:

rake db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $USER -d newrelic-ruby-kata_development public/sample-data.dump`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $USER -d newrelic-ruby-kata_development public/sample-data.dump

Step 2
Step 3
-------
Deploy your app to Heroku and load the database there
Deploy your app to Heroku, and load the database:

heroku apps:create
heroku addons:add pgbackups:plus newrelic:stark memcachier
heroku pgbackups:restore DATABASE 'http://newrelic-ruby-kata.herokuapp.com/sample-data.dump'
First,

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

Step 3
Then, you can load the sample data via:

heroku pgbackups:restore DATABASE 'http://newrelic-ruby-kata.herokuapp.com/sample-data.dump'

Step 4
-------
You can watch a [video on getting started](http://newrelic.com/resources/training) with the New Relic agent to help get you started. The New Relic agent will help you find and solve the performance issues in this application as well as help you see the complete impact of your changes.

Step 4
Step 5
-------
Fix the code / Solve as many of the Katas as you can. There are seven distinct Katas in this application that can be torn apart and fixed by using your awesome dev abilities and the deep metrics that New Relic provides.

Step 5
Step 6
-------
Let us know how you did, what you liked or disliked, what helped you find problems or what were the challenges, what you like about New Relic and what you don't - we just want to hear from you and see what we can do to get better. We'll even send you something for demonstrating your geek super powers when you complete the Kata - just provide us with your [thoughts and a link to your forked repo](https://support.newrelic.com/home).
18 changes: 18 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "New Relic Ruby Kata",
"description": "Using New Relic and Heroku, see how many things you can find and fix to make this app perform fast!",
"repository": "https://github.com/newrelic/newrelic-ruby-kata",
"website": "http://newrelic-ruby-kata.herokuapp.com/",
"logo": "http://storefront.nr-assets.net/assets/newrelic/source/NewRelic-logo-square.png",
"success_url": "/",
"addons": [
"pgbackups:plus",
"newrelic:stark",
"memcachier"
],
"keywords": [
"new relic",
"rails",
"kata"
]
}
30 changes: 11 additions & 19 deletions app/views/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,31 @@
<div class="row">
<div class="span4">
<h2>Step 1</h2>
<p>Get the code. Using your <a href="http://github.com">github</a> account, fork
<p>Get the code. Using your <a href="http://github.com">Github</a> account, fork
the <a href="https://github.com/newrelic/newrelic-ruby-kata">newrelic/newrelic-ruby-kata</a> repo
and then clone it onto your machine.</p>
<p><a class="btn" href="https://github.com/newrelic/newrelic-ruby-kata/">Fork &amp; Clone! &raquo;</a></p>
</div>
<div class="span4">
<h2>Step 2</h2>
<p>Create a Heroku app. Using your <a href="http://heroku.com">heroku</a> account, create
a new app and then push the kata code to it.
(Use the <a href="https://toolbelt.heroku.com/">Heroku toolbelt</a>.)</p>
<pre>heroku apps:create
git push heroku master</pre>
<p><a class="btn" href="http://heroku.com">Create &amp; Push! &raquo;</a></p>
<p>Load the sample DB locally:</p>
<pre>rake db:create

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $USER -d newrelic-ruby-kata_development public/sample-data.dump</pre>
</code>
</div>
<div class="span4">
<h2>Step 3</h2>
<p>Add New Relic to your Heroku app.
The New Relic agent will help you find and solve the performance issues in this
application as well as help you see the complete impact of your changes.
</p>
<pre>heroku addons:add newrelic:stark
heroku config:set NEW_RELIC_APP_NAME="YOUR APP NAME GOES HERE"</pre>
<p>Deploy your app to Heroku, and load the database:
<p>Look for the purple 'Deploy to Heroku' button on your Github fork's README.</p>
<p>Then, you can load the sample data via:</p>
<pre>heroku pgbackups:restore DATABASE 'http://newrelic-ruby-kata.herokuapp.com/sample-data.dump'</pre>
</div>
</div>
<div class="row">
<div class="span4">
<h2>Step 4</h2>
<p>Populate the sample database and setup memcache.</p>
<pre>heroku addons:add heroku-postgresql:dev
heroku addons:add pgbackups:plus
heroku addons:add memcachier

heroku pgbackups:restore DATABASE 'http://newrelic-ruby-kata.herokuapp.com/sample-data.dump'</pre>
<p>You can watch a <a href="http://newrelic.com/resources/training">video on getting started</a> with the New Relic agent to help get you started. The New Relic agent will help you find and solve the performance issues in this application as well as help you see the complete impact of your changes.
</div>
<div class="span4">
<h2>Step 5</h2>
Expand Down

0 comments on commit 1b250e3

Please sign in to comment.