This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1) Put these files on the master and the staging server which has PE installed (2 files on 2 servers) | |
| 2) `service pe-mcollective restart` on the master and staging server | |
| 3) try it! mco rpc stageit run manifest="ZmlsZSB7ICcvdG1wL2Zvbyc6CiAgZW5zdXJlID0+IGRpcmVjdG9yeSwKfQoK" -I centos65a | |
| # /opt/puppet/libexec/mcollective/mcollective/agent/stageit.rb on Linux | |
| module MCollective | |
| module Agent | |
| class Stageit<RPC::Agent | |
| activate_when do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd REPONAME | |
| git init | |
| git add . | |
| git commit -m 'initial commit' -a | |
| git remote add origin git@YOUR_SERVER_HOSTNAME:REPONAME | |
| git push origin master:refs/heads/master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puppet master --compile master --debug |less -R | |
| --- | |
| test::ipaddress: "%{hiera('ipaddress')}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| MANIFEST=$(cat) | |
| echo class $1 { | |
| echo "$MANIFEST" | sed 's/^/ /' | |
| echo } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <enforce> | |
| <a></a> | |
| <b></b> | |
| </enforce> | |
| <simulate> | |
| <a></a> | |
| <b></b> | |
| </simulate> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class mydb { | |
| class { 'mysql::server': | |
| root_password => 'Pupp3tlabs!', | |
| override_options => { | |
| 'mysqld' => { 'datadir' => '/tmp/lib/mysql', 'log-error' => '/tmp/log/jeremysql.log' }, | |
| }, | |
| } | |
| mysql::db { 'mydb': | |
| user => 'myuser', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/opt/puppet/bin/ruby | |
| require 'yaml' | |
| require 'base64' | |
| runlist = YAML.load_file(ARGV[0]) | |
| runlist.each do |manifest, node| | |
| text = File.read(manifest) | |
| encoded = Base64.strict_encode64(text) | |
| puts "applying #{manifest} on #{node}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/opt/puppet/bin/ruby | |
| require 'yaml' | |
| require 'base64' | |
| runlist = YAML.load_file(ARGV[0]) | |
| runlist.each do |manifest, node| | |
| text = File.read(manifest) | |
| encoded = Base64.strict_encode64(text) | |
| puts "applying #{manifest} on #{node}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --cacert `puppet agent --configprint localcacert` --cert `puppet agent --configprint hostcert` --key `puppet agent --configprint hostprivkey` --insecure https://localhost:4433/classifier-api/v1/environments | |
| curl --cacert `puppet agent --configprint localcacert` --cert `puppet agent --configprint hostcert` --key `puppet agent --configprint hostprivkey` --insecure https://localhost:4433/classifier-api/v1/nodes | |
| curl --cacert `puppet agent --configprint localcacert` --cert `puppet agent --configprint hostcert` --key `puppet agent --configprint hostprivkey` --insecure https://localhost:4433/classifier-api/v1/groups | |
| curl --cacert `puppet agent --configprint localcacert` --cert `puppet agent --configprint hostcert` --key `puppet agent --configprint hostprivkey` --insecure https://localhost:4433/classifier-api/v1/classes | |
| curl --cacert `puppet agent --configprint localcacert` --cert `puppet agent --configprint hostcert` --key `puppet agent --configprint hostprivkey` --insecure https://localhost:4433/classifie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| PUPPET='/opt/puppet/bin/puppet' | |
| $PUPPET module install stahnma-epel --version '0.0.6' | |
| $PUPPET module install elasticsearch-elasticsearch --version '0.3.2' | |
| $PUPPET module install gini-archive --version '0.2.0' | |
| $PUPPET module install dwerder-graphite --version '5.3.3' | |
| cd `$PUPPET config print modulepath | cut -d: -f1` |