Skip to content

Building Kibana

aborkar-ibm edited this page Oct 13, 2020 · 52 revisions

Building Kibana

The instructions provided below specify the steps to install Kibana 7.9.1 on Linux on IBM Z for following distributions:

  • RHEL (7.6, 7.7, 7.8, 8.1, 8.2)
  • SLES (15 SP1)
  • Ubuntu (18.04, 20.04)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Build and Install Kibana

1) Build using script

If you want to build Kibana using manual steps, go to STEP 2.

Use the following commands to build Kibana using the build script. Please make sure you have wget installed.

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Kibana/7.9.1/build_kibana.sh

# Build Kibana
bash build_kibana.sh

If the build completes successfully, go to STEP 8. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.

2) Install build dependencies

export SOURCE_ROOT=/<source_root>/
  • RHEL (7.6, 7.7, 7.8)

    sudo yum install -y autoconf automake bzip2 gcc-c++ git gzip libtool make openssl-devel python tar wget zlib-devel patch curl pixman-devel.s390x cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel
    • Install GCC 4.9.4 for Node.js

      cd $SOURCE_ROOT
      wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz
      tar xzf gcc-4.9.4.tar.gz
      cd gcc-4.9.4/
      ./contrib/download_prerequisites
      mkdir build
      cd build/
      ../configure --enable-shared --disable-multilib --enable-threads=posix --with-system-zlib --enable-languages=c,c++
      make
      sudo make install
      export PATH=/usr/local/bin:$PATH
      export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
      rm -rf $SOURCE_ROOT/gcc-4.9.4
  • RHEL (8.1, 8.2)

    sudo yum install -y autoconf automake bzip2 gcc-c++ git gzip libtool make openssl-devel python2 tar wget zlib-devel curl pkgconf-pkg-config pixman-devel.s390x cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel
  • SLES (15.1)

    sudo zypper install -y autoconf automake bzip2 gcc-c++ git gzip libtool make openssl-devel python2 tar wget zlib-devel curl libjpeg8-devel libpixman-1-0-devel cairomm1_0-devel pangomm1_4-devel pkg-config giflib-devel
  • Ubuntu (18.04, 20.04)

     sudo apt-get update
     sudo apt-get install -y curl git g++ gzip libssl-dev make python tar wget patch pkg-config libpixman-1-dev libcairo2-dev libpangocairo-1.0-0 libpango1.0-dev libjpeg-dev  ```
    

3) Install Node.js

cd $SOURCE_ROOT
sudo mkdir -p /usr/local/lib/nodejs
wget https://nodejs.org/dist/v10.22.0/node-v10.22.0-linux-s390x.tar.gz
sudo tar xzvf node-v10.22.0-linux-s390x.tar.gz -C /usr/local/lib/nodejs
sudo ln -s /usr/local/lib/nodejs/node-v10.22.0-linux-s390x/bin/* /usr/bin/

4) Install Yarn

cd $SOURCE_ROOT
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

5) Installing Kibana

  • Download Kibana

    cd $SOURCE_ROOT
    git clone https://github.com/elastic/kibana.git
    cd kibana
    git checkout v7.9.1
  • Apply source code patch:

    wget https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Kibana/7.9.1/patch/kibana_patch.diff
    git apply kibana_patch.diff
  • Apply register_git_hook.diff (Only for RHEL 7.x)

    wget https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Kibana/7.9.1/patch/register_git_hook.diff
    git apply register_git_hook.diff
  • Bootstrap Kibana

    yarn kbn bootstrap --oss
  • Build Kibana

    cd $SOURCE_ROOT/kibana
    yarn build --skip-os-packages --oss

6) Test (Optional)

cd $SOURCE_ROOT/kibana
yarn test --force

Note:

Some test case failures can be ignored as they are seen on x86 also.

Tests case failures lib/config.test.ts, verify_existing_node_builds_task.test.ts, download_node_builds_task.test.ts and extract_node_builds_task.test.ts are not related to functionality and can be safely ignored.

7) Install Kibana

cd $SOURCE_ROOT/kibana
sudo mkdir /usr/share/kibana/
sudo tar -xzf target/kibana-oss-7.9.1-SNAPSHOT-linux-s390x.tar.gz -C /usr/share/kibana --strip-components 1
sudo ln -sf /usr/share/kibana/bin/* /usr/bin/

sudo groupadd [username]
sudo chown [username]:[username] -R /usr/share/kibana/

8) Start Kibana

Kibana requires an Elasticsearch instance to be running.

Set Kibana home directory export KIBANA_HOME=/usr/share/kibana/. You may start Kibana and also update the Kibana configuration file $KIBANA_HOME/config/kibana.yml.

kibana

Open your browser and go to https://<HOST_IP>:5601 to make sure the Kibana installation works.

Note:

  • In order to access Kibana server through web browser, you might need to change server.host field in $KIBANA_HOME/config/kibana.yml to 0.0.0.0. See here for more information
  • For more information regarding configuring Kibana, please visit here

References

https://www.elastic.co/products/kibana

Clone this wiki locally