# Export and Publish a Bundle
The ent bundler command exports a bundle from an existing Entando Application to:
- Perform the initial install of components into an Entando Application
- Migrate bundles from one environment to another (e.g. Dev to QA)
- Provide a template for building a new application
This tutorial describes how to export a git-based Entando Bundle using the ent CLI. This package can be deployed to Entando or changed to a docker-based bundle to take advantage of Entando's latest composable methods. The procedure assumes you're using an Entando quickstart application. Otherwise, you may need to adjust specific URLs, credentials, namespaces, etc., for a custom application.
Verify dependencies with the Entando CLI:
ent check-env develop
# Export an Entando Bundle
# Set Up the Keycloak Client
Configure a Keycloak client to grant the ent CLI access to the required Entando APIs.
- Log in to Keycloak using the admin credentials. The URL will be similar to
http://YOUR-HOST-NAME/auth/and can be verified with the following command:
ent kubectl describe ingress/default-sso-in-namespace-ingress -n entando
Client IDof your choice, e.g.
Settingstab should be shown. Edit the values as follows:
Access Type: confidential
Service Accounts Enabled: On
Valid Redirect URLs: *
Web Origins: *
Go to the
Service Account Rolestab
Add Selectedto add
Assigned Roles. This change will be saved automatically.
Go to the
Credentialstab and copy the
Secretshown there for use in the next section
# Create the
env.json Configuration File
- Create a directory where you'll run the bundler and switch to that directory:
mkdir testBundle; cd testBundle
- Create an
env.jsonfile using your environment URLs and client credentials. Refer to the client configuration for the
# Run the Bundler
- Create a child directory to store the bundler output. Choosing the name
bundleallows you to easily use the
ent prjcommand with this bundle.
- Run the bundler:
ent bundler from-env --location bundle --code YOUR-BUNDLE-NAME --description “Your Exported Bundle”
The bundler will inspect the application using Entando APIs, collect information about individual components, construct appropriate descriptor files, and assemble the top-level descriptor file.
$ ls bundle
assets contentModels contents fragments labels pageModels resources
categories contentTypes descriptor.yaml groups languages pages widgets
You now have a complete Entando project structure for a git-based bundle! You can inspect the output to edit the exported components or deploy it to another Entando Application.
To convert this project to a docker-based bundle, continue with the steps below.
# Construct the Docker-based Bundle Structure
- Initialize a new bundle and switch to that directory:
ent bundle init YOUR-BUNDLE-NAME
- Copy the resources from the
testBundle/bundledirectory to the
YOUR-BUNDLE-NAME/platformdirectory, with the exception of microservices (/plugins) and micro frontends (/widgets).
For micro frontends and microservices, migrate the source code manually to the corresponding folders inside your bundle directory. Note that non-MFE widgets are considered platform entities on Entando and should be placed in the
Use the ent bundle CLI tool to assist in the process of adding micro frontends and microservices. To define their specific attributes in the bundle descriptor,
entando.json, also check out the Entando Bundle details page.
- With the project structure in place, build and install your bundle.
ent bundle pack
ent bundle publish
ent bundle deploy
ent bundle install