File: prism-roboconf.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (49 lines) | stat: -rw-r--r-- 1,586 bytes parent folder | download | duplicates (3)
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
<h2>Full example</h2>
<pre><code>ApacheServer {
    # Apache instances will be deployed by Roboconf's Puppet extension
    installer: puppet;

    # Web applications could be deployed over this Apache server
    children: My-Dash-Board, Marketing-Suite;

    # Properties exported by this component.
    # 'port' should have a default value, or we will have to set it when we create an instance.
    exports: port = 19099;

    # 'ip' is a special variable. It will be updated at runtime by a Roboconf agent.
    exports: ip;

    # Other components properties that this server needs to have so that it can start.
    imports: LB.port (optional), LB.ip (optional);

    # Here, the Apache may also be notified about components instances of type LB.
    # The imports are marked as optional. It means that if there is no LB instance, an
    # Apache instance will be able to start anyway.
    #
    # If the import was not optional, e.g.
    #
    # imports: LB.port, LB.ip;
    # or even
    # imports: LB.port (optional), LB.ip;
    #
    # ... then an Apache instance would need at least one LB instance somewhere.

    # Imports may also reference variables from other applications
    imports: external Lamp.lb-ip;
}

facet LoadBalanced {
    exports: ip, port;  # Define we export two variables.
}

instance of VM {

    # This will create 5 VM instances, called VM 1, VM 2, VM3, VM 4 and VM 5.
    name: VM ;  # Yes, there is a space at the end... :)
    count: 5;

    # On every VM instance, we will deploy...
    instance of Tomcat {
        name: Tomcat;
    }
}</code></pre>