Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move integration testing KairosDB Docker image to Waylay org on Docker Hub #7

Open
thomastoye opened this issue Aug 11, 2016 · 1 comment

Comments

@thomastoye
Copy link
Contributor

thomastoye commented Aug 11, 2016

Currently using thomastoye/kairosdb-scala-driver-it:latest

https://docs.docker.com/docker-hub/builds/

@thomastoye
Copy link
Contributor Author

Automated builds docs: https://docs.docker.com/docker-hub/builds/

Dockerfile:

FROM java:8-alpine

RUN apk upgrade libssl1.0 --update-cache && \
    apk add wget ca-certificates bash
RUN wget -O /tmp/kairosdb_1.1.1-1.tar.gz \
    https://github.com/kairosdb/kairosdb/releases/download/v1.1.1/kairosdb-1.1.1-1.tar.gz

RUN mkdir -p /opt/ && \
    cd /opt/ && \
    tar -xvf /tmp/kairosdb*

COPY conf/kairosdb.properties /opt/kairosdb/conf/kairosdb.properties

EXPOSE 4242 8080 2003 2004
ENTRYPOINT [ "/opt/kairosdb/bin/kairosdb.sh"]
CMD [ "run" ]

docker-compose.yml:

version: '2'

services:
  kairosdb:
    build: .
    ports:
      - '8080:8080'

README:

# KairosDB

Simple KairosDB docker setup using a default configuration with built-in H2 database.

This docker setup does not use Cassandra and is intended for testing purposes.

## Configure

Configuration can be found in [conf/kairosdb.properties](conf/kairosdb.properties).

## Deploy

`docker-compose up -d`

conf/kairosdb.properties:

kairosdb.telnetserver.port=4242
kairosdb.telnetserver.address=0.0.0.0
kairosdb.telnetserver.max_command_size=1024

kairosdb.service.telnet=org.kairosdb.core.telnet.TelnetServerModule
kairosdb.service.http=org.kairosdb.core.http.WebServletModule
kairosdb.service.reporter=org.kairosdb.core.reporting.MetricReportingModule

#===============================================================================
#Each factory must be bound in a guice module.  The definition here defines what
#protocol data type the factory services.
#Default data point implementation for long - class must implement LongDataPointFactory
kairosdb.datapoints.factory.long=org.kairosdb.core.datapoints.LongDataPointFactoryImpl
#Default data point implementation for double - class must implement DoubleDataPointFactory
kairosdb.datapoints.factory.double=org.kairosdb.core.datapoints.DoubleDataPointFactoryImpl

kairosdb.datapoints.factory.string=org.kairosdb.core.datapoints.StringDataPointFactory

#===============================================================================
# Uses Quartz Cron syntax - default is to run every minute
kairosdb.reporter.schedule=0 */1 * * * ?

#===============================================================================
# Set to 0 to turn off HTTP port
kairosdb.jetty.port=8080
kairosdb.jetty.address=0.0.0.0
kairosdb.jetty.static_web_root=webroot

# To enable SSL uncomment the following lines and specify the path to the keyStore and its password and port
#kairosdb.jetty.ssl.port=443
#kairosdb.jetty.ssl.protocols=TLSv1, TLSv1.1, TLSv1.2
#kairosdb.jetty.ssl.cipherSuites=TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA
#kairosdb.jetty.ssl.keystore.path=
#kairosdb.jetty.ssl.keystore.password=

#To enable http basic authentication uncomment the following lines and specify
#the user name and password for authentication.
#kairosdb.jetty.basic_auth.user=
#kairosdb.jetty.basic_auth.password=

#===============================================================================
kairosdb.service.datastore=org.kairosdb.datastore.h2.H2Module
kairosdb.datastore.concurrentQueryThreads=5
#kairosdb.service.datastore=org.kairosdb.datastore.cassandra.CassandraModule
#kairosdb.service.datastore=org.kairosdb.datastore.remote.RemoteModule

#this module is built using the code at https://github.com/brianhks/opentsdb
#kairosdb.service.datastore=net.opentsdb.kairosdb.HBaseModule

#===============================================================================
#H2 properties
kairosdb.datastore.h2.database_path=build/h2db

#===============================================================================
#Cassandra properties
#host list is in the form> 1.1.1.1:9160,1.1.1.2:9160
kairosdb.datastore.cassandra.host_list=localhost:9160
kairosdb.datastore.cassandra.keyspace=kairosdb
kairosdb.datastore.cassandra.replication_factor=1
kairosdb.datastore.cassandra.write_delay=1000
kairosdb.datastore.cassandra.write_buffer_max_size=500000
#When reading one row read in 10k
kairosdb.datastore.cassandra.single_row_read_size=10240

#The number of rows to read when doing a multi get
kairosdb.datastore.cassandra.multi_row_size=1000
#The amount of data to read from each row when doing a multi get
kairosdb.datastore.cassandra.multi_row_read_size=1024

#Size of the row key cache size.  This can be monitored by querying
#kairosdb.datastore.write_size and filtering on the tag buffer = row_key_index
#Ideally the data written to the row_key_index should stabilize to zero except
#when data rolls to a new row
kairosdb.datastore.cassandra.row_key_cache_size=10240

kairosdb.datastore.cassandra.string_cache_size=5000

# Uses Quartz Cron syntax - default is to run every five minutes
kairosdb.datastore.cassandra.increase_buffer_size_schedule=0 */5 * * * ?

#Control the required consistency for cassandra operations.
#Available settings are cassandra version dependent:
#http://www.datastax.com/documentation/cassandra/2.0/webhelp/index.html#cassandra/dml/dml_config_consistency_c.html
kairosdb.datastore.cassandra.read_consistency_level=ONE
kairosdb.datastore.cassandra.write_consistency_level=QUORUM

#for cassandra authentication use the following
#kairosdb.datastore.cassandra.auth.[prop name]=[prop value]
#example:
#kairosdb.datastore.cassandra.auth.username=admin
#kairosdb.datastore.cassandra.auth.password=eat_me

#the time to live in seconds for datapoints. After this period the data will be
#deleted automatically. If not set the data will live forever.
#TTLs are added to columns as they're inserted so setting this will not affect
#existing data, only new data.
#kairosdb.datastore.cassandra.datapoint_ttl=31536000

#===============================================================================
#Remote datastore properties
#Location to store data locally before it is sent off
kairosdb.datastore.remote.data_dir=.
kairosdb.datastore.remote.remote_url=http://10.92.1.41:8080

# quartz cron schedule for sending data (currently set to 30 min)
kairosdb.datastore.remote.schedule=0 */30 * * * ?

# delay the sending of data for a random number of seconds.
# this prevents all remote kairos nodes from sending data at the same time
# the default of 600 means the data will be sent every half hour plus some some
# delay up to 10 minutes.
kairosdb.datastore.remote.random_delay=0

#===============================================================================
#Uncomment this line to require oauth connections to http server
#kairosdb.service.oauth=org.kairosdb.core.oauth.OAuthModule

#OAuth consumer keys and secrets in the form
#kairosdb.oauth.consumer.[consumer key]=[consumer secret]

#===============================================================================
# Cache file cleaning schedule. Uses Quartz Cron syntax
kairosdb.query_cache.cache_file_cleaner_schedule=0 0 12 ? * SUN *

#By default the query cache is located in kairos_cache under the system temp folder as
#defined by java.io.tmpdir system property.  To override set the following value
#kairosdb.query_cache.cache_dir=


#===============================================================================
# Hector configuration

#kairosdb.datastore.cassandra.hector.maxActive=50
#kairosdb.datastore.cassandra.hector.maxWaitTimeWhenExhausted=-1
kairosdb.datastore.cassandra.hector.useSocketKeepalive=true
kairosdb.datastore.cassandra.hector.cassandraThriftSocketTimeout=10000
#kairosdb.datastore.cassandra.hector.retryDownedHosts=true
#kairosdb.datastore.cassandra.hector.retryDownedHostsDelayInSeconds=10
#kairosdb.datastore.cassandra.hector.retryDownedHostsQueueSize=-1
#kairosdb.datastore.cassandra.hector.autoDiscoverHosts=false
#kairosdb.datastore.cassandra.hector.autoDiscoveryDelayInSeconds=30
#kairosdb.datastore.cassandra.hector.autoDiscoveryDataCenters=
#kairosdb.datastore.cassandra.hector.runAutoDiscoveryAtStartup=false
#kairosdb.datastore.cassandra.hector.useHostTimeoutTracker=false
#kairosdb.datastore.cassandra.hector.maxFrameSize=2147483647
#kairosdb.datastore.cassandra.hector.loadBalancingPolicy=roundRobin | leastActive | dynamic
#kairosdb.datastore.cassandra.hector.hostTimeoutCounter=10
#kairosdb.datastore.cassandra.hector.hostTimeoutWindow=500
#kairosdb.datastore.cassandra.hector.hostTimeoutSuspensionDurationInSeconds=10
#kairosdb.datastore.cassandra.hector.hostTimeoutUnsuspendCheckDelay=10
#kairosdb.datastore.cassandra.hector.maxConnectTimeMillis=-1
#kairosdb.datastore.cassandra.hector.maxLastSuccessTimeMillis-1

#===============================================================================
# Health Checks
kairosdb.service.health=org.kairosdb.core.health.HealthCheckModule

#Response code to return from a call to /api/v1/health/check
#Some load balancers want 200 instead of 204
kairosdb.health.healthyResponseCode=204

Credits: @gillesdemey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant