Skip to content
Browse files

backuppc: initial commit

  • Loading branch information...
1 parent 4622bec commit e12fe2098a8a8cebd0781c3ba6cf6ceb8195eb33 @troyready troyready committed
Showing with 117 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +12 −0 backuppc/CHANGELOG.md
  3. +20 −0 backuppc/README.md
  4. +7 −0 backuppc/metadata.rb
  5. +20 −0 backuppc/recipes/default.rb
  6. +54 −0 backuppc/recipes/server.rb
  7. +1 −0 htpasswd
View
3 .gitmodules
@@ -46,3 +46,6 @@
[submodule "nfs"]
path = nfs
url = git://github.com/atomic-penguin/cookbook-nfs.git
+[submodule "htpasswd"]
+ path = htpasswd
+ url = git://github.com/Youscribe/htpasswd-cookbook.git
View
12 backuppc/CHANGELOG.md
@@ -0,0 +1,12 @@
+# CHANGELOG for backuppc
+
+This file is used to list changes made in each version of backuppc.
+
+## 0.1.0:
+
+* Initial release of backuppc
+
+- - -
+Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
+
+The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
View
20 backuppc/README.md
@@ -0,0 +1,20 @@
+Description
+===========
+A (fairly simple) recipe for setting up the BackupPC enterprise backup software.
+
+Currently only tested on Ubuntu.
+
+
+Requirements
+============
+htpasswd cookbook (https://github.com/Youscribe/htpasswd-cookbook)
+
+Attributes
+==========
+
+[backuppc][server][webadminpassword] : setting this attribute will define the backuppc user web admin password
+
+Usage
+=====
+
+Apply the backuppc::server recipe to your node, and specify the webadminpassword variable on the node. The BackupPC web admin console will then be available on the server at http://ipaddress/backuppc
View
7 backuppc/metadata.rb
@@ -0,0 +1,7 @@
+maintainer "Biola University"
+maintainer_email "troy.ready@biola.edu"
+license "Apache 2.0"
+description "Installs/Configures backuppc"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.1.0"
+depends "htpasswd"
View
20 backuppc/recipes/default.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: backuppc
+# Recipe:: default
+#
+# Copyright 2013, Biola University
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include_recipe "backuppc::server"
View
54 backuppc/recipes/server.rb
@@ -0,0 +1,54 @@
+#
+# Cookbook Name:: backuppc
+# Recipe:: server
+#
+# Copyright 2013, Biola University
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Install backuppc
+package "backuppc" do
+ action :install
+end
+
+# Setup apache virtual server
+
+link "/etc/apache2/sites-available/backuppc" do
+ to "/etc/backuppc/apache.conf"
+end
+
+link "/etc/apache2/sites-enabled/backuppc" do
+ to "/etc/apache2/sites-available/backuppc"
+ notifies :restart, "service[apache2]"
+end
+
+service "apache2" do
+ supports :restart => true, :reload => true
+ action [ :enable, :start ]
+end
+
+# Since backuppc package installation will generate an unknown
+# httpasswd for the backuppc user, allow for an attribute override of
+# the password
+if node.has_key? "backuppc"
+ if node['backuppc'].has_key? "server"
+ if node['backuppc']['server'].has_key? "webadminpassword"
+ include_recipe "htpasswd::default"
+ htpasswd "/etc/backuppc/htpasswd" do
+ user "backuppc"
+ password node['backuppc']['server']['webadminpassword']
+ end
+ end
+ end
+end
1 htpasswd
@@ -0,0 +1 @@
+Subproject commit cc5652ae308e3e6a869bd3e3d108385f60a113ec

0 comments on commit e12fe20

Please sign in to comment.
Something went wrong with that request. Please try again.