Left: | ||
Right: |
OLD | NEW |
---|---|
1 // Copyright 2012, 2013 Canonical Ltd. | 1 // Copyright 2012, 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package main | 4 package main |
5 | 5 |
6 import ( | 6 import ( |
7 "errors" | 7 "errors" |
8 "fmt" | 8 "fmt" |
9 "os" | 9 "os" |
10 "strings" | 10 "strings" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 local:precise/mysql | 59 local:precise/mysql |
60 | 60 |
61 <service name>, if omitted, will be derived from <charm name>. | 61 <service name>, if omitted, will be derived from <charm name>. |
62 | 62 |
63 Constraints can be specified when using deploy by specifying the --constraints | 63 Constraints can be specified when using deploy by specifying the --constraints |
64 flag. When used with deploy, service-specific constraints are set so that later | 64 flag. When used with deploy, service-specific constraints are set so that later |
65 machines provisioned with add-unit will use the same constraints (unless changed | 65 machines provisioned with add-unit will use the same constraints (unless changed |
66 by set-constraints). | 66 by set-constraints). |
67 | 67 |
68 Charms can be deployed to a specific machine using the --to argument. | 68 Charms can be deployed to a specific machine using the --to argument. |
69 If the destination is an LXC container, as of trusty, the default is | |
70 to use lxc-clone to create the container. A 'template' container is | |
71 created with the name | |
menn0
2014/05/15 00:41:03
Given that we're moving towards supporting non-Ubu
wallyworld
2014/05/15 10:12:57
Done.
| |
72 juju-<series>-template | |
73 where <series> is the OS series, for example 'juju-trusty-template'. | |
74 | |
75 You can override the use of clone by changing the provider configuration: | |
menn0
2014/05/15 00:41:03
s/clone/lxc-clone/
wallyworld
2014/05/15 10:12:57
"clone" here is correct as it is referring to the
| |
76 lxc-clone: false | |
77 | |
78 If you have the main container directory mounted on a btrfs partition, | |
79 then the clone will be using btrfs snapshots to create the containers. | |
80 This means that the clones use up much less disk space. If you do not have btrf s, | |
menn0
2014/05/15 00:41:03
s/that the clones/that clones will/
wallyworld
2014/05/15 10:12:57
Done.
| |
81 lxc will attempt to use aufs (which is an overlay type filesystem). You can | |
menn0
2014/05/15 00:41:03
s/which is an overlay type filesystem/an overlay f
wallyworld
2014/05/15 10:12:57
Done.
| |
82 explicitly ask Juju to create full containers and not overlays by specifying | |
83 the following in the provider configuration: | |
84 lxc-clone-aufs: false | |
85 | |
86 Examples: | |
87 juju deploy mysql --to 23 (Deploy to machine 23) | |
88 juju deploy mysql --to 24/lxc/3 (Deploy to lxc container 3 on host machine 24 ) | |
89 juju deploy mysql --to lxc:25 (Deploy to a new lxc container on host machin e 25) | |
90 ··· | |
91 juju deploy mysql -n 5 --constraints mem=8G (deploy 5 instances of mysql with at least 8 GB of RAM each) | |
menn0
2014/05/15 00:41:03
Capitalisation is inconsistent here: Deploy vs dep
wallyworld
2014/05/15 10:12:57
Done.
| |
92 | |
93 juju deploy mysql --networks=storage,mynet --exclude-networks=logging | |
69 | 94 |
70 Like constraints, service-specific network requirements can be | 95 Like constraints, service-specific network requirements can be |
71 specified with --networks and --exclude-networks arguments, both can | 96 specified with --networks and --exclude-networks arguments, both can |
72 take a comma-delimited list of provider-specific network names/labels. | 97 take a comma-delimited list of provider-specific network names/labels. |
73 These instruct juju to ensure to add all the networks specified with | 98 These instruct juju to ensure to add all the networks specified with |
74 --networks to all new machines deployed to host units of the service | 99 --networks to all new machines deployed to host units of the service |
75 and to ensure none of the networks in --exclude-networks are added to | 100 and to ensure none of the networks in --exclude-networks are added to |
76 the service's machines. Not supported on all providers. | 101 the service's machines. Not supported on all providers. |
77 | 102 |
78 Examples: | |
79 juju deploy mysql --to 23 (Deploy to machine 23) | |
80 juju deploy mysql --to 24/lxc/3 (Deploy to lxc container 3 on host machine 24 ) | |
81 juju deploy mysql --to lxc:25 (Deploy to a new lxc container on host machin e 25) | |
82 ··· | |
83 juju deploy mysql -n 5 --constraints mem=8G (deploy 5 instances of mysql with at least 8 GB of RAM each) | |
84 | |
85 juju deploy mysql --networks=storage,mynet --exclude-networks=logging | |
86 | |
87 See Also: | 103 See Also: |
88 juju help constraints | 104 juju help constraints |
89 juju help set-constraints | 105 juju help set-constraints |
90 juju help get-constraints | 106 juju help get-constraints |
91 ` | 107 ` |
92 | 108 |
93 func (c *DeployCommand) Info() *cmd.Info { | 109 func (c *DeployCommand) Info() *cmd.Info { |
94 return &cmd.Info{ | 110 return &cmd.Info{ |
95 Name: "deploy", | 111 Name: "deploy", |
96 Args: "<charm name> [<service name>]", | 112 Args: "<charm name> [<service name>]", |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 func parseNetworks(networksValue string) (networks []string) { | 298 func parseNetworks(networksValue string) (networks []string) { |
283 parts := strings.Split(networksValue, ",") | 299 parts := strings.Split(networksValue, ",") |
284 for _, part := range parts { | 300 for _, part := range parts { |
285 network := strings.TrimSpace(part) | 301 network := strings.TrimSpace(part) |
286 if network != "" { | 302 if network != "" { |
287 networks = append(networks, names.NetworkTag(network)) | 303 networks = append(networks, names.NetworkTag(network)) |
288 } | 304 } |
289 } | 305 } |
290 return networks | 306 return networks |
291 } | 307 } |
OLD | NEW |