Skip to content

Instantly share code, notes, and snippets.

@burdzwastaken
Created October 31, 2017 23:06
Show Gist options
  • Save burdzwastaken/2e02fdd7ab2adf816d420b78dd300467 to your computer and use it in GitHub Desktop.
Save burdzwastaken/2e02fdd7ab2adf816d420b78dd300467 to your computer and use it in GitHub Desktop.
# requires docker && docker-compose
mkdir kolide-local && cd kolide-local
echo "
version: '2'
services:
mysql:
image: mysql:5.7
volumes:
- /tmp:/tmp
command: mysqld --datadir=/tmp/mysqldata --slow_query_log=1 --log_output=TABLE --log-queries-not-using-indexes
environment:
MYSQL_ROOT_PASSWORD: kolide
MYSQL_DATABASE: kolide
MYSQL_USER: kolide
MYSQL_PASSWORD: kolide
ports:
- "3306:3306"
mailhog:
image: mailhog/mailhog:latest
ports:
- "8025:8025"
- "1025:1025"
redis:
image: redis:3.2.4
ports:
- "6379:6379"
kolide:
image: kolide/fleet
volumes:
- .:/tmp
command: "sh /tmp/init.sh"
expose:
- "8080"
ports:
- "8080:8080"
" > docker-compose.yml
echo "
mysql:
address: mysql:3306
database: kolide
username: kolide
password: kolide
redis:
address: redis:6379
server:
address: 0.0.0.0:8080
cert: /tmp/kolide.crt
key: /tmp/kolide.key
logging:
json: true
auth:
jwt_key: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 30 | head -n 1)
" > kolide.yml
echo "
#!/bin/sh
/usr/bin/fleet prepare db --config /tmp/kolide.yml
/usr/bin/fleet serve --config /tmp/kolide.yml
" > init.sh
openssl genrsa -out kolide.key 4096
openssl req -new -key kolide.key -out kolide.csr
openssl x509 -req -days 366 -in kolide.csr -signkey kolide.key -out kolide.crt
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment