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 |
Usage
-
Run the following maven command:
mvn archetype:generate -Dfilter=info.magnolia.maven.archetypes:magnolia
-
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
-
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': : {magnolia-latest-version} (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: {magnolia-latest-version} 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 |
|
Typically, this reflects the name or domain of your organization. |
||
2 |
|
Defines the project-specific identifier. |
||
3 |
|
Specifies the version. When creating a new project, use the value suggested by Maven. |
||
4 |
|
Package name for Java classes reflecting both your organization and the specific project.
|
||
5 |
|
Enter your cloud subscription code.
|
||
6 |
|
Specify the version of Magnolia on which your bundle is built. |
||
7 |
|
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.
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 |
During packaging, the
|
||
2 |
During packaging, the
Shared properties
Format:
|
If you created a custom bundle before Magnolia 6.2.1 with |