Merge lp:~jorge/charms/precise/node-app/fix-node-readme into lp:charms/node-app

Proposed by Jorge Castro
Status: Merged
Approved by: Juan L. Negron
Approved revision: 32
Merge reported by: Juan L. Negron
Merged at revision: not available
Proposed branch: lp:~jorge/charms/precise/node-app/fix-node-readme
Merge into: lp:charms/node-app
Diff against target: 118 lines (+23/-25)
1 file modified
README.markdown (+23/-25)
To merge this branch: bzr merge lp:~jorge/charms/precise/node-app/fix-node-readme
Reviewer Review Type Date Requested Status
Juan L. Negron (community) Approve
Marco Ceppi (community) Approve
Review via email: mp+124716@code.launchpad.net

Description of the change

Update the README to reflect the charm store and the name "charm"

To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Changes look good, just one thing.

I'd remove the for loop, and instead use `juju add-unit -n10 myapp`

Otherwise, LGTM

review: Approve
32. By Jorge Castro

Of course we don't need a loop with add-unit!

Revision history for this message
Juan L. Negron (negronjl) wrote :

I agree with Marco about the loop ( take the loop out and just use -n<n> ).
Other than that, it looks good to me as well.

-Juan

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README.markdown'
--- README.markdown 2011-09-30 20:09:18 +0000
+++ README.markdown 2012-09-17 16:23:20 +0000
@@ -1,44 +1,42 @@
11
2# juju formula to deploy a user-defined node.js app2# juju charm to deploy a user-defined node.js app
33
4This is an example 4This is an example
5[juju](http://juju.ubuntu.com)5[juju](http://juju.ubuntu.com)
6formula to deploy a user-defined node app6charm to deploy a user-defined node app
7directly from revision control.7directly from revision control.
88
9This formula will be maintained with a general set of hooks9This charm will be maintained with a general set of hooks
10for various services that can be used with node apps10for various services that can be used with node apps
11(like mongodb).11(like mongodb).
1212
1313
14# Using this formula14# Using this charm
1515
16First, edit `config.yaml` to add info about your app.16First, edit `config.yaml` to add info about your app.
1717
18Then deploy some basic services18Then deploy some basic services
1919
20 $ juju deploy --repository ~/formulas node-app myapp20 juju deploy node-app myapp
21 $ juju deploy --repository ~/formulas mongodb21 juju deploy mongodb
22 $ juju deploy --repository ~/formulas haproxy22 juju deploy haproxy
2323
24relate them24relate them
2525
26 $ juju add-relation mongodb myapp26 juju add-relation mongodb myapp
27 $ juju add-relation myapp haproxy27 juju add-relation myapp haproxy
2828
29scale up your app29scale up your app (to 10 nodes for example)
3030
31 $ for i in {1..10}; do31 juju add-unit -n 10 myapp
32 $ juju add-unit myapp
33 $ done
3432
35open it up to the outside world33open it up to the outside world
3634
37 $ juju expose haproxy35 juju expose haproxy
3836
39Find the haproxy instance's public URL from 37Find the haproxy instance's public URL from
4038
41 $ juju status39 juju status
4240
43(or attach it to an elastic IP via the aws console)41(or attach it to an elastic IP via the aws console)
44and open it up in a browser.42and open it up in a browser.
@@ -60,16 +58,16 @@
60- starts your node app as a service58- starts your node app as a service
6159
6260
63## Formula configuration61## Charm configuration
6462
65Configurable aspects of the formula are listed in `config.yaml`63Configurable aspects of the charm are listed in `config.yaml`
66and can be set by either editing the default values directly64and can be set by either editing the default values directly
67in the yaml file or passing a `myapp.yaml` configuration65in the yaml file or passing a `myapp.yaml` configuration
68file during deployment66file during deployment
6967
70 $ juju deploy --repository ~/formulas --config ~/myapp.yaml node-app myapp68 juju deploy --config ~/myapp.yaml node-app myapp
7169
72Some of these parameters are used directly by the formula,70Some of these parameters are used directly by the charm,
73and some are passed through to the node app using `config/config.js`.71and some are passed through to the node app using `config/config.js`.
7472
75## Application configuration73## Application configuration
@@ -104,7 +102,7 @@
104102
105## Network access103## Network access
106104
107This formula does not open any public ports itself.105This charm does not open any public ports itself.
108The intention is to relate it to a proxy service like106The intention is to relate it to a proxy service like
109`haproxy`, which will in turn open port 80 to the outside world.107`haproxy`, which will in turn open port 80 to the outside world.
110This allows for instant horizontal scalability.108This allows for instant horizontal scalability.
@@ -117,7 +115,7 @@
117to the bottom of the `install` hook, and then once your stack115to the bottom of the `install` hook, and then once your stack
118is started, you expose116is started, you expose
119117
120 $ juju expose myapp118 juju expose myapp
121119
122it to the outside world.120it to the outside world.
123121
@@ -128,13 +126,13 @@
128126
129# Making this work with your node.js app127# Making this work with your node.js app
130128
131This formula makes some strong assumptions129This charm makes some strong assumptions
132about the structure of the node application 130about the structure of the node application
133(`config/config.js`) that might not apply to your app.131(`config/config.js`) that might not apply to your app.
134Please treat this formula as a template that 132Please treat this formula as a template that
135you can fork and modify to suit your needs.133you can fork and modify to suit your needs.
136134
137The biggest difference between how the formula135The biggest difference between how the charm
138behaves for different kind of apps is application136behaves for different kind of apps is application
139startup. A simple application will want to start137startup. A simple application will want to start
140upon install (startup code goes in the `install` hook),138upon install (startup code goes in the `install` hook),

Subscribers

People subscribed via source and target branches

to all changes: