Set up repositories RHEL

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:

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=2.12
platform_repo_path=platform-packages-centos
platform_deps_path=platform-dependencies-centos-2.9
ic_deps_path=intelligence-center-dependencies-rpm
key_path=public/GPG-KEY-eclecticiq

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 repositories. Set to platform-dependencies-centos-2.9.NOTE: This is set to *-2.9 for IC versions 2.9 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~=2.12.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.

This procedure consists of the following steps:

  • Remove obsolete repositories

  • Create .repo file for general dependencies

  • Create .repo file for IC Python 3.8 packages

  • Create the YUM repository files for the IC

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-dependencies-centos.repo
[platform-dependencies-centos]
name=platform-dependencies-centos
baseurl=${repos_protocol}://${repos_root}/${platform_deps_path}
enabled=1
priority=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}
EOF

Create .repo file for IC Python 3.8 packages

Run the following command to create a .repo file for IC Python 3.8 packages:

cat << EOF > /etc/yum.repos.d/platform-dependencies-centos-python38.repo
[platform-dependencies-centos-python38]
name=platform-dependencies-centos-python38
baseurl=${repos_protocol}://${repos_root}/${ic_deps_path}/centos/7/x86_64/python/3.8
enabled=1
priority=1
username=${eiq_repo_user}
password=${eiq_repo_pass}
gpgkey=${repos_protocol}://${repos_root}/${key_path}
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}
EOF

Refresh Yum cache

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

yum makecache