Graylog operator for ingesting logs written for Juju and the Operator Framework. Graylog is a leading centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis of terabytes of machine data.
This graylog charm must be deployed with Elasticsearch and MongoDB. The application will be in a blocked state if these two relations do not exist.
Install dependencies:
snap install microk8s --classic # if microk8s is not on your system
# or
microk8s.reset # if you already have microk8s
snap install charmcraft
snap install juju --classicInitial setup (ensure microk8s is a clean slate with microk8s.reset or a fresh install with snap install microk8s --classic):
microk8s.enable dns storage registry dashboard
juju bootstrap microk8s mk8s
juju add-model lma
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpathDeploy Graylog on its own:
git clone git@github.com:canonical/graylog-operator.git
cd graylog-operator
charmcraft build
juju deploy ./graylog.charm --config admin-password={CHOOSE_PASSWORD} --resource graylog-image=graylog/graylog:3.3.8-1
cd ..Deploy the MongoDB and Elasticsearch dependencies
# mongodb
git clone git@github.com:canonical/mongodb-operator.git
cd mongodb-operator
charmcraft build
juju deploy ./mongodb.charm --resource mongodb-image=mongo:4.4.1 --num-units=3
cd ..
# elasticsearch
git clone git@github.com:canonical/elasticsearch-operator.git
cd elasticsearch-operator
charmcraft build
juju deploy ./elasticsearch.charmRelate Graylog to MongoDB and Elasticsearch so automatic configuration can take place
juju add-relation graylog mongodb
juju add-relation graylog elasticsearchUse watch -c juju status --color to wait until everything has settled and is active and then visit: {GRAYLOG_APP_IP}:9000 in your browser.
...
Create and activate a virtualenv, and install the development requirements,
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt
Just run run_tests:
./run_tests