Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Kapua » how to run kapua with docker-compose?
how to run kapua with docker-compose? [message #1778629] Tue, 19 December 2017 03:20 Go to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
I want to run kapua use docker-compose, have an example of docker-compose.yml file?
Re: how to run kapua with docker-compose? [message #1778819 is a reply to message #1778629] Fri, 22 December 2017 01:35 Go to previous messageGo to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
I write it by myself, i hope kapua can install more easily.
version: '3.4'
services:
  kapua-sql:
    image: kapua/kapua-sql
    ports:
      - "8181:8181"
      - "3306:3306"
    deploy:
      restart_policy:
        condition: any
    restart: always
    networks:
      cloud_net:
        aliases:
         - sql

  kapua-elasticsearch:
    image: elasticsearch:5.4.0
    ports:
      - "9200:9200"
      - "9300:9300"
    deploy:
      restart_policy:
        condition: any
    restart: always
    command: ["-Ecluster.name=kapua-datastore","-Ediscovery.type=single-node","-Etransport.host=_site_","-Etransport.ping_schedule=-1","-Etransport.tcp.connect_timeout=30s"]
    networks:
      cloud_net:
        aliases:
         - es

  kapua-broker:
    image: kapua/kapua-broker
    depends_on:
      - kapua-sql
      - kapua-elasticsearch
    ports:
      - "1883:1883"
      - "61614:61614"
    deploy:
      restart_policy:
        condition: any 
    restart: always
    environment:
      - commons.db.schema.update=true
      - DB_PORT_3306_TCP_ADDR=sql
      - DB_PORT_3306_TCP_PORT=3306
      - ES_PORT_9200_TCP_ADDR=es
      - ES_PORT_9200_TCP_PORT=9200
    networks:
      cloud_net:
        aliases:
         - broker

  kapua-console:
    image: kapua/kapua-console
    depends_on:
      - kapua-sql
      - kapua-elasticsearch
      - kapua-broker
    ports:
      - "8080:8080"
    deploy:
      restart_policy:
        condition: any
    restart: always
    environment:
      - commons.db.schema.update=true
      - DB_PORT_3306_TCP_ADDR=sql
      - DB_PORT_3306_TCP_PORT=3306
      - ES_PORT_9200_TCP_ADDR=es
      - ES_PORT_9200_TCP_PORT=9200
    networks:
      cloud_net:
        aliases:
         - console

  kapua-api:
    image: kapua/kapua-api
    depends_on:
      - kapua-sql
      - kapua-elasticsearch
      - kapua-broker
    ports:
      - "8081:8080"
    deploy:
      restart_policy:
        condition: any
    restart: always
    environment:
      - commons.db.schema.update=true
      - DB_PORT_3306_TCP_ADDR=sql
      - DB_PORT_3306_TCP_PORT=3306
      - ES_PORT_9200_TCP_ADDR=es
      - ES_PORT_9200_TCP_PORT=9200
    networks:
      cloud_net:
        aliases:
         - api
networks:
  cloud_net:
Re: how to run kapua with docker-compose? [message #1790050 is a reply to message #1778819] Mon, 04 June 2018 09:02 Go to previous message
Vitalijs Vilums is currently offline Vitalijs VilumsFriend
Messages: 1
Registered: June 2018
Junior Member
I can't run kapua-elasticsearch
($ docker run -td --name kapua-elasticsearch -p 9200:9200 -p 9300:9300 elasticsearch:5.4.0 -Ecluster.name=kapua-datastore -Ediscovery.type=single-node -Etransport.host=_site_ -Etransport.ping_schedule=-1 -Etransport.tcp.connect_timeout=30s)

-------------------------------------------
docker inspect kapua-elasticsearch:
------------------------------------------

"Id": "7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3",
"Created": "2018-06-04T08:15:04.2609895Z",
"Path": "/docker-entrypoint.sh",
"Args": [
"-Ecluster",
".name=kapua-datastore",
"-Ediscovery",
".type=single-node",
"-Etransport",
".host=_site_",
"-Etransport",
".ping_schedule=-1",
"-Etransport",
".tcp.connect_timeout=30s"
],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 64,
"Error": "",
"StartedAt": "2018-06-04T08:15:05.2809353Z",
"FinishedAt": "2018-06-04T08:15:07.0567819Z"
},
"Image": "sha256:d781cd4e3228009a22d212ff36c9275314404badeb4249138fb17cad7cb9b431",
"ResolvConfPath": "/var/lib/docker/containers/7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3/hostname",
"HostsPath": "/var/lib/docker/containers/7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3/hosts",
"LogPath": "/var/lib/docker/containers/7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3/7ff213ca26c75543cff95d8a5eab66214282ef7e1bb858b385ce999d76e2b3f3-json.log",
"Name": "/kapua-elasticsearch",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"9200/tcp": [
{
"HostIp": "",
"HostPort": "9200"
}
],
"9300/tcp": [
{
"HostIp": "",
"HostPort": "9300"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
50,
155
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/36ce33af7280a6de0b22e378d024adebb9a18358670200d6ba2c3d70ac375e68-init/diff:/var/lib/docker/overlay2/b4b4593a07a0c46ec3fed8ee089b48068a3b5212a1a8980c87d9a150ca5ef39e/diff:/var/lib/docker/overlay2/7bede92428e718ec42061c8777db699e43333204ae8104f7335d4c9866a07982/diff:/var/lib/docker/overlay2/88ddfc58948b55034df4eeb0f3657e6fea9221db42202b32e4432ec06141bc8c/diff:/var/lib/docker/overlay2/b2eb9f43693352ebad911390713850a4b3bf90f35d5596a8f6552e7568b17b3e/diff:/var/lib/docker/overlay2/86ff227607e95815b623e7a49760cede2f7dc34a8865465cc9431eb1f8de12b7/diff:/var/lib/docker/overlay2/28661088cefc2c6c0e7b4c97e5ab0895226c732e89f64a0643d1a2749e696561/diff:/var/lib/docker/overlay2/e9652a3236eb43dabf577fada042fb3eebe8b1e9220d63de507be93cab61609c/diff:/var/lib/docker/overlay2/203f09bca0d98f8ac077bd6c54a195cf02cf7560c5f2b4858f3f1628f314d182/diff:/var/lib/docker/overlay2/8d578e1442c10377ae89ae65939c496d16155604425f94d401c5194dfd711650/diff:/var/lib/docker/overlay2/3beae18fe26ae87bd1fd3723e008f1c0e70ed5b74dbea658bfdbebb43a1f5122/diff:/var/lib/docker/overlay2/c6f09b9e54d0b07ddac00dbba423cf16d2e73bbc4c349a2ccce458edc9f78f9f/diff:/var/lib/docker/overlay2/3ef921ad09bb553b09b6714e46edf08929a8e59293d2c65488ca613eb07e1699/diff:/var/lib/docker/overlay2/9ae21c1ecd0c4b59c0e9420d8b772306f51129b6068626cecf6e75474b92662a/diff:/var/lib/docker/overlay2/3ececa236866923a8f184f8b7af745595f19f4a27b4fe4f8e68feed6d5ad8451/diff:/var/lib/docker/overlay2/279d4043c0c88d9b922d0fe085b5518baba5899e33e4a70ec84fd7b694ff38d7/diff",
"MergedDir": "/var/lib/docker/overlay2/36ce33af7280a6de0b22e378d024adebb9a18358670200d6ba2c3d70ac375e68/merged",
"UpperDir": "/var/lib/docker/overlay2/36ce33af7280a6de0b22e378d024adebb9a18358670200d6ba2c3d70ac375e68/diff",
"WorkDir": "/var/lib/docker/overlay2/36ce33af7280a6de0b22e378d024adebb9a18358670200d6ba2c3d70ac375e68/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "dc37557ad61193a9cbcf8f23533f636ffb3878fde7d897b0c7dd8ae2b9c263be",
"Source": "/var/lib/docker/volumes/dc37557ad61193a9cbcf8f23533f636ffb3878fde7d897b0c7dd8ae2b9c263be/_data",
"Destination": "/usr/share/elasticsearch/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "7ff213ca26c7",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"9200/tcp": {},
"9300/tcp": {}
},
"Tty": true,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"JAVA_HOME=/docker-java-home/jre",
"JAVA_VERSION=8u131",
"JAVA_DEBIAN_VERSION=8u131-b11-1~bpo8+1",
"CA_CERTIFICATES_JAVA_VERSION=20161107~bpo8+1",
"GOSU_VERSION=1.7",
"ELASTICSEARCH_VERSION=5.4.0",
"ELASTICSEARCH_DEB_VERSION=5.4.0"
],
"Cmd": [
"-Ecluster",
".name=kapua-datastore",
"-Ediscovery",
".type=single-node",
"-Etransport",
".host=_site_",
"-Etransport",
".ping_schedule=-1",
"-Etransport",
".tcp.connect_timeout=30s"
],
"Image": "elasticsearch:5.4.0",
"Volumes": {
"/usr/share/elasticsearch/data": {}
},
"WorkingDir": "/usr/share/elasticsearch",
"Entrypoint": [
"/docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "52b82747ea18bb8a12e207c5eacc5ed3a81d5a8e0e476a2b960a44dff83a3143",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/52b82747ea18",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "6143ed7508512ecdffe77b4d30f57c4fb66b211da1993c1fbae8748a20f9d9a3",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
}

  • Attachment: scr1.jpg
    (Size: 63.05KB, Downloaded 5 times)
Previous Topic:Can not connect Krua device to kapua server exception Not authorized to connect (5)
Next Topic:Data visualisation of Kapua devices
Goto Forum:
  


Current Time: Sat Sep 22 18:53:50 GMT 2018

Powered by FUDForum. Page generated in 0.01930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top