~jaywink/juju-core/fix-create-path-charm-intro

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html> 
<html>
<!--Head-->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Juju Documentation</title>
		<script src="/wp-content/themes/ubuntu/library/js/all-yui.js"></script>
		<link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono" rel="stylesheet" type="text/css">
		<link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css">
 		<link rel="shortcut icon" href="//assets.ubuntu.com/sites/ubuntu/latest/u/img/favicon.ico" />
		<link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/guidelines/css/latest/ubuntu-styles.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/ubuntu/latest/u/css/global.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css">
		<link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/home-new.css">
		<link rel="stylesheet" id="stacktack-css" href="https://juju.ubuntu.com/wp-content/plugins/stacktack/css/stacktack.min.css?ver=3.4.2" type="text/css" media="all">
		<link href="./css/main.css" rel="stylesheet" type="text/css">
		
		<!--[if lt IE 9]>
		<script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
	</head>
<!--End-Head-->






  <body class="resources">
  	
<!--Header-->

	<header class="banner global" role="banner">
		<nav role="navigation" class="nav-primary nav-right">
			<div class="logo">
				<a class="logo-ubuntu" href="https://juju.ubuntu.com/">
					<img width="118" height="27" src="//assets.ubuntu.com/sites/ubuntu/latest/u/img/logo.png" alt="Juju logo" />
					<span>Juju</span>
				</a>
			</div>
			<ul>
				<li class="accessibility-aid"><a accesskey="s" href="#main-content">Jump to content</a></li>
				<li class="page_item page-item-8"><a href="https://juju.ubuntu.com/charms/">Charms</a></li>
				<li class="page_item page-item-10"><a href="https://juju.ubuntu.com/features/">Features</a></li>
				<li class="page_item page-item-12"><a href="https://juju.ubuntu.com/deployment/">Deploy</a></li>
				<li class="page_item page-item-14"><a href="https://juju.ubuntu.com/resources/">Resources</a></li>
				<li class="page_item page-item-16"><a href="https://juju.ubuntu.com/community/">Community</a></li>
				<li class="page_item page-item-18"><a href="https://juju.ubuntu.com/download/">Install Juju</a></li>
			</ul>
			<div id="box-search">
				<form class="search-form" method="get" id="searchform" action="https://juju.ubuntu.com/">
					<label class="off-left" for="s">Search:</label>
					<input class="form-text" type="text" value="" name="s" id="s" />
					<button class="off-left form-submit" type="submit" id="searchsubmit">Search</button>
				</form>		
			</div>
		</nav>	
	</header>
<!--End-Header-->
<!--Preamble-->
<div class="wrapper">
  <div id="main-content" class="inner-wrapper" role="main">
    <div class="row no-border">
     <div class="header-navigation-secondary"></div>
     <h2 class="pagetitle">Juju documentation</h2>
    </div>
    <section id="content" class="container-12">
      <div class="grid-12 doc-container">
        <div id="navlinks" class="grid-3 doc-navigation">LINKS</div>
        <div class="grid-9 doc-content">
<!--End-Preamble-->
          <article>
            <section id="implicit-relations">
            <h1>Implicit relations</h1>
            <p>Implicit relations allow for interested services to gather lifecycle-oriented events and data about other services without expecting or requiring any modifications on the part of the author of the other service's charm.</p>
            <p>Implicit relationships are named in the reserved juju-* namespace. Both the relation name and interface names provided by Juju are prefixed with <cite>juju-</cite>. Charms attempting to provide new relationships in this namespace will trigger an error.</p>
            <p>Juju currently provides one implicit relationship to all deployed services.</p>
            <p><cite>juju-info</cite>, if specified would look like:</p>
            <pre>provides:
                juju-info:
                    interface: juju-info</pre>
                    
            <p>The charm author should not declare the <cite>juju-info</cite> relation and is provided here only as an example. The <cite>juju-info</cite> relation is implicitly provided by all charms, and enables the requiring unit to obtain basic details about the related-to unit. The following settings will be implicitly provided by the remote unit in a relation through its <cite>juju-info</cite> relation</p>
            <pre><span class="n">private</span><span class="o">-</span><span class="n">address</span> <span class="n">public</span><span class="o">-</span><span class="n">address</span>
            </pre>
            
            
            <h2>Relationship resolution</h2>
            <p>If <strong>rsyslog</strong> is a <a class="reference external" href="authors-subordinate-services.html"><em>subordinate charm</em></a> and requires a valid <cite>scope: container</cite> relationship in order to deploy. It can take advantage of optional support from the principal charm but in the event that the principal charm doesn't provide this support it will still require a <cite>scope: container</cite> relationship. In this event the logging charm author can take advantage of the implicit relationship offered by all charms, <cite>juju-info</cite>.</p>
            <pre>requires:
              logging:
                  interface: logging-directory
                  scope: container
              juju-info:
                  interface: juju-info
                  scope: container</pre>
                  
            <p>The admin then issues the following</p>
            <pre>juju add-relation wordpress rsyslog</pre>
            
            <p>If the wordpress charm author doesn't define the <cite>logging-directory</cite> interface Juju will use the less-specific (in the sense that it likely provides less information) <cite>juju-info</cite> interface. Juju always attempts to match user provided relations outside the <cite>juju-*</cite> namespace before looking for possible relationship matches in the <cite>juju-*</cite> namespace.</p>
            
            </section>
          </article>
<!--Postamble-->
        </div>
      </div>
    </section>
  </div>
</div>
<!--End-Postamble-->
<!--Footer-->
	<footer class="global clearfix" role="contentinfo">
		<nav role="navigation">
			<div class="footer-a">
				<div class="clearfix">
					<ul>
						<li>
							<h2><a href="/">Juju</a></h2>
							<ul>
								<li><a href="/charms">Charms</a></li>
								<li><a href="/features">Features</a></li>
								<li><a href="/deployment">Deployment</a></li>
							</ul>
						</li>
						<li>
							<h2><a href="/resources">Resources</a></h2>
							<ul>
								<li><a href="/resources/juju-overview/">Overview</a></li>
								<li><a href="/docs/">Documentation</a></li>
								<li><a href="/resources/the-juju-gui/">The Juju web UI</a></li>
								<li><a href="/docs/authors-charm-store.html">The charm store</a></li>
								<li><a href="/docs/getting-started.html#test">Tutorial</a></li>
								<li><a href="/resources/videos/">Videos</a></li>
								<li><a href="/resources/easy-tasks-for-new-developers/">Easy tasks for new developers</a></li>
							</ul>
						</li>
						<li>
							<h2><a href="/community">Community</a></h2>
							<ul>
								<li><a href="/community/blog/">Juju Blog</a></li>
								<li><a href="/events/">Events</a></li>
								<li><a href="/community/weekly-charm-meeting/">Weekly charm meeting</a></li>
								<li><a href="/community/charmers/">Charmers</a></li>
								<li><a href="/docs/authors-charm-writing.html">Write a charm</a></li>
								<li><a href="/docs/contributing.html">Help with documentation</a></li>
								<li><a href="https://bugs.launchpad.net/juju-website/+filebug">File a bug</a></li> <li><a href="/labs/">Juju Labs</a></li>
							</ul>
						</li>
						<li>
							<h2><a href="https://jujucharms.com/sidebar/">Try Juju</a></h2>
							<ul>
								<li><a href="https://jujucharms.com/">Charm store</a></li>
								<li><a href="/download/">Download Juju</a></li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</nav>
		<div class="legal clearfix">
			<p>&copy; 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of <a href="http://canonical.com">Canonical Ltd</a>.</p>
		</div>
	</footer>

<!--End-Footer-->

<!--Scripts-->
    <script src="//google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=sunburst"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
    <script src="//d38yea5fb4e2oh.cloudfront.net/jquery.stacktack.min.js"></script>    
    <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="./js/main.js"></script>
    <script type="text/javascript" src="./js/jquery.details.js"></script>
    <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/core.js"></script>
    <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/global.js"></script>
    <!-- google analytics -->
    <script>
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-1018242-41']);
   _gaq.push(['_trackPageview']);
  
   (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
    </script>
<!--End-Scripts-->





</body></html>