3. Administration¶
The administration section of this documentation covers topics related to installing the software module on a machine.
3.1. Installing the software¶
3.1.1. Requirements¶
MGRID Messaging 3 is supported on
- Enterprise Linux (RedHat or CentOS) 6 and 7
- with python 2.7 installed
3.1.2. Adding the MGRID repository¶
Install
pygpgme
, a package which allows yum to handle gpg signatures, and a package calledyum-utils
which contains the tools you need for installing source RPMs.$ sudo yum install -y pygpgme yum-utils ... Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: yum-utils noarch 1.1.30-30.el6 base 110 k Transaction Summary ================================================================================ Install 1 Package(s) Total size: 110 k Installed size: 307 k ... Complete!
Create a file named
/etc/yum.repos.d/mgrid_mgrid3.repo
that contains the repository configuration. This is a private repository, so you’ll need a read token to access it. Use the command below to create a read token and output a repository configuration. ReplaceUNIQUE_ID
with any unique identifier for your system, such as the hostname. Replace the master token with the token you’ve received from support@mgrid.net. Replaceos
anddist
with a valid Linux distribution and version, in our example case ‘el’, version 6.UNIQUE_ID=`hostname -f` && \ MASTER_TOKEN=aabbccddeeff00112233445566778899aabbccddeeff0011 && \ OS=el && \ DIST=6 && \ curl "https://${MASTER_TOKEN}:@packagecloud.io/install/repositories/mgrid/mgrid3/config_file.repo?os=${OS}&dist=${DIST}&name=${UNIQUE_ID}"
Place the output from the above command in a file named
/etc/yum.repos.d/mgrid_mgrid3.repo
.Update your local yum cache by running
$ sudo yum -q makecache -y --disablerepo='*' --enablerepo='mgrid_mgrid3' Importing GPG key 0xD59097AB: Userid: "packagecloud ops (production key) <ops@packagecloud.io>" From : https://packagecloud.io/gpg.key
Verify that packages are available. Note that on first access of the repository we must accept the GPG key.
$ sudo yum search mgrid Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.amsiohosting.net * extras: mirror.1000mbps.com * updates: mirror.amsiohosting.net mgrid_mgrid3-source/signature | 836 B 00:00 Retrieving key from https://packagecloud.io/gpg.key Importing GPG key 0xD59097AB: Userid: "packagecloud ops (production key) <ops@packagecloud.io>" From : https://packagecloud.io/gpg.key Is this ok [y/N]: y ============================================================ N/S Matched: mgrid ============================================================ mgridhdl3_94.x86_64 : MGRID Healthcare Datatype Library mgridhdl3_95.x86_64 : MGRID Healthcare Datatype Library mgridhdm3-hl7v3models_edition2006_94.noarch : MGRID HDM HL7v3 RIM, Vocabulary and CRUD functions. Normative Edition 2006 mgridhdm3-hl7v3models_edition2006_95.noarch : MGRID HDM HL7v3 RIM, Vocabulary and CRUD functions. Normative Edition 2006 mgridhdm3-hl7v3models_edition2008_94.noarch : MGRID HDM HL7v3 RIM, Vocabulary and CRUD functions. Normative Edition 2008 mgridhdm3-hl7v3models_edition2008_95.noarch : MGRID HDM HL7v3 RIM, Vocabulary and CRUD functions. Normative Edition 2008 ...
3.1.3. Enterprise Linux 6¶
The default python on Enterprise Linux 6 is python 2.6. Applications that require python2.7, such as MGRID Messaging 3.0, will need a virtual environment with python 2.7. Without python available, installation of the mgridmsg message will result in the following error:
$ sudo yum install -y mgridmsg3
--> Running transaction check
---> Package mgridmsg3.noarch 0:3.0.4-2 will be installed
--> Processing Dependency: python27-python-virtualenv for package: mgridmsg3-3.0.4-2.noarch
--> Finished Dependency Resolution
Error: Package: mgridmsg3-3.0.4-2.noarch (mgrid_mgrid3)
Requires: python27-python-virtualenv
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
3.1.3.1. Adding the Software Collections repository¶
This section describes how to add this package from the Scientific Linux Software Collections for https://linux.web.cern.ch/linux/scientific6/docs/softwarecollections.shtml
$ sudo yum install centos-release-scl-rh
...
Dependencies Resolved
===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Installing:
centos-release-scl-rh noarch 1-1.el6.centos extras 12 k
Transaction Summary
===============================================================================================================
Install 1 Package(s)
Total download size: 12 k
Installed size: 19 k
Is this ok [y/N]: y
...
Complete!
$ sudo yum -q makecache -y --disablerepo='*' --enablerepo='centos-sclo-rh'
At this point, python27 is available so we can install the mgridmsg3 package.
3.1.3.2. Installing the MGRID Messaging SDK package¶
$ yum install mgridmsg3
...
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
mgridmsg3 noarch 3.0.4-3 mgrid_mgrid3 7.2 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-16.el6 base 3.7 M
gcc x86_64 4.4.7-16.el6 base 10 M
glibc-devel x86_64 2.12-1.166.el6_7.3 updates 986 k
glibc-headers x86_64 2.12-1.166.el6_7.3 updates 615 k
iso-codes noarch 3.16-2.el6 base 2.4 M
kernel-headers x86_64 2.6.32-573.12.1.el6 updates 3.9 M
libgcrypt-devel x86_64 1.4.5-11.el6_4 base 118 k
libgomp x86_64 4.4.7-16.el6 base 134 k
libgpg-error-devel x86_64 1.7-4.el6 base 14 k
libxml2-devel x86_64 2.7.6-20.el6_7.1 updates 1.1 M
libxslt-devel x86_64 1.1.26-2.el6_3.1 base 561 k
mpfr x86_64 2.4.1-6.el6 base 157 k
perl x86_64 4:5.10.1-141.el6_7.1 updates 10 M
perl-Module-Pluggable x86_64 1:3.90-141.el6_7.1 updates 40 k
perl-Pod-Escapes x86_64 1:1.04-141.el6_7.1 updates 33 k
perl-Pod-Simple x86_64 1:3.13-141.el6_7.1 updates 213 k
perl-libs x86_64 4:5.10.1-141.el6_7.1 updates 579 k
perl-version x86_64 3:0.77-141.el6_7.1 updates 52 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
python27-python x86_64 2.7.8-3.el6 centos-sclo-rh 80 k
python27-python-devel x86_64 2.7.8-3.el6 centos-sclo-rh 386 k
python27-python-libs x86_64 2.7.8-3.el6 centos-sclo-rh 5.6 M
python27-python-pip noarch 1.5.6-5.el6 centos-sclo-rh 1.4 M
python27-python-setuptools noarch 0.9.8-3.el6 centos-sclo-rh 423 k
python27-python-virtualenv noarch 1.10.1-2.sc1.el6 centos-sclo-rh 1.4 M
python27-runtime x86_64 1.1-17.el6 centos-sclo-rh 1.0 M
redhat-rpm-config noarch 9.0.3-44.el6.centos base 59 k
scl-utils x86_64 20120927-27.el6_6 base 22 k
scl-utils-build x86_64 20120927-27.el6_6 base 17 k
xml-common noarch 0.6.3-33.el6 base 18 k
zlib-devel x86_64 1.2.3-29.el6 base 44 k
Updating for dependencies:
glibc x86_64 2.12-1.166.el6_7.3 updates 3.8 M
glibc-common x86_64 2.12-1.166.el6_7.3 updates 14 M
libxml2 x86_64 2.7.6-20.el6_7.1 updates 803 k
Transaction Summary
==============================================================================================================
Install 33 Package(s)
Upgrade 3 Package(s)
Total download size: 73 M
Is this ok [y/N]: y
...
Complete!
Note that on first access of the SCL repository, the gpg key must be accepted.
Next, it is necessary to setup a python2.7 virtual container in the /opt/mgrid/messaging-3 directory, and install the
python packages that are required by the Messaging Toolkit listed in requirements.txt
.
For installation of psychopg2, we must ensure that the PostgreSQL pg_config
executable can be found in
the PATH, in this example the path for PostgreSQL 9.5 from http://yum.postgresql.org is used.
$ sudo echo /opt/rh/python27/root/usr/lib64 > /etc/ld.so.conf.d/scl-python27.conf
$ sudo ldconfig
$ /opt/rh/python27/root/usr/bin/virtualenv-2.7 /opt/mgrid/messaging3/pyenv
$ source /opt/mgrid/messaging3/pyenv/bin/activate
$ sudo PATH=/usr/pgsql-9.5/bin:$PATH pip install -r /opt/mgrid/messaging3/requirements.txt
...
Successfully installed cython lxml nose psycopg2
Cleaning up...
3.1.4. Enterprise Linux 7¶
To install on EL7, we first need the EPEL repository, for python-pip
.
$ sudo yum install -y epel-release
Next we can install the mgridmsg3 package.
$ sudo yum install mgridmsg3
...
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
mgridmsg3 noarch 3.0.4-3 mgrid_mgrid3 7.2 M
Installing for dependencies:
cpp x86_64 4.8.5-4.el7 base 5.9 M
gcc x86_64 4.8.5-4.el7 base 16 M
glibc-devel x86_64 2.17-106.el7_2.1 updates 1.0 M
glibc-headers x86_64 2.17-106.el7_2.1 updates 661 k
kernel-headers x86_64 3.10.0-327.3.1.el7 updates 3.2 M
libgcrypt-devel x86_64 1.5.3-12.el7_1.1 base 129 k
libgpg-error-devel x86_64 1.12-3.el7 base 16 k
libmpc x86_64 1.0.1-3.el7 base 51 k
libxml2-devel x86_64 2.9.1-6.el7_2.2 updates 1.0 M
libxslt-devel x86_64 1.1.28-5.el7 base 309 k
mpfr x86_64 3.1.1-4.el7 base 203 k
python-backports x86_64 1.0-8.el7 base 5.8 k
python-backports-ssl_match_hostname noarch 3.4.0.2-4.el7 base 12 k
python-devel x86_64 2.7.5-34.el7 base 391 k
python-pip noarch 7.1.0-1.el7 epel 1.5 M
python-setuptools noarch 0.9.8-4.el7 base 396 k
xz-devel x86_64 5.1.2-12alpha.el7 base 44 k
zlib-devel x86_64 1.2.7-15.el7 base 50 k
Updating for dependencies:
glibc x86_64 2.17-106.el7_2.1 updates 3.6 M
glibc-common x86_64 2.17-106.el7_2.1 updates 11 M
libgcc x86_64 4.8.5-4.el7 base 95 k
libgomp x86_64 4.8.5-4.el7 base 130 k
libxml2 x86_64 2.9.1-6.el7_2.2 updates 666 k
python x86_64 2.7.5-34.el7 base 88 k
python-libs x86_64 2.7.5-34.el7 base 5.6 M
xz x86_64 5.1.2-12alpha.el7 base 200 k
xz-libs x86_64 5.1.2-12alpha.el7 base 102 k
zlib x86_64 1.2.7-15.el7 base 89 k
Transaction Summary
==============================================================================================================
Install 1 Package (+18 Dependent packages)
Upgrade ( 10 Dependent packages)
Total download size: 60 M
Is this ok [y/d/N]: y
...
Complete!
Next we need to install the python packages that are required by the Messaging Toolkit listed in requirements.txt
.
For installation of psychopg2, we must ensure that the PostgreSQL pg_config
executable can be found in
the PATH, in this example the path for PostgreSQL 9.5 from http://yum.postgresql.org is used.
$ sudo PATH=/usr/pgsql-9.5/bin:$PATH pip install -r /opt/mgrid/messaging3/requirements.txt
...
Successfully installed cython lxml nose psycopg2
Cleaning up...