# Export and Publish a Bundle
# Overview
Use the bundler command to export a bundle of components from an existing Entando Application. An Entando Bundle can be used
- For the initial install of Entando components into an Entando Application
- To migrate Entando components from one environment to another (e.g. Dev to QA)
- To provide a template for building a new Entando Application
- As the skeleton of an Entando solution
This command generates the same bundle directory structure as an Entando project, including a bundle descriptor file.
# Prerequisites
- Use the Entando CLI to verify prerequisites (e.g. git, entando-bundler):
ent check-env develop
- A running Entando Application
- Admin access to Keycloak
This tutorial assumes you're using an Entando quickstart application. You may need to adjust specific URLs, credentials, namespaces, etc., for a custom application.
# Export an Entando Bundle
# Set Up the Keycloak Client
Configure a Keycloak client to grant the bundler 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:
kubectl describe ingress/default-sso-in-namespace-ingress -n entando
- Go to
Clients
→Create
- Enter a
Client ID
of your choice, e.g.entando-bundler
- Click
Save
- The
Settings
tab should be shown. Edit the values as follows:
Access Type
: confidentialService Accounts Enabled
: OnValid Redirect URLs
: *Web Origins
: *
- Click
Save
- Go to the
Service Account Roles
tab - Select
Client Roles
→quickstart
- Select
Available Roles
→superuser
- Click
Add Selected
to addsuperuser
to theAssigned Roles
. This change will be saved automatically. - Go to the
Credentials
tab and copy theSecret
shown there for use in the next section
# Create env.json
- Create a directory where you'll run the bundler and go to that directory:
mkdir testBundle; cd testBundle
- Create an
env.json
file with the environment URLs and client credentials. Refer to the client configuration for theclientId
andclientSecret
values.
{
"coreBaseApi": "http://YOUR-HOST-NAME/entando-de-app",
"componentManagerApi": "http://YOUR-HOST-NAME/digital-exchange",
"clientId": "YOUR-CLIENT-ID",
"clientSecret": "YOUR-CLIENT-SECRET"
}
# Run the Bundler
- Create a child directory to store the bundler output. Choosing the name
bundle
allows you to easily use theent prj
command with this bundle.
mkdir bundle
- Run the bundler:
ent bundler from-env --location bundle --code YOUR-TEST-BUNDLE --description “Your Test 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! You can inspect the output to edit the exported components or deploy it to another Entando Application.