Permalink
Browse files

Re-organize the entire world

Change-Id: I2bab0240999b0dab5fe5fccb745c66aaec295c4c
  • Loading branch information...
1 parent d932c9a commit 66ef47a22c842de8575a0c823d7c089090882769 @adamhjk committed Aug 1, 2012
Showing 318 changed files with 93 additions and 84 deletions.
File renamed without changes.
View
@@ -11,7 +11,13 @@ gerrit
OK - the recipe will get you set up, but there are manual steps. You need to log in to the review system, and register the first user.
-Add an ssh key, select a username.
+# Add an ssh key, select a username.
+
+# Add the gerrit user
+
+ cat /var/lib/jenkins/.ssh/id_rsa.pub | ssh -p29418 adam@review.local gerrit create-account --ssh-key - --full-name Jenkins jenkins
+
+# Add the Jenkins suer to the Non-Interactive Users group
Manipulate the default permissions.
@@ -25,17 +31,20 @@ Admin->Project->All-Projects->Access
+ Push -> Administrators -> Force Push Checked
+ Label Verified -> Non-Interactive Users (-1/+1)
+ Label Code Reviewed -> Non-Interactive Users (-1/+1)
+ + Submit -> Registered Users
-# Add the gerrit user
-
- cat /var/lib/jenkins/.ssh/id_rsa.pub | ssh -p29418 adam@review.local gerrit create-account --ssh-key - --full-name Jenkins jenkins
-
-Add the Jenkins suer to the Non-Interactive Users group
# Configure gerrit for ssh to github
Make sure you add the ssh host key for git@github.com to gerrit's ssh known hosts, and have restarted gerrit
+Configure replication
+
+[remote "github"]
+ url = git@github.com:adamhjk/#{name}
+ push = +refs/heads/*:refs/heads/*
+ push = +refs/tags/*:refs/tags/*
+
# Creating a repository
Admin->Projects->Create New Project
@@ -49,6 +58,15 @@ In the project itself
Require Change ID
(If it's open source, add the signed-off-by)
+# Configure Jenkins
+
+Manage Jenkins->Gerrit Trigger
+
+ Hostname: review.local
+ Frontend URL: http://review.local
+ SSH Port: 29418
+ Username: jenkins
+
# Test Flow for Cookbooks
- Check Jobs
@@ -66,3 +84,5 @@ In the project itself
- Production->A
- A->B
+# Create the first check job
+
File renamed without changes.
File renamed without changes.
View
@@ -1,66 +0,0 @@
-Overview
-========
-
-Every Chef installation needs a Chef Repository. This is the place where cookbooks, roles, config files and other artifacts for managing systems with Chef will live. We strongly recommend storing this repository in a version control system such as Git and treat it like source code.
-
-While we prefer Git, and make this repository available via GitHub, you are welcome to download a tar or zip archive and use your favorite version control system to manage the code.
-
-Repository Directories
-======================
-
-This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef.
-
-* `certificates/` - SSL certificates generated by `rake ssl_cert` live here.
-* `config/` - Contains the Rake configuration file, `rake.rb`.
-* `cookbooks/` - Cookbooks you download or create.
-* `data_bags/` - Store data bags and items in .json in the repository.
-* `roles/` - Store roles in .rb or .json in the repository.
-
-Rake Tasks
-==========
-
-The repository contains a `Rakefile` that includes tasks that are installed with the Chef libraries. To view the tasks available with in the repository with a brief description, run `rake -T`.
-
-The default task (`default`) is run when executing `rake` with no arguments. It will call the task `test_cookbooks`.
-
-The following tasks are not directly replaced by knife sub-commands.
-
-* `bundle_cookbook[cookbook]` - Creates cookbook tarballs in the `pkgs/` dir.
-* `install` - Calls `update`, `roles` and `upload_cookbooks` Rake tasks.
-* `ssl_cert` - Create self-signed SSL certificates in `certificates/` dir.
-* `update` - Update the repository from source control server, understands git and svn.
-
-The following tasks duplicate functionality from knife and may be removed in a future version of Chef.
-
-* `metadata` - replaced by `knife cookbook metadata -a`.
-* `new_cookbook` - replaced by `knife cookbook create`.
-* `role[role_name]` - replaced by `knife role from file`.
-* `roles` - iterates over the roles and uploads with `knife role from file`.
-* `test_cookbooks` - replaced by `knife cookbook test -a`.
-* `test_cookbook[cookbook]` - replaced by `knife cookbook test COOKBOOK`.
-* `upload_cookbooks` - replaced by `knife cookbook upload -a`.
-* `upload_cookbook[cookbook]` - replaced by `knife cookbook upload COOKBOOK`.
-
-Configuration
-=============
-
-The repository uses two configuration files.
-
-* config/rake.rb
-* .chef/knife.rb
-
-The first, `config/rake.rb` configures the Rakefile in two sections.
-
-* Constants used in the `ssl_cert` task for creating the certificates.
-* Constants that set the directory locations used in various tasks.
-
-If you use the `ssl_cert` task, change the values in the `config/rake.rb` file appropriately. These values were also used in the `new_cookbook` task, but that task is replaced by the `knife cookbook create` command which can be configured below.
-
-The second config file, `.chef/knife.rb` is a repository specific configuration file for knife. If you're using the Opscode Platform, you can download one for your organization from the management console. If you're using the Open Source Chef Server, you can generate a new one with `knife configure`. For more information about configuring Knife, see the Knife documentation.
-
-http://help.opscode.com/faqs/chefbasics/knife
-
-Next Steps
-==========
-
-Read the README file in each of the subdirectories for more information about what goes in those directories.
@@ -1,6 +0,0 @@
-
-%w{git gerrit-trigger build-pipeline-plugin github greenballs}.each do |plugin|
- jenkins_cli "install-plugin #{plugin}"
-end
-jenkins_cli "safe-restart"
-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -97,7 +97,7 @@ function merge_changes {
set -x
if [[ ! -e .git ]]
then
- git clone git fetch ssh://jenkins@$SITE:29418/$PROJECT.git .
+ git clone ssh://jenkins@$SITE:29418/$GERRIT_PROJECT.git .
fi
git remote update || git remote update # attempt to work around bug #925790
git reset --hard
File renamed without changes.
@@ -0,0 +1,6 @@
+maintainer "YOUR_COMPANY_NAME"
+maintainer_email "YOUR_EMAIL"
+license "All rights reserved"
+description "Installs/Configures cd-tools"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.0.1"
@@ -0,0 +1,8 @@
+#
+# Cookbook Name:: cd-tools
+# Recipe:: default
+#
+# Copyright 2012, YOUR_COMPANY_NAME
+#
+# All rights reserved - Do Not Redistribute
+#
File renamed without changes.
@@ -0,0 +1,12 @@
+Description
+===========
+
+Requirements
+============
+
+Attributes
+==========
+
+Usage
+=====
+
@@ -0,0 +1,6 @@
+maintainer "YOUR_COMPANY_NAME"
+maintainer_email "YOUR_EMAIL"
+license "All rights reserved"
+description "Installs/Configures foodcritic"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.0.1"
@@ -0,0 +1,18 @@
+#
+# Cookbook Name:: foodcritic
+# Recipe:: default
+#
+# Copyright 2012, YOUR_COMPANY_NAME
+#
+# All rights reserved - Do Not Redistribute
+#
+
+include_recipe "build-essential"
+
+package "libxml2-devel"
+package "libxslt-devel"
+
+gem_package "foodcritic" do
+ gem_binary "/opt/chef/embedded/bin/gem"
+end
+
View
@@ -0,0 +1,12 @@
+Description
+===========
+
+Requirements
+============
+
+Attributes
+==========
+
+Usage
+=====
+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -39,6 +39,4 @@
end.run_action(:install)
end
-gem_package "pg" do
- action :nothing
-end.run_action(:install)
+chef_gem "pg"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 66ef47a

Please sign in to comment.