This Appendix contains:
A procedure to install Docker and Docker Compose.
A manual procedure to install HERO: it guides you to manually execute the steps run by the automatic installation script.
Information about using DB2 database instead of Derby.
NGINX configuration example.
To remove any previous installation and reinstall Docker, run the following commands as a user with root privileges (i.e. sudo):
systemctl stop docker
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
rm /etc/yum.repos.d/docker*.repo
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
usermod -aG docker YOUR_DOCKER_USER_HERE
systemctl enable docker.service
systemctl daemon-reload
For Docker Compose, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
To manually install HERO, run the following procedure:
Unzip the HERO Docker build file in the <BUILD_DIR> directory.
In the <BUILD_DIR>\CONFIGURATION\HERO directory, locate the dashboard.properties and ui.properties configuration files and customize the following properties with the external hostname and ip address of the workstation where HERO is being installed:
dashboard.properties
IPdashboard
elasticsearch_external
LaunchInContextUrl
ui.properties
IP
kibanaHost
keycloak
Configure HERO Security as described in Configuring Security.
From the <BUILD_DIR> directory, type docker-compose up -d to start HERO.
Type https://<your_host_machine_address>/Dashboard to access HERO dashboard (can be default access port 443, or your custom port).
Before adding environments to HERO dashboard, create a Kibana default index pattern by running the following steps:
Connect to Kibana console by typing: <kibana host:port>/kibana/
On the navigation bar, click Dev Tools
On the left text area, write the following text: “PUT default”
Click the green arrow
On the navbar, enter Management
Click Index Patterns
In the index pattern field write default* then, click Next Step
Click the Create Index Pattern button
Now that you have created the index pattern, verify that Kibana uses it as a default: on the left list, if the index pattern presents a star, the configuration is complete
If the star is not present, select the index pattern and click the star button at the top right of the page
Hero installation has been completed: you can start adding environments.
To stop HERO, from the <BUILD_DIR> directory, type docker-compose stop
To restart HERO, from the <BUILD_DIR> directory, type docker-compose start
If you want to use DB2 database instead of Derby, run the following steps:
Create the database instance
Run the following scripts on the database instance:
dashboard.sql (to create the default schema)
componentActions.sql (default data)
componentGlobalAction.sql (default data)
scripts.sql
Add the JDBC driver jar files in the <BUILD_DIR>\CONFIGURATION\HERO\lib directory
In the <BUILD_DIR>\CONFIGURATION\HERO\conf directory, edit the context.xml file and add the following text in the <Context> tag:
<Resource name="jdbc/console"
global="jdbc/console"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://<host-machine-db2>:<port_db2>/console"
username="<username_db2>"
password="<password_db2>"/>
The following example shows how to configure an NGINX server for providing authentication and using the HTTPS protocol without configuring each node:
upstream tomcat {
server tomcat:8080 fail_timeout=0;
}
upstream elasticsearch {
server elasticsearch:9200 fail_timeout=0;
}
upstream kibana {
server kibana:5601 fail_timeout=0;
}
server { # simple reverse-proxy
listen 443 ssl default_server;
ssl_certificate /usr/share/cert/localhost.cert;
ssl_certificate_key /usr/share/cert/localhost.key;
auth_basic_user_file /etc/nginx/.htpasswd;
auth_basic "Access restricted";
location /Dashboard {
proxy_pass http://tomcat;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /ES {
rewrite /ES/(.*) /$1 break;
proxy_pass http://elasticsearch;
}
location /kibana {
proxy_pass http://kibana;
}
}