Diferença entre implantar o bundle com o quickstart ou o juju-deployer?

2

Qual é a diferença entre implantar um pacote juju com quickstart ou juju-deployer ?

    
por Galgalesh 17.03.2015 / 11:50

1 resposta

4

Grande pergunta! O Juju Quickstart é um aplicativo wrapper fácil de usar em torno do juju-deployer e do Juju. O propósito da vida útil do Quickstart é ajudar os usuários a iniciar o Juju o mais rápido possível instalando o Juju (se ainda não estiver instalado), fornecendo uma interface do usuário para gerenciar suas definições de ambiente, inicializando esses ambientes e obtendo uma GUI Juju nesse ambiente da maneira mais leve possível. O recurso final é permitir que você implante um pacote da loja de charadas ( link ) ou um pacote local que você tenha no disco.

O juju-deployer é uma ferramenta Python de propósito único usada para implantar bundles de qualquer local - como github, ramificações da barra de ativação, repositórios de charme locais e / ou arquivos do implementador. O objetivo geral do juju-deployer era ser consumido diretamente pelos desenvolvedores ou consumido pelos aplicativos. Ele fornece um controle mais aprofundado dessas implantações de pacote, dando suporte a coisas como nova tentativa em caso de falha.

O Juju Quickstart usa o deployer, mas o envolve em um shell fácil de usar, pois apresenta uma maneira única de começar com o Juju como seu objetivo principal.

No entanto, é importante observar que o deployer expõe algumas funcionalidades adicionais que você não encontrará no Juju Quickstart - como a implantação diretamente dos repositórios do GitHub. (isso está sujeito a alterações)

Exemplos:

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

Referência de Comando

Isso pode ser encontrado em 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)

E o seguinte pode ser obtido em 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").
    
por lazyPower 17.03.2015 / 12:04