This file contains 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
- type: replace | |
path: /properties/nats? | |
value: | |
machines: | |
- ((/cf_nats_ip)) | |
user: nats-user | |
password: ((/cf_nats_password)) | |
port: 4222 | |
- type: remove |
This file contains 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 admin:[email protected]:3000/v2/catalog | jq . | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 3333 0 3333 0 0 14999 0 --:--:-- --:--:-- --:--:-- 15081 | |
{ | |
"services": [ | |
{ | |
"id": "ce7d9d95-6877-4151-9e58-249745aebd77", | |
"name": "a9s-redis32", | |
"description": "This is a service creating and managing dedicated Redis service instances, powered by the anynines Service Framework", |
This file contains 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 admin:xx@<deployer-ip>:3000/deployments/161.json?with_vm_details=true | jq '.' | |
{ | |
"id": 161, | |
"name": "d621cb1", | |
"description": null, | |
"metadata": null, | |
"current_state": "deployed", | |
"template_id": 1, | |
"template_version": 203, |
This file contains 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 admin:xx@<broker-ip>:3000/v2/catalog | jq '.' | |
{ | |
"services": [ | |
{ | |
"id": "7ee52a02-8839-43c2-a550-728ad736bbda", | |
"name": "a9s-postgresql94", | |
"description": "This is a service creating and managing dedicated PostgreSQL service instances and clusters, powered by the anynines Service Framework", | |
"bindable": true, | |
"tags": [ | |
"sql", |
This file contains 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
deployment_name=<your-bosh-deployment-name> #e.g. d30cf96 | |
deployer_api_pwd=<the-deployer-api-password> | |
deployer_api_ip=<the-deployer-api-ip-address> | |
template_name=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/deployments.json | jq -r ".[] | select(.name == \"${deployment_name}\") | .template_name") | |
template_content=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/templates.json | jq -r ".[] | select(.name == \"${template_name}\") | .content" | ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))') | |
echo $template_content | jq '.jobs' | jq -r '.[].vm_type' | |
This file contains 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
deployment_name=<your-bosh-deployment-name> #e.g. d30cf96 | |
deployer_api_pwd=<the-deployer-api-password> | |
deployer_api_ip=<the-deployer-api-ip-address> | |
template_name=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/deployments.json | jq -r ".[] | select(.name == \"${deployment_name}\") | .template_name") | |
template_content=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/templates.json | jq -r ".[] | select(.name == \"${template_name}\") | .content" | ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))') | |
echo $template_content | jq '.jobs' | jq -r '.[].vm_type' | |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>update content of domelement #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains 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
azs: | |
- name: z1 | |
cloud_properties: {availability_zone: REPLACE} | |
- name: z2 | |
cloud_properties: {availability_zone: REPLACE} | |
- name: z3 | |
cloud_properties: {availability_zone: REPLACE} | |
vm_types: |
This file contains 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
# This command deletes all orphaned disks in a BOSH director (see: bosh.io; cloudfoundry.org) | |
# It assumes that the BOSH CLI is installed and that a BOSH director is targeded and the CLI is authenticated | |
for disk in `bosh disks --orphaned | grep 'disk-' | cut -d ' ' -f 2`; do; bosh delete disk $disk; done |
This file contains 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
module Net | |
class HTTP | |
alias_method :old_request, :request | |
def request(req, body = nil, &block) | |
start_time = Time.now | |
result = old_request(req, body, &block) | |
puts "-"*120 | |
puts "reqeust (#{(Time.now - start_time).round(2)} sec) #{req.method} --> #{self.address}#{req.path}" | |
#puts caller |
NewerOlder