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 partner manages the creation of custom Java modules and the creation and deployment of the custom bundle.  ++++light dev can be done in parallel with java/light dev in custom bundles since the light dev is stored in git and can easily be reinstalled.

Continuous delivery is a way to ensure that new configuration, templates and code can be rapidly and safely deployed to production. You deliver every change first to a UAT environment and verify that business applications and services function as expected through testing. Since every change is delivered to the UAT environment using automation in the Magnolia Cloud Cockpit, you have confidence that the application can be deployed to the Live environment exactly the same way, with a push of a button when the business is ready. In the UAT environment, business users can validate your changes with real content cloned from the Live environment. – Adapted from Caum, Carl: Continuous Delivery Vs. Continuous Deployment: What's the Diff?

  • You or your cloud partner set up the maven project reactor following the readme instructions
  • You deploy the custom bundle to Magnolia CLoud. 
  • First upgrade from standard bundle to a custom bundle is effort intensive on mgnl side due to dependency/compatibility issues. Only if data must be kept. Simpler alternative is to remove and replce when data doesn't need to be kept.
  • Change in bundle name triggers same effort. +++Warning to not change name unless absolutely necessary.
  • Partner bundle upgrade to newer partner bundle is fine.
  • Mention: light dev can be done in parallel with java/light dev in custom bundles since the light dev is stored in git and can easily be reinstalled

To successfully deploy custom bundles to Magnolia Cloud certain criteria and best practices must be adopted.

Project setup and best practices

To bootstrap a new project Magnolia provides the Magnolia Cloud maven archetype.

...

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

You will need to finish Magnolia Cloud onboarding to retrieve your subscription-code and access keys.

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.

Note

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] ------------------------------------------------------------------------

Further instructions and documentation related to best practices will be best practice information are provided in your project's README.md.

The Magnolia Maven Archetype generates a best-practice project skeleton. For example:

Code Block
my-mgnl-cloud-webapp/
├── pom.xml
└── src
    └── main
        └── webapp
            └── WEB-INF
                └── config
                    └── dev
                    │   └── README.md
                    │   └── magnolia.

...

properties
                    └── shared
                        └── README.md
                        └── magnolia.properties

Note that upon creation:

  • Two default profiles are generated: dev and shared. These profiles have their own magnolia.properties files. 
  • During packaging, the dev profile is excluded. The shared profile is included and deployed to Magnolia Cloud.
  • 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.
  • 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. 
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.

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

CI/CD for Custom Bundles

For Continuous Integration and Deployment of custom bundles to Magnolia Cloud, the usage of Magnolia Cloud Maven Plugin is mandated.

Magnolia Cloud Maven Plugin

Validation of the custom bundle

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

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

...

  • .

...

Deployment of the

...

WAR file

Uploads The plugin uploads the built artifact to S3 bucket that serves as the entry point to for Magnolia Cloud's deployment pipelines. Collects 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.