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
| dialmgo() { | |
| agent=$(cd /var/lib/juju/agents; echo machine-*) | |
| pw=$(sudo cat /var/lib/juju/agents/${agent}/agent.conf |grep statepassword |awk '{ print $2 }') | |
| mongo --ssl --sslAllowInvalidCertificates -u ${agent} -p $pw localhost:37017/juju --authenticationDatabase admin | |
| } |
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
| dialmgo() { | |
| agent=$(cd /var/lib/juju/agents; echo machine-*) | |
| pw=$(sudo cat /var/lib/juju/agents/${agent}/agent.conf |grep statepassword |awk '{ print $2 }') | |
| /usr/lib/juju/mongo3.2/bin/mongo --ssl --sslAllowInvalidCertificates -u ${agent} -p $pw localhost:37017/juju --authenticationDatabase admin | |
| } |
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
| var mgo = db.getMongo() | |
| function getReadableFileSizeString(fileSizeInBytes) { | |
| var i = -1; | |
| var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']; | |
| do { | |
| fileSizeInBytes = fileSizeInBytes / 1024; | |
| i++; | |
| } while (fileSizeInBytes > 1024); |
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 | |
| PKGS=( | |
| git | |
| python-tox | |
| python-virtualenv | |
| libpython-all-dev | |
| gcc | |
| bzr | |
| ) |
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
| function getcolfilename(colName) { return db.getCollection(colName).stats()["wiredTiger"]["uri"] } | |
| db.getCollectionNames().forEach(function(n){ print(getcolfilename(n) + " " + n ) } ) |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "github.com/juju/utils" | |
| ) | |
| const MIN_LEN = 30 |
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 -eux | |
| # change this one if your gerrit remote user name is not the same as your | |
| # shell user name | |
| gerritusername=$USER | |
| #gerritusername=mariosplivalo | |
| repos=( | |
| # supported charms as of 19.04 (https://docs.openstack.org/charm-guide/latest/1904.html#supported-charms) | |
| charm-ceilometer-agent | |
| charm-cinder |