The BitSwan product is delivered in the form of Docker container images which can easily be downloaded and triggered from a distribution URL address by means of Docker compose application to which a corresponding configuration file is provided.
Provided ElasticSearch database is used, it is necessary to be installed and prepared separately.
Each BitSwan product customer will be given registration data for pre-specified Docker registers in which containers specific for setting in its production environment are located. Apart from them the user will obtain a configuration file
docker-compose.yml for the Docker compose which precisely defines the source of individual containers within given Docker registry. Because of that the Docker compose command will download and set containers automatically. The whole installation looks as follows:
sudo -i # Entry in directory with configuration file `docker-compose.yml` cd /opt/docker-compose Login under provided data docker login docker.teskalabs.com # Downloading and instantaneous setting of containers docker-compose pull docker-compose up -d --remove-orphans
We aim for a three months release cycle of BitSwan. The new release is marked with a version tag in the GitHub and also a maintenance branch is created. The latest version of BSPump is then available for download at pip (Python package) and Docker Hub to be used directly for creating containerized applications: https://hub.docker.com/r/teskalabs/bspump
Installation in Docker
Create a container with ElasticSearch in a version you request. The following commands will install a container with ElasticSearch in version 6. 4. 2.
sudo mkdir -p /private/var/elasticsearch/data sudo chmod a+rw /private/var/elasticsearch/data
Trigger the container:
docker run \ --name elasticsearch-6.4.2 -p 9200:9200 -p 9300:9300 \ -e "discovery.type=single-node" \ -v /private/var/elasticsearch/data:/usr/share/elasticsearch/data \ docker.elastic.co/elasticsearch/elasticsearch:6.4.2
Requested dependencies will be downloaded and installed automatically.
Installation for CentOS
ElasticSearch can be installed by means of following commands (designed for CentOS distribution). First it is important to prepare the environment for the actual installation:
yum install java-1.8.0-openjdk-headless rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch vi /etc/yum.repos.d/elasticsearch.repo
For more information go to: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html
Now install ElasticSearch (or its requested version):
yum install elasticsearch mkdir -p /data/elasticsearch/data /data/elasticsearch/logs chown -Rv elasticsearch:elasticsearch /data/elasticsearch/
Modify the configuration according to specific requirements:
Change Java VM settings according to specific requirements:
service elasticsearch start
Lock the ElasticSearch version so as to prevent automatic update:
yum install yum-plugin-versionlock yum versionlock elasticsearch
Import of templates
ElasticSearch templates are designed for description of data stored in ElasticSearch indexes.
Clone provided Git repository with ElasticSearch templates:
git clone URL_TO_REPOSITORY
Execute import into ElasticSearch by means of BSElastic tool:
bspump/utils/bselastic load_index_template . ELASTICSEARCH_URL
Kibana together with Kibana Lookup plugin is accessible as a Docker container from Docker Hub. Thus its installation is very easy. Consequently, the user is able to create a specific container with his/her own configuration all by himself/herself.
Installation with one´s own configuration
To install Kibana version 6. 4. 2., create Dockerfile with the following content in the first place:
FROM teskalabs/kibana:6.4.2 COPY ./kibana.yml /opt/kibana/config/kibana.yml
Then create kibana.yml file in the same folder, in which you configure Kibana according to your own requirements. Remember to give the correct track to the ElasticSearch cluster:
server.name: kibana server.host: "0" elasticsearch.url: http://elasticsearch:9200 xpack.monitoring.ui.container.elasticsearch.enabled: true
Then create your own Docker container:
docker build -t kibana .
Then load the container to your server.
Installation without one´s own configuration
Create a Kibana container with link to ElasticSearch running in Docker container. All of this in version 6. 4. 2:
docker run --name kibana-6.4.2 -p 5601:5601 --link elasticsearch-6.4.2:elasticsearch teskalabs/kibana:6.4.2
Note: it is necessary for Kibana to be in the same version as ElasticSearch is._
To load the already existing objects (e.g.visualisations) into Kibana, Kibana Object Library and BSKibana tool are designed.
Kibana Object Library
Kibana Object Library is a directory structure with the following objects:
- ● Kibana settings
- ● index patterns
- ● visualisations
- ● dashboards
- ● lookups
By means of BSKibana tool Kibana Object Library enables to export and import the above mentioned objects into/out of files and verse these files subsequently. These files are administered by Git version system.
Compilation and import
Clone specific Kibana Object Library from provided Git repository:
git clone URL_TO_REPOSITORY
Compile it by means of BSKibana tool:
bspump/utils/bskibana compile REPOSITORY_FOLDER --output output.json
Execute import into ElasticSearch:
bspump/utils/bskibana import output.json ELASTICSEARCH_URL