usage: juju-deployer [-h] [-c CONFIGS] [-d] [-L] [-u] [-l] [-D] [-T]
[-t TIMEOUT] [-f FIND_SERVICE] [-b] [-S] [-B]
[-s DEPLOY_DELAY] [-e JUJU_ENV] [-o OVERRIDES]
[--series SERIES] [-v] [-W] [-r RETRY_COUNT]
[--ignore-errors] [--diff] [-w REL_WAIT]
[deployment]
positional arguments:
deployment
optional arguments:
-h, --help show this help message and exit
-c CONFIGS, --config CONFIGS
File containing deployment(s) json config. This option
can be repeated, with later files overriding values in
earlier ones.
-d, --debug Enable debugging to stdout
-L, --local-mods Allow deployment of locally-modified charms
-u, --update-charms Update existing charm branches
-l, --ls List available deployments
-D, --destroy-services
Destroy all services (do not terminate machines)
-T, --terminate-machines
Terminate all machines but the bootstrap node. Destroy
any services that exist on each
-t TIMEOUT, --timeout TIMEOUT
Timeout (sec) for entire deployment (45min default)
-f FIND_SERVICE, --find-service FIND_SERVICE
Find hostname from first unit of a specific service.
-b, --branch-only Update vcs branches and exit.
-S, --skip-unit-wait Don't wait for units to come up, deploy, add rels and
exit.
-B, --bootstrap Bootstrap specified environment, blocks until ready
-s DEPLOY_DELAY, --deploy-delay DEPLOY_DELAY
Time in seconds to sleep between 'deploy' commands, to
allow machine provider to process requests. On
terminate machines this also signals waiting for
machine removal.
-e JUJU_ENV, --environment JUJU_ENV
Deploy to a specific Juju environment.
-o OVERRIDES, --override OVERRIDES
Override *all* config options of the same name across
all services. Input as key=value.
--series SERIES Override distro series in config files
-v, --verbose Verbose output
-W, --watch Watch environment changes on console
-r RETRY_COUNT, --retry RETRY_COUNT
Resolve CLI and unit errors via number of retries
(default: 0). Either standalone or in a deployment
--ignore-errors Proceed with the bundle deployment ignoring units
errors. Unit errors are also automatically ignored if
--retry != 0
--diff Generate a delta between a configured deployment and a
running environment.
-w REL_WAIT, --relation-wait REL_WAIT
Number of seconds to wait before checking for relation
errors after all relations have been added and
subordinates started. (default: 60)
以下内容可以从juju-quickstart -h
usage: juju-quickstart [-h] [-e ENV_NAME] [-n BUNDLE_NAME] [-i]
[--environments-file ENV_FILE]
[--gui-charm-url CHARM_URL] [--no-browser]
[--distro-only] [--ppa] [--version] [--debug]
[--description] [--upload-tools]
[--upload-series UPLOAD_SERIES]
[--constraints CONSTRAINTS]
[BUNDLE]
Juju Quickstart is a Juju plugin which allows for easily setting up a Juju
environment in very few steps. The environment is bootstrapped and set up so
that it can be managed using a Web interface (the Juju GUI).
positional arguments:
BUNDLE The optional bundle to be deployed. The bundle can be:
1) a bundle path as shown in jujucharms.com, e.g.
"mediawiki-single" or "django".
Non promulgated bundles can be requested providing
the user, e.g. "u/bigdata-dev/apache-analytics-sql".
A specific bundle revision can also be requested,
e.g. "mediawiki-scalable/7".
If not specified, the most recent revision is used;
2) a jujucharms.com full URL of the bundle detail page,
with or without the revision. e.g.
"https://jujucharms.com/mongodb-cluster/4" or
"https://jujucharms.com/openstack";
3) a URL ("http:" or "https:") to a YAML/JSON, e.g.
"https://raw.github.com/user/my/master/bundle.yaml";
4) a local path to a YAML/JSON file with ".yaml" or
".json" extension, e.g. "~/bundles/django.yaml";
5) a legacy fully qualified bundle URL, starting with
"bundle:", e.g. "bundle:mediawiki/single".
Non promulgated bundles can be requested providing
the user, e.g. "bundle:~user/mediawiki/single".
A specific bundle revision can also be requested,
e.g. "bundle:~myuser/mediawiki/42/single".
If not specified, the last bundle revision is used.
Note that this form is DEPRECATED, and a deprecation
warning is printed suggesting the new value to use
optional arguments:
-h, --help show this help message and exit
-e ENV_NAME, --environment ENV_NAME
The name of the Juju environment to use (amazon)
-n BUNDLE_NAME, --bundle-name BUNDLE_NAME
The name of the bundle to use.
This must be included in the provided bundle YAML/JSON.
Specifying the bundle name is not required if the
bundle YAML/JSON only contains one bundle. This option
is ignored if the bundle file is not specified
-i, --interactive Start the environments management interactive session
--environments-file ENV_FILE
The path to the Juju environments YAML file
(/home/charles/.juju/environments.yaml)
--gui-charm-url CHARM_URL
The Juju GUI charm URL to deploy in the environment.
If not provided, the last release of the GUI will be
deployed. The charm URL must include the charm version,
e.g. "cs:~juju-gui/precise/juju-gui-162". This option is
ignored if the GUI is already present in the environment
--no-browser Avoid opening the browser to the GUI at the end of the
process
--distro-only Do not use external sources when installing and setting up Juju
--ppa Use external sources when installing and setting up Juju
(enabled by default, use --distro-only to disable)
--version show program's version number and exit
--debug Turn debug mode on. When enabled, all the subcommands
and API calls are logged to stdout, and the Juju
environment is bootstrapped passing --debug
--description Show program's description and exit
--upload-tools upload local version of tools before bootstrapping
--upload-series UPLOAD_SERIES
upload tools for supplied comma-separated series list
--constraints CONSTRAINTS
If constraints are specified, they will apply to the machine
provisioned for the Juju state server.
They will also be set as default constraints on the
environment for all future machines, exactly as if the
constraints were set with "juju set-constraints".
Features include the following:
* New users are guided, as needed, to install Juju, set up SSH keys, and
configure it for first use.
* Juju environments can be created and managed from a command line interactive
session.
* The Juju GUI is automatically installed, adding no additional machines
(installing on an existing state server when possible).
* Bundles can be deployed, from local files, HTTP(S) URLs, or the charm store,
so that a complete topology of services can be set up in one simple command.
* Quickstart ends by opening the browser and automatically logging the user
into the Juju GUI.
* Users with a running Juju environment can run the quickstart command again to
simply re-open the GUI without having to find the proper URL and password.
To start Juju Quickstart, run the following:
juju-quickstart [-i]
Once Juju has been installed, the command can also be run as a juju plugin,
without the hyphen ("juju quickstart").
好问题!Juju Quickstart 是一个围绕 juju-deployer 和 Juju 的用户友好的包装应用程序。Quickstart 在生活中的目的是通过安装 Juju(如果尚未安装)帮助用户尽快开始使用 Juju,为您提供一个 UI 来管理您的环境定义,引导这些环境,并在该环境中为您提供 Juju GUI以尽可能轻的方式。它的最后一个功能是允许您部署来自 charmstore ( https://jujucharms.com ) 的捆绑包或您在磁盘上的本地捆绑包。
juju-deployer 是一个单一用途的 python 工具,用于从任何位置部署包——例如 github、launchpad 分支、本地 charm 存储库和/或部署程序文件。juju-deployer 的一般用途是供开发人员直接使用,或供应用程序使用。它通过支持在失败时重试之类的东西来提供对这些捆绑包部署的更深入的控制。
Juju Quickstart 使用部署器,但将其包装在一个易于使用的 shell 中,因为它提供了一种以 Juju 为主要目标的单一方法。
然而,重要的是要注意部署程序确实公开了一些您在 Juju Quickstart 中找不到的附加功能 - 例如直接从 GitHub 存储库部署。(这可能会发生变化)
例子:
命令参考
这可以在
juju-deployer -h
以下内容可以从
juju-quickstart -h
在提出这个问题后的几年里,部署包已经被简化了。
juju quickstart
并juju-deployer
已被内置功能取代。已经上传到charm store的包可以用一个命令添加:
本地定义的包被识别为文件系统路径: