BusyBee Tips & Tricks
How to run Busybee as executable
This will allow you to use "busybee"-command to be able to use it from anywhere in your system.
How to start your env in the morning
- Run your "Rancher desktop" application.
- Run "docker compose up -d" from the folder where your docker file "docker-compose.yml" is situated.
- Run "busybee"
- Run "start"
- Run "yarn start" from the platform-complete module. It should be on the "snapshot"-branch.
- Feel free to use your environment on "localhost:3000"
How to stop your env in the evening
- Input "Ctrl+C" in the terminal where you ran "yarn start" to stop your UI env.
- Run "docker compose stop"
- Close your "Rancher desktop" application.
How to set snapshot versions from local install.json
- Clone the platform-complete repo at https://github.com/folio-org/platform-complete
- Get the path of the install.json at the top level of the platform-complete
- Go to the busybee config in your home directory and update install-json-path property in the YAML.
How to run integration tests
- Start your local env as usual (see above).
- Open your "folio-integration-tests" module via IntelliJIdea (or another IDE)
- Checkout on the main branch.
- Edit your "Run Configuration" as "Junit" and set "Environment variables" as "karate.env=dev"
- Feel free to run your tests via the current configuration. Example:
How to create "Run configuration" in IntellijIdea
This is needed for debugging purposes. Just select "Edit Configurations..."→"Add New Configuration"->"JAR Application" and configure:
- "VM options:" "-Dhttp.port=8132" or other port on which you started your module before (in our example 7000).
- "Path to JAR:" "{path to your .fat jar}"
You can see an example here:
How to enable local Modules in Busybee
Use depCheck=false param to avoid interface required module problem.
/_/proxy/tenants/{{xokapitenant}}/install?depCheck=false&tenantParameters=loadSample%3Dfalse%2CloadReference%3Dfalse
If you don't use this param, you will this issue below:
If progress took more than you expected. You can add folio IP address to work properly
sudo ip addr add 10.0.2.2/24 brd 10.0.2.255 dev lo
or
sudo ifconfig lo:1 10.0.2.15 up" and "sudo ifconfig lo:0 10.0.2.2 up
How to run consortia karate tests on busybee
To run consortia related karate tests on busybee, you need configure busybee by following steps
Add consortia to the install.json file manually (mod-consortia module is not existing in platform-complete snapshot install.json)
you can find latest version from jenkins: github folio org → module → master(branch) or custom branch
Add mod-consorta, mod-password-validator to the .busybee/config.yml file
(Optional) Alternatively you can populate an optional additional-json-path
key in your .busybee/
config.yml
with an absolute file path (e.g. additional-json-path: C:\Users\User\.busybee\additional_modules.json
), to be able to to deploy additional modules with custom versions. Also note that using allow additional-json-path
allows receiving and deploying latest SNAPHOT module versions from the registry alongside any additional modules.
Configuration config.yml
file with additional-json-path
key being included:
(Optional) Additional json
file with custom module version:
(Optional) Output of python -m busybee reload
command with this setup:
Finally, after everything is completed, you can now run mod-consortia karate tests with using karate.env=dev
environment variable:
Docker Volume Storage Management
There is a Docker volume accumulation. It will occupy storage space on your machine. You can see the list of all of them via, for example, "VS Code" IDE. In the section: "Volumes" via Docker plugin there.
So to remove all of them you can run this command and free some GBs on your machine:
docker volume prune
How to update snapshot versions
- First of all, wipe your environment with the command: "docker compose down"
- Pull the latest updates from the "snapshot" branch of the platform-complete repo. The main thing is that it will update your "install.json"-file with the latest versions and builds of the modules.
- Initialize another environment with the command: "docker compose up -d"
- Run the command "busybee". There will be such a message: "Using existing module descriptor cache at [C:\Users\{USER}\.busybee\.mod_descriptors.json]"
- Copy this value: C:\Users\{USER}\.busybee\.mod_descriptors.json
- Run command: "quit"
- Run command: "rm C:\Users\Volodymyr_Rohach\.busybee\.mod_descriptors.json"
- Run command: "busybee"
- Start your environment as usual.
Docker-compose mem_limit
With a similar error when starting modules:
EXCEPTION of type 'Exception' occurred with message: could not create enable module(mod-entities-links-3.0.0-SNAPSHOT.242) for tenant(diku): Deployment failed for service mod-entities-links-3.0.0-SNAPSHOT.242. Could not connect to 172.17.0.1:9145: finishConnect(..) failed: Connection refused: /172.17.0.1:9145
Try increasing mem_limit
in docker-compose.yml (for instance 2g
).
Connection issue to the registry URL
There can be an issue regarding failing to connect to the registry URL when starting busybee env: Could not start BusyBee: HTTPConnectionPool(host='
folio-registry.aws.indexdata.com
', port=80): Max retried exceed with url.... Failed to establish connection
To fix it just change every "folio-registry.aws.indexdata.com" to "http://folio-registry.dev.folio.org" inside the config.yml-file and it should work as expected.