Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you have opted for a decided to use the custom cloud bundle variant, your site is hosted in Magnolia Cloud and you, or your cloud partner, manage:

...

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.

Note

Until version 1.3 has been released, use the snapshot catalog: -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/repositories/magnolia.public.snapshots

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

Code Block
languagebash
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/ 

...
6: https://nexus.magnolia-cms.com/content/repositories/magnolia.public.snapshots -> info.magnolia.maven.archetypes:magnolia-cloud-project-archetype (Automates the creation of a Magnolia Cloud project: parent pom and webapp)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 6

Define value for property 'groupId': : com.mycompany.project
Define value for property 'artifactId': : web-project-xyz
Define value for property 'version':  1.0-SNAPSHOT: :
Define value for property 'package':  com.mycompany.project: :
Define value for property 'cloud-subscription-code': : mycompany-project
Define value for property 'magnolia-bundle-version': : 6.2.1
Define value for property 'project-name':  web-project-xyz: :
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] ------------------------------------------------------------------------

...

Warning

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.

Continuous integration and deployment of custom bundles

You must use the Magnolia Cloud Maven Plugin for the continuous integration and deployment (CI/CD) of custom bundles to Magnolia Cloud. The plugin validates and uploads your custom cloud bundle and deploys it to Magnolia's pipelines.

Tip

Make sure you use the latest version of the Magnolia Cloud Maven Plugin when deploying a new bundle to Magnolia Cloud: v1.0-RC6 (available soon).

More information can be found in the readme here: https://git.magnolia-cms.com/projects/OD/repos/magnolia-cloud-maven-plugin/browse/README.md

Validation of the custom bundle

The plugin performs validation checks against the built artifact (webapp) to ensure compatibility with the Magnolia Cloud infrastructure:

  • Basic checks for required configuration in the web.xml and magnolia.properties files.
  • Inspection of required and blacklisted modules/jars.

Deployment of the

...

WAR file

The plugin uploads the built artifact to the entry point for Magnolia Cloud's deployment pipelines. It also collects meta-information about the artifact for debugging purposes.

Magnolia Cloud Simulator

For testing the We recommend you test your custom bundle in a simulated cloud environment before deploying it.

To do so, we offer a docker-compose based setup: Magnolia Cloud Simulator.