Skip to content

Instantly share code, notes, and snippets.

View Mierdin's full-sized avatar

Matt Oswalt Mierdin

View GitHub Profile
terraform apply
random_id.id: Refreshing state... [id=7Rnb0Q]
google_compute_health_check.k8sapi: Refreshing state... [id=k8sapi]
google_compute_health_check.observerhealth-influxdb: Refreshing state... [id=observerhealth-influxdb]
google_compute_global_address.nrefrontend: Refreshing state... [id=nrefrontend]
google_compute_health_check.httphealth: Refreshing state... [id=httphealth]
google_compute_health_check.httpshealth: Refreshing state... [id=httpshealth]
google_compute_disk.grafana_disk: Refreshing state... [id=grafana-disk]
google_project_iam_binding.ansible-bind: Refreshing state... [id=antidote-216521/roles/compute.viewer]
git review -s [10:50:57]
Enter passphrase for key '/Users/mierdin/.ssh/id_rsa':
Could not connect to gerrit.
Enter your gerrit username: mierdin
Trying again with ssh://mierdin@review.opencontrail.org:29418/Juniper/contrail-controller.git
Enter passphrase for key '/Users/mierdin/.ssh/id_rsa':
<traceback object at 0x1107a36c8>
We don't know where your gerrit is. Please manually create a remote
named "gerrit" and try again.
Traceback (most recent call last):
vagrant@st2dev:~/st2$ ST2_REPO_PATH=/home/vagrant/st2 ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip...done.
Traceback (most recent call last):
File "/tmp/st2-pack-tests-virtualenvs/napalm/bin/pip", line 7, in <module>
from pip import main
File "/tmp/st2-pack-tests-virtualenvs/napalm/local/lib/python2.7/site-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
(napalm) vagrant@st2dev:~/st2$ ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/lib/python2.7/site.py with new content
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip...done.
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.fish with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate_this.py with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.csh with new content
(virtualenv)vagrant@st2dev:~/st2$ ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
Using real prefix '/usr'
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/lib/python2.7/site.py with new content
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip, wheel...done.
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.fish with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate_this.py with new content
vagrant@st2dev:~$ curl -X DELETE -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.11.1' -H 'X-Auth-Token: c64c7c82be38408f9dc406ceb2640d77' -H 'Content-Length: 0' http://127.0.0.1:9101/v1/executions/5826561132ed353e0b26994f
{
"status": "canceled",
"start_timestamp": "2016-11-11T23:36:49.158835Z",
"log": [
{
"status": "requested",
"timestamp": "2016-11-11T23:36:49.171000Z"
},
{
@Mierdin
Mierdin / gist:6e169f9e6af8469f3568f729d42e81bc
Created October 20, 2016 01:30
Debugging minikube with rkt support
~$ minikube start \ [17:47:25]
> --network-plugin=cni \
> --container-runtime=rkt \ --iso-url=https://github.com/coreos/minikube-iso/releases/download/v0.0.5/minikube-v0.0.5.iso
Starting local Kubernetes cluster...
Kubectl is now configured to use the cluster.
~$ kubectl get nodes [17:48:34]
The connection to the server 192.168.99.103:8443 was refused - did you specify the right host or port?
~$ minikube logs [17:52:29]
@Mierdin
Mierdin / todd-http-sample.json
Created April 22, 2016 09:29
Sample output of ToDD HTTP metrics
vagrant@todddev:~/go/src/github.com/Mierdin/todd$ todd run test-http-saas -y -j
RUNNING TEST: bb54adc33eaa3fcdaa8c550a5877cc839b8784da0a510e6f82e965ed9a0f7103
(Please be patient while the test finishes...)
2016-04-22 09:23:00.222214093 +0000 UTC INIT: (0/3) READY: (0/3) TESTING: (0/3) FINISHED: (3/3)
Done.
{
"8436bfd7f28ba4a47cb0addd5738ead80a25749156890ea50b628eb1d6509a3a": {
@Mierdin
Mierdin / create_swarm_osx_dockertoolbox.sh
Last active February 1, 2016 21:40
A quick script to create a Swarm cluster with Docker Machine on OSX (with configuration for multi-host networking as well)
# Create
docker-machine create -d virtualbox local
eval "$(docker-machine env local)"
TOKEN_SWARM=$(docker run swarm create)
docker-machine create -d virtualbox mh-keystore
docker $(docker-machine config mh-keystore) run -d -p "8500:8500" -h "consul" progrium/consul -server -bootstrap
CREATE_MASTER_NODE="docker-machine create --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore):8500" -d virtualbox --swarm --swarm-master --swarm-discovery token://$TOKEN_SWARM swarm-master"
CREATE_NODE_01="docker-machine create --engine-label name=swarm-agent-00 --engine-label storage=ssd --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore):8500" -d virtualbox --swarm --swarm-discovery token://$TOKEN_SWARM swarm-agent-00"
CREATE_NODE_02="docker-machine create --engine-label name=swarm-agent-01 --engine-label storage=rust --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-m
>>> import re
>>> results = re.search('\*([A-Za-z]{3} [0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}):', 'Oct 15 21:29:09 60: testRouter0: *Oct 16 03:04:37.099:')
>>> results.group(1)
'Oct 16 03:04:37.099'