Merge lp:~themue/juju-core/docs-003-config-local-firewall-note into lp:juju-core/docs

Proposed by Frank Mueller
Status: Merged
Approved by: Dave Cheney
Approved revision: no longer in the source branch.
Merged at revision: 111
Proposed branch: lp:~themue/juju-core/docs-003-config-local-firewall-note
Merge into: lp:juju-core/docs
Diff against target: 87 lines (+26/-22)
1 file modified
htmldocs/config-local.html (+26/-22)
To merge this branch: bzr merge lp:~themue/juju-core/docs-003-config-local-firewall-note
Reviewer Review Type Date Requested Status
Dave Cheney (community) lgtm Approve
Review via email: mp+184087@code.launchpad.net

Description of the change

config-local: added a note regarding ufw (conflicts with juju local)

To post a comment you must log in.
Revision history for this message
Dave Cheney (dave-cheney) :
review: Approve (lgtm)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'htmldocs/config-local.html'
--- htmldocs/config-local.html 2013-09-05 12:01:47 +0000
+++ htmldocs/config-local.html 2013-09-05 12:17:36 +0000
@@ -57,57 +57,61 @@
57 <article>57 <article>
58 <section id="config_local">58 <section id="config_local">
59 <h1>Configuring for Local Provider</h1>59 <h1>Configuring for Local Provider</h1>
60
60 <h2>Prerequisites</h2>61 <h2>Prerequisites</h2>
61 <p>The local provider enables you to run Juju on a single system like your local computer or a single server. This way you can simply evaluate the software or service configurations, develop your own charms or run a single server system.</p> 62 <p>The local provider enables you to run Juju on a single system like your local computer or a single server. This way you can simply evaluate the software or service configurations, develop your own charms or run a single server system.</p>
62 <p>To do this, Juju uses the <strong>LXC Linux Container</strong>, which can be installed on your computer with the command:</p>63 <p>To do this, Juju uses the <strong>LXC Linux Container</strong>, which can be installed on your computer with the command:</p>
63<pre class="prettyprint lang-yaml">64<pre class="prettyprint lang-bash">
64sudo apt-get install lxc65sudo apt-get install lxc
65</pre>66</pre>
66 <p>Additionally the local provider needs <strong>MongoDB</strong> to be installed. This is done with the command:</p> 67 <p>Additionally the local provider needs <strong>MongoDB</strong> to be installed. This is done with the command:</p>
67<pre class="prettyprint lang-yaml">68<pre class="prettyprint lang-bash">
68 sudo apt-get install mongodb-server69sudo apt-get install mongodb-server
69</pre>70</pre>
70 <p>In case of <strong>precise</strong> or <strong>quantal</strong> versions of Ubuntu, MongoDB has to be installed from a different repository. So in this case call</p>71 <p>In case of <strong>precise</strong> or <strong>quantal</strong> versions of Ubuntu, MongoDB has to be installed from a different repository. So in this case call</p>
71<pre class="prettyprint lang-yaml">72<pre class="prettyprint lang-bash">
72 sudo apt-add-repository ppa:juju/stable73sudo apt-add-repository ppa:juju/stable
73 sudo apt-get update74sudo apt-get update
74</pre>75</pre>
75 <p>beforehand. In case you're not sure take a look into the file <code>/etc/lsb-release</code> which identifies the series with the variable <code>DISTRIB_CODENAME</code>. If you're not running Ubuntu please consult your operating system distribution's documentation for instructions on installing the LXC userspace tools and the MongoDB server. Juju requires a MongoDB server built with SSL support.</p>76 <p>beforehand. In case you're not sure take a look into the file <code>/etc/lsb-release</code> which identifies the series with the variable <code>DISTRIB_CODENAME</code>. If you're not running Ubuntu please consult your operating system distribution's documentation for instructions on installing the LXC userspace tools and the MongoDB server. Juju requires a MongoDB server built with SSL support.</p>
76 <p>The dependence on the LXC Linux Container shows that the local provider only runs on Linux systems. All steps above are also printed in case of any unsatisfied prerequisite.</p>77 <p>The dependence on the LXC Linux Container shows that the local provider only runs on Linux systems. All steps above are also printed in case of any unsatisfied prerequisite.</p>
7778
78 <h2>Configuration</h2>79 <h2>Configuration</h2>
79 <p>You should start by generating a generic configuration file for Juju, using the command:80 <p>You should start by generating a generic configuration file for Juju, using the command:
80<pre class="prettyprint lang-bash">juju generate-config</pre>81<pre class="prettyprint lang-bash">
82juju init
83</pre>
81 <p>This will generate a file, <strong>environments.yaml</strong>, which will live in your <strong>~/.juju/</strong> directory (and will create the directory if it doesn't already exist).84 <p>This will generate a file, <strong>environments.yaml</strong>, which will live in your <strong>~/.juju/</strong> directory (and will create the directory if it doesn't already exist).
82 <p class ="note"><strong>Note:</strong> If you have an existing configuration, you can use <code>juju generate-config --show</code> to output the new config file, then copy and paste relevant areas in a text editor etc.</p>85 <p class ="note"><strong>Note:</strong>If you have an existing configuration, you can use <code>juju generate-config --show</code> to output the new config file, then copy and paste relevant areas in a text editor etc.</p>
83 <p>The generic configuration sections generated for the local provider will look something like this:</p>86 <p>The generic configuration sections generated for the local provider will look something like this:</p>
84<pre class="prettyprint lang-yaml">87<pre class="prettyprint lang-yaml">
85## https://juju.ubuntu.com/get-started/local/88## https://juju.ubuntu.com/get-started/local/
86local:89local:
87type: local90 type: local
88admin-secret: 772b9471131c6b5883475e3908156d3291 admin-secret: 772b9471131c6b5883475e3908156d32
89#Override the directory that is used for the storage files and database.92 # Override the directory that is used for the storage files and database.
90#The default location is $JUJU_HOME.93 # The default location is $JUJU_HOME.
91# $JUJU_HOME defaults to ~/.juju94 # $JUJU_HOME defaults to ~/.juju
92# root-dir: ~/.juju/local95 # root-dir: ~/.juju/local
93# Override the storage port if you have multiple local providers, or if the96 # Override the storage port if you have multiple local providers, or if the
94# default port is used by another program.97 # default port is used by another program.
95# storage-port: 804098 # storage-port: 8040
96# Override the shared storage port if you have multiple local providers,99 # Override the shared storage port if you have multiple local providers,
97# or if the default port is used by another program.100 # or if the default port is used by another program.
98# shared-storage-port: 8041101 # shared-storage-port: 8041
99</pre>102</pre>
100 <p>Running Juju with this configuration the storage files and the database will be located in the directory specified by the environment variable <strong>$JUJU_HOME</strong>, which defaults to <strong>~/.juju/</strong>. By uncommenting and setting <strong>root-dir</strong> this location can be changed as well as the ports of the storage and the shared storage. This may be useful in the case of multiple parallel running local providers or conflicts with other programs on your system. Also when using encrypted home directories you have to set <strong>$JUJU_HOME</strong> or <strong>root-dir</strong> to point to a location outside your home directory.103 <p>Running Juju with this configuration the storage files and the database will be located in the directory specified by the environment variable <strong>$JUJU_HOME</strong>, which defaults to <strong>~/.juju/</strong>. By uncommenting and setting <strong>root-dir</strong> this location can be changed as well as the ports of the storage and the shared storage. This may be useful in the case of multiple parallel running local providers or conflicts with other programs on your system. Also when using encrypted home directories you have to set <strong>$JUJU_HOME</strong> or <strong>root-dir</strong> to point to a location outside your home directory.
101104
102 <h2>Bootstrapping and Destroying</h2>105 <h2>Bootstrapping and Destroying</h2>
103 <p>The usage of LXC Linux Containers enforces that bootstrapping and destroying of an environment are done as <strong>root</strong>. All other operations can be executed as non-root. E.g.</p>106 <p>The usage of LXC Linux Containers enforces that bootstrapping and destroying of an environment are done as <strong>root</strong>. All other operations can be executed as non-root. E.g.</p>
104<pre class="prettyprint lang-yaml">107<pre class="prettyprint lang-bash">
105sudo juju bootstrap108sudo juju bootstrap
106juju deploy mysql109juju deploy mysql
107...110...
108sudo juju destroy-environment111sudo juju destroy-environment
109</pre>112</pre>
110113 <p class ="note"><strong>Note:</strong>In case of a running firewall like <strong>ufw</strong> it has
114 to be stopped.</p>
111 </section>115 </section>
112 </article>116 </article>
113 </div>117 </div>

Subscribers

People subscribed via source and target branches