Scenario 4: Exploring the Apache Model
Estimated Time: 20 minutes
Background: Now that you have seen how Moonlight can help you troubleshoot and repair deployed software, explore the Apache model to see the Moonlight rules, templates, attributes and commands that comprise this model.
If you are not logged in to Moon Portal, do so now. See Starting Moonlight.
To explore the Apache model
- Click the Models tab.
- Select Edit Model from the Action drop-down menu for the Apache Model, and click Go.
- The Moonlight model wizard opens in a new window.
- Click Continue to go to the Directories & Files page. The directory listing may take a few moments to display.
- Click the conf directory to navigate into that directory.

- Moonlight allows you to browse the actual directories on the reference target to choose the files and directories that are included in (or excluded from) the model. Once you select a directory or file, you can create a rule to tell Moonlight how to handle that directory or file.
- Notice that the
httpd.conf file is designated as a per-target file and as a template. This means that Moonlight will create a unique httpd.conf for each target that gets this model.
- Also notice the file properties that Moonlight is watching on the
httpd.conf file: cglmorstx (checksum, group, symbolic link, mode, owner, device, size, timestamp, and content differences).
- The Rules Overview area shows all of the file and directory rules that have been saved for this model.
- Click Continue to go to the Templates & Attributes page.

- The top half of this page lists the Templates in this model. Templates contain variables to represent the information in a file that is different on each target. A variable can be a target property (such as hostname or IP address) or a custom attribute that you define.
- Notice that the Apache configuration file,
httpd.conf, has been made into a template. This allows us to specify the configuration values that are unique to each target. Moonlight will then generate a unique httpd.conf file for each target that gets this model.
- The lower half of this page lists the Attributes for this model. Attributes can be used store default configuration values that are particular to this model. There are also some attribute values set on the individual targets (such as the HTTP port). We will take a look at the target-level attributes later on in this scenario.
- Click Modify next to the
conf/httpd.conf template.
- This opens the
httpd.conf file in the Template Editor.

- Notice the value for the Apache root directory (
ServerRoot). This is a Moonlight target property variable, %{target.RootDir}, which was defined when the target was added to Moonlight. The value of the target's root directory will be used for this configuration setting when Moonlight distributes or audits the model.
- Notice the value for the Apache HTTP port (
Listen). This is a Moonlight attribute variable, %{attrs.httpd_Listen}, which unlike target properties, are custom user-defined variables. The value of this attribute can be set on the target, the model, or the group level, and will be used for this configuration setting when Moonlight distributes or audits the model.
- Click Cancel to exit the Template Editor.
- Click Continue to go to the Commands page.

- Notice the different sections of the model where you can add commands. This model has a command in the After File Walk Commands section. This means that Moonlight will run the command only after it has finished distributing the files to the target.
- This model has a command to restart the Apache server after a distribution is finished. The output of this command is written to the status report when the operation completes.
- Click Continue to go to the Model Summary page. This page provides a summary of all the parts of the model: the rules, the templates, and the commands.
- Click Finish to exit the model wizard.
- Now, lets look at the attributes to see how they have been set for certain Apache configuration parameters. Click the Attributes tab.
- The list of attributes that we have created appears. These attributes are used to hold configuration values for the Apache deployment.

- Click the website_Image attribute to see its assigned values.

- Notice that this particular attribute is assigned at the target level.
- Each target (SanFrancisco, New York, and Seattle) has its own value assigned for this attribute.
- The value of this attribute controls the name of the image file that appears on the home page (
index.html) for each Web site location. Since Moonlight generates a unique home page for each target (using a template), you can use the same model to deploy a different configuration to each server.
Highlights
|
The structure of the Moonlight model allows for flexible, rule-based software distribution and monitoring processes. Moonlight rules allow you to define processes that meet your exact requirements. Commands allow for one-click deployment (stop, populate, and restart a server in one operation). Templates and attributes allow you to fine-tune your configurations for each target server.
|
Thank You for Evaluating Moonlight 4.0
This ends the evaluation scenarios. As you have seen, Moonlight can help you detect and troubleshoot security breaches and configuration errors. Once you have identified a problem, you can correct it with one click, preventing downtime of your critical applications. Moonlight's flexible and dynamic rules, templates, and attributes reduce the need for custom scripts, saving time in debugging and maintenance. Moonlight allows for one-click deployment of software, reducing the amount of repetitive manual activities, and increasing the productivity of your system management staff.
Send Us Your Feedback
We welcome your feedback about your experience with the Moonlight 4.0 Evaluation. Please send your comments to support@moonlight.com .
Speak to a Moonlight Sales Representative
To learn more about the full version of Moonlight 4.0, send a request to sales@moonlight.com or call 415-278-0877.
Get Support and Documentation
To get support, visit our support site (http://support.moonlight.com) or send email to support@moonlight.com .
To get full product documentation for Moonlight 4.0, send an email request to support@moonlight.com .
For Further Instructions
Go to Next Steps.