Magnolia Cloud Simulator

Use these instructions to smoke test your bundle before trying it properly in Magnolia Cloud. It ensures that basic contracts between our cloud platform and the deployed bundle are met.

When submitting HELPDESK tickets for support related to new cloud deployments, always attach the logs from the simulator to help narrow down issues. Also ensure that the Cloud Compatibility Checks have been executed successfully.

We highly recommended including these checks as part of your Continuous Deployment pipelines.

The current state is only compatible with Magnolia versions > 6.2.1. For older version use the tag compat/pre-6.2.1.



Prerequisites

  • You need Docker Engine’s latest stable release.

  • You need Docker Compose’s latest stable release that supports profiles.

  • You must have created your custom cloud bundle.

  • You must have verified/validated your custom cloud bundle.

  • You must have locally deployed your custom cloud WAR file.

  • You must have set up the PostgreSQL databases for your cloud bundle.

             Don’t worry, the database setup is handled by the provided Dockerfile.


Instructions

  1. Clone the magnolia cloud simulator repository.

    git clone https://git.magnolia-cms.com/scm/od/magnolia-cloud-simulator.git
  2. From your custom cloud bundle project, copy your .war file into the dist/ folder.

  3. Copy the following into your project pom.xml file:

    <build>
      <pluginManagement>
        <!-- Copy artifact to dist folder for docker build. See docker/README.md -->
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>example-cloud-webapp</artifactId>
                  <type>war</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>dist</outputDirectory>
              <stripVersion>true</stripVersion>
            </configuration>
          </plugin>
        </plugins>
      </pluginManagement>
    </build>
  4. Run the following to copy the artifact into the docker/dist folder:

    mvn clean verify -U dependency:copy
    Ensure the war file is now in the docker/dist folder. Alternatively, you can copy the war file manually.

Build and run docker compose

Ensure that you have your LICENSE_ID and LICENSE_SECRET to hand in the .env file to use when running docker-compose up.

Alternatively, you can run the command below along with docker-compose up.
docker-compose up
Hooray

Now you have one Magnolia author instance and one Magnolia public instance. Publishing should work without any additional configuration.

You can access Author and Public via:

You can ignore exceptions related to licensing as this is expected.

Run Cloud Compatibility Tests

A successful execution of these Cloud Compatibility Tests is required before uploading the bundle to the cloud.

After launching the instances in docker-compose, run the following commands to test reachability of the .rest/status endpoint on the public and author instances.

# Build the simulator-check docker image
$ docker build checks -t simulator-check

# Print the help message, for e.g. tweaking the wait times
$ docker run -t simulator-check -h

# check the author instance
$ docker run -t simulator-check --delay 90 --retry 45 http://host.docker.internal:8080/.healthcheck/
$ docker run -t simulator-check --delay 90 --retry 45 http://host.docker.internal:8080/.rest/status

# check the public instance
$ docker run -t simulator-check --delay 90 --retry 45 http://host.docker.internal:8180/.healthcheck/
$ docker run -t simulator-check --delay 90 --retry 45 http://host.docker.internal:8180/.rest/status

On Linux systems you need to enable the docker engine to communicate with the host:

$ docker run --add-host=host.docker.internal:host-gateway -t simulator-check [...]
Automation

Refer to the Jenkinsfile for automating these steps as part of your CD job.

Login credentials

You can login to Magnolia with users listed here.

Username Password

adminuser1

password

adminuser2

password

developer1

password

developer2

password

developer3

password

developer4

password

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