Permalink
Browse files

Misc. cleanup

  • Loading branch information...
1 parent b425ad2 commit 54837a50e3be8360f6510caed9cfe86823e0c1ac caryp committed Jun 11, 2010
View
@@ -1,7 +0,0 @@
-This is a blank repository you can use as a starting point for your
-local chef configuration.
-
-For full details on the parts aside from information contained in the
-README files, see the Chef wiki documentation at:
-
-http://wiki.opscode.com/display/chef/Chef+Repository
View
@@ -0,0 +1,6 @@
+== RightScale OpenSource
+These cookbooks are a part of RightScale's OpenSource ServerTemplates. Please see the following resources for more information:
+
+* The {RightScale forum}[http://forums.rightscale.com/forumdisplay.php?f=37]
+* The #rightscale channel on Freenode IRC
+* Code contributions and issue reporting are welcome on Github.
View
@@ -1,3 +0,0 @@
-Creating SSL certificates is a common task done in web application
-infrastructures, so a rake task is provided to generate certificates.
-These certificates are stored here by the ssl_cert task.
@@ -1,21 +0,0 @@
-#
-# Example Chef Client Config File
-#
-# Use Opscode's chef cookbook for managing chef itself,
-# instead of using this file. It is provided as an example.
-
-log_level :info
-log_location STDOUT
-ssl_verify_mode :verify_none
-chef_server_url "http://chef.example.com:4000"
-
-validation_client_name "chef-validator"
-validation_key "/etc/chef/validation.pem"
-client_key "/etc/chef/client.pem"
-
-file_store_path "/srv/chef/file_store"
-file_cache_path "/srv/chef/cache"
-
-pid_file "/var/run/chef/chef-client.pid"
-
-Mixlib::Log::Formatter.show_time = true
@@ -1,12 +0,0 @@
-# This file provided as an example. Run 'knife configure' to generate a
-# config file for your local user.
-log_level :info
-log_location STDOUT
-node_name 'chef_admin'
-client_key '/home/chef_admin/.chef/chef_admin.pem'
-validation_client_name 'chef-validator'
-validation_key '/home/chef_admin/.chef/chef-validator.pem'
-chef_server_url 'http://chef.example.com:4000'
-cache_type 'BasicFile'
-cache_options( :path => '/home/chef_admin/.chef/checksums' )
-cookbook_path [ './cookbooks', './site-cookbooks' ]
@@ -1,42 +0,0 @@
-#
-# Chef Server Config File
-#
-# Use Opscode's chef cookbook for managing chef itself,
-# instead of using this file. It is provided as an example.
-
-log_level :info
-log_location STDOUT
-ssl_verify_mode :verify_none
-chef_server_url "http://chef.example.com:4000"
-
-signing_ca_path "/srv/chef/ca"
-couchdb_database 'chef'
-
-cookbook_path [ "/srv/chef/cookbooks", "/srv/chef/site-cookbooks" ]
-
-file_cache_path "/srv/chef/cache"
-node_path "/srv/chef/nodes"
-openid_store_path "/srv/chef/openid/store"
-openid_cstore_path "/srv/chef/openid/cstore"
-search_index_path "/srv/chef/search_index"
-role_path "/srv/chef/roles"
-
-validation_client_name "chef-validator"
-validation_key "/etc/chef/validation.pem"
-client_key "/etc/chef/client.pem"
-web_ui_client_name "chef-webui"
-web_ui_key "/etc/chef/webui.pem"
-
-# change this as required.
-#web_ui_admin_user_name "admin"
-#web_ui_admin_default_password "replace_with_something_secure"
-
-supportdir = "/srv/chef/support"
-solr_jetty_path File.join(supportdir, "solr", "jetty")
-solr_data_path File.join(supportdir, "solr", "data")
-solr_home_path File.join(supportdir, "solr", "home")
-solr_heap_size "256M"
-
-umask 0022
-
-Mixlib::Log::Formatter.show_time = false
@@ -1,13 +0,0 @@
-#
-# Chef Solo Config File
-#
-
-log_level :info
-log_location STDOUT
-file_cache_path "/var/chef/cookbooks"
-
-# Optionally store your JSON data file and a tarball of cookbooks remotely.
-#json_attribs "http://chef.example.com/dna.json"
-#recipe_url "http://chef.example.com/cookbooks.tar.gz"
-
-Mixlib::Log::Formatter.show_time = false
View
@@ -1 +0,0 @@
-Remove this file to clone an upstream git repository of cookbooks
@@ -1,22 +0,0 @@
-= DESCRIPTION:
-
-Dropbox is software that syncs your files online and across your computers.
-Free cloud storage up to 2GB!
-See https://www.dropbox.com/tour for more info.
-
-This install procedure was created using guildlines from the dropbox wiki:
- http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
-
-= REQUIREMENTS:
-
-You must have a vailid dropbox account.
-
-Currently this cookbook only supports ubuntu.
-Please contribute!!
-
-= USAGE:
-
-Add dropbox::default to you runlist, then your node will register with your
-account and start downloading your dropbox into your home dir.
-
-Use 'dropbox.py' from the command-line
@@ -1,2 +0,0 @@
-set_unless[:dropbox][:email] = nil
-set_unless[:dropbox][:password] = nil
@@ -1,76 +0,0 @@
-{
- "recipes": {
- "dropbox::default": "Install dropbox and register instance."
- },
- "groupings": {
-
- },
- "long_description": "",
- "recommendations": {
-
- },
- "dependencies": {
-
- },
- "maintainer": "RightScale, Inc.",
- "suggestions": {
-
- },
- "description": "Installs\/Configures dropbox",
- "maintainer_email": "cary@rightscale.com",
- "name": "dropbox",
- "conflicting": {
-
- },
- "providing": {
-
- },
- "platforms": {
-
- },
- "version": "0.1.0",
- "attributes": {
- "dropbox\/email": {
- "calculated": false,
- "type": "string",
- "choice": [
-
- ],
- "description": "Email address linked to your dropbox account.",
- "display_name": "Dropbox User Email",
- "required": "required",
- "recipes": [
- "dropbox::default"
- ]
- },
- "dropbox\/password": {
- "calculated": false,
- "type": "string",
- "choice": [
-
- ],
- "description": "Passwod for your dropbox user account.",
- "display_name": "Dropbox Password",
- "required": "required",
- "recipes": [
- "dropbox::default"
- ]
- },
- "dropbox": {
- "calculated": false,
- "type": "hash",
- "choice": [
-
- ],
- "display_name": "Dropbox Application Settings",
- "recipes": [
-
- ],
- "required": "optional"
- }
- },
- "replacing": {
-
- },
- "license": "All rights reserved"
-}
@@ -1,28 +0,0 @@
-maintainer "RightScale, Inc."
-maintainer_email "cary@rightscale.com"
-license IO.read(File.join(File.dirname(__FILE__), '..', '..', 'LICENSE'))
-description "Installs/Configures dropbox"
-version "0.1"
-
-supports 'ubuntu'
-
-recipe "dropbox::default", "Install dropbox and register instance."
-
-attribute "dropbox",
- :display_name => "Dropbox Application Settings",
- :type => "hash"
-
-#
-# required attributes
-#
-attribute "dropbox/email",
- :display_name => "Dropbox User Email",
- :description => "Email address linked to your dropbox account.",
- :required => true,
- :recipes => [ "dropbox::default" ]
-
-attribute "dropbox/password",
- :display_name => "Dropbox Password",
- :description => "Passwod for your dropbox user account.",
- :required => true,
- :recipes => [ "dropbox::default" ]
@@ -1,101 +0,0 @@
-#
-# Cookbook Name:: dropbox
-# Recipe:: default
-#
-
-user = node.etc.passwd[node.current_user]
-raise "ERROR: valid user #{user} not found on system." unless user
-home_dir = user.dir
-raise "ERROR: user #{user} must have a valid home dir." unless home_dir
-
-OUTPUT_FILE = "dropbox.log"
-DROPBOX_EXEC = "#{home_dir}/.dropbox-dist/dropboxd"
-
-platform = node.kernel.machine
-suffix = (platform == "x86_64") ? platform : "x86"
-
-bash "download dropbox" do
- not_if do ::File.exists?(DROPBOX_EXEC) end
- cwd home_dir
- code <<-EOH
- wget -O dropbox.tar.gz http://www.getdropbox.com/download?plat=lnx.#{suffix}
- tar zxof dropbox.tar.gz
- EOH
-end
-
-bash "download CLI tool" do
- not_if do ::File.exists?("/usr/local/bin/dropbox.py") end
- cwd home_dir
- code <<-EOH
- wget -P /usr/local/bin http://www.dropbox.com/download?dl=packages/dropbox.py
- mv /usr/local/bin/dropbox.py /usr/local/bin/dropbox.py
- chmod 755 /usr/local/bin/dropbox.py
- /usr/local/bin/dropbox.py help
- EOH
-end
-
-ruby_block "check download" do
- not_if do ::File.exists?(DROPBOX_EXEC) end
- block do
- raise "ERROR: unable to download dropbox!"
- end
-end
-
-template "#{home_dir}/.dropbox-dist/dropbox.sh" do
- source "dropbox.sh.erb"
- mode "770"
-end
-
-# Add init.d script for dropdox
-template "/etc/init.d/dropbox" do
- Chef::Log.info("Update template.")
- source "init_dropbox.erb"
- mode "770"
-end
-
-# Call service resource to ensure dropbox is running
-service "dropbox" do
-# supports [ :status ]
- Chef::Log.info("Enable service.")
- action [ :enable, :start ]
-end
-
-ruby_block "wait for log file" do
- block do
- Chef::Log.info "Waiting for logfile to exist.."
- 60.times do
- break if ::File.exists?("#{home_dir}/#{OUTPUT_FILE}")
- Chef::Log.info " retrying..."
- sleep 5
- end
- raise "Dropbox logfile not found. Unable to register instance!. Fail." unless ::File.exists?("#{home_dir}/#{OUTPUT_FILE}")
- end
-end
-
-ruby_block "register instance" do
- only_if do ::File.exists?("#{home_dir}/#{OUTPUT_FILE}") end
- not_if do ::File.directory?("#{home_dir}/Dropbox") end
- block do
- # wait for the log to catchup and have the registration link
- sleep 10
- Chef::Log.info("Registering instance with dropbox website...")
-
- data = "--data-urlencode login_email=#{node[:dropbox][:email]} "
- data << "--data-urlencode login_password=#{node[:dropbox][:password]} "
- data << "-d 'login_submit=Log in' "
- data << "-d remember_me=on "
- data << "-d t=791206fc33 "
-
- link_line = `grep "link this machine" #{home_dir}/#{OUTPUT_FILE}`
- words = link_line.split
- url = words[2]
- data << "-d cont=#{url}"
-
- Chef::Log.info "Registering instance using URL: #{url}"
- cmd = "curl -L -c cookies.txt #{data} -o #{home_dir}/dropbox_register.log --url https://www.dropbox.com/login"
- Chef::Log.info "Running command: #{cmd}"
- Kernel.system(cmd)
- end
-end
-
-
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /root/.dropbox-dist/dropbox >> /root/dropbox.log
Oops, something went wrong.

0 comments on commit 54837a5

Please sign in to comment.