Skip to content

Instantly share code, notes, and snippets.

View maraca's full-sized avatar

Martin Cozzi maraca

View GitHub Profile
D ------Exception-------
D Class: Kitchen::UserError
D Message: You must first install the Docker CLI tool http://www.docker.io/gettingstarted/
D ---Nested Exception---
D Class: Kitchen::ShellOut::ShellCommandFailed
D Message: Expected process to exit with [0], but received '1'
---- Begin output of sudo -E docker > /dev/null ----
STDOUT:
STDERR: sudo: no tty present and no askpass program specified
---- End output of sudo -E docker > /dev/null ----
Generated at 2014-04-08 23:33:51 +0000
Ohai::Exceptions::AttributeNotFound: ohai[reload_nginx] (nginx::ohai_plugin line 22) had an error: Ohai::Exceptions::AttributeNotFound: No such attribute: 'nginx'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/provides_map.rb:79:in `block in deep_find_providers_for'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/provides_map.rb:72:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/provides_map.rb:72:in `deep_find_providers_for'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/provides_map.rb:110:in `all_plugins'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/system.rb:88:in `run_plugins'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.0/lib/ohai/system.rb:73:in `all_plugins'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.0/lib/chef/provider/ohai.rb:41:in `block in action_reload'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.0/lib/chef/mixin/why_run.rb:52:in `cal
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
#!/bin/bash
KEY_NAME=$1
PEM_NAME="${KEY_NAME}-key.pem"
PEM_NAME_PCKS8="${KEY_NAME}-pem-PCKS8-format.pem"
CERTIFICATE_NAME="${KEY_NAME}-certificate.pem"
openssl genrsa 2048 > $PEM_NAME
openssl pkcs8 -topk8 -nocrypt -inform PEM -in $PEM_NAME -out $PEM_NAME_PCKS8
openssl req -new -x509 -nodes -sha1 -days 365 -key $PEM_NAME -outform PEM > $CERTIFICATE_NAME
@maraca
maraca / HelloWorld.json
Created March 6, 2014 20:13
Cloudformation template for our hello-world Packer AMI
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Creates an EC2 instance with our hello-world AMI",
"Parameters" : {
"KeyName" : {
"Description" : "Name of the production EC2 KeyPair to enable SSH to the instance",
"Type" : "String"
},
@maraca
maraca / packer_build.sh
Created March 6, 2014 19:59
Builds a packer AMI.
#!/bin/bash
rm -r vendor
bundle exec berks install --path vendor/cookbooks
packer build \
-var "account_id=$AWS_ACCOUNT_ID" \
-var "aws_access_key_id=$AWS_ACCESS_KEY_ID" \
-var "aws_secret_key=$AWS_SECRET_ACCESS_KEY" \
-var "x509_cert_path=$AWS_X509_CERT_PATH" \
-var "x509_key_path=$AWS_X509_KEY_PATH" \
-var "s3_bucket=packer-ami-bucket" \
@maraca
maraca / .bashrc
Created March 6, 2014 19:53
.bashrc config for AWS and Packer
#AWS Settings
export AWS_ACCESS_KEY_ID=AKIABCDEFGHIJKLMNOP
export AWS_SECRET_ACCESS_KEY=fweifeoifjwef/thkopyhtkotykhyth
export AWS_X509_CERT_PATH=/home/bob/.packer/bob_certificate.pem
export AWS_X509_KEY_PATH=/home/bob/.packer/bob_key.pem
export AWS_ACCOUNT_ID='1234-5678-9999'
@maraca
maraca / packer.json
Last active August 29, 2015 13:57
packer-hello-world
{
"variables": {
"account_id": "",
"aws_access_key_id": "",
"aws_secret_key": "",
"s3_bucket": "",
"x509_cert_path": "",
"x509_key_path": ""
},
site :opscode
cookbook 'apt'
cookbook 'nginx'
metadata
@maraca
maraca / x509
Last active August 29, 2015 13:57
#!/bin/bash
KEY_NAME=$1
PEM_NAME="${KEY_NAME}-key.pem"
PEM_NAME_PCKS8="${KEY_NAME}-pem-PCKS8-format.pem"
CERTIFICATE_NAME="${KEY_NAME}-certificate.pem"
openssl genrsa 2048 > $PEM_NAME
openssl pkcs8 -topk8 -nocrypt -inform PEM -in $PEM_NAME -out $PEM_NAME_PCKS8
openssl req -new -x509 -nodes -sha1 -days 365 -key $PEM_NAME -outform PEM > $CERTIFICATE_NAME