Skip to content

Managing Environments in Martini

In Martini, users have the flexibility to configure multiple environments, each serving a specific purpose in the application lifecycle. These environments can be named according to the needs of the project, allowing for a tailored development, testing, and deployment process. Understanding these environments is crucial for developers and system administrators to ensure seamless integration and deployment of applications.

To start, configure the following:

  • Add your desired prefix via the package.properties.prefix={your-prefix} property inside the override properties.

These environments can then be determined by Martini via the {prefix}.package.properties. If empty, Martini will use the default environment via package.properties.

Development Environment

The Development environment is where developers write and initially test their code. It serves as a sandbox for new features, bug fixes, and enhancements, allowing for experimentation without impacting live applications or testing processes.

In the Development environment, developers have two primary options for utilizing Martini:

  1. Martini Designer Desktop Edition: This powerful desktop development environment includes an embedded Martini Runtime, enabling developers to build and test applications directly on their machines. It provides a comprehensive set of tools for local development, ensuring a streamlined workflow.

  2. Martini Designer Online Edition: This hosted instance of Martini Designer allows developers to collaborate online. It can serve as a development environment or a deployment server for Development builds, facilitating teamwork and integration with cloud services.

A development environment can range from a simple setup with a single server hosting integrated services like ActiveMQ, databases, and Solr, to a more sophisticated configuration where these services run as separate, standalone applications—provided your license permits this arrangement.

Given the experimental nature of changes in development environments, they are often subject to frequent rebuilds. To streamline this process, encapsulating your environment in a VM or Docker image is recommended. This strategy allows for quick and efficient restoration, ensuring minimal downtime and disruption in your development workflow.

Staging Environment

The Staging environment acts as an intermediate step between Development and Production. While it is common to have a Staging environment, users can configure additional environments tailored to their workflow, such as QA or UAT. These environments should closely mirror the Production environment to test applications in settings that simulate real-world scenarios without affecting live operations.

In the Staging environment, users may elect to use either Martini Designer Online Edition or Martini Server Runtime. It's essential to replicate the same dependencies as in Production, including databases and message queues, to ensure that the application performs consistently under realistic conditions. Once the project passes quality assurance tests in this environment, it can be moved to Production.

Production Environment

The Production environment is the live setting where the application is accessible to end users. In this environment, users will be using Martini Server Runtime to ensure stability, availability, and performance, which are paramount for the successful operation of the application.

Custom Environments

Beyond Development, Staging, and Production, users have the capability to create and manage as many environments as needed for their projects. These custom environments can be named according to specific requirements, providing flexibility in how applications are developed, tested, and deployed.

Understanding and effectively managing these environments are essential for a structured and error-minimized development lifecycle in Martini. By segregating development, testing, and live operations, teams can ensure higher quality and stability of the applications deployed to end users.