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 # == 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. # protocol.
# #
class refstack::apache::http () { class refstack::apache::http () {
@ -22,7 +22,7 @@ class refstack::apache::http () {
require ::refstack::api require ::refstack::api
require ::refstack::app 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_api_root = $::refstack::params::install_api_root
$install_www_root = $::refstack::params::install_www_root $install_www_root = $::refstack::params::install_www_root
$src_www_root = $::refstack::params::src_www_root $src_www_root = $::refstack::params::src_www_root
@ -32,7 +32,7 @@ class refstack::apache::http () {
$server_admin = $::refstack::params::server_admin $server_admin = $::refstack::params::server_admin
$python_version = $::refstack::params::python_version $python_version = $::refstack::params::python_version
# Install apache # Install apache
include ::apache include ::apache
include ::apache::params include ::apache::params
include ::apache::mod::wsgi include ::apache::mod::wsgi
@ -50,7 +50,7 @@ class refstack::apache::http () {
notify => Service['httpd'], notify => Service['httpd'],
} }
# Synchronize the app directory and the apache directory. # Synchronize the app directory and the apache directory.
file { $install_www_root: file { $install_www_root:
ensure => directory, ensure => directory,
owner => $::apache::params::user, owner => $::apache::params::user,
@ -62,7 +62,7 @@ class refstack::apache::http () {
notify => Service['httpd'], notify => Service['httpd'],
} }
# Set up refstack as HTTP # Set up RefStack as HTTP.
apache::vhost { $hostname: apache::vhost { $hostname:
port => 80, port => 80,
docroot => $install_www_root, docroot => $install_www_root,

View File

@ -14,7 +14,7 @@
# == Class: refstack::apache::https # == 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. # protocol.
# #
class refstack::apache::https () { class refstack::apache::https () {
@ -99,7 +99,7 @@ class refstack::apache::https () {
notify => Service['httpd'], notify => Service['httpd'],
} }
# Set up ::refstack as HTTPS # Set up RefStack as HTTPS.
apache::vhost { $hostname: apache::vhost { $hostname:
port => 443, port => 443,
docroot => $install_www_root, docroot => $install_www_root,

View File

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

View File

@ -14,7 +14,7 @@
# == Class: refstack::app # == 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 # 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 # 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: vcsrepo { $src_www_root:
ensure => latest, ensure => latest,
owner => $user, owner => $user,
@ -65,7 +65,7 @@ class refstack::app () {
require => Package['git'] require => Package['git']
} }
# Run NPM Install # Run NPM Install.
exec { 'npm install': exec { 'npm install':
command => 'npm install', command => 'npm install',
path => '/usr/local/bin:/usr/bin:/bin/', 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": file { "${src_www_root}/refstack-ui/app/config.json":
ensure => file, ensure => file,
content => '{"refstackApiUrl": "/api/v1"}', content => '{"refstackApiUrl": "/api/v1"}',

View File

@ -14,7 +14,7 @@
# == Class: refstack # == 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. # directly from its git repositories.
# #
class refstack ( class refstack (

View File

@ -14,7 +14,7 @@
# == Class: refstack::mysql # == 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. # of mysql for refstack to connect to.
# #
class refstack::mysql () { class refstack::mysql () {

View File

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

View File

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

View File

@ -2,7 +2,7 @@
"name": "openstackci-refstack", "name": "openstackci-refstack",
"version": "0.0.1", "version": "0.0.1",
"author": "Openstack CI", "author": "Openstack CI",
"summary": "Puppet module for the OpenStack refstack", "summary": "Puppet module for the OpenStack RefStack",
"license": "Apache 2.0", "license": "Apache 2.0",
"source": "git://git.openstack.org/openstack-infra/puppet-refstack.git", "source": "git://git.openstack.org/openstack-infra/puppet-refstack.git",
"project_page": "http://ci.openstack.org/", "project_page": "http://ci.openstack.org/",
@ -20,14 +20,6 @@
"name": "openstackci/httpd", "name": "openstackci/httpd",
"version_requirement": "= 0.0.4" "version_requirement": "= 0.0.4"
}, },
{
"name": "puppetlabs/rabbitmq",
"version_requirement": ">= 4.0.0"
},
{
"name": "example42/puppi",
"version_requirement": ">= 2.1.9"
},
{ {
"name": "openstackci/vcsrepo", "name": "openstackci/vcsrepo",
"version_requirement": ">= 0.0.8" "version_requirement": ">= 0.0.8"
@ -35,10 +27,6 @@
{ {
"name": "stankevich/python", "name": "stankevich/python",
"version_requirement": ">= 1.6.6" "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 %>/ Redirect / https://<%= @hostname %>/
LogLevel warn LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/storyboard-error.log ErrorLog ${APACHE_LOG_DIR}/refstack-error.log
CustomLog ${APACHE_LOG_DIR}/storyboard-access.log combined CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined
</VirtualHost> </VirtualHost>
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
@ -23,8 +23,8 @@ WSGIPythonHome <%= @install_api_root %>
ServerName <%= @hostname %> ServerName <%= @hostname %>
LogLevel warn LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/storyboard-ssl-error.log ErrorLog ${APACHE_LOG_DIR}/refstack-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/storyboard-ssl-access.log combined CustomLog ${APACHE_LOG_DIR}/refstack-ssl-access.log combined
SSLEngine on SSLEngine on