Skip to content

Instantly share code, notes, and snippets.

@smford22
smford22 / gist:7edd37ac1d1a24bbebff
Last active August 29, 2015 14:01
disable_sign_up_enterprise_chef

How to disable the sign up form on a public facing Enterprise Chef Install

This document assumes you already have opscode-manage installed on your Enterprise Chef server, and will walk you through the process of disabling the sign-up form seen by default.

  1. On the Enterprise Chef server append opscode-manage configuration file as follows:

    sudo echo 'disable_sign_up true' >> /etc/opscode-manage/manage.rb

  2. Reconfigure opscode-manage:

@smford22
smford22 / migrate_open_source_chef_to_enterprise_chef.md
Last active August 29, 2015 14:01
Migrate open source chef to enterprise chef

#Migrate open source chef to enterprise chef

  1. setup a ~/.chef directory with a knife.rb and a .pem with access to your open source chef server. NOTE:make sure you have have
  2. cd ~/.chef and then create a new git repo git init
  3. create a new git branch using the open source chef server name git checkout -b OPEN_SOURCE_CHEF_SERVER
  4. make sure you have versioned_cookbooks “true” in the knife.rb
#
# Cookbook Name:: users
# Recipe:: default
#
# Copyright (C) 2014 YOUR_NAME
#
# All rights reserved - Do Not Redistribute
#
search("users", "*:*").each do |user_data|
@smford22
smford22 / gist:c2a55e2be0777be5f77b
Created January 16, 2015 18:15
AWS Bootcamp 1/16
i-ea7e23e0: ec2-54-148-139-153.us-west-2.compute.amazonaws.com
i-eb7e23e1: ec2-54-148-196-68.us-west-2.compute.amazonaws.com
i-e87e23e2: ec2-54-148-239-226.us-west-2.compute.amazonaws.com
i-e97e23e3: ec2-54-148-25-71.us-west-2.compute.amazonaws.com
i-e67e23ec: ec2-54-148-207-181.us-west-2.compute.amazonaws.com
i-2e4a1724: ec2-54-191-103-193.us-west-2.compute.amazonaws.com
i-2f4a1725: ec2-54-191-103-219.us-west-2.compute.amazonaws.com
i-224a1728: ec2-54-191-59-136.us-west-2.compute.amazonaws.com
i-234a1729: ec2-54-191-87-174.us-west-2.compute.amazonaws.com
i-204a172a: ec2-54-191-67-23.us-west-2.compute.amazonaws.com
@smford22
smford22 / workshop_notes.md
Last active August 29, 2015 14:14
DeveloperWeek SF 2015 - Build an Awesome Application with Chef

Use Chef to Deploy an Awesome Application

Local Development Setup

This section is for configuring your local workstation with the tools you need to write Chef code. You will need to install the following:

  1. ChefDK (Developers Kit) - Contains the most common tools you need to write Chef code.
  2. Vagrant -
  3. VirtualBox
@smford22
smford22 / test-kitchen-issues-with-symbols.md
Last active August 29, 2015 14:17
Test-Kitchen issue converting symbols to strings

I am using test-kitchen 1.3.2 dev built from the windows-guest-support branch. I have a basic .kitchen.yml that should setup my client.rb to turn on audit_mode :enabled

~/analytics-workshop/chef-repo/cookbooks/cis_benchmarks
scottford$ kitchen -v
Test Kitchen version 1.3.2.dev
~/analytics-workshop/chef-repo/cookbooks/cis_benchmarks
scottford$ chef gem list|grep kitchen
kitchen-ec2 (0.8.0)
kitchen-vagrant (0.15.0)
test-kitchen (1.3.2.dev, 1.3.1)
@smford22
smford22 / analytics_cluster_environment.md
Last active August 29, 2015 14:17
analytic-cluster environment template for chefconf workshop
{
  "name": "<firstname-lastname>",
  "description": "An example environment for a Chef Server and Chef Analytics",
  "json_class": "Chef::Environment",
  "chef_type": "environment",
  "override_attributes": {
    "analytics-cluster": {
      "id": "<firstname-lastname>",
 "aws": {
@smford22
smford22 / chefanalyics_rule.json
Last active August 29, 2015 14:17
Chef Analytics
{
"name": "Send Control to HipChat",
"org_name": "<YOUR_ORG>",
"modified_by": "<USERNAME>",
"rule": "rules \"Run Control\"\n rule on run_control\n when\n status = \"success\"\n then\n notify(\"hipchat-success\", \"<YOUR_NAME> had success in run_control \\\"{{ message.name }}\\\" on node {{ message.run.node_name }}\")\n end\n\n rule on run_control\n when\n status = \"failure\"\n then\n notify(\"hipchat-failure\", \"<YOUR_NAME> has a FAILURE on run_control \\\"{{ message.name }}\\\" on node {{ message.run.node_name }}\")\n end\nend",
"with": {
"priority": 0
},
"active": true
}
@smford22
smford22 / config.xml
Created May 1, 2015 05:22
Jenkins Verify Job
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github@1.11">
<projectUrl>https://github.com/smford22/sample-cookbook/</projectUrl>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>