Skip to content

Instantly share code, notes, and snippets.

View dims's full-sized avatar

Davanum Srinivas dims

View GitHub Profile
<%
director_uuid = 'CHANGEME'
static_ip = 'CHANGEME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '173'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
---
name: microbosh-openstack
logging:
level: DEBUG
network:
type: dynamic
vip: 172.24.4.1
AllowEncodedSlashes NoDecode
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/private/etc/apache2/server.crt"
SSLCertificateKeyFile "/private/etc/apache2/server.key"
SSLProxyEngine On
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/static/hideci.js
from novadocker.virt import docker
from novadocker.virt.docker import client
from novadocker.virt.docker import hostinfo
from nova.compute import flavors
driver = docker.DockerDriver(None)
driver._docker = client.DockerHTTPClient(url='tcp://127.0.0.1:2375')
print ">>>> init_host : %r " % "OK" if driver.init_host(None) is None else "FAILED"
print ">>>> is_daemon_running : %r " % driver._is_daemon_running()
@dims
dims / devices.md
Last active August 29, 2015 14:10

GET /containers/(id)/devices

Example request:

GET /containers/4fa6e0f0c678/devices HTTP/1.1

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
@dims
dims / gist:f4efd63af8b2216dff0e
Created December 22, 2014 03:30
fwd docker unix socket via ssh
sudo socat "UNIX-LISTEN:/var/run/docker.sock,reuseaddr,fork" EXEC:'ssh -i /Users/dims/.ssh/id_dsa dims@192.168.1.30 socat STDIO UNIX-CONNECT\:/var/run/docker.sock'
@dims
dims / gist:c3327f633c526847c8e5
Created December 22, 2014 13:20
simple docker-py client to stream logs
import docker
base_url = 'unix://var/run/docker.sock'
print(">>>>>> CLIENT")
client = docker.Client(base_url=base_url,
version='1.14',
timeout=10)
print(">>>>>> CLIENT LOGS")
log_stream = client.logs('20ce0b3c8f5d', stream=True)
@dims
dims / gist:2f56a64f5460b79f0a6c
Created December 31, 2014 16:23
verbose unix socket redirect using socat
sudo socat -x -v -d -d "UNIX-LISTEN:/var/run/docker2.sock,reuseaddr,fork" "UNIX-CONNECT:/var/run/docker.sock"
#!/usr/bin/python
# 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@dims
dims / app.conf
Last active August 29, 2015 14:17
Quick oslo.config example for testing
#/etc/my.conf
[DEFAULT]
###########
# Logging #
###########
# syslog server configuration (default port(UDP): 514)
# NOTE: Following logging configuration can be left as is for logs to come on UI
syslog_host=127.0.0.1