sh 自托管Kadira APM - Docker Compose - Ubuntu

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 自托管Kadira APM - Docker Compose - Ubuntu相关的知识,希望对你有一定的参考价值。

#### 1 - Get an Ubuntu machine up and running (make sure ports 11011 and 4000 are open) 
#### 2 - Install docker + docker-compose ([full_install_docker_compose.sh](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-full_install_docker_compose-sh))
#### 3 - Get a docker-compose.yml with mongodb, kadira-ui, kadira-engine and kadira-rma ([docker-compose.yml](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-docker-compose-yml))
#### 3 - Run "sudo docker-compose up"  (-d if you want it running on background)
#### 4 - Access http://machineIp:4000 and login as "admin@gmail.com" and "admin" password
#### 5 - Create your APP, get the ID and Secret
#### 6 - Setup kadira in your app by code or settings.json ([Config](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-config-md))
#### 7 - Update your app from "free" plan to "paid" to get full access at Kadira ([Update App Plan](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-changeplan-md))


#### 8 - Enjoy!
#### Install MongoDB client if not already
    $ sudo apt install mongodb-clients
#### Access MongoDB (make sure port 27018 is accessible)
    $ mongo apm --host michineIP --port 27018
#### Execute update command (free, paid, startup, business, pro)
    >  db.apps.update({},{$set:{plan:'pro'}},{multi:true})
#### Done!
#### Add Kadira package to your project
    $ meteor add meteorhacks:kadira
#### Config Kadira in your code or settings.json
    # code
    Kadira.connect('xxxxxxxxxxx', 'xxxxxxxxxxxxxxx', {"endpoint":"http://machineIp:11011"});
    
    #settings.json    
    {  
      "kadira": {
        "appId": "xxxxxxxxxxx",
        "appSecret": "xxxxxxxxxxxxxxx",
        "options": {
            "endpoint":"http://machineIp:11011"
        }
      } 
    }
 
 #### You can find more advanced options here: 
 [Link](https://github.com/meteorhacks/kadira/blob/master/lib/environment_variables.js#L40)
# Source: https://github.com/mdemri/kadira-docker-compose/blob/bece9ca502f0770ce9af7abda729d081b5147368/docker-compose.yml

version: '2'

services:
  kadira-engine:
    image: vladgolubev/kadira-engine
    environment:
      - MONGO_URL=mongodb://mongodb/apm
      - MONGO_SHARD_URL_one=mongodb://mongodb/apm
      - PORT=11011
    ports:
      - "11011:11011"
    restart: always
    depends_on:
        - mongodb

  kadira-rma:
    image: dkoo761/kadira-rma
    environment:
      - MONGO_URL=mongodb://mongodb/apm
    restart: always
    depends_on:
        - mongodb

  kadira-ui:
    image: vladgolubev/kadira-ui
    environment:
      - MONGO_URL=mongodb://mongodb/apm
      - MONGO_SHARD_URL_one=mongodb://mongodb/apm
    ports:
      - "4000:4000"
    restart: always
    depends_on:
        - mongodb
  mongodb:
    image: mongo
    ports:
    - "27018:27017"
    restart: always
# Source: https://gist.github.com/wdullaer/f1af16bd7e970389bad3

sudo true
wget -qO- https://get.docker.com/ | sh
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | tail -n 1`
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
cd /tmp
git clone https://gist.github.com/76b450a0c986e576e98b.git
cd 76b450a0c986e576e98b
sudo mv docker-cleanup /usr/local/bin/docker-cleanup
sudo chmod +x /usr/local/bin/docker-cleanup

以上是关于sh 自托管Kadira APM - Docker Compose - Ubuntu的主要内容,如果未能解决你的问题,请参考以下文章

sh [Dock Spacer]在macos dock #macos上添加一个spacer

sh 这是一个shell脚本,用于自动生成https托管站点的自签名证书。

微软雅黑monaco支持中文吗

sh OSX添加Dock Spacers

sh 在OS X中添加空间到Dock

sh [打开#Ubuntu上的#minimize on dock选项]