Vous êtes sur la page 1sur 4

iface lo inet loopback

# The primary network interface


auto ens3
iface ens3 inet static
address 172.16.110.25
netmask 255.255.255.0
gateway 172.16.110.1
dns-nameservers 8.8.8.8

auto ens4
iface ens4 inet static
address 192.168.200.25
netmask 255.255.255.0

auto ens9
iface ens9 inet static
address 172.18.1.25
netmask 255.255.255.0

auto ens9
iface ens9 inet dhcp

kspace

Select a cloud [localhost]: mymaas

Enter a name for the Controller [mymaas]: maas-server.maas

Creating Juju controller "maas-server.maas" on mymaas


Looking for packaged Juju agent version 2.2.4 for amd64
Launching controller instance(s) on mymaas...
- aq6r7h (arch=amd64 mem=4G cores=4)
Fetching Juju GUI 2.9.2
ERROR failed to bootstrap model: bootstrap instance started but did not change to
Deployed state: instance "aq6r7h" is started but not deployed
techm@maas-server:~/juju$

techm@maas-server:/usr$ juju deploy --help


Usage: juju deploy [options] <charm or bundle> [<application name>]

Summary:
Deploy a new application or bundle.

Options:
-B, --no-browser-login (= false)
Do not use web browser for authentication
--bind (= "")
Configure application endpoint bindings to spaces
--bundle-config (= "")
Config override values for a bundle
--channel (= "")
Channel to use when getting the charm or bundle from the charm store
--config (= )
Path to yaml-formatted application config
--constraints (= "")
Set application constraints
--force (= false)
Allow a charm to be deployed to a machine running an unsupported series
--increase-budget (= 0)
increase model budget allocation by this amount
-m, --model (= "")
Model to operate in. Accepts [<controller name>:]<model name>
-n, --num-units (= 1)
Number of application units to deploy for principal charms
--plan (= "")
plan to deploy charm under
--resource (= )
Resource to be uploaded to the controller
--series (= "")
The series on which to deploy
--storage (= )
Charm storage constraints
--to (= "")
The machine and/or container to deploy the unit in (bypasses constraints)

Details:
<charm or bundle> can be a charm/bundle URL, or an unambiguously condensed
form of it; assuming a current series of "trusty", the following forms will be
accepted:

For cs:trusty/mysql
mysql
trusty/mysql

For cs:~user/trusty/mysql
~user/mysql

For cs:bundle/mediawiki-single
mediawiki-single
bundle/mediawiki-single

The current series for charms is determined first by the 'default-series' model
setting, followed by the preferred series for the charm in the charm store.

In these cases, a versioned charm URL will be expanded as expected (for


example, mysql-33 becomes cs:precise/mysql-33).

Charms may also be deployed from a user specified path. In this case, the path
to the charm is specified along with an optional series.

juju deploy /path/to/charm --series trusty

If '--series' is not specified, the charm's default series is used. The default
series for a charm is the first one specified in the charm metadata. If the
specified series is not supported by the charm, this results in an error,
unless '--force' is used.

juju deploy /path/to/charm --series wily --force

Local bundles are specified with a direct path to a bundle.yaml file.


For example:

juju deploy /path/to/bundle/openstack/bundle.yaml

If an 'application name' is not provided, the application name used is the


'charm or bundle' name.

Constraints can be specified by specifying the '--constraints' option. If the


application is later scaled out with `juju add-unit`, provisioned machines
will use the same constraints (unless changed by `juju set-constraints`).

Resources may be uploaded by specifying the '--resource' option followed by a


name=filepath pair. This option may be repeated more than once to upload more
than one resource.

juju deploy foo --resource bar=/some/file.tgz --resource baz=./docs/cfg.xml

Where 'bar' and 'baz' are resources named in the metadata for the 'foo' charm.

When using a placement directive to deploy to an existing machine or container


('--to' option), the `juju status` command should be used for guidance. A few
placement directives are provider-dependent (e.g.: 'zone').

In more complex scenarios, Juju's network spaces are used to partition the
cloud networking layer into sets of subnets. Instances hosting units inside the
same space can communicate with each other without any firewalls. Traffic
crossing space boundaries could be subject to firewall and access restrictions.
Using spaces as deployment targets, rather than their individual subnets,
allows Juju to perform automatic distribution of units across availability zones
to support high availability for applications. Spaces help isolate applications
and their units, both for security purposes and to manage both traffic
segregation and congestion.

When deploying an application or adding machines, the 'spaces' constraint can


be used to define a comma-delimited list of required and forbidden spaces (the
latter prefixed with "^", similar to the 'tags' constraint).

Examples:
juju deploy mysql (deploy to a new machine)
juju deploy mysql --to 23 (deploy to preexisting machine 23)
juju deploy mysql --to lxd (deploy to a new LXD container on a new
machine)
juju deploy mysql --to lxd:25 (deploy to a new LXD container on machine 25)
juju deploy mysql --to 24/lxd/3 (deploy to LXD container 3 on machine 24)

juju deploy mysql -n 2 --to 3,lxd:5


(deploy 2 units, one on machine 3 & one to a new LXD container on machine 5)

juju deploy mysql -n 3 --to 3


(deploy 3 units, one on machine 3 & the remaining two on new machines)

juju deploy mysql -n 5 --constraints mem=8G


(deploy 5 units to machines with at least 8 GB of memory)

juju deploy mysql --to zone=us-east-1a


(provider-dependent; deploy to a specific AZ)

juju deploy mysql --to host.maas


(deploy to a specific MAAS node)

juju deploy haproxy -n 2 --constraints spaces=dmz,^cms,^database


(deploy 2 units to machines that are in the 'dmz' space but not of
the 'cmd' or the 'database' spaces)
See also:
spaces
constraints
add-unit
config
set-constraints
get-constraints
techm@maas-server:/usr$

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
dns-nameservers 192.99.122.200
dns-search maas
pre-up ip address add 10.1.0.9/24 dev eth0 || true
up ip route replace 10.1.0.0/24 dev eth0 || true
down ip route del 10.1.0.0/24 dev eth0 || true
post-down address del 10.1.0.9/24 dev eth0 || true
up ip route replace default via 10.1.0.1 || true
down ip route del default via 10.1.0.1 || true

https://github.com/juju/cheatsheet/blob/master/juju_2.x.md

Vous aimerez peut-être aussi