Skip to content

Instantly share code, notes, and snippets.

View srid's full-sized avatar
🌤️
a smoothly flowing moment of clear experiencing

Sridhar Ratnakumar srid

🌤️
a smoothly flowing moment of clear experiencing
View GitHub Profile
// read-only registry API server
// TODO:
// * directly read from the .tar file (will break martini.Static)
// * UX friendly error handling
package main
import (
"encoding/json"
#!/bin/bash -ex
# Wrapper for 'docker save' fixing,
# https://github.com/dotcloud/docker/issues/3877
# In addition: this script will always save exactly one image (possibly
# multiple tags).
IMAGE=$1
TARGET=$2
NAME=`echo $IMAGE | awk -F':' '{print $1}'`
ID=`docker inspect $IMAGE | python -c "import sys,json; print json.load(sys.stdin)[0]['id']"`
// GetNameServers returns nameservers configured on the host.
func GetNameServers() ([]string, error) {
resolvFile := "/etc/resolv.conf"
f, err := os.Open(resolvFile)
if err != nil {
return nil, err
}
defer f.Close()
+ sudo docker run -e REDIS_PROVIDER_URL=redis://user@172.17.0.3:6379 -e POSTGRES_HOST=172.17.0.58 -e POSTGRES_PORT=5432 -v /home/srid/code/discourse/data/assets:/discourse/public/assets -v /discourse/public srid/discourse /discourse/init.sh 'bundle exec rails s'
lxc-start: No such file or directory - failed to mount '/home/srid/code/discourse/data/assets' on '/usr/lib/x86_64-linux-gnu/lxc///discourse/public/assets'
lxc-start: failed to setup the mount entries for '2e05edd484a05ced1f47a927a6093cecd7c098db42fefd6cfec488e8c4ca3009'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn '2e05edd484a05ced1f47a927a6093cecd7c098db42fefd6cfec488e8c4ca3009'
Request PUT, application/json: https://api.stackato-nightly.activestate.com/apps/env -query {
"env" : ["FOO=bar"],
"instances" : "1",
"meta" : {
"console" : "null",
"created" : "1368826688", "debug" : "null",
"version" : "4" }, "name" : "env",
"resources" : {
"disk" : "2048",
"fds" : "256",
diff --git a/deploy/app-logs.rst b/deploy/app-logs.rst
index 0c5ebe3..228c113 100644 (file)
--- a/deploy/app-logs.rst
+++ b/deploy/app-logs.rst
@@ -19,6 +19,17 @@ filtered. Application log streams can be accessed via:
Information on system logs for Stackato itself and log aggregation
settings can be found in the :ref:`Log Aggregation <logging>` documentation.
+Log streams are tailed output from actual log files in each application
+container, generally found in the */app/logs/* directory. These files
sridharr@dhcp-22 ~/g/s/logyard> make dev-install
gofmt -w .
go install -tags zmq_3_x -v logyard/... github.com/ActiveState/tail/cmd/gotail
github.com/vmihailenco/bufio
github.com/ActiveState/log
# github.com/vmihailenco/bufio
can't create $WORK/github.com/vmihailenco/bufio/_obj/_go_.6: No such file or directory
github.com/alecthomas/gozmq
# github.com/ActiveState/log
can't create $WORK/github.com/ActiveState/log/_obj/_go_.6: No such file or directory
# This module provides a quick and dirty ruby interface to docker. The
# docker team promises to implement a properly ruby client library in
# the future. The docker API is not complete; see
# https://github.com/dotcloud/docker/issues/21
require 'open3'
# FIXME: replace IO.popen/backticks with the EM variants, although the
# docker commands below return instantaneously.
class Docker
diff --git a/go/goget.manifest b/go/goget.manifest
index 8a7687b..edb7bd5 100644
--- a/go/goget.manifest
+++ b/go/goget.manifest
@@ -6,13 +6,13 @@
# IMPORT_PATH VCS_TYPE REPO_URL [HEAD]
## doozer
-code.google.com/p/go.net/ hg http://mercurial.activestate.com/stackato-mirrors/go.net/ 3a318dc9
+code.google.com/p/go.net/ hg https://code.google.com/p/go.net/ 3a318dc9
$ curl -v localhost:3000
* About to connect() to localhost port 3000 (#0)
* Trying 127.0.0.1... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:3000
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/html; charset=utf-8