Skip to content

Instantly share code, notes, and snippets.

View briandant's full-sized avatar

Brian Dant briandant

View GitHub Profile
Starting with UID : 501
Bourbon files already installed, doing nothing.
x27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35mit worked if it ends withx27[0m ok
x27[0mx27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35musingx27[0m npm@3.8.6
x27[0mx27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35musingx27[0m node@v6.0.0
x27[0mx27[?25lx27[0G
x27[?25hx27[1Ax27[?25lx27[0G
x27[?25hx27[1Ax27[?25lx27[0G
x27[?25hx27[1Ax27[?25lx27[0G

Starting with UID : 501 Bourbon files already installed, doing nothing. x27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35mit worked if it ends withx27[0m ok x27[0mx27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35musingx27[0m npm@3.8.6 x27[0mx27[37mx27[40mnpmx27[0m x27[0mx27[32minfox27[0m x27[0mx27[35musingx27[0m node@v6.0.0 x27[0mx27[?25lx27[0G x27[?25hx27[1Ax27[?25lx27[0G x27[?25hx27[1Ax27[?25lx27[0G x27[?25hx27[1Ax27[?25lx27[0G x27[?25hx27[1Ax27[?25lx27[0G

root at prod-isc-wharf-1 in /opt/wharf/wharf (master) (wharf)
$ docker --tlsverify -H swarm.service.consul:4000 ps | grep 33551437
d601a53fa43b        hspi14class                                                        "/root/startup.sh"       6 hours ago         Up 2 minutes                            22/tcp, 10.240.0.5:17728->1972/tcp, 10.240.0.5:32847->57772/tcp                               prod-isc-wharfhouse-2/user___33551437

root at prod-isc-wharf-1 in /opt/wharf/wharf (master) (wharf)
$ docker --tlsverify -H swarm.service.consul:4000 ps | grep 12670453
37f5ea5a2bb9        hspi14class                                                        "/root/startup.sh"       About an hour ago   Up 26 minutes                           22/tcp, 10.240.0.5:27761->1972/tcp, 10.240.0.5:32846->57772/tcp                               prod-isc-wharfhouse-2/user___12670453

netstat

$ docker --tlsverify -H swarm.service.consul:4000 exec 37f5ea5 netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      6/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      6/sshd
tcp6       0      0 :::57772                :::*                    LISTEN      -

Code Example

Manager

class ContainerManager(models.Manager):

    def delete(self, *args, **kwargs):

        c = get_docker_client() 
[pid: 31482|app: 0|req: 4/37] 66.191.225.38 () {46 vars in 905 bytes} [Fri Apr  8 19:44:28 2016] GET /isc/dashboard/images/?_=1460158456961 => generated 1675 bytes in 46 msecs (HTTP/1.1 200) 6 headers in 209 bytes (1 switches on core 0)
INFO 2016-04-08 19:50:11,058 views 31680 140357413058368 {"id":"staging-isc-wharfhouse-0","status":"Pulling gcr.io/isc-dashboard/isc1013image...","progressDetail":{}}

INFO 2016-04-08 19:50:11,058 views 31680 140357413058368 {"id":"staging-isc-wharfhouse-1","status":"Pulling gcr.io/isc-dashboard/isc1013image...","progressDetail":{}}

"04-08-2016 19:52:41 -0400" - *** HARAKIRI ON WORKER 4 (pid: 31680, try: 1) ***
"04-08-2016 19:52:41 -0400" - HARAKIRI !!! worker 4 status !!!
"04-08-2016 19:52:41 -0400" - HARAKIRI [core 0] 66.191.225.38 - POST /isc/dashboard/images/ since 1460159410
"04-08-2016 19:52:41 -0400" - HARAKIRI !!! end of worker 4 status !!!
$ docker inspect 373ee30c8d06
[
{
"Id": "373ee30c8d06d9b03f82212840d491ef1f65eaf8eaf6d4c524426b52d78c7f1c",
"Created": "2015-07-15T23:43:22.652405226Z",
"Path": "supervisord",
"Args": [
"-c",
"/etc/supervisor/supervisord.conf"
],
Host prod-isc-wharf
HostName isc.appsembler.com
Port 22
User root
Host prod-isc-docker
HostName 45.55.236.164
Port 22
User root
Host prod-isc-docker-2
HostName 45.55.239.148
from django.cotrib.staticfiles.storage import CachedFilesMixin
class ASCachedFilesMixin(CachedFilesMixin):
"""A Cached files mixin that handles slashes properly, so that we can use
Pipeline with ``url(//fonts.google.com//*)``.
"""
def url_converter(self, name):
"""
# This is the Dockerfile that manages the edX --> Cloud9 connection.
FROM kdelfour/cloud9-docker
RUN mkdir -p /edx/app/edxapp && ln -s /workspace /edx/app/edxapp
VOLUME /edx/app/edaxapp