How to ask BCD to deploy on a Qualification server?

1
0
-1

We want to use BCD to deploy artifacts on an, already installed (and out of the docker), qualification server, a

How can we configure that ?

In this scenario (https://documentation.bonitasoft.com/bcd/3.3/scenarios) we see in the Bonita part :

bonita_port

but we miss

bonita_host, bonita_username, bonita_password

to connect on the qualification host.

Why did BCD require bonita_db_vendor, bonita_db_host, bonita_db_admin_user... Does it manipulate directly the database ?

Thanks,

4 answers

1
+1
-1
This one is the BEST answer!

Hi,

To build the scenario is required to provide the bonita_version, please take a look to https://documentation.bonitasoft.com/bcd/3.3/livingapp_build#toc2

As mentioned into https://documentation.bonitasoft.com/bcd/3.3/bcd_cli
the scenario is a "BCD_OPTIONS" and not a "SUBCOMMAND_OPTIONS" (in your case build is a subcommand of the command livingapp)

Bonita Continuous Delivery CLI.

bcd [OPTIONS] COMMAND [COMMAND_OPTIONS] SUBCOMMAND [SUBCOMMAND_OPTIONS]...
Options

-s, --scenario < scenario >
YAML scenario file path - MANDATORY OPTION unless BCD_SCENARIO environment variable is defined.

Please note that usage examples are provided https://documentation.bonitasoft.com/bcd/3.3/bcd_cli#toc1

Take also in consideration that since BCD 3.0.0, process configurations are built into a separate .bconf artifact. This configuration artifact allows to separate process configuration (parameters) from application assets.
As a result, the same .zip package can be deployed on all environments (Development, Test, Staging) whereas a specific .bconf artifact may be applied to each environment. https://documentation.bonitasoft.com/bcd/3.3/livingapp_build#toc3

In fact the unzip mentioned into https://documentation.bonitasoft.com/bcd/3.3/livingapp_build_and_deploy#toc4 is only required if you want to select what to deploy cf examples :

  • Example 1: I only want to deploy the Business Data Model from my Bonita repository
  • Example 2: I only want to deploy all the resources from my Bonita repository except applications
  • Example 3: I want to add some custom pages in the resources to deploy

If you want to build and deploy straight you can simply chain the commands as described into https://documentation.bonitasoft.com/bcd/3.3/livingapp_build_and_deploy#toc3

And to perform only a deploy please see "How to use" https://documentation.bonitasoft.com/bcd/3.3/livingapp_deploy#toc6

bcd -s < scenario > livingapp deploy -p < application_path > -c < configuration_path >
where:

< scenario > is the path to the BCD scenario which defines the target Bonita stack. Artifacts will be deployed using tenant credentials defined by this scenario (bonita_tenant_login and bonita_tenant_password variables).
< application_path > is the path to the Application Archive to deploy (zip file or directory).
< configuration_path > is the path to the Application Configuration bconf artifact to deploy. This file can be generated for Bonita 7.8.0 onwards.

I hope this clarifies things.

1
+2
-1

Hello,

No, if you only perform build and deploy on an existing stack BCD doesn't require bonita_db_vendor, bonita_db_host, bonita_db_admin_user.
Please take a look to https://documentation.bonitasoft.com/bcd/3.3/livingapp_deploy
You will also notice that into bcd bundle the following examples are present :
- scenarios/build_and_deploy.yml.EXAMPLE
- ansible/inventory/static-inventory/livingapp-build-deploy-static-inventory.EXAMPLE

So if you need to perform only deployments you should :
- create ansible/inventory/static-inventory/livingapp-build-deploy-static-inventory and set bonita_url into this file
- create scenarios/build_and_deploy.yml with
-- bonita_version
-- and also override default credentials (install/install) by setting bonita_tenant_login and bonita_tenant_password into the scenario

Kind regards,
Jérémy

Comments

Submitted by Pierre-yves Monnet on Thu, 06/04/2020 - 19:37

Hello Jérémy

Thanks you for the answer,

We will try this configuration.

For my information, why BCD required bonita_db_vendor, bonita_db_host, bonita_db_admin_user... ?

Kind regards,

1
+1
-1

Hello Pierre-Yves,

By default, BCD provisions a database Docker container while deploying your Bonita stack.
Even if you can override them into your scenario, default values are already present into ansible/group_vars/all.yml.
In this case as BCD manages the database you can set what you want.
Otherwise if you want to manage stack deploy with an existing database you will have to configure your scenario accordingly.
When the bonita_db_host variable is defined, BCD does not create a database container. Instead, BCD expects to connect to an existing database. Please take a look to https://documentation.bonitasoft.com/bcd/3.3/deploy-with-existing-database

Kind regards,
Jérémy

1
0
-1

Ok, we did some manipulations:

1/ To build, nothing is required

Documentation said (https://documentation.bonitasoft.com/bcd/3.3/bcd_cli)

bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] build [OPTIONS]
Options
-p, --path
Bonita Living Application repository path

so -p is a BCD_OPTIONS ? a LIVINGAPP_OPTION ? a OPTIONS ? Is the place is important ?

A assume the -p option is an OPTIONS, so the syntax is
bcd build -p /pathWhereIDidTheGitPulllivingapp -e Qualification

==> But it complains that a scenario is required. it's not in the documentation in the build command.
Why the scenario is required at this step if I want to build all?

Ok, we try:
bcd livingapp build -s scenarios/build_and_deploy.yml -p /pathWhereIDidTheGitPulllivingapp -e Qualification

==> Another error.

Finally, order is very important, and the scenario is a "BCD_OPTIONS" (we call a friend :-) ).
bcd -s scenarios/build_and_deploy.yml livingapp build -p /pathWhereIDidTheGitPulllivingapp -e Qualification

So, what is the correct command to build all? Where the result will be saved (there are no path on the command line)...

It's not write in the documentation, but reading in another part of the documentation (and calling again a friend), (https://documentation.bonitasoft.com/bcd/3.3/livingapp_build) we understood that the command generated a ZIP file and all under /pathWhereIDidTheGitPulllivingapp/target

2/ Deploy
I need to setup the server information in 2 different files (and the ansible file is registered in the scenario)

ansible/inventory/livingapp_build_deploy-static_inventory
bonita_url= http://myServeurInstalledOnAWS:8080/bonita_url

scenarios/build_and_deploy.yml
bonita_tenant_login: install
bonita_tenant_password: install

According https://documentation.bonitasoft.com/bcd/3.3/livingapp_build_and_deploy#...,

we have manually to unzip the file in "to-deploy".

bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] deploy [OPTIONS]
-p, --path
Bonita Living Application archive or directory path

and the "Bonita Living Application archive or directory path" is not the "Bonita Living Application repository path", this is the place you unzip the file manually.

so the command should be
bcd -s scenarios/build_and_deploy.yml livingapp deploy -p /pathWhereIDidTheGitPulllivingapp/target/to-deploy

Correct?

Thank for your feedback.

Notifications