Perform some module cleanup

Fix capitalization of RefStack project name in comments, remove unused
dependencies, and correct some file names.

Change-Id: Ie203c3dab354b67f2693993beb5038a72130aec8
This commit is contained in:
Paul Van Eck 2015-08-24 14:16:13 -07:00
parent 36a3b33379
commit 8f2a27de12
10 changed files with 32 additions and 44 deletions

View File

@ -14,7 +14,7 @@
# == Class: refstack::apache::http
#
# This module installs refstack onto the current host using an unecrypted http
# This module installs RefStack onto the current host using an unencrypted http
# protocol.
#
class refstack::apache::http () {
@ -22,7 +22,7 @@ class refstack::apache::http () {
require ::refstack::api
require ::refstack::app
# Pull various variables into this module, for slightly saner templates.
# Pull various variables into this module, for slightly saner templates.
$install_api_root = $::refstack::params::install_api_root
$install_www_root = $::refstack::params::install_www_root
$src_www_root = $::refstack::params::src_www_root
@ -32,7 +32,7 @@ class refstack::apache::http () {
$server_admin = $::refstack::params::server_admin
$python_version = $::refstack::params::python_version
# Install apache
# Install apache
include ::apache
include ::apache::params
include ::apache::mod::wsgi
@ -50,7 +50,7 @@ class refstack::apache::http () {
notify => Service['httpd'],
}
# Synchronize the app directory and the apache directory.
# Synchronize the app directory and the apache directory.
file { $install_www_root:
ensure => directory,
owner => $::apache::params::user,
@ -62,7 +62,7 @@ class refstack::apache::http () {
notify => Service['httpd'],
}
# Set up refstack as HTTP
# Set up RefStack as HTTP.
apache::vhost { $hostname:
port => 80,
docroot => $install_www_root,

View File

@ -14,7 +14,7 @@
# == Class: refstack::apache::https
#
# This module installs refstack onto the current host using an the https
# This module installs RefStack onto the current host using an the https
# protocol.
#
class refstack::apache::https () {
@ -99,7 +99,7 @@ class refstack::apache::https () {
notify => Service['httpd'],
}
# Set up ::refstack as HTTPS
# Set up RefStack as HTTPS.
apache::vhost { $hostname:
port => 443,
docroot => $install_www_root,

View File

@ -14,7 +14,7 @@
# == Class: refstack::api
#
# This class installs the refstack API so that it may be run via wsgi.
# This class installs the RefStack API so that it may be run via wsgi.
#
class refstack::api () {
require ::refstack::params
@ -49,7 +49,7 @@ class refstack::api () {
}
}
# Create the refstack configuration directory.
# Create the RefStack configuration directory.
file { '/etc/refstack':
ensure => directory,
owner => $user,
@ -57,7 +57,7 @@ class refstack::api () {
mode => '0755',
}
# Configure the refstack API
# Configure the RefStack API.
file { '/etc/refstack/refstack.conf':
ensure => present,
owner => $user,
@ -69,7 +69,7 @@ class refstack::api () {
]
}
# Download the latest Refstack Source
# Download the latest RefStack Source.
vcsrepo { $src_api_root:
ensure => latest,
provider => git,
@ -78,7 +78,7 @@ class refstack::api () {
require => Package['git']
}
# Create the install directory and virtual environment
# Create the install directory and virtual environment.
file { $install_api_root:
ensure => directory,
owner => $user,
@ -96,8 +96,8 @@ class refstack::api () {
systempkgs => true,
}
# Run pip from the venv, install refstack.
exec { 'pip install':
# Install RefStack using pip.
exec { 'install-refstack':
command => "${install_api_root}/bin/pip install ${src_api_root}",
user => $user,
group => $group,
@ -106,17 +106,17 @@ class refstack::api () {
subscribe => Vcsrepo[$src_api_root],
}
# Migrate the database
# Migrate the database.
exec { 'migrate-refstack-db':
command => 'refstack-manage --config-file /etc/refstack/refstack.conf upgrade --revision head',
path => "${install_api_root}/bin/:/usr/local/bin:/usr/bin:/bin/",
refreshonly => true,
subscribe => [
Exec['pip install'],
Exec['install-refstack'],
File['/etc/refstack/refstack.conf'],
],
require => [
Exec['pip install'],
Exec['install-refstack'],
File['/etc/refstack/refstack.conf'],
],
}

View File

@ -14,7 +14,7 @@
# == Class: refstack::app
#
# This class installs the refstack JavaScript Webclient (or app).
# This class installs the RefStack JavaScript Webclient (or app).
#
# Much of this module is duplicated in ::refstack::api, however it's separated
# here so that any future project splits (api vs. client) can be treated
@ -54,7 +54,7 @@ class refstack::app () {
}
}
# Download the latest Refstack Source
# Download the latest RefStack Source.
vcsrepo { $src_www_root:
ensure => latest,
owner => $user,
@ -65,7 +65,7 @@ class refstack::app () {
require => Package['git']
}
# Run NPM Install
# Run NPM Install.
exec { 'npm install':
command => 'npm install',
path => '/usr/local/bin:/usr/bin:/bin/',
@ -86,7 +86,7 @@ class refstack::app () {
]
}
# Create config.json file
# Create config.json file.
file { "${src_www_root}/refstack-ui/app/config.json":
ensure => file,
content => '{"refstackApiUrl": "/api/v1"}',

View File

@ -14,7 +14,7 @@
# == Class: refstack
#
# This class installs and updates refstack in a continuous-deployment fashion
# This class installs and updates RefStack in a continuous-deployment fashion
# directly from its git repositories.
#
class refstack (

View File

@ -14,7 +14,7 @@
# == Class: refstack::mysql
#
# The Refstack MySQL manifest will install a standalone, localhost instance
# The RefStack MySQL manifest will install a standalone, localhost instance
# of mysql for refstack to connect to.
#
class refstack::mysql () {

View File

@ -14,7 +14,7 @@
# == Class: refstack::params
#
# Centralized configuration management for the refstack module.
# Centralized configuration management for the Refstack module.
#
class refstack::params (
$python_version = '2.7',
@ -60,7 +60,7 @@ class refstack::params (
# CA file needs special treatment, since we want the path variable
# to be undef in some cases.
if $ssl_ca == undef and $ssl_ca_content != undef {
$resolved_ssl_ca = '/etc/ssl/certs/storyboard.ca.pem'
$resolved_ssl_ca = '/etc/ssl/certs/refstack.ca.pem'
} else {
$resolved_ssl_ca = $ssl_ca
}

View File

@ -14,7 +14,7 @@
# == Class: refstack::user
#
# Sets up the refstack user.
# Sets up the RefStack user.
#
class refstack::user () {
require refstack::params
@ -24,7 +24,7 @@ class refstack::user () {
$group = $::refstack::params::group
group { $group:
ensure => present
ensure => present
}
user { $user:

View File

@ -2,7 +2,7 @@
"name": "openstackci-refstack",
"version": "0.0.1",
"author": "Openstack CI",
"summary": "Puppet module for the OpenStack refstack",
"summary": "Puppet module for the OpenStack RefStack",
"license": "Apache 2.0",
"source": "git://git.openstack.org/openstack-infra/puppet-refstack.git",
"project_page": "http://ci.openstack.org/",
@ -20,14 +20,6 @@
"name": "openstackci/httpd",
"version_requirement": "= 0.0.4"
},
{
"name": "puppetlabs/rabbitmq",
"version_requirement": ">= 4.0.0"
},
{
"name": "example42/puppi",
"version_requirement": ">= 2.1.9"
},
{
"name": "openstackci/vcsrepo",
"version_requirement": ">= 0.0.8"
@ -35,10 +27,6 @@
{
"name": "stankevich/python",
"version_requirement": ">= 1.6.6"
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 3.2.0"
}
]
}

View File

@ -11,8 +11,8 @@ WSGIPythonHome <%= @install_api_root %>
Redirect / https://<%= @hostname %>/
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/storyboard-error.log
CustomLog ${APACHE_LOG_DIR}/storyboard-access.log combined
ErrorLog ${APACHE_LOG_DIR}/refstack-error.log
CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
@ -23,8 +23,8 @@ WSGIPythonHome <%= @install_api_root %>
ServerName <%= @hostname %>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/storyboard-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/storyboard-ssl-access.log combined
ErrorLog ${APACHE_LOG_DIR}/refstack-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/refstack-ssl-access.log combined
SSLEngine on