Set up the repositories RHEL#

Deprecated: Use installation playbooks instead

Instructions to manually install and upgrade EclecticIQ Intelligence Center, and using rundoc to install or upgrade EclecticIQ Intelligence Center, are deprecated.

Use EclecticIQ Intelligence Center installation playbooks instead.

By the end of this guide, you would have set up the Yum repositories required to install the Intelligence Center (IC).

✅ You need to run commands in this guide as root. To gain root-level access in your shell, run: sudo -i.

Table of Contents

Environment variables#

The scripts in this page depend on the environment variables listed in this section.

✅ Set environment variables by running export <variable_name>=<value>.

For example, to set eiq_repo_user, run: export eiq_repo_user="my_username"

Repository credentials#

Set up environment variables to store your EclecticIQ credentials:

⚠ Caution: You must URL-encode the credential values set here.

eiq_repo_user=
eiq_repo_pass=
extensions_repo_user=
extensions_repo_password=

Env. variable

Description

eiq_repo_user

Set this to your https://downloads.eclecticiq.com account user name.

eiq_repo_pass

Set this to your https://downloads.eclecticiq.com account password.

extensions_repo_user

User account for the extensions repository. By default, set this to the same value as eiq_repo_user.

extensions_repo_pass

Password for your extensions repository user account. By default, set this to the same value as eiq_repo_pass

Repository paths#

Set up the following environment variables to specify repository paths:

repos_protocol=https
repos_root=downloads.eclecticiq.com
repos_component=3.2
platform_repo_path=platform-packages-centos
platform_deps_path=intelligence-center-dependencies-rpm
ic_deps_path=intelligence-center-dependencies-rpm
key_path=public

Env. variable

Description

repos_protocol

Set to https by default.

repos_root

Set to downloads.eclecticiq.com.

repos_component

Set to the target version of the IC.

platform_repo_path

Repository name for IC packages. Set to platform-packages-centos.

platform_deps_path

Repository name for IC 3rd party dependencies packages. Set to intelligence-center-dependencies-rpm.
NOTE: This is for IC versions 3.0.x and later.

ic_deps_path

Repository name for additional IC dependencies. Set to intelligence-center-dependencies-rpm

key_path

Path to directory on repos_root that contains EclecticIQ public keys. Set to public/GPG-KEY-eclecticiq by default.

Extensions repository paths#

Set up the following environment variables for installing extensions:

extensions_repo_protocol=https
extensions_repo_domain=downloads.eclecticiq.com
extensions_repo_path=Extensions
extensions_packages=eclecticiq-extension-all~=3.2.0

Env. variable

Description

extensions_repo_protocol

Set to https by default.

extensions_repo_domain

Set to downloads.eclecticiq.com

extensions_repo_path

Location of the extensions repository on extensions_repo_domain. Set to Extensions by default.

extensions_packages

Set to eclecticiq-extensions-all~=<IC_minor_ver> by default.

NOTE: Extension versions should match the IC’s minor version, but not the patch version. For example, when installing IC 2.9.2, the <IC_minor_ver> here should be set to 2.9 and not 2.9.2. Setting the patch version (e.g. 2.9.2) may cause some extensions to fail to install.

Set up repository configuration files#

Run the commands in the following sections to set up the configuration files for EclecticIQ repositories.

Make sure you’ve set up the environment variables above before running these commands.

Set up the pip repository#

Set up your host’s PIP configuration to install packages from the extensions_repo_domain.

mkdir -p /opt/eclecticiq-platform-backend/
cat << EOF > /opt/eclecticiq-platform-backend/pip.conf
[global]
index-url = ${extensions_repo_protocol}://${extensions_repo_domain}/${extensions_repo_path}/
find-links = ${extensions_repo_protocol}://${extensions_repo_domain}/${extensions_repo_path}/
EOF

cat << EOF > ~/.netrc
machine ${extensions_repo_domain} login ${extensions_repo_user:-$eiq_repo_user} password ${extensions_repo_password:-$eiq_repo_pass}
EOF
chmod 0600 ~/.netrc

Set up the YUM repositories#

Set up Yum repositories for the IC so that you can manage IC packages using yum or dnf.

This procedure consists of the following steps:

Remove obsolete repositories#

If you are upgrading an existing platform installation, begin by removing obsolete repositories:

# Remove old repos
rm -f /etc/yum.repos.d/platform-centos.repo
rm -f /etc/yum.repos.d/platform-centos-deps.repo
yum clean all

Create .repo file for general dependencies#

Run the following command to create a .repo file for general IC dependencies:

cat << EOF > /etc/yum.repos.d/platform-3rd-party-dependencies-rocky8.repo
[deps-elk]
name=deps-elk
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/elastic/8.8/
enabled=1
priority=1
module_hotfixes=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/GPG-KEY-elasticsearch

[deps-nginx]
name=deps-nginx
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/nginx/1/
enabled=1
priority=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/nginx_signing.key

[deps-postgresql]
name=deps-postgresql
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/postgresql/14/
enabled=1
priority=1
module_hotfixes=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/RPM-GPG-KEY-PGDG

[deps-powertools]
name=deps-powertools
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/powertools/8/
enabled=1
priority=1
module_hotfixes=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/RPM-GPG-KEY-Rocky-8

[deps-python]
name=deps-python
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/python/3.8/
enabled=1
priority=1
module_hotfixes=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/GPG-KEY-eclecticiq

[deps-redis]
name=deps-redis
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}/${repos_component}.x/8/x86_64/redis/7/
enabled=1
priority=1
module_hotfixes=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/GPG-KEY-eclecticiq
EOF

Create the YUM repository files for the IC#

Run the following command to create repository files for IC packages:

cat << EOF > /etc/yum.repos.d/platform-packages-centos.repo
[platform-packages-centos]
name=platform-packages-centos
baseurl=${repos_protocol}://${repos_root}/${platform_repo_path}/${repos_component}
enabled=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}/GPG-KEY-eclecticiq
EOF

Refresh Yum cache#

Finally, run the following command to refresh the Yum cache:

yum makecache