Install Grafana v9.0.5 in IBM zLinux (s390x)
The following article contains the steps that must be followed to install Grafana v9.0.5 from source code on IBM zLinux (s390x).
Pre-requisites
for Grafana install
a. NodeJS version: v16.15.1. (Ensure you execute: export NODE_OPTIONS=--max-old-space-size=12228)
b. Yarn:
v4.0.0-rc.12 (Execute from grafana-install directory: sudo
yarn set version 4.0.0-rc.12). This version of yarn contains an important
fix related to running Yarn (berry) in Bigendian systems such as zLinux. (More
info...)
c. Go: go version go1.17.11 linux/s390x. Ensure the environment variables for Go (GOPATH and GOROOT) are set:
d. make: GNU Make 4.3
Configuration
1. Download the latest Grafana Source into 'grafana-install' directory using:
- sudo wget https://github.com/grafana/grafana/archive/refs/tags/v9.0.5.tar.gz
2. Now extract it using: sudo tar -C . -xzf v9.0.5.tar.gz
The above step will extract Grafana v9.0.5 to directory named: grafana-9.0.5
2. Edit the file grafana-install/grafana-9.0.5/.yarnrc.yml and do the following changes:
a.
Point the yarnPath to ../.yarn/releases/yarn-4.0.0-rc.12.cjs
b. From the plugins section remove the following entries:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
3. Open grafana-install/grafana-9.0.5/package.json and
-
change package manager entry as: "packageManager": yarn@4.0.0-rc.12
- under the scripts section change:
"postinstall": "husky
install" to
"prepare": "husky
install"
- from the devDependencies section, remove all the @swc entries such as:
"@swc/core": "1.2.187",
"@swc/helpers":
"0.3.13"
4. Remove all occurrences of @swc/helpers from the following files:
- packages/grafana-data/package.json
- packages/grafana-schema/package.json
- packages/grafana-ui/package.json
5. Remove the ts-node section shown below from: scripts/cli/tsconfig.json
"ts-node": {
"transpileOnly": true,
"transpiler":
"ts-node/transpilers/swc-experimental"
}
6. Remove source map generation from webpack for development environment. For this open the file: scripts/webpack/webpack.dev.js and remove the entry devtool: 'inline-source-map'. Please note that there are still issues around the building Grafana v9.0.5 for production (yarn build), hence this article will focus on the dev build only.
Install
the server and client
With your current directory as grafana-install verify that the yarn version is yarn-4.0.0-rc.12 with the command: yarn -v. (If not execute: sudo yarn set version 4.0.0-rc.12)
1. Change directory to ./grafana-9.0.5 and execute: make run. This will install the server portion of Grafana with all Go libraries/dependencies. Once this completes it goes into a wait state. Press Cntrl + C and exit.
2. Next step is to install the client dependencies. So execute: sudo yarn install
3. Once client dependencies are installed execute: sudo yarn start. Once it succeeds press Cntrl + C to exit.
4. Now we are all ready to start Grafana. For this navigate to the ./bin directory and start the executable titled: grafana-server. Once it starts at port 3000, open a new browser window and navigate to http://<server_name>:3000
5. Happy visualizations with Grafana!!!
0 comments: