使用 quickstart 或 juju-deployer 部署捆绑包之间有区别吗?

使用 quickstart 或 juju-deployer 部署捆绑包之间有区别吗?

quickstart使用或部署 juju 包有什么区别juju-deployer

答案1

好问题!Juju Quickstart 是一个用户友好的包装器应用程序,围绕 juju-deployer 和 Juju。Quickstart 的目的是通过安装 Juju(如果尚未安装)、为您提供一个 UI 来管理您的环境定义、引导这些环境以及以最轻量的方式为您提供该环境中的 Juju GUI,帮助用户尽快开始使用 Juju。它的最后一个功能是允许您从 charmstore 部署一个包(https://jujucharms.com)或者磁盘上的本地包。

juju-deployer 是一个单一用途的 Python 工具,用于从任何位置部署捆绑包 - 例如 github、launchpad 分支、本地 charm 存储库和/或部署器文件。juju-deployer 的一般用途是供开发人员直接使用或供应用程序使用。它通过支持在发生故障时重试等功能,提供对这些捆绑包部署的更深入的控制。

Juju Quickstart 使用部署器,但将其包装在一个易于使用的 shell 中,因为它提供了一种以 Juju 为主要目标的单一方法。

然而,值得注意的是,部署程序确实公开了一些你在 Juju Quickstart 中找不到的附加功能 - 例如直接从 GitHub 存储库部署。(这可能会发生变化)

例子:

juju deployer -c /path/to/my/bundle
juju quickstart path/to/my/bundle


juju deployer -c bundle:mediawiki-single/7
juju quickstart mediawiki-single/7

命令参考

这可以在juju-deployer -h

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").

答案2

自提出这个问题以来的几年中,部署捆绑软件已经得到简化,juju quickstartjuju-deployer已被内置功能所取代。

已上传至魅力商店可以通过一个命令添加:

  juju deploy mediawiki-single

本地定义的捆绑包通过文件系统路径来识别:

  juju deploy /path/to/bundle.yaml

相关内容