Creating and deploying custom cloud bundles

If you have decided to use the custom cloud bundle variant, your site is hosted in Magnolia Cloud and you, or your cloud partner, must create and deploy the custom bundle.

To successfully deploy custom bundles to Magnolia Cloud, certain best practices must be followed when creating your project and when deploying it the first time or continuously thereafter.

Creating your custom bundle

Magnolia provides a cloud-specific option in the Magnolia Maven Archetype to bootstrap a new project.

You receive your subscription-code and access keys during the Magnolia Cloud onboarding process.

The magnolia-cloud-project-archetype is supported with version 1.3+ of the Magnolia Maven Archetype.

Usage

  1. Run the following maven command:

    mvn archetype:generate -Dfilter=info.magnolia.maven.archetypes:magnolia
  2. Choose the magnolia-cloud-project-archetype option.

    ...
    6: https://nexus.magnolia-cms.com/content/repositories/magnolia.public.snapshots -> info.magnolia.maven.archetypes:magnolia-cloud-project-archetype
    
    Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 6
  3. Define the properties for the project.

    Define value for property 'groupId': : com.mycompany.project (1)
    Define value for property 'artifactId': : web-project-xyz (2)
    Define value for property 'version': 1.0-SNAPSHOT: : (3)
    Define value for property 'package': com.mycompany.project: : (4)
    Define value for property 'cloud-subscription-code': : mycompany-project (5)
    Define value for property 'magnolia-bundle-version': : 6.2.1 (6)
    Define value for property 'project-name': web-project-xyz: : (7)
    Confirm properties configuration:
    groupId: com.mycompany.project
    artifactId: web-project-xyz
    version: 1.0-SNAPSHOT
    package: com.mycompany.project
    cloud-subscription-code: mycompany-project
    magnolia-bundle-version: 6.2.1
    project-name: web-project-xyz
     Y : : Y
    
    [INFO] project created from Archetype in dir: /Users/user/dev/web-project-xyz
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:18 min
    [INFO] Finished at: 2020-04-23T13:12:46+02:00
    [INFO] ------------------------------------------------------------------------
Item Property Notes

1

groupId

Typically, this reflects the name or domain of your organization.

2

artifactId

Defines the project-specific identifier.

3

version

Specifies the version. When creating a new project, use the value suggested by Maven.

4

package

Package name for Java classes reflecting both your organization and the specific project.

This is typically the same as groupId.

5

cloud-subscription-code

Enter your cloud subscription code.

This is given to your during onboarding.

6

magnolia-bundle-version

Specify the version of Magnolia on which your bundle is built.

7

project-name

A human-readable version of the `artifactId`, Title case and spaces are allowed.

Further instructions and best practice information are provided in your project’s README.md.

Project Structure

The Magnolia Maven Archetype generates a best-practice project skeleton. Two default profiles are generated: dev and shared. These profiles have their own magnolia.properties files.

Structure
my-mgnl-cloud-webapp/
├── pom.xml
└── src
    └── main
        └── webapp
            └── WEB-INF
                └── config
                    └── dev                         (1)
                    │ └── README.md
                    │ └── magnolia.properties
                    └── shared                      (2)
                        └── README.md
                        └── magnolia.properties
Profile Notes

1 MAGNOLIA_PROFILE = dev

During packaging, the dev profile is excluded.

You can add local developer credentials to the dev profile to be used instead of the typical Magnolia superuser/superuser, which is disabled in the cloud.

2 MAGNOLIA_PROFILE = shared

During packaging, the shared profile is included.

In the shared profile, you can create specific .properties files for each cloud environment. This can be used, for example, to test the integration of a third-party tool in the UAT environment without affecting your Live environment.
Shared properties

Format: magnolia_${env/INSTANCE_TYPE}_${env/CLOUD_ENVIRONMENT}.properties

Examples
  • Integration author: magnolia_author_integration.properties

  • Integration public: magnolia_public_integration.properties

  • UAT public: magnolia_public_uat.properties

  • Live author: magnolia_author_live.properties

If you created a custom bundle before Magnolia 6.2.1 with .properties file changes, please check your customizations carefully and adhere to the structure shown above.

Pre-production test

Before you go live

Before you go live to production, you should do a final run-through using the Magnolia Cloud Simulator.

Feedback

Legacy Cloud

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Magnolia Cloud docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules