Here are logs when installing LXC, docker, shipyard GUI and shipyard agent on the same box.
I am newbie to LXC, docker and shipyard.
[ install docker ]
Reference
http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring-saucy
# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.10"
3.11.0-18-generic x86_64
# apt-get update ;apt-get install linux-image-extra-`uname -r`
# apt-get install lxc-docker lxc
|
edit /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT"
|
restart ufw
# service ufw restart
|
/etc/default/docker
# grep -v ^# /etc/default/docker | grep -v ^$
DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4"
|
# service docker restart
docker stop/waiting
docker start/running, process 14870
|
[ install shipyard ]
Reference
https://github.com/shipyard/shipyard/wiki/QuickStart
edit /etc/default/docker
# grep -v ^# /etc/default/docker | grep -v ^$
DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4 -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock"
|
restart docker
# service docker restart
docker stop/waiting
docker start/running, process 14978
# lsof -ni:4243
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker 14981 root 7u IPv4 1060465 0t0 TCP 127.0.0.1:4243 (LISTEN)
|
deploy shipyard
# docker run -i -t -v /var/run/docker.sock:/docker.sock shipyard/deploy setup
Shipyard Stack Deployed
You should be able to login with admin:shipyard at http://<docker-host-ip>:8000
You will also need to setup and register the Shipyard Agent. See http://github.com/shipyard/shipyard-agent for details.
|
user: admin
pass: shipyard
[ install shipyard agent ]
download shipyard agent from https://github.com/shipyard/shipyard-agent/releases/tag/v0.2.5 and install that.
# mv shipyard-agent /usr/local/bin/
# chmod +x /usr/local/bin/shipyard-agent
# shipyard-agent --version
0.2.5
|
register shipyard-agenterror.
# shipyard-agent -url http://127.0.0.1:4243 -register
2014/03/25 02:30:48 Using 192.168.11.8 for the Docker Host IP for Shipyard
2014/03/25 02:30:48 If this is not correct or you want to use a different IP, please update the host in Shipyard
2014/03/25 02:30:48 Registering at http://127.0.0.1:4243
2014/03/25 02:30:48 Error parsing JSON from Shipyard register: json: cannot unmarshal number into Go value of type main.AgentData
|
oops, wrong URL. I need to specify shipyard url, not doker.
# shipyard-agent -url http://127.0.0.1:8000 -register
2014/03/25 02:33:01 Using 192.168.11.8 for the Docker Host IP for Shipyard
2014/03/25 02:33:01 If this is not correct or you want to use a different IP, please update the host in Shipyard
2014/03/25 02:33:01 Registering at http://127.0.0.1:8000
2014/03/25 02:33:01 Agent Key: fdadd72f21b3486f834ce0d3ce039468
# shipyard-agent -url http://127.0.0.1:8000 -key fdadd72f21b3486f834ce0d3ce039468
2014/03/25 02:33:57 Shipyard Agent (http://127.0.0.1:8000)
2014/03/25 02:33:57 Listening on :4500
|
on the GUI
enabled shipyard agent ( LXC ) host.
# ps aux | grep shipyard
root 15280 0.0 0.1 938284 14584 pts/17 Sl+ 02:11 0:00 node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15285 0.0 0.1 938272 14764 pts/17 Sl+ 02:11 0:00 /usr/local/bin/node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15286 0.0 0.1 872476 14788 pts/17 Sl+ 02:11 0:00 /usr/local/bin/node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15287 0.0 0.1 872476 14756 pts/17 Sl+ 02:11 0:00 /usr/local/bin/node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15288 0.0 0.1 872476 14804 pts/17 Sl+ 02:11 0:00 /usr/local/bin/node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15292 0.0 0.1 938272 14800 pts/17 Sl+ 02:11 0:00 /usr/local/bin/node /usr/local/bin/hipache -c /etc/shipyard_router.config.json
root 15477 0.0 0.0 39144 3384 pts/18 S+ 02:13 0:00 nginx: master process /usr/local/openresty/nginx/sbin/nginx -p /usr/local/openresty/nginx -c /etc/shipyard.conf
102 15937 0.0 0.0 239832 7580 ? Ss 02:16 0:00 postgres: shipyard shipyard 172.17.0.7(56910) idle
root 16495 0.2 0.0 292728 6592 pts/6 Sl+ 02:33 0:00 shipyard-agent -url http://127.0.0.1:8000 -key fdadd72f21b3486f834ce0d3ce039468
root 16788 0.0 0.0 14624 912 pts/9 S+ 02:37 0:00 grep --color=auto shipyard
|
list running containers
# docker info
Containers: 6
Images: 78
Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 90
WARNING: No swap limit support
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
db14972006f4 shipyard/shipyard:latest /app/.docker/run.sh 22 minutes ago Up 22 minutes 0.0.0.0:8000->8000/tcp shipyard
871856e04284 shipyard/db:latest /bin/bash -e /usr/lo 24 minutes ago Up 24 minutes 0.0.0.0:49154->5432/tcp shipyard/db,shipyard_db
f1fdedf89a7a shipyard/lb:latest /bin/sh -e /usr/loca 25 minutes ago Up 25 minutes 0.0.0.0:80->80/tcp, 443/tcp shipyard_lb
838683e60356 shipyard/router:latest /bin/sh -e /usr/loca 27 minutes ago Up 27 minutes 0.0.0.0:49153->80/tcp, 443/tcp shipyard_lb/app_router,shipyard_router
e2c3b21ac096 shipyard/redis:latest /usr/local/bin/redis 31 minutes ago Up 31 minutes 0.0.0.0:6379->6379/tcp shipyard/redis,shipyard_lb/app_router/redis,shipyard_lb/redis,shipyard_redis,shipyard_router/redis
root@ubuntu:~# docker info
Containers: 6
Images: 78
Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 90
WARNING: No swap limit support
root@ubuntu:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
db14972006f4 shipyard/shipyard:latest /app/.docker/run.sh 22 minutes ago Up 22 minutes 0.0.0.0:8000->8000/tcp shipyard
871856e04284 shipyard/db:latest /bin/bash -e /usr/lo 24 minutes ago Up 24 minutes 0.0.0.0:49154->5432/tcp shipyard/db,shipyard_db
f1fdedf89a7a shipyard/lb:latest /bin/sh -e /usr/loca 25 minutes ago Up 25 minutes 0.0.0.0:80->80/tcp, 443/tcp shipyard_lb
838683e60356 shipyard/router:latest /bin/sh -e /usr/loca 27 minutes ago Up 27 minutes 0.0.0.0:49153->80/tcp, 443/tcp shipyard_lb/app_router,shipyard_router
e2c3b21ac096 shipyard/redis:latest /usr/local/bin/redis 31 minutes ago Up 31 minutes 0.0.0.0:6379->6379/tcp shipyard/redis,shipyard_lb/app_router/redis,shipyard_lb/redis,shipyard_redis,shipyard_router/redis
|
# pwd
/var/lib/docker
root@ubuntu:/var/lib/docker# ls
aufs execdriver init repositories-aufs volumes
containers graph linkgraph.db vfs
|
[ deploy images ]
deploy images. It will take few minutes to deploy the image.
Images -> Import
containers tab
# docker ps | grep hello
f072532ff18c ehazlett/py-helloworld:latest /usr/local/bin/uwsgi 2 minutes ago Up 2 minutes 0.0.0.0:49155->8000/tcp helloworld-01
|
[ access to the container ]
click Mapping
Containers -> container name -> Ports -> Mapping -> 49155
python flask container is running.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.