Skip to content

Instantly share code, notes, and snippets.

View malnick's full-sized avatar
💭
🦄 Figment of your imagination

Jeff Malnick malnick

💭
🦄 Figment of your imagination
  • Boonville, CA
View GitHub Profile
root@bohr [/Users/malnick/projects/courseware]$ git checkout master
Previous HEAD position was b6aa49f... Updating for release v3.1.4
Switched to branch 'master'
root@bohr [/Users/malnick/projects/courseware]$ ls
.git Rakefile _preshow architect intro stats
.gitignore Windows _support extending mini
README.md _fonts advanced fundamentals practitioner
root@bohr [/Users/malnick/projects/courseware]$ cd fundamentals/
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ git fetch courseware --tags
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ git checkout v3.1.4
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ rake present --trace
** Invoke present (first_time)
** Invoke parse_showoff (first_time)
** Execute parse_showoff
** Execute present
What version is printed at the bottom of the course manuals you received? [v3.2.0] v3.1.4
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
WARN: image sizing disabled - install rmagick
WARN: pdf generation disabled - install pdfkit
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': No such file or directory - stats (Errno::ENOENT)
@malnick
malnick / gist:9733633
Created March 24, 2014 03:27
good to go
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ rake present
What version is printed at the bottom of the course manuals you received? [v3.2.0] v3.2.0
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 9 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (9/9), done.
From github.com:puppet-training/courseware
- [tag update] Fundamentals-v3.1.3 -> Fundamentals-v3.1.3
* [new tag] show -> show
- [tag update] v3.2.0 -> v3.2.0
@malnick
malnick / gist:216f1a6af621c1c8780c
Created June 23, 2014 16:41
My recent courseware log
* 89665cb Jeff 5 days ago Merge remote-tracking branch 'upstream/master' merging upstream with local, personal copy (HEAD, origin/master, origin/jeffsChanges, origin/HEAD, master, jeffsChanges)
|\
| * d7bc33b Ben Ford 6 days ago Updating for Architect release v0.0.1 (tag: Architect-v0.0.1, upstream/master)
| * 54b77fc Ben Ford 6 days ago updating release notes
| * 7b17547 Brad Hamilton 6 days ago Merge pull request #464 from binford2k/fix/practitioner/add_haproxy_export_note
| |\
| | * a930a71 Ben Ford 6 days ago Add a note clarifying the export
[vagrant@d1p3100mgmt-puppet-b puppet]$ r10k deploy environment -p --verbose debug2
[R10K::Git::Cache - DEBUG1] Execute: "git branch, args: {:git_dir=>\"/var/cache/r10k/git@git.vchslabs.vmware.com-vchs-vchs-control-repo\"}"
[R10K::Git::Cache - DEBUG2] [git branch, args: {:git_dir=>"/var/cache/r10k/git@git.vchslabs.vmware.com-vchs-vchs-control-repo"}] STDOUT: add_r10k_webhook
* production
puppet_iam
puppet_pe_master
puppet_presto
timezone
[R10K::Task::Deployment::DeployEnvironments - INFO] Loading environments from all sources
[R10K::Git::Cache - DEBUG1] Execute: "git fetch --prune, args: {:git_dir=>\"/var/cache/r10k/git@git.vchslabs.vmware.com-vchs-vchs-control-repo\"}"
** mkdir -p /opt/puppet/var/lib/pgsql/9.2
** /opt/puppet/bin/erb -T - '/root/puppet-enterprise-3.3.0-el-6-i386/erb/postgresql_server.pp.erb' | /opt/puppet/bin/puppet apply --no-report --modulepath=/opt/puppet/share/puppet/modules -v
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/pe_postgresql/lib/facter/pe_postgres_default_version.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/pe_staging/lib/facter/staging_http_get.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_version.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/firewall/lib/facter/ip6tables_version.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/concat/lib/facter/concat_basedir.rb^[[0m
^[[0;32mInfo: Loading facts in /opt/puppet/share/puppet/modules/pe_puppetdb/lib/facter/pe_puppetdb_server_statu
##Often, we want to encode raw IDs in our database by hiding them behind some 2-way decodeable hash. So, a URL which would have at one time been:
#
##https://www.airbnb.com/rooms/848662
#
##becomes
#
##https://www.airbnb.com/rooms/kljJJ324hjkS_
#
##We decode the ID kljJJ324hjkS_ to 848662 on our backend and serve the relevant content. At some point, we start getting 404 errors from clients requesting a certain URL of the form
## https://www.airbnb.com/rooms/kljjj324hjks_

PE is installed under /opt/puppet

Executable binaries on *nix are in /opt/puppet/bin and /opt/puppet/sbini

The Puppet modules included with PE /opt/puppet/share/puppet/modules

Puppet Enterprise’s configuration files /etc/puppetlabs

Orchestration config /var/lib/peadmin

class profiles::test {
#[node]
$variable1 = hiera('profiles::test::variable1'),
$variable2 = hiera('profiles::test::varibale2'),
#[datacenter]
$variable3 = hiera....
$variablle4 = heira...
...
}
data_by_tag = {}
for line in lines
line = line.chomp
if line.startswith('#')
tag_name = line[1:]
data_by_tag[tag_name] = current_tag = []
else
current_tag.append(line)
return data_by_tag