Skip to content

Instantly share code, notes, and snippets.

@TimSimmons
TimSimmons / gist:6091218
Last active December 20, 2015 07:09
Designate Installation Sample Configuration File
[DEFAULT]
########################
## General Configuration
########################
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = True
@TimSimmons
TimSimmons / gist:6596014
Created September 17, 2013 15:34
Sample Configuration File for Designate Getting Started Guide
[DEFAULT]
########################
## General Configuration
########################
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = False
@TimSimmons
TimSimmons / blogpost
Last active December 23, 2015 22:29 — forked from joeracker/gist:6701861
Small Changes
# Using Openstack DNS for Domain Name Resolution
*Last week, you saw a guide on [Getting Started with OpenStack and Designate][11] that covered the basic setup for getting a Domain Name Server up and running using Openstack DNS's solution, Designate. Today we'll dive into actually using Designate to resolve your domain names.*
In my opinion the best way to learn about a project is to use the software yourself. In that spirit, I’m going to show you how to use Designate as a name server for your own domains and servers. Here is a very basic picture of what we’ll be doing:
![diagram][1]
### What You’ll Need
* 2 Domains. You must own them or have the ability to set their name servers, a common option on sites where you register domains. If you don’t have any, I recommend registering with [namecheap.com][2]. They come in handy, perhaps you’d like to get some variations of your name, or your kids’ names. One of these will be a name server. So you won’t be able to use it to post pictures of your cats, keep th
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "trusty"
# config.vm.box_url = "http://domain.com/path/to/above.box"
# config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
# config.vm.box_url = "https://dl.dropboxusercontent.com/u/197673519/debian-7.2.0.box"
config.vm.box_url = "file://ubuntu-14.04-amd64-vbox.box"
@TimSimmons
TimSimmons / gist:aeb79d93eb888c952b94
Created July 31, 2014 14:34
designate/api/v2/__init__.py
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hp.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
import re
import time
import redis
red = redis.StrictRedis(host='162.242.231.206', port=6379, db=0)
regex = r'(.*) xfer-in(.*) transfer of \'(.*)/IN\'(.*)from (.*)#53: Transfer completed(.*)'
regex_2 = r'(.*) general: info: zone (.*)/IN: transferred serial (.*)'
def read(thefile):
while True:
@TimSimmons
TimSimmons / etcmysqlmydotconf
Created October 17, 2014 20:10
MySQL Config
#
# Generated by Chef for galera-1
#
# Local modifications will be overwritten.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
@TimSimmons
TimSimmons / queriestobeoptd
Created October 22, 2014 21:24
Queries to be optimized
These queries need to be analyzed to see what generates them, and see if they can be optimized.
# Query 2: 2.06 QPS, 0.16x concurrency, ID 0xA8C3198C3A54D679 at byte 12403643
# This item is included in the report because it matches --limit.
# Scores: Apdex = 1.00 [1.0], V/M = 0.00
# Query_time sparkline: | ^_ |
# Time range: 2014-10-22 16:20:16 to 16:22:28
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 272
@TimSimmons
TimSimmons / analysis.sql
Last active August 29, 2015 14:08
Query Analysis results
# 336.7s user time, 960ms system time, 21.99M rss, 65.09M vsz
# Current date: Wed Oct 22 16:35:03 2014
# Hostname: galera-2
# Files: slow.log
# Overall: 1.86M total, 175 unique, 1.97k QPS, 0.07x concurrency _________
# Time range: 2014-10-22 16:19:15 to 16:35:02
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 67s 1us 110ms 36us 20us 990us 15us
# Lock time 2s 0 4ms 0 0 6us 0
SELECT domains.id, domains.version, domains.created_at, domains.updated_at, domains.deleted, domains.deleted_at, domains.tenant_id, domains.name, domains.email, domains.description, domains.ttl, domains.serial, domains.refresh, domains.retry, domains.expire, domains.minimum, domains.status, domains.parent_domain_id
FROM domains
WHERE domains.id = 'ff5dcaafe2684da69c571617f0a68790' AND domains.tenant_id = 'noauth-project' AND domains.deleted = '0'
LIMIT 2;
SELECT recordsets.id, recordsets.version, recordsets.created_at, recordsets.updated_at, recordsets.tenant_id, recordsets.domain_id, recordsets.name, recordsets.type, recordsets.ttl, recordsets.description
FROM recordsets
WHERE recordsets.id = 'b743734519d942058ffd0d3b3875810d' AND recordsets.tenant_id = 'noauth-project'
LIMIT 2;