Skip to content

Instantly share code, notes, and snippets.

View roquie's full-sized avatar
🎯
Focusing

Maks roquie

🎯
Focusing
View GitHub Profile
@roquie
roquie / AuloloadListeners.php
Last active March 22, 2016 07:41
Laravel 5 Autoload Listeners from subscribe method.
<?php
/**
* Created by Roquie.
* E-mail: roquie0@gmail.com
* GitHub: Roquie
*/
namespace App\Traits;
@roquie
roquie / ansible-role-test.sh
Last active July 31, 2017 08:50 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)
tmc_payment_doc:
created: 2017-07-24T13:51:43.368Z
updated: 2017-07-24T13:51:43.373Z
state: deploying
stack: teamc.io/tmc_payment_doc
version: 1.0.0
revision: 1
expose: -
services:
doc:

List of all nodes:

kontena node ls

output:

NAME                              VERSION   STATUS    INITIAL   LABELS
⊛ Ubuntu-1604-xenial-64-minimal   1.3.3     online    1 / 1     -               <-------- master & node
⊝ (initializing)                            offline   -
⊛ roquie-kvm-1 1.3.4 online - -
{"log":"Net::HTTPFatalError: 503 \"Service Unavailable\"\n","stream":"stderr","time":"2017-07-24T09:49:00.097680967Z"}
{"log":" /usr/lib/ruby/2.3.0/net/http/response.rb:120:in `error!'\n","stream":"stderr","time":"2017-07-24T09:49:00.097736097Z"}
{"log":" /usr/lib/ruby/gems/2.3.0/gems/etcd-0.3.0/lib/etcd/client.rb:145:in `process_http_request'\n","stream":"stderr","time":"2017-07-24T09:49:00.097745653Z"}
{"log":" /usr/lib/ruby/gems/2.3.0/gems/etcd-0.3.0/lib/etcd/client.rb:114:in `api_execute'\n","stream":"stderr","time":"2017-07-24T09:49:00.0977524Z"}
{"log":" /app/app/etcd_client.rb:27:in `version'\n","stream":"stderr","time":"2017-07-24T09:49:00.097758847Z"}
{"log":" /app/app/etcd_client.rb:22:in `initialize'\n","stream":"stderr","time":"2017-07-24T09:49:00.097766831Z"}
{"log":" /app/config.ru:11:in `new'\n","stream":"stderr","time":"2017-07-24T09:49:00.09777753Z"}
{"log":" /app/config.ru:11:in `block in \u003cmain\u003e'\n","stream":"stderr","time":"2017-07-24T09:49:00.097783825Z"}
{"log":" /usr/li
This file has been truncated, but you can view the full file.
{"log":"2017-07-24 09:48:53.329917 W | flags: unrecognized environment variable ETCD_RELEASE=2.3.7\n","stream":"stderr","time":"2017-07-24T09:48:53.396272003Z"}
{"log":"2017-07-24 09:48:53.396023 I | etcdmain: etcd Version: 2.3.7\n","stream":"stderr","time":"2017-07-24T09:48:53.39635564Z"}
{"log":"2017-07-24 09:48:53.396033 I | etcdmain: Git SHA: fd17c91\n","stream":"stderr","time":"2017-07-24T09:48:53.396371793Z"}
{"log":"2017-07-24 09:48:53.396039 I | etcdmain: Go Version: go1.6.2\n","stream":"stderr","time":"2017-07-24T09:48:53.396378154Z"}
{"log":"2017-07-24 09:48:53.396086 I | etcdmain: Go OS/Arch: linux/amd64\n","stream":"stderr","time":"2017-07-24T09:48:53.396383422Z"}
{"log":"2017-07-24 09:48:53.396116 I | etcdmain: setting maximum number of CPUs to 4, total number of available CPUs is 4\n","stream":"stderr","time":"2017-07-24T09:48:53.396388262Z"}
{"log":"2017-07-24 09:48:53.396999 I | etcdmain: proxy: using peer urls [http://10.81.0.1:2380] \n","stream":"stderr","time":"2017-07-24T09:48:53.39725975Z
root@Ubuntu-1604-xenial-64-minimal ~ # vi /etc/kontena-
kontena-agent.env kontena-server.env
root@Ubuntu-1604-xenial-64-minimal ~ # vi /etc/kontena-agent.env
root@Ubuntu-1604-xenial-64-minimal ~ # service kontena-agent restart
root@Ubuntu-1604-xenial-64-minimal ~ # service docker restart
root@Ubuntu-1604-xenial-64-minimal ~ # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fb739f6db415 mongo:3.0 "docker-entrypoint.sh" 5 seconds ago Up 4 seconds 27017/tcp kontena-server-mongo
32633b36432f kontena/agent:1.3.4 "/app/bin/kontena-age" 6 seconds ago Up 5 seconds kontena-agent
59787fd693ec google/cadvisor:v0.24.1 "/usr/bin/cadvisor -l" 26 seconds ago Up 6 seconds kontena-cadvisor
max@Roquie-mac:~/google_drive/infra/kontena-ansible$ kontena grid logs -t
weave | INFO: 2017/07/31 20:35:14.388842 Command line options: map[trusted-subnets: ipalloc-range: nickname:Ubuntu-1604-xenial-64-minimal port:6783 status-addr:127.0.0.1:6782 http-addr:127.0.0.1:6784 name:e2:17:6d:eb:53:45 resolv-conf:/var/run/weave/etc/resolv.conf datapath:datapath dns-domain:kontena.local dns-effective-listen-address:172.17.0.1 dns-listen-address:172.17.0.1:53]
weave | INFO: 2017/07/31 20:35:14.389231 Communication between peers via untrusted networks is encrypted.
weave | INFO: 2017/07/31 20:35:14.495586 Our name is e2:17:6d:eb:53:45(Ubuntu-1604-xenial-64-minimal)
weave | INFO: 2017/07/31 20:35:14.496004 Launch detected - using supplied peer list: []
weave | INFO: 2017/07/31 20:35:14.498975 Docker API on unix:///var/run/docker.sock: &[GitCommit=78d1802 GoVersion=go1.6.2 Os=linux Arch=amd64 KernelVersion=4.8.0-58-generic BuildTime=2017-01-31T23:35:14.312544877+00:00 Version=1.12.6 ApiVersion=1.24]
weave | INFO: 2017/0
2017-07-31T20:35:14.000Z weave: INFO: 2017/07/31 20:35:14.388842 Command line options: map[trusted-subnets: ipalloc-range: nickname:Ubuntu-1604-xenial-64-minimal port:6783 status-addr:127.0.0.1:6782 http-addr:127.0.0.1:6784 name:e2:17:6d:eb:53:45 resolv-conf:/var/run/weave/etc/resolv.conf datapath:datapath dns-domain:kontena.local dns-effective-listen-address:172.17.0.1 dns-listen-address:172.17.0.1:53]
2017-07-31T20:35:14.000Z weave: INFO: 2017/07/31 20:35:14.389231 Communication between peers via untrusted networks is encrypted.
2017-07-31T20:35:14.000Z weave: INFO: 2017/07/31 20:35:14.495586 Our name is e2:17:6d:eb:53:45(Ubuntu-1604-xenial-64-minimal)
2017-07-31T20:35:14.000Z weave: INFO: 2017/07/31 20:35:14.496004 Launch detected - using supplied peer list: []
2017-07-31T20:35:14.000Z weave: INFO: 2017/07/31 20:35:14.498975 Docker API on unix:///var/run/docker.sock: &[GitCommit=78d1802 GoVersion=go1.6.2 Os=linux Arch=amd64 KernelVersion=4.8.0-58-generic BuildTime=2017-01-31T23:35:14.312544877+00:00 Versio
{
"serviceName": "M2MSIMCardLimitList",
"errorCode": "12546304",
"userMessage": "Недостаточно прав для доступа к выбранной функции",
"developerMessage": "com.peterservice.openapi.m2m.backend.exceptions.PermissionException: \n\tat com.peterservice.openapi.m2m.backend.camel.InitProcessor.process(InitProcessor.java:90)\n\tat org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)\n\tat org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)\n\tat org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:118)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:80)\n\tat org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)\n\tat org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)\n\tat org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncPro