Skip to content

Instantly share code, notes, and snippets.

Douglas Land looprock

Block or report user

Report or block looprock

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IT_Ops_job_description.txt
Why OJO?
We’re on a mission to empower people to make better decisions through the fusion of machine and human intelligence.
We’re solving some of the biggest problems troubling the modern consumer experience. Through our unique, data-driven
AI platform, we’ve introduced a fresh approach to the way people make important decisions. As part of our team, you’d
be helping to build technologies that will significantly advance the world’s largest consumer industries, starting with
home buyers in the real estate industry.
We hope to have an opportunity to meet you, learn about your experience and introduce you to the OJO team.
View cloudstack issues
We pulled a host from the pool for upgrades, and in the process seems to have gotten a virtual router in an odd state. It's showing as destroyed in the UI, but cloudmonkey says it's still expunging.
This host has been completely rebuild including completely redisked. On the management node I found:
mysql> select * from op_ha_work
-> ;
+----+-------------+-----------+--------------+-----------+----------------+---------+---------------------+-------+-------+-----------+-------------+---------+
| id | instance_id | type | vm_type | state | mgmt_server_id | host_id | created | tried | taken | step | time_to_try | updated |
+----+-------------+-----------+--------------+-----------+----------------+---------+---------------------+-------+-------+-----------+-------------+---------+
| 1 | 13 | Migration | DomainRouter | Expunging | NULL | 24 | 2016-07-01 14:34:17 | 0 | NULL | Migrating | 1433332034 | 205 |
View add_slack_notification
#!/usr/bin/python
# i created a local endpoint to push webhook data to slack and use this via cron to populate notification for every job
import MySQLdb
import logging
import datetime
LOG_FILENAME = '/var/log/add_slack.log'
logging.basicConfig(filename=LOG_FILENAME,
level=logging.INFO,
)
View gist:c8ad9574cbe28defc6f3
/var/lib/rundeck/terraform/dland-pgtest-8
Refreshing Terraform state prior to plan...
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
View gist:dbbfe916b04810d06ea9
/var/lib/rundeck/terraform/dland-rundeck-7
Refreshing Terraform state prior to plan...
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
View kubernetes_notes
eval `ssh-agent -s`
ssh-add ~/.ssh/id_dsa
ssh-add -L
export PATH=/opt/kubernetes/cluster:$PATH
RE: https://github.com/GoogleCloudPlatform/kubernetes/issues/7359
/opt/kubernetes/cluster/ubuntu/token-system-dns.json
{
"apiVersion": "v1beta2",
"kind": "Secret",
View gist:59ce177b6f4503076b16
@botcmd(split_args_with=None)
def tickets(self, mess, args):
"""list jira tickets - options: -user=[def: you], -status=[RE: Closed], -project=[RE: Operations] -search=[string]"""
options = {'server': 'https://jira.company.com'}
user = utils.get_sender_username(mess)
status = '(status = Open OR status = Reopened OR status = "In Progress")'
tmpstatus = None
#project = "Operations"
project = None
search = None
@looprock
looprock / gist:33df34b896357ecf0c45
Created May 12, 2015
wrap rundeck exec in single quotes
View gist:33df34b896357ecf0c45
#!/usr/bin/env python
import re
import sys
import os
f = open(sys.argv[1])
try:
data = f.read()
finally:
f.close()
@looprock
looprock / gist:1f025e98750c771a50fd
Created May 11, 2015
salt supervisor config and error
View gist:1f025e98750c771a50fd
consul:
supervisord.running:
- update: True
- restart: True
- require:
- pkg: supervisor
- watch:
- file: /etc/consul.d/agent/config.json
Result:
You can’t perform that action at this time.