This is an old revision of the document!
timbrado-${__time(yyyyMMddHHmmss)}
esosvg/home
mounted at /homeesosvg/mariadb
mounted at /var/lib/mysqlesosvg/opt
mounted at /opt (only if rootvg
/opt isn't sufficient)esosvg/arc
mounted at /opt/arcesosvg/home
mounted at /home with all other locations sym-linked under /homeyum update
newterm
/etc/sudoers
to switch to NOPASSWD:
wheel group entryyum groupinstall “Fonts”
for all fonts M3_HOME
= /usr/maven
PATH
= /var/lib/jenkins/bin:/usr/maven/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
JAVA_HOME
= /usr/java
/usr/lib/python2.7/site-packages
for:jenkinsapi
six
pytz
Previously-mentioned package install via yum
installs the software
Configuration is in /etc/my.cnf
and /etc/my.cnf.d
:
datadir
attribute to where database storage is to live is advisable, to separate it from /var/lib/mysql
, which is where the socket is created/var/lib/mysql
to some other location causes permissions quirks/var/run/mariadb
is sometimes not created - to remediate:mkdir /var/run/mariadb chown mysql:mysql /var/run/mariadb chmod 775 /var/run/mariadb chmod g+s /var/run/mariadb cd /var/run/mariadb ; chcon -t var_run_t .
/var/lib/mysql
has mysqld_db_t
type, in the directory: chcon -t mysqld_db_t .
Previously-mentioned package install via yum
installs the software
Edit /etc/httpd/conf/httpd.conf
:
DocumentRoot
to suitable location, ensure location exists and resides in suitable storageOpen firewall for Apache:
firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --reload
Perform the typical systemctl enable httpd
and service httpd start
for startup
Resource Clustering InfluxDB ...
Create the file /etc/yum.repos.d/influxdb.repo
with this content:
[influxdb] name = InfluxDB Repository - RHEL $releasever baseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stable enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdb.key
… then, do a yum update
and yum install influxdb
Open firewall for InfluxDB:
firewall-cmd --permanent --zone=public --add-port=8086/tcp firewall-cmd --permanent --zone=public --add-port=8083/tcp firewall-cmd --reload
Edit /etc/influxdb/influxdb.conf
and:
[http]
section:enabled = true
bind = :8086
entry, if neededunix-socket-enabled = true
bind-socket =
value to /var/run/influxdb/influxdb.sock
[udp]
section:enabled = true
bind = :8089
entry, if needed
Ensure /var/run/influxdb
and /var/lib/influxdb
exist and are owned correctly
/var/run/influxdb
is sometimes not created - to remediate:mkdir /var/run/influxdb chown influxdb:influxdb /var/run/influxdb chmod 775 /var/run/influxdb chmod g+s /var/run/influxdb cd /var/run/influxdb ; chcon -t var_run_t .
Remember to systemctl enable influxdb
and service influxdb start
See: InfluxDB auth
Create the file /etc/yum.repos.d/grafana.repo
with this content:
[grafana] name=grafana baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
… then, do a yum update
and yum install grafana
Open firewall for Grafana:
firewall-cmd --permanent --zone=public --add-port=3000/tcp firewall-cmd --reload
Remember to systemctl enable grafana-server
and service grafana-server start
Log in (default login is admin
with password admin
) and change password, add user(s)
Install the InfluxDB datasource plugin (find in plugins section, follow instructions)
Edit /etc/grafana/grafana.ini
:
[auth.ldap] enabled = true config_file = /etc/grafana/ldap.toml allow_sign_up = true
Edit /etc/grafana/ldap.toml
:
servers.attributes
section, make sure username is set to sAMAccountName
for Active Directoryservers.group_mappings
section, group_dn should be cn=bluejay_adm,cn=Users,dc=ms,dc=ds,dc=uhc,dc=com
cn=github_users,cn=Users,dc=ms,dc=ds,dc=uhc,dc=com
“ADC21101.ms.ds.uhc.com”
“oaptbot@ms.ds.uhc.com”
'BlueJay1!
'“(sAMAccountName=%s)”
[“cn=Users,dc=ms,dc=ds,dc=uhc,dc=com”]
*
==== Jenkins Installation ====
Pull the Jenkins repository file and import its GPG key:
<code>
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm –import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
</code>
… then, do a
yum update and
yum install jenkins
If the
jenkins login isn't locked down off-server:
* Enable login for Jenkins with
usermod -s /bin/bash jenkins
* Log in as
jenkins and create SSH key with:
ssh-keygen -t rsa
Otherwise:
* Create SSH key for
jenkins from root:
ssh-keygen -f id_rsa -C “jenkins@bluejay”
Open firewall for Jenkins:<code>
firewall-cmd –permanent –zone=public –add-port=8080/tcp
firewall-cmd –reload
</code>
Remember to
systemctl enable jenkins and
service jenkins start
Log in (default login is
admin with password
admin) and change password, add user(s)
==== Maven Installation ====
Get latest maven archive, example:<code>wget http://www-eu.apache.org/dist/maven/maven-3/3.5.3/binaries/apache-maven-3.5.3-bin.tar.gz</code>
Extract to suitable location and sym-link to it (
/usr/maven or
/opt/maven)
Set environment variables in
/etc/profile.d/maven.sh:<code>
export M3_HOME=/usr/maven
export M2_HOME=${M3_HOME}
export PATH=${M3_HOME}/bin:${PATH}
</code>
… perform a
source /etc/profile.d/maven.sh to get these in current shell.
===== Bluejay LG Node =====
* Ensure central repository at
/var/www/html/pub/eptrepo/jmeter is populated, and create SSL cert
* Edit the
create-rmi-keystore.sh script, changing the validity to
99999 and run to gen cert
* Ensure cert file
rmi_keystore.jks has same ownership/permissions/seattr as other files
* On Jenkins slave, perform basic installation, update, and pkgs for: wget, htop, vim, git, and OpenJDK
* Populate /etc/hosts
* Create
bluejay login<code>groupadd -g 39092 bluejay
useradd -u 441849 -g 39092 -d /home/bluejay -s /bin/bash -c “Bluejay” -m bluejay
passwd bluejay
chage -I -1 -m 0 -M 99999 -E -1 bluejay
</code>
* Extended storage setup:<code>lvcreate -l 100%FREE -n bluejay rootvg
mkfs -t ext4 /dev/rootvg/bluejay
blkid /dev/rootvg/bluejay » /etc/fstab
vi /etc/fstab
ls -lZd /home/bluejay/.
mkdir -p ~/tmp
mv /home/bluejay/.??* ~/tmp/
chmod 755 /home/bluejay
mount /home/bluejay
chown bluejay:bluejay /home/bluejay/.
chmod 775 /home/bluejay/.
chcon -u unconfined_u -t user_home_dir_t /home/bluejay/.
mv ~/tmp/.??* /home/bluejay/</code>
* Populate
bluejay login's
~/.ssh directory:<code>cd ~bluejay ; mkdir .ssh ; cd .ssh
ssh-keygen -t rsa -f id_rsa -C bluejay@hostname
cp -a id_rsa.pub authorized_keys
chown -R bluejay:bluejay .
chcon -R -u unconfined_u -t ssh_home_t .
chmod 700 . ; chmod 600 *</code>
* Copy public key to central staging location:<code>scp ./id_rsa.pub someone@somewhere:/home/someone/dot-ssh/bluejay_host.pub</code>
* Create
jenkins login<code>groupadd -g 822 jenkins
useradd -u 990 -g 822 -d /var/lib/jenkins -s /bin/bash -c “Jenkins” jenkins
usermod -a -G bluejay jenkins
usermod -a -G jenkins bluejay
chcon -u system_u -t var_lib_t /var/lib/jenkins/.
chmod 750 /var/lib/jenkins/.</code>
* Populate
jenkins login's
~/.ssh directory:<code>cd ~jenkins ; mkdir .ssh ; cd .ssh
ssh-keygen -t rsa -f id_rsa -C jenkins@hostname
cp -a id_rsa.pub authorized_keys
chown -R jenkins:jenkins .
chcon -R -u unconfined_u -t ssh_home_t .
chmod 700 . ; chmod 600 *</code>
* Copy public key to central staging location, and make sure it gets populated into Bluejay web server's
bluejay login
~/.ssh/authorized_keys file:<code>scp ./id_rsa.pub someone@somewhere:/home/someone/dot-ssh/jenkins_host.pub</code>
* Create Jenkins agent workspace:<code>cd ~bluejay ; mkdir -p jenkins
chown bluejay:jenkins ./jenkins/.
chmod 770 ./jenkins/.
chmod g+s ./jenkins/.
chcon -u system_u -t var_lib_t ./jenkins/.
</code>
* Populate Jenkins controller's
jenkins login SSH key into
bluejay login's
authorized_keys
* Populate jenkins
known_hosts file on Jenkins host
——
====== Trivia ======
===== Optum-specific Admin Concerns =====
==== UID/GID ====
* msamud1: uid=
7301
* jenkins: uid=
990, gid=
822
* bluejay: uid=
441849, gid=
39092
* mosquito: uid=
263407, gid=
28606
* canary: uid=
783478, gid=
31708
* apache: uid=48, gid=1739
* mantis: uid=
17236, gid=
?
* wildfly: uid=
282, gid=
28202
* perfmgmt: gid=
4035
==== EPEL ====
<code>
## RHEL/CentOS 7 64-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
</code>
yum –enablerepo=epel info pkgname
yum –enablerepo=epel install pkgname
==== Re-sizing /opt ====
If
/opt happens to be an XFS filesystem, resizing can be done “live”. Otherwise, in order to unmount
/opt to manipulate it, all processes holding files open on the filesystem have to be shut down, including:
<code>
/etc/init.d/opsware-agent stop
/etc/init.d/vasd stop
service postfix stop
service dbus stop
</code>
Edit
/etc/nsswitch.conf to comment out lines with
vas4 in them, then
kill -HUP <pid-of-nss-process>
Perform the whole thing in reverse when
/opt'' is resized