Skip to content

boltops-pro-docs/httpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This repo contains only the documentation for the private BoltsOps Pro repo code. Original file: https://github.com/boltopspro/httpd/blob/master/README.md The docs are publish so they are available for interested customers. For access to the source code, you must be a paying BoltOps Pro subscriber. If are interested, you can contact us at contact@boltops.com or https://www.boltops.com

Configset: httpd

CodeBuild

BoltOps Badge

This lono configset will install, configure and run the httpd or apache2 webserver.

What are lono configsets?

Lono configsets allow CloudFormation cfn-init configsets that are typically embedded in the template to be reusable. More info: Lono Configsets docs.

Usage

Add the configset to Gemfile:

gem "httpd", git: "https://github.com/boltopspro-docs/httpd"

Use configset to enable it for a lono blueprint. Here's a example with a blueprint named demo:

configs/demo/configsets/base.rb:

configset("httpd", resource: "Instance")

This adds the configset to the resource with the logical id Instance in your CloudFormation template. The configset is added to the Resources[].Metadata.AWS::CloudFormation::Init attribute of the Instance resource.

Here's an another example adding to a LaunchConfig resource:

configset("httpd", resource: "LaunchConfig")

And another example adding to a LaunchTemplate resource:

configset("httpd", resource: "LaunchTemplate")

Set the html content

You can set the html content of the created /var/www/html/index.html file with configset variables. Example:

configs/demo/configsets/httpd/variables.rb:

@html =<<~EOL
<h1>My test page</h1>
<p>My test content. Set with configs/demo/configsets/httpd/variables.rb.</p>
EOL

Learn more here: Configset Variables Docs

Releases

No releases published

Packages

No packages published

Languages