Skip to content

Instantly share code, notes, and snippets.

Evan Machnic emachnic

Block or report user

Report or block emachnic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@emachnic
emachnic / effortless_proposal.md
Created Dec 12, 2019
"Effortless" AMI Deployments with Chef and Habitat
View effortless_proposal.md

Abstract

Moving to an AMI deployment strategy for standing up web servers can be really awesome. From immutable artifacts that are deployed to any environment, to fewer moving parts, we can really simplify deploys.

Unfortunately, we still usually have some dynamic elements, like web server configs or environment-specific secrets. How can we supply values to those elements at runtime?

This talk will focus on how we can use a combination of Chef Infra and Habitat to solve that issue with AMI deployments.

Description

View keybase.md

Keybase proof

I hereby claim:

  • I am emachnic on github.
  • I am emachnic (https://keybase.io/emachnic) on keybase.
  • I have a public key ASAQiZlm0NvhUayP82RlKL7xX8i3LhdOItoEWEvgQwNC6Ao

To claim this, I am signing this object:

View chef-client-run.md
PS C:\Windows\system32> chef-client -l debug
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["uship_ping"]
Synchronizing Cookbooks:
  - uship_ping (1.1.4)
  - git (4.3.7)
  - build-essential (7.0.2)
  - seven_zip (2.0.2)
  - windows (2.0.2)
View notify_vs_subscribe.rb
template "#{consul_config_directory}/rabbit_config.json" do
...
end
execute 'consul reload' do
action :nothing
subscribes :run, "template[#{consul_config_directory}/rabbit_config.json"
end
View myapp.yml
# you can make as many tabs as you wish...
project_name: 'MyApp'
project_root: '~/Work/my_app'
rvm: '1.9.3'
tabs:
- editor:
layout: 'main-vertical'
panes:
- 'vim .'
View .working_man.yml
# Default applications for startup and shutdown.
# Add/remove applications to customize
apps:
- 'Google Chrome'
- 'Propane'
- 'Skype'
- 'X-Lite'
- 'OmniFocus'
# URLs open in default browser
@emachnic
emachnic / kitchen_diagnose.md
Last active Mar 11, 2016
Test Kitchen Deadlock
View kitchen_diagnose.md
---
timestamp: 2016-03-11 23:40:33 UTC
kitchen_version: 1.5.0
plugins:
  driver:
    Vagrant:
      class: Kitchen::Driver::Vagrant
      version: 0.19.0
      api_version: 2
@emachnic
emachnic / kitchen log
Created Feb 2, 2016
Unexpected token in chef-client.bat
View kitchen log
$env:systemdrive\opscode\chef\bin\chef-client.bat --local-mode --config $env:TEMP\kitchen/client.rb --log_level debug --force-formatter --no-color --chef-zero-port 8889)
$$$$$$ At line:4 char:17
$$$$$$ + $env:systemdrive\opscode\chef\bin\chef-client.bat --local-mode --config
$$$$$$ $env:TEM ...
$$$$$$ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$$$$$$ Unexpected token '\opscode\chef\bin\chef-client.bat' in expression or
$$$$$$ statement.
$$$$$$ + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
$$$$$$ ception
$$$$$$ + FullyQualifiedErrorId : UnexpectedToken
View Dockerfile
FROM php:5.5-apache
RUN apt-get -qy update && apt-get -qy install php5-mhash php5-curl libmcrypt-dev libpng12-dev
RUN docker-php-ext-install mcrypt mysql gd pdo_mysql
COPY . /var/www/html/
WORKDIR /var/www/html
RUN chown -R www-data .
RUN find . -type d -exec chmod 700 {} \;
RUN find . -type f -exec chmod 600 {} \;
View secrets.yml
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
You can’t perform that action at this time.