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
| # Assumes htpass authentication | |
| registry_server='docker.mycloud.com' | |
| username='bob' | |
| # List all images (i.e. repositories) | |
| curl -k -X GET "https://$registry_server/v2/_catalog" -u $username -H "Accept: application/json" | |
| Enter host password for user 'bob': | |
| {"repositories":["app-base","ubuntu","cache-base"]} | |
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
| docker_service 'default' do | |
| version node["docker"]["version"] | |
| group 'docker' | |
| action [:create, :start] | |
| end |
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
| RubyGems Environment: | |
| - RUBYGEMS VERSION: 2.4.8 | |
| - RUBY VERSION: 2.1.6 (2015-04-13 patchlevel 336) [x86_64-darwin12.0] | |
| - INSTALLATION DIRECTORY: /opt/chefdk/embedded/lib/ruby/gems/2.1.0 | |
| - RUBY EXECUTABLE: /opt/chefdk/embedded/bin/ruby | |
| - EXECUTABLE DIRECTORY: /opt/chefdk/embedded/bin | |
| - SPEC CACHE DIRECTORY: /Users/adpatter/.gem/specs | |
| - SYSTEM CONFIGURATION DIRECTORY: /opt/chefdk/embedded/etc | |
| - RUBYGEMS PLATFORMS: | |
| - ruby |
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
| Compiling Cookbooks... | |
| ================================================================================ | |
| Recipe Compile Error in /home/vagrant/.chef/local-mode-cache/cache/cookbooks/docker/libraries/provider_docker_container.rb | |
| ================================================================================ | |
| LoadError | |
| --------- | |
| cannot load such file -- docker |
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
| # use this to monitor a web server that is front-ended by a load balancer or sso gateway, | |
| # without going throug said gateway (requires direct network route be available) | |
| curl -k -v -X GET --resolve app.domain.com:443:10.0.0.10 https://app.domain.com/login |
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
| # create private key | |
| openssl genrsa -out app.key 2048 | |
| # create config/ini file for request | |
| # generate csr | |
| openssl req -new -out app.csr -key app.key -config request.ini | |
| # issue from CA using CSR |
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
| jenkins_server='jenkins-dev.domain.net' | |
| job_name='app-deploy' | |
| username='adam' | |
| curl -X GET -u $username -k "https://$jenkins_server/job/$job_name/config.xml" -O | |
| # prompted for password |
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
| jenkins_server='jenkins-dev.domain.net' | |
| job_name='my-new-branch-job' | |
| username='adam' | |
| curl -s -k -X POST "https://$jenkins_server/createItem?name=$job_name" \ | |
| --data-binary @config.xml \ | |
| -H "Content-Type:text/xml" \ | |
| -u $username | |
| # enter password when prompted |
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 | |
| usage_message=" Usage: sudo bash start-registry.sh -u [HT_USER] -p [HT_PASS]" | |
| if (($# == 0)); then | |
| echo "Missing opts." | |
| echo "$usage_message" | |
| exit 1 | |
| fi |
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
| a = [ | |
| { key: "key1", value: "value1" }, | |
| { key: "key2", value: "value2" } | |
| ] | |
| b = [ | |
| { key: "key3", value: "value3" }, | |
| { key: "key4", value: "value4" } | |
| ] | |
| a.push(b) |