Commit 5d82ae6b by John Doe

renamed docs to static_sites

parent f91954c4
Showing with 573 additions and 67 deletions
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f03ccff803878db812e11b9e81b5e0f4
tags: 645f666f9bcd5a90fca523b33c5a78b7
.. Wattsworth documentation master file, created by
sphinx-quickstart on Tue Aug 1 11:55:55 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
The Wattsworth Project
======================
Installing the Software
-----------------------
All of the software repositories are available at
https://git.wattsworth.net/wattsworth. The software has been tested on
64 bit Ubuntu Linux. While it is possible to run on Arm-based Single
Board Computers (eg Raspberry Pi), the software works best on x86 systems
such as the Intel NUC.
Use the Puppet repository to install the complete Wattsworth stack
.. code-block:: bash
$> sudo apt-get update
$> sudo apt-get install puppet
$> git clone https://git.wattsworth.net/wattsworth/puppet.git
$> cd puppet
$> sudo puppet apply --modulepath=./modules --verbose site.pp
Here is info about Joule and the Web Frontend
Another edit
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
# apache
#### Table of Contents
1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with apache](#setup)
* [What apache affects](#what-apache-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with apache](#beginning-with-apache)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)
## Overview
A one-maybe-two sentence summary of what the module does/what problem it solves.
This is your 30 second elevator pitch for your module. Consider including
OS/Puppet version it works with.
## Module Description
If applicable, this section should have a brief description of the technology
the module integrates with and what that integration enables. This section
should answer the questions: "What does this module *do*?" and "Why would I use
it?"
If your module has a range of functionality (installation, configuration,
management, etc.) this is the time to mention it.
## Setup
### What apache affects
* A list of files, packages, services, or operations that the module will alter,
impact, or execute on the system it's installed on.
* This is a great place to stick any warnings.
* Can be in list or paragraph form.
### Setup Requirements **OPTIONAL**
If your module requires anything extra before setting up (pluginsync enabled,
etc.), mention it here.
### Beginning with apache
The very basic steps needed for a user to get the module up and running.
If your most recent release breaks compatibility or requires particular steps
for upgrading, you may wish to include an additional section here: Upgrading
(For an example, see http://forge.puppetlabs.com/puppetlabs/firewall).
## Usage
Put the classes, types, and resources for customizing, configuring, and doing
the fancy stuff with your module here.
## Reference
Here, list the classes, types, providers, facts, etc contained in your module.
This section should include all of the under-the-hood workings of your module so
people know what the module is touching on their system but don't need to mess
with things. (We are working on automating this section!)
## Limitations
This is where you list OS compatibility, version compatibility, etc.
## Development
Since your module is awesome, other users will want to play with it. Let them
know what the ground rules for contributing are.
## Release Notes/Contributors/Etc **Optional**
If you aren't using changelog, put your release notes here (though you should
consider using changelog). You may also add any additional sections you feel are
necessary or important to include here. Please use the `## ` header.
# == Class: apache
#
# Install Apache Web Server
#
class apache {
$deps = ['apache2','libapache2-mod-wsgi','dirmngr', 'gnupg' ]
$https_pkgs = ['apt-transport-https', 'ca-certificates']
package{ $deps:
ensure => present,
}
#configure passenger for host rails applications
exec{ 'install-keys':
command => '/usr/bin/apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7',
require => Package[$deps],
}
package {$https_pkgs:
ensure => present,
require => Exec['install-keys'],
notify => Exec['add-repo']
}
exec {'add-repo':
command => "/bin/sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list' && /usr/bin/apt-get update",
refreshonly => true
}
package{'libapache2-mod-passenger':
ensure => present,
require => Exec['add-repo'],
notify => Exec['enable-passenger']
}
exec{'enable-passenger':
command => '/usr/sbin/a2enmod passenger',
require => Package['libapache2-mod-passenger'],
refreshonly => true,
notify => Exec['apache2ctl restart']
}
exec{'enable-rewrite-engine':
command => '/usr/sbin/a2enmod rewrite',
require => Package[$deps],
notify => Exec['apache2ctl restart']
}
exec{'apache2ctl restart':
path => ['/usr/sbin','/usr/bin'],
require => Package[$deps],
refreshonly => true,
}
}
{
"name": "jdonnal-apache",
"version": "0.1.0",
"author": "John Donnal",
"summary": "install Apache",
"license": "Apache 2.0",
"source": "",
"project_page": null,
"issues_url": null,
"dependencies": [
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"}
]
}
require 'spec_helper'
describe 'apache' do
context 'with defaults for all parameters' do
it { should contain_class('apache') }
end
end
require 'puppetlabs_spec_helper/module_spec_helper'
# The baseline for module testing used by Puppet Labs is that each manifest
# should have a corresponding test manifest that declares that class or defined
# type.
#
# Tests are then run by using puppet apply --noop (to check for compilation
# errors and view a log of events) or by fully applying the test in a virtual
# environment (to compare the resulting system state to the desired state).
#
# Learn more about module testing here:
# http://docs.puppetlabs.com/guides/tests_smoke.html
#
include apache
# == Class: docs
#
# Full description of class docs here.
#
# === Parameters
#
# Document parameters here.
#
# [*sample_parameter*]
# Explanation of what this parameter affects and what it defaults to.
# e.g. "Specify one or more upstream ntp servers as an array."
#
# === Variables
#
# Here you should define a list of variables that this module would require.
#
# [*sample_variable*]
# Explanation of how this variable affects the funtion of this class and if
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
# External Node Classifier as a comma separated list of hostnames." (Note,
# global variables should be avoided in favor of class parameters as
# of Puppet 2.6.)
#
# === Examples
#
# class { 'docs':
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
# }
#
# === Authors
#
# Author Name <author@domain.com>
#
# === Copyright
#
# Copyright 2017 Your name here, unless otherwise noted.
#
class docs {
}
require 'puppetlabs_spec_helper/module_spec_helper'
......@@ -13,22 +13,17 @@
class nilmdb {
require 'common'
require 'python'
require 'apache'
$pip_url='http://puppet:wX27zvbA@pypi.wattsworth.net:8080/'
$pip_cmd="pip2 install --upgrade --upgrade-strategy only-if-needed --extra-index-url ${pip_url} --trusted-host pypi.wattsworth.net"
$deps = ['apache2','libapache2-mod-wsgi']
package{ $deps:
ensure => present,
before => Exec['install_nilmdb']
}
exec{'install_nilmdb':
command => "${pip_cmd} nilmdb nilmtools",
timeout => 0,
path => ['/usr/local/bin','/usr/bin'],
require => Package[$deps]
}
user{'nilmdb':
......@@ -37,29 +32,22 @@ class nilmdb {
}
file{'/etc/apache2/sites-available/10-nilmdb.conf':
source => 'puppet:///modules/nilmdb/10-nilmdb.conf',
owner => root,
group => root,
mode => '0644',
require => Package[$deps]
source => 'puppet:///modules/nilmdb/10-nilmdb.conf',
owner => root,
group => root,
mode => '0644',
}
exec{'a2ensite 10-nilmdb.conf':
creates => '/etc/apache2/sites-enabled/10-nilmdb.conf',
path => ['/usr/sbin','/usr/bin'],
require => Package[$deps],
subscribe => File['/etc/apache2/sites-available/10-nilmdb.conf'],
notify => Exec['apache2ctl restart']
notify => Exec['nilmdb_restart_apache']
}
file{'/etc/apache2/sites-enabled/000-default.conf':
ensure => absent,
require => Package[$deps],
notify => Exec['apache2ctl restart']
}
exec{'apache2ctl restart':
path => ['/usr/sbin','/usr/bin'],
require => Package[$deps],
refreshonly => true,
ensure => absent,
notify => Exec['nilmdb_restart_apache']
}
file{'/opt/data':
ensure => directory,
owner => nilmdb,
......@@ -77,7 +65,7 @@ class nilmdb {
group => root,
mode => '0644',
source => 'puppet:///modules/nilmdb/nilmdb.wsgi',
notify => Exec['apache2ctl restart']
notify => Exec['nilmdb_restart_apache']
}
#mod_wsgi tries to access user home directory
#nilmdb is a system account but just create a stub
......@@ -86,6 +74,10 @@ class nilmdb {
ensure => directory,
owner => nilmdb,
group => nilmdb,
notify => Exec['apache2ctl restart']
notify => Exec['nilmdb_restart_apache']
}
exec{'nilmdb_restart_apache':
command => '/usr/sbin/apache2ctl restart',
refreshonly => true,
}
}
source 'https://rubygems.org'
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.3']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
desc "Validate manifests, templates, and ruby files"
task :validate do
Dir['manifests/**/*.pp'].each do |manifest|
sh "puppet parser validate --noop #{manifest}"
end
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end
end
<VirtualHost *:80>
ServerName wattsworth.local
DocumentRoot /var/www/frontend
Alias /api /opt/lumen/public
<Directory /opt/lumen/public>
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
Require all granted
allow from all
</Directory>
<Location /api>
PassengerBaseURI /api
PassengerAppRoot /opt/lumen
</Location>
<Directory /var/www/frontend>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Require all granted
allow from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
</Directory>
</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName docs
ServerAlias docs.wattsworth.local
DocumentRoot /var/www/docs
<Directory /var/www/docs>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Require all granted
allow from all
</Directory>
ErrorLog /var/log/apache2/docs_error.log
LogLevel warn
CustomLog /var/log/apache2/docs_access.log combined
</VirtualHost>
.. Wattsworth documentation master file, created by
sphinx-quickstart on Tue Aug 1 11:55:55 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
The Wattsworth Project
======================
Installing the Software
-----------------------
All of the software repositories are available at
https://git.wattsworth.net/wattsworth. The software has been tested on
64 bit Ubuntu Linux. While it is possible to run on Arm-based Single
Board Computers (eg Raspberry Pi), the software works best on x86 systems
such as the Intel NUC.
Use the Puppet repository to install the complete Wattsworth stack
.. code-block:: bash
$> sudo apt-get update
$> sudo apt-get install puppet
$> git clone https://git.wattsworth.net/wattsworth/puppet.git
$> cd puppet
$> sudo puppet apply --modulepath=./modules --verbose site.pp
Here is info about Joule and the Web Frontend
Another edit
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
......@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......
......@@ -4,7 +4,7 @@
*
* sphinx.websupport utilities for all documentation.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &#8212; Wattsworth 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2017, John Donnal, James Paris.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Wattsworth Project &#8212; Wattsworth 1.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="the-wattsworth-project">
<h1>The Wattsworth Project<a class="headerlink" href="#the-wattsworth-project" title="Permalink to this headline"></a></h1>
<div class="section" id="installing-the-software">
<h2>Installing the Software<a class="headerlink" href="#installing-the-software" title="Permalink to this headline"></a></h2>
<p>All of the software repositories are available at
<a class="reference external" href="https://git.wattsworth.net/wattsworth">https://git.wattsworth.net/wattsworth</a>. The software has been tested on
64 bit Ubuntu Linux. While it is possible to run on Arm-based Single
Board Computers (eg Raspberry Pi), the software works best on x86 systems
such as the Intel NUC.</p>
<p>Use the Puppet repository to install the complete Wattsworth stack</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo apt-get update
$&gt; sudo apt-get install puppet
$&gt; git clone https://git.wattsworth.net/wattsworth/puppet.git
$&gt; <span class="nb">cd</span> puppet
$&gt; sudo puppet apply --modulepath<span class="o">=</span>./modules --verbose site.pp
</pre></div>
</div>
<p>Here is info about Joule and the Web Frontend
Another edit</p>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">The Wattsworth Project</a><ul>
<li><a class="reference internal" href="#installing-the-software">Installing the Software</a></li>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="#">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2017, John Donnal, James Paris.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="_sources/index.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
\ No newline at end of file
No preview for this file type
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment