<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.docking.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benrwong</id>
	<title>DISI - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.docking.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benrwong"/>
	<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Special:Contributions/Benrwong"/>
	<updated>2026-04-05T07:06:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Python&amp;diff=11895</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Python&amp;diff=11895"/>
		<updated>2019-08-16T20:02:30Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Python is probably the single most useful programming language you can learn today. Most of our new code is written in Python.  The interface to many programs we use such as [[PyMol]], [[Chimera]], [[Omega]] and [[rdkit]] are in python. There are times to swim upstream and go against the crowd, but with Python in 2014, &#039;&#039;&#039;this is not one of those times&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
There are two version streams, 2.7.x and 3.7.x.  As of February 2014, our software uses exclusively 2.7.x and will not work with 3.x.x nor with 2.5.x or earlier versions.&lt;br /&gt;
&lt;br /&gt;
Modules required:  numpy, scipy, biopython, psycopg2, MySQL-python, sh, matplotlib&lt;br /&gt;
&lt;br /&gt;
Python 2.7.6 is currently installed in nfs-soft:/mnt/nfs/python/python-2.7.6&lt;br /&gt;
Python 3.7.0 is currently installed in nfs:soft:/mnt/nfs/python/python-3.7.0&lt;br /&gt;
&lt;br /&gt;
===Installing a new version of Python onto nfs-soft for general cluster usage===&lt;br /&gt;
&lt;br /&gt;
The below commands were used to install the latest version of Python onto nfs-soft.  &lt;br /&gt;
&lt;br /&gt;
Note #1:  in command 5, the --prefix option notes that which directory to install the Python files.  This is necessary because otherwise, Python will get installed in /usr/local/bin and not in an nfs export directory where it can be accessed by other hosts in the cluster. &amp;lt;br /&amp;gt;&lt;br /&gt;
Note #2: In command 6, use &#039;make altinstall&#039; instead of &#039;make install&#039;.  This prevents the new installation from overwriting the system installation of Python which is crucial for basic processes (the package manager, yum, needs the original installation of Python to be unchanged) &lt;br /&gt;
&lt;br /&gt;
 1) [s_bwong1@bet ~]$ cd /export/soft/python/build&lt;br /&gt;
 2) [s_bwong1@bet build]$ sudo wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz&lt;br /&gt;
 3) [s_bwong1@bet build]$ sudo unxz Python-3.7.0.tar.xz&lt;br /&gt;
 4) [s_bwong1@bet build]$ sudo tar -xvf Python-3.7.0.tar&lt;br /&gt;
 5) [s_bwong1@bet build]$ #sudo ./configure --prefix=/export/soft/python/python-3.7.0 --enable-optimizations --with-ensurepip=install&lt;br /&gt;
 6) [s_bwong1@bet build]$ sudo make &amp;amp;&amp;amp; sudo make altinstall&lt;br /&gt;
&lt;br /&gt;
===Environment Variables for using Python3.7===&lt;br /&gt;
&lt;br /&gt;
.bash_profile&lt;br /&gt;
  export PATH=&amp;quot;/nfs/soft/python/python-3.7.0/bin:$PATH&amp;quot;&lt;br /&gt;
  export LD_LIBRARY_PATH=/mnt/nfs/soft/openssl/openssl-1.1.1a/lib/&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Free]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11873</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11873"/>
		<updated>2019-07-16T20:54:05Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting: Ligprep fails &amp;quot;FATAL: Error: in replying to &amp;#039;JPROXYPORT&amp;#039;&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
If it does not look like this, let the sysadmin know!  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Job Fails to Submit &amp;amp; Status is &#039;Fizzled Out&#039;===&lt;br /&gt;
A job that fails to submit successfully from the desktop is caused by a lack of passwordless SSH.  You need to have an ssh-key enabled between your desktop and the SGE head nodes (gimel/gimel2).  Please see: http://wiki.docking.org/index.php/SSH_public_key_authentication for the Linux section and set the remote_host as either gimel or gimel2.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.&lt;br /&gt;
RESOLVED: http://wiki.docking.org/index.php/SELinux_notes&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep fails &amp;quot;FATAL: Error: in replying to &#039;JPROXYPORT&#039;&amp;quot;===&lt;br /&gt;
This is related to a firewall issue.  The complete error message looks like this: &lt;br /&gt;
&lt;br /&gt;
 FATAL: Error: in replying to &#039;JPROXYPORT &amp;lt;submit host&amp;gt; &amp;lt;user&amp;gt; &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&#039; - dial tcp gimel2:32971: connect: no route to host&lt;br /&gt;
&lt;br /&gt;
Schrodinger is trying to connect to the submission host via port 32971.  We did not set the JPROXYPORT in the schrodinger.hosts file so it seems to pick a random port along the 32000 and above.  On gimel, we&#039;ve previously had these ports opened for web applications.  After I opened up the same ports on gimel2&#039;s iptables rules, then it appears fine.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep&#039;s multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a compute node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes under six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 ### (name your key &#039;compute_to_gimel&#039;) ###&lt;br /&gt;
 $ cat ~/.ssh/compute_to_gimel.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11872</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11872"/>
		<updated>2019-07-16T20:53:50Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
If it does not look like this, let the sysadmin know!  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Job Fails to Submit &amp;amp; Status is &#039;Fizzled Out&#039;===&lt;br /&gt;
A job that fails to submit successfully from the desktop is caused by a lack of passwordless SSH.  You need to have an ssh-key enabled between your desktop and the SGE head nodes (gimel/gimel2).  Please see: http://wiki.docking.org/index.php/SSH_public_key_authentication for the Linux section and set the remote_host as either gimel or gimel2.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.&lt;br /&gt;
RESOLVED: http://wiki.docking.org/index.php/SELinux_notes&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep fails &amp;quot;FATAL: Error: in replying to &#039;JPROXYPORT&#039;&amp;quot;===&lt;br /&gt;
This is related to a firewall issue.  The complete error message looks like this: &lt;br /&gt;
&lt;br /&gt;
FATAL: Error: in replying to &#039;JPROXYPORT &amp;lt;submit host&amp;gt; &amp;lt;user&amp;gt; &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&#039; - dial tcp gimel2:32971: connect: no route to host&lt;br /&gt;
&lt;br /&gt;
Schrodinger is trying to connect to the submission host via port 32971.  We did not set the JPROXYPORT in the schrodinger.hosts file so it seems to pick a random port along the 32000 and above.  On gimel, we&#039;ve previously had these ports opened for web applications.  After I opened up the same ports on gimel2&#039;s iptables rules, then it appears fine.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep&#039;s multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a compute node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes under six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 ### (name your key &#039;compute_to_gimel&#039;) ###&lt;br /&gt;
 $ cat ~/.ssh/compute_to_gimel.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11862</id>
		<title>Switch-5-1</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11862"/>
		<updated>2019-07-13T03:44:23Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;switch-5-1 is a Netgear 10Gbe managed switch.  The model is ProSafe XS716T.  This switch is unlike many of the other switches in that you cannot ssh/telnet into it.  You must tunnel into the private network and access it via it&#039;s IP address: 10.20.109.33.  &lt;br /&gt;
&lt;br /&gt;
Currently, the switch only has a single gigabit link between it and switch-4-1.  I hope to purchase some GBICs/SFPs and then link it with RACK0.&lt;br /&gt;
&lt;br /&gt;
===Quick Starting a Fresh NetGear Switch Model XS716T===&lt;br /&gt;
By default, the XS716T will have a starting IP address of 192.168.0.239 and a subnet mask of 255.255.255.0.  &lt;br /&gt;
I connected to this switch by changing my local Windows 10 laptop&#039;s network adapter IP Address to 192.168.0.240 and my subnet to 255.255.255.0.  This allows my laptop to be in the same LAN as the network switch.  &lt;br /&gt;
Then I downloaded Netgear&#039;s Smart Control Center: https://www.netgear.com/support/product/Smart%20Control%20Center%20(SCC).aspx#download  &lt;br /&gt;
&lt;br /&gt;
Once I connected to any port on the switch via ethernet cable to my laptop, I was able to access the switch&#039;s configuration page with a web browser by putting the switch&#039;s default IP address 192.168.0.239 into the URL entry.  From here, I was able to assign the proper static configurations.&lt;br /&gt;
&lt;br /&gt;
Note: the &#039;Apply&#039; button on the top right of the switch configuration screen saves the configuration.  Be really careful not to save a bad configuration!  The &#039;Apply&#039; button doesn&#039;t really give a good indication the settings have been applied so only click it if you&#039;re really sure you have a configuration you want.  If you&#039;re not sure, then press cancel.  &lt;br /&gt;
&lt;br /&gt;
The default network configuration is: &lt;br /&gt;
 IP Address: 192.168.0.139&lt;br /&gt;
 Subnet Mask: 255.255.255.0&lt;br /&gt;
 Gateway: 192.168.0.254&lt;br /&gt;
&lt;br /&gt;
I want this switch to change to the IP address that&#039;s within the cluster network:&lt;br /&gt;
 IP Address: 10.20.109.33&lt;br /&gt;
 Subnet Mask: 255.255.0.0&lt;br /&gt;
 Gateway: 10.20.1.1&lt;br /&gt;
&lt;br /&gt;
1) Create VLANs for BKS private network and UCSF Public network.  Private network is VLAN 200.  Public is VLAN 100.  &amp;lt;br /&amp;gt;&lt;br /&gt;
2) IP connection can only be made through a port that is part of the management VLAN.  &amp;lt;br /&amp;gt;&lt;br /&gt;
By default, all ports are VLAN 1 and PVID 1 (Port VLAN ID).  Since our cluster&#039;s private network VLAN ID is 200, we have to change all ports to VLAN 200 EXCEPT for the port you are currently using to connect with your computer.  Keep that port set to the default of VLAN 1.&amp;lt;br /&amp;gt;&lt;br /&gt;
3) Change the Management VLAN from VLAN 1 to VLAN 200 and change the switch&#039;s IP address from the default of 192.168.0.139 to the BKS Private Network IP Address of your choosing.  &amp;lt;br /&amp;gt;&lt;br /&gt;
4) Change your computer&#039;s IP address to a BKS private network IP address so it is within the same subnet as the switch.  The interacting computer should have a private network address like 10.20.*.*/16.  Use this to connect to the switch&#039;s new, non-default, IP Address.&amp;lt;br /&amp;gt;&lt;br /&gt;
5) Change your ethernet cable&#039;s connection to a different port.  Your ethernet cable is probably still connected to the port that is in VLAN 1.  Switch to a port that is VLAN 200.  Since in the previous step, we changed every port to VLAN 200, you can basically switch to any other port. &amp;lt;br /&amp;gt; &lt;br /&gt;
5) As you login to the switch via the new IP address, use this moment to change the one lonely port that is VLAN 1 and make it VLAN 200 like all the other ports.  You now basically have a dumb switch that can be a part of the cluster! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further configuration will involve making LACP/trunks between this switch and other switches.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have accidentally broken this configuration many times.  Here&#039;s some of the actions I did:&lt;br /&gt;
- Changing all the port PVIDs (Port VLAN ID) from 1 to 200 without having the necessary VLANs setup.&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11861</id>
		<title>Switch-5-1</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11861"/>
		<updated>2019-07-13T03:43:49Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Detailed steps on quick starting a Netgear Switch model XS716T&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;switch-5-1 is a Netgear 10Gbe managed switch.  The model is ProSafe XS716T.  This switch is unlike many of the other switches in that you cannot ssh/telnet into it.  You must tunnel into the private network and access it via it&#039;s IP address: 10.20.109.33.  &lt;br /&gt;
&lt;br /&gt;
Currently, the switch only has a single gigabit link between it and switch-4-1.  I hope to purchase some GBICs/SFPs and then link it with RACK0.&lt;br /&gt;
&lt;br /&gt;
===Quick Starting a Fresh NetGear Switch Model XS716T===&lt;br /&gt;
By default, the XS716T will have a starting IP address of 192.168.0.239 and a subnet mask of 255.255.255.0.  &lt;br /&gt;
I connected to this switch by changing my local Windows 10 laptop&#039;s network adapter IP Address to 192.168.0.240 and my subnet to 255.255.255.0.  This allows my laptop to be in the same LAN as the network switch.  &lt;br /&gt;
Then I downloaded Netgear&#039;s Smart Control Center: https://www.netgear.com/support/product/Smart%20Control%20Center%20(SCC).aspx#download  &lt;br /&gt;
&lt;br /&gt;
Once I connected to any port on the switch via ethernet cable to my laptop, I was able to access the switch&#039;s configuration page with a web browser by putting the switch&#039;s default IP address 192.168.0.239 into the URL entry.  From here, I was able to assign the proper static configurations.&lt;br /&gt;
&lt;br /&gt;
Note: the &#039;Apply&#039; button on the top right of the switch configuration screen saves the configuration.  Be really careful not to save a bad configuration!  The &#039;Apply&#039; button doesn&#039;t really give a good indication the settings have been applied so only click it if you&#039;re really sure you have a configuration you want.  If you&#039;re not sure, then press cancel.  &lt;br /&gt;
&lt;br /&gt;
The default network configuration is: &lt;br /&gt;
 IP Address: 192.168.0.139&lt;br /&gt;
 Subnet Mask: 255.255.255.0&lt;br /&gt;
 Gateway: 192.168.0.254&lt;br /&gt;
&lt;br /&gt;
I want this switch to change to the IP address that&#039;s within the cluster network:&lt;br /&gt;
 IP Address: 10.20.109.33&lt;br /&gt;
 Subnet Mask: 255.255.0.0&lt;br /&gt;
 Gateway: 10.20.1.1&lt;br /&gt;
&lt;br /&gt;
1) Create VLANs for BKS private network and UCSF Public network.  Private network is VLAN 200.  Public is VLAN 100.  &lt;br /&gt;
2) IP connection can only be made through a port that is part of the management VLAN.  &lt;br /&gt;
By default, all ports are VLAN 1 and PVID 1 (Port VLAN ID).  Since our cluster&#039;s private network VLAN ID is 200, we have to change all ports to VLAN 200 EXCEPT for the port you are currently using to connect with your computer.  Keep that port set to the default of VLAN 1.&lt;br /&gt;
3) Change the Management VLAN from VLAN 1 to VLAN 200 and change the switch&#039;s IP address from the default of 192.168.0.139 to the BKS Private Network IP Address of your choosing.  &lt;br /&gt;
4) Change your computer&#039;s IP address to a BKS private network IP address so it is within the same subnet as the switch.  The interacting computer should have a private network address like 10.20.*.*/16.  Use this to connect to the switch&#039;s new, non-default, IP Address.&lt;br /&gt;
5) Change your ethernet cable&#039;s connection to a different port.  Your ethernet cable is probably still connected to the port that is in VLAN 1.  Switch to a port that is VLAN 200.  Since in the previous step, we changed every port to VLAN 200, you can basically switch to any other port.  &lt;br /&gt;
5) As you login to the switch via the new IP address, use this moment to change the one lonely port that is VLAN 1 and make it VLAN 200 like all the other ports.  You now basically have a dumb switch that can be a part of the cluster!&lt;br /&gt;
&lt;br /&gt;
Further configuration will involve making LACP/trunks between this switch and other switches.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have accidentally broken this configuration many times.  Here&#039;s some of the actions I did:&lt;br /&gt;
- Changing all the port PVIDs (Port VLAN ID) from 1 to 200 without having the necessary VLANs setup.&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11860</id>
		<title>Switch-5-1</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11860"/>
		<updated>2019-07-12T22:05:05Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;switch-5-1 is a Netgear 10Gbe managed switch.  The model is ProSafe XS716T.  This switch is unlike many of the other switches in that you cannot ssh/telnet into it.  You must tunnel into the private network and access it via it&#039;s IP address: 10.20.109.33.  &lt;br /&gt;
&lt;br /&gt;
Currently, the switch only has a single gigabit link between it and switch-4-1.  I hope to purchase some GBICs/SFPs and then link it with RACK0.&lt;br /&gt;
&lt;br /&gt;
===Quick Starting a fresh NetGear switch===&lt;br /&gt;
By default, the XS716T will have a starting IP address of 192.168.0.239 and a subnet mask of 255.255.255.0.  &lt;br /&gt;
I connected to this switch by changing my local Windows 10 laptop&#039;s network adapter IP Address to 192.168.0.240 and my subnet to 255.255.255.0.  This allows my laptop to be in the same LAN as the network switch.  &lt;br /&gt;
Then I downloaded Netgear&#039;s Smart Control Center: https://www.netgear.com/support/product/Smart%20Control%20Center%20(SCC).aspx#download  &lt;br /&gt;
&lt;br /&gt;
Once I connected to any port on the switch via ethernet cable to my laptop, I was able to access the switch&#039;s configuration page with a web browser by putting the switch&#039;s default IP address 192.168.0.239 into the URL entry.  From here, I was able to assign the proper static configurations.&lt;br /&gt;
&lt;br /&gt;
Note: the &#039;Apply&#039; button on the top right of the switch configuration screen saves the configuration.  Be really careful not to save a bad configuration!  The &#039;Apply&#039; button doesn&#039;t really give a good indication the settings have been applied so only click it if you&#039;re really sure.  &lt;br /&gt;
&lt;br /&gt;
The default network configuration is: &lt;br /&gt;
IP Address: 192.168.0.139&lt;br /&gt;
Subnet Mask: 255.255.255.0&lt;br /&gt;
Gateway: 192.168.0.254&lt;br /&gt;
&lt;br /&gt;
I want this switch to change to the IP address that&#039;s within the cluster network:&lt;br /&gt;
IP Address: 10.20.109.33&lt;br /&gt;
Subnet Mask: 255.255.0.0&lt;br /&gt;
Gateway: 10.20.1.1&lt;br /&gt;
&lt;br /&gt;
1) Create VLANs for BKS private network and UCSF Public network.  Private network is VLAN 200.  Public is VLAN 100.  &lt;br /&gt;
2) &lt;br /&gt;
&lt;br /&gt;
I have accidentally broken this configuration many times.  Here&#039;s some of the actions I did:&lt;br /&gt;
- Changing all the port PVIDs (Port VLAN ID) from 1 to 200 without having the necessary VLANs setup.&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11852</id>
		<title>Switch-5-1</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Switch-5-1&amp;diff=11852"/>
		<updated>2019-07-12T21:24:51Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Quick Starting a fresh NetGear switch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;switch-5-1 is a Netgear 10Gbe managed switch.  The model is ProSafe XS716T.  This switch is unlike many of the other switches in that you cannot ssh/telnet into it.  You must tunnel into the private network and access it via it&#039;s IP address: 10.20.109.33.  &lt;br /&gt;
&lt;br /&gt;
Currently, the switch only has a single gigabit link between it and switch-4-1.  I hope to purchase some GBICs/SFPs and then link it with RACK0.&lt;br /&gt;
&lt;br /&gt;
===Quick Starting a fresh NetGear switch===&lt;br /&gt;
By default, the XS716T will have a starting IP address of 192.168.0.239 and a subnet mask of 255.255.255.0.  &lt;br /&gt;
I connected to this switch by changing my local Windows 10 laptop&#039;s network adapter IP Address to 192.168.0.240 and my subnet to 255.255.255.0.  This allows my laptop to be in the same LAN as the network switch.  &lt;br /&gt;
Then I downloaded Netgear&#039;s Smart Control Center: https://www.netgear.com/support/product/Smart%20Control%20Center%20(SCC).aspx#download  &lt;br /&gt;
&lt;br /&gt;
Once I connected to any port on the switch via ethernet cable to my laptop, I was able to access the switch&#039;s configuration page with a web browser by putting the switch&#039;s default IP address 192.168.0.239 into the URL entry.  From here, I was able to assign the proper static configurations.&lt;br /&gt;
&lt;br /&gt;
Note: the &#039;Apply&#039; button on the top right of the switch configuration screen saves the configuration.  Be really careful not to save a bad configuration!&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Reformatting_a_USB_drive&amp;diff=11839</id>
		<title>Reformatting a USB drive</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Reformatting_a_USB_drive&amp;diff=11839"/>
		<updated>2019-07-09T23:23:27Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When inserted into a USB slot, USB drives, should show up in the output of /mount or in /proc/mounts.  &amp;lt;br /&amp;gt;&lt;br /&gt;
The filesystem type will show up also in this output.  USB drives tend to be formatted for Windows (ntfs via fuseblk) &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to reformat a USB drive (reformatting involves deleting all pre-existing data on the drive), firstly you should become root then issue a umount command on the disk device (typically under /dev/sdb1 if you&#039;re on a regular desktop with one drive, but take care to identify the USB drive on a multi-HDD machine) but leave the USB drive physically attached to the computer.  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new filesystem on the USB device with mkfs while specifying the filesystem type with option -t and the former mount point as an argument.  Below is an example of mkfs with a filesystem type of ext4.  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 [root@band media]# mkfs -t ext4 /dev/sdb1&lt;br /&gt;
 mke2fs 1.41.12 (17-May-2010)&lt;br /&gt;
 Filesystem label=&lt;br /&gt;
 OS type: Linux&lt;br /&gt;
 Block size=4096 (log=2)&lt;br /&gt;
 Fragment size=4096 (log=2)&lt;br /&gt;
 Stride=0 blocks, Stripe width=0 blocks&lt;br /&gt;
 265056 inodes, 1058560 blocks&lt;br /&gt;
 52928 blocks (5.00%) reserved for the super user&lt;br /&gt;
 First data block=0&lt;br /&gt;
 Maximum filesystem blocks=1086324736&lt;br /&gt;
 33 block groups&lt;br /&gt;
 32768 blocks per group, 32768 fragments per group&lt;br /&gt;
 8032 inodes per group&lt;br /&gt;
 Superblock backups stored on blocks: &lt;br /&gt;
 32768, 98304, 163840, 229376, 294912, 819200, 884736&lt;br /&gt;
 &lt;br /&gt;
 Writing inode tables: done                            &lt;br /&gt;
 Creating journal (32768 blocks): done&lt;br /&gt;
 Writing superblocks and filesystem accounting information: done&lt;br /&gt;
 &lt;br /&gt;
 This filesystem will be automatically checked every 39 mounts or&lt;br /&gt;
 180 days, whichever comes first.  Use tune2fs -c or -i to override.&lt;br /&gt;
&lt;br /&gt;
After new filesystem has been created, remove the USB drive then plug it back in again.  You should be able to view the new filesystem.  Check output of mount and /proc/mounts again.  &lt;br /&gt;
&lt;br /&gt;
==To create a bootable USB drive==&lt;br /&gt;
For this example, we&#039;ll create a bootable CentOS USB drive.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Firstly, download the .iso file of the OS you want to download.  Change directories to the folder that contains your desired OS .iso.  &lt;br /&gt;
 [root@band bwong1]# cd Downloads&lt;br /&gt;
 [root@band Downloads]# ls&lt;br /&gt;
 Benjamin_Wong_RHCSA.pdf&lt;br /&gt;
 bwong1@mk-1-a.compbio.ucsf.edu&lt;br /&gt;
 ccp4-7.0-shelx-linux-x86_64.tar.bz2&lt;br /&gt;
 &#039;&#039;&#039;CentOS-6.8-x86_64-LiveCD.iso&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Secondly, plug in a reformatted USB drive.  Use the mount command to see the device name of your USB drive.     &lt;br /&gt;
 [root@band Downloads]# mount&lt;br /&gt;
 ***&lt;br /&gt;
 /dev/sdc on /media/9fff3ec2-8853-4c6a-a6f0-8a1b2491fb80 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
&lt;br /&gt;
Unmount your usb drive prior to writing the ISO onto it.&lt;br /&gt;
 [root@band Downloads]# umount /dev/sdc&lt;br /&gt;
&lt;br /&gt;
Now, write the .ISO file into the USB drive with the dd command.  if stands for input file and of stands for output file.  Send your output file to the USB drive&#039;s location.&lt;br /&gt;
 [root@band Downloads]# dd if=CentOS-6.8-x86_64-LiveCD.iso of=/dev/sdc bs=1M&lt;br /&gt;
 702+0 records in&lt;br /&gt;
 702+0 records out&lt;br /&gt;
 736100352 bytes (736 MB) copied, 132.887 s, 5.5 MB/s&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Wynton_%26_BKS&amp;diff=11838</id>
		<title>Wynton &amp; BKS</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Wynton_%26_BKS&amp;diff=11838"/>
		<updated>2019-07-08T20:32:47Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* File Servers Exported to Wynton */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://wynton.ucsf.edu/&lt;br /&gt;
&lt;br /&gt;
===File Servers Exported to Wynton===&lt;br /&gt;
&lt;br /&gt;
File servers accessible over automount.  &lt;br /&gt;
 # While on wynton, &lt;br /&gt;
 ls /bks/[NFS name]&lt;br /&gt;
 Eg: ls /bks/ex9/work&lt;br /&gt;
&lt;br /&gt;
BKS NFS Servers available on Wynton&lt;br /&gt;
 bet 172.26.28.32      bet-wyn.wynton.ucsf.edu         bet-wyn:/work&lt;br /&gt;
 tsadi 172.26.28.33    tsadi-wyn.wynton.ucsf.edu       tsadi-wyn:/ex1,/ex2,/ex3,/ex4&lt;br /&gt;
 lamed 172.26.28.34    lamed-wyn.wynton.ucsf.edu       lamed-wyn:/ex5,/ex6,/ex7,/ex8&lt;br /&gt;
 qof   172.26.28.35    qof-wyn.wynton.ucsf.edu         qof-wyn:/ex9&lt;br /&gt;
&lt;br /&gt;
===Adding a file server to Wynton===&lt;br /&gt;
Connect an open network port on host to Wynton&#039;s network.  Ask JL for IP-address and ports to connect to in BH101.  &lt;br /&gt;
Create network interface in /etc/sysconfig/network-scripts for new interface.  Populate with the following:&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;/etc/sysconfig/network-scripts/ifcfg-&amp;lt;interface name&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
 TYPE=Ethernet&lt;br /&gt;
 DEVICE=&amp;lt;interface name&amp;gt;&lt;br /&gt;
 BOOTPROTO=static&lt;br /&gt;
 HWADDR=&amp;lt;MAC Address&amp;gt; &lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
 IPADDR=&amp;lt;Wynton IP&amp;gt;&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 DHCP_HOSTNAME=&amp;lt;wynton network hostname&amp;gt;.wynton.ucsf.edu&lt;br /&gt;
 HOSTNAME=&amp;lt;wynton network hostname&amp;gt;.wynton.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create a static route to wynton&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/etc/sysconfig/network-scripts/route-&amp;lt;interface name&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
 172.26.0.0/16 via 172.26.28.1 dev &amp;lt;interface name&amp;gt; &lt;br /&gt;
&lt;br /&gt;
See lamed for example.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/exports.  Backup the configuration just in case of messups.  Export the NFS files to 172.26.0.0/16 with (rw,sync,fsid=&amp;lt;insert fsid&amp;gt;).&lt;br /&gt;
Issue command: &lt;br /&gt;
 exportfs -a&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
CentOS 6 NFS servers are showing user/group ownerships as nobody:nobody.  This problem doesn&#039;t happen on the CentOS 7 machines.  They are mounted NFSv4.0.  &lt;br /&gt;
&lt;br /&gt;
This is due to /sys/module/nfsd/parameters/nfs4_disable_idmapping.  To address: &lt;br /&gt;
&lt;br /&gt;
On the NFS Server exporting to Wynton: &lt;br /&gt;
  echo &#039;Y&#039; &amp;gt; /sys/module/nfsd/parameters/nfs4_disable_idmapping &lt;br /&gt;
  exportfs -a&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11837</id>
		<title>PuppetTricks</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11837"/>
		<updated>2019-07-08T19:30:26Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Creating a new Puppet Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of tricks and tips for using Puppet to administer systems.&lt;br /&gt;
&lt;br /&gt;
The names &#039;&#039;&#039;master&#039;&#039;&#039;, &#039;&#039;&#039;puppetmaster&#039;&#039;&#039;, and &#039;&#039;&#039;foreman&#039;&#039;&#039; all refer to (at the time of writing this) alpha. The name &#039;&#039;&#039;client&#039;&#039;&#039; refers to any machine that is maintained by puppet.&lt;br /&gt;
&lt;br /&gt;
==Creating a new Puppet Module==&lt;br /&gt;
Puppet code consists of Puppet modules.  Modules are self contained bundles of code and data that exist to manage a particular technology.  Modules consist of classes which consist of resource types. &amp;lt;br /&amp;gt;&lt;br /&gt;
Our puppet modules exist in two places:  /opt/bks/src/cluster/puppet/modules &amp;amp; /etc/puppet/modules &amp;lt;br /&amp;gt;&lt;br /&gt;
We write new Puppet module configs in the /opt directory but when we build the packages, they go to /etc/puppet/modules.  Any changes to Puppet code should occur in the /opt directory then built later.  &lt;br /&gt;
&lt;br /&gt;
To generate a new Puppet module, we first go to /opt/bks/src/cluster/puppet/modules.  Decide on what you want to call it.  Notice in this directory, everything is called bks-&amp;lt;module name&amp;gt;.  This is because Puppet wants you to put the author&#039;s name first prior to the module name.  You should name your module the same way with &amp;quot;bks-&amp;quot; in front of the module name.  &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me creating a new module: bks-selinux&lt;br /&gt;
&lt;br /&gt;
1) Generate a new Puppet module.  The generate command produces a basic skeleton of a typical Puppet module structure.  We&#039;ll need to edit it to our liking.  &lt;br /&gt;
 [root@alpha ~]# &#039;&#039;&#039;cd /opt/bks/src/cluster/puppet/modules/&#039;&#039;&#039;&lt;br /&gt;
 [root@alpha modules]# puppet module generate bks-selinux&lt;br /&gt;
 Generating module at /share/utils/bks/src/cluster/puppet/modules/bks-selinux&lt;br /&gt;
 bks-selinux&lt;br /&gt;
 bks-selinux/spec&lt;br /&gt;
 bks-selinux/spec/spec_helper.rb&lt;br /&gt;
 bks-selinux/manifests&lt;br /&gt;
 bks-selinux/manifests/init.pp&lt;br /&gt;
 bks-selinux/tests&lt;br /&gt;
 bks-selinux/tests/init.pp&lt;br /&gt;
 bks-selinux/Modulefile&lt;br /&gt;
 bks-selinux/README&lt;br /&gt;
&lt;br /&gt;
2) We want to copy a SELinux configuration file to the destination nodes.  I made this configuration file, sgehald.pp, and it must be copied to other nodes.  First, it should be copied to the module&#039;s directory. &lt;br /&gt;
I make a directory in the bks-selinux directory named files then copy the SELinux config file there. &lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;mkdir files&#039;&#039;&#039;&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;cp /tmp/sgehald.pp files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Edit the module&#039;s manifests/init.pp with desired configuration information.  Here I am telling Puppet to copy a SELinux .pp file from the Puppetmaster to destination nodes with proper ownership and permissions.  Afterwards, I tell Puppet to ensure that the sgehald selmodule is loaded.  The require line means that the selmodule command will not run unless the sgehald.pp file exists on the destination machine already at location /usr/share/selinux/targeted/sgehald.pp. &lt;br /&gt;
Note that puppet:///selinux/sgehald.pp refers to sgehald.pp which exists inside the file directory of puppet module, bks-selinux,.  &lt;br /&gt;
 class selinux {&lt;br /&gt;
  file {&#039;/usr/share/selinux/targeted/sgehald.pp&#039;:&lt;br /&gt;
    ensure =&amp;gt; present,&lt;br /&gt;
    owner  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    group  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    mode   =&amp;gt; 644,&lt;br /&gt;
    source =&amp;gt; &#039;puppet:///selinux/sgehald.pp&#039;,&lt;br /&gt;
  }&lt;br /&gt;
  selmodule {&#039;sgehald&#039;:&lt;br /&gt;
    ensure      =&amp;gt; present,&lt;br /&gt;
    syncversion =&amp;gt; true,&lt;br /&gt;
    require     =&amp;gt; File [&#039;/usr/share/selinux/targeted/sgehald.pp&#039;],&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
4) After we&#039;re finished editing the init.pp file, we should verify the contents are syntactically correct.  Use puppet parser validate against the init.pp file to verify this.  If you get no output, Puppet thinks your init.pp file is fine&lt;br /&gt;
 [root@alpha manifests]# puppet parser validate init.pp&lt;br /&gt;
&lt;br /&gt;
5) Now that init.pp file is fine, it&#039;s time to build the module.  While in the module directory, issue the following command to create a new Puppet package: &lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module build .&#039;&#039;&#039; &lt;br /&gt;
 Building /share/utils/bks/src/cluster/puppet/modules/bks-selinux for release&lt;br /&gt;
 pkg/bks-selinux-0.0.1.tar.gz&lt;br /&gt;
 &lt;br /&gt;
6) The previous command created a package but it is not yet usable in production.  To make it usable, do a puppet module install commmand with the -f flag. &lt;br /&gt;
(why do we use an -f flag?  I tried the same command without and with the -f flag and you should see.  It looks for this module on forge.puppetlabs.com first but since we are building locally, we force the build)&lt;br /&gt;
&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Downloading from http://forge.puppetlabs.com ...&lt;br /&gt;
 Error: Could not find release information for this module (bks/selinux) (HTTP 410)&lt;br /&gt;
 Error: Try &#039;puppet help module install&#039; for usage&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install -f pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Installing -- do not interrupt ...&lt;br /&gt;
 /etc/puppet/modules&lt;br /&gt;
 └── bks-selinux (v0.0.1)&lt;br /&gt;
&lt;br /&gt;
7) After running a puppet module install, check /etc/puppet/modules.  There should be an selinux module directory now.  &lt;br /&gt;
 [root@alpha manifests]# &#039;&#039;&#039;ls -lhd /etc/puppet/modules/selinux/&#039;&#039;&#039;&lt;br /&gt;
 drwxr-xr-x. 6 root root 4.0K Jul  1 13:50 /etc/puppet/modules/selinux/&lt;br /&gt;
&lt;br /&gt;
8) To put this Puppet module into production, we must go to foreman.ucsf.bkslab.org.  Then, Configure -&amp;gt; Puppet Classes -&amp;gt; Import from puppetmaster.cluster.ucsf.bkslab.org.  Select both Production and Development environments and say yes.  From there, you have to figure which nodes need this particular Puppet module.  Since this SELinux fix existed to avoid GPU job failures, I activated the Puppet Module on cluster/noautogpu host group.  Then, all nodes now have the proper SELinux permission to run GPU jobs!&lt;br /&gt;
&lt;br /&gt;
== Regenerating a Certificate ==&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
    $ sudo service puppet stop&lt;br /&gt;
    $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~&lt;br /&gt;
    $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60&lt;br /&gt;
&lt;br /&gt;
=== On Server (within 60 seconds) ===&lt;br /&gt;
    $ sudo puppet cert clean &amp;lt;client hostname&amp;gt;&lt;br /&gt;
    $ sudo puppet cert sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
       &#039;&#039;&#039;OR&#039;&#039;&#039; if you wish to allow DNS aliases&lt;br /&gt;
    $ sudo puppet cert --allow-dns-alt-names sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note this can also be done through Foreman by going to the [https://foreman.ucsf.bkslab.org/smart_proxies/1-puppetmaster-cluster-ucsf-bkslab-org/puppetca Infrastructure -&amp;gt; Smart Proxies -&amp;gt; Puppetmaster -&amp;gt; Certificates page]&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
The previous run should finish without errors (errors are in purple). It should then be possible to run `sudo puppet agent -t` without any waiting or errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== changing mounts, dbraw ===&lt;br /&gt;
&lt;br /&gt;
 cd /opt/bks/src/cluster/puppet/modules/bks-nfs_mounts/files/dbraw&lt;br /&gt;
or edit&lt;br /&gt;
 manifests/init.pp&lt;br /&gt;
&lt;br /&gt;
Then from nfs_mounts directory&lt;br /&gt;
&lt;br /&gt;
* 1) Bump version in Modulefile&lt;br /&gt;
* 2) puppet module build .&lt;br /&gt;
* 3) puppet module install -f pkg/bks-nfs_mounts-0.0.X.tar.gz&lt;br /&gt;
* 4) proceed to standard goat sacrifice procedure&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_Wynton&amp;diff=11836</id>
		<title>Using Wynton</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_Wynton&amp;diff=11836"/>
		<updated>2019-07-05T22:37:51Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is how to use Wynton with DOCK/ZINC&lt;br /&gt;
&lt;br /&gt;
https://ucsf-hpc.github.io/wynton/status/index.html&lt;br /&gt;
&lt;br /&gt;
* 1 get an account @ https://ucsf-hpc.github.io/wynton/about/join.html&lt;br /&gt;
* 2 login&lt;br /&gt;
 $ &#039;&#039;&#039;ssh &amp;lt;username&amp;gt;@wynlog1.compbio.ucsf.edu&#039;&#039;&#039;&lt;br /&gt;
    OR&lt;br /&gt;
 $ &#039;&#039;&#039;$ ssh &amp;lt;username&amp;gt;@log2.wynton.ucsf.edu&#039;&#039;&#039;&lt;br /&gt;
* 3 here are the disks:&lt;br /&gt;
 [benwong@wynlog1 ~]$ &#039;&#039;&#039;ls -lh /bks&#039;&#039;&#039; &lt;br /&gt;
 total 93K&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 Oct  7  2018 ex1&lt;br /&gt;
 drwxr-xr-x. 10 root  root   10 Oct  7  2018 ex2&lt;br /&gt;
 drwxr-xr-x. 19 root  root   19 Oct  7  2018 ex3&lt;br /&gt;
 drwxr-xr-x.  9 root  root    9 Oct  7  2018 ex4&lt;br /&gt;
 drwxr-xr-x. 14 root  root   14 Oct  7  2018 ex5&lt;br /&gt;
 drwxr-xr-x.  9 root  root    9 Oct  7  2018 ex6&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 Jul 17  2018 ex7&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 May  3  2018 ex8&lt;br /&gt;
 drwxr-xr-x. 10 root  root   10 Jun 11 16:15 ex9&lt;br /&gt;
 drwxrwxr-x. 67 42024 1010 4.0K Mar 15 15:18 soft&lt;br /&gt;
 drwxr-xr-x. 46 root  root 4.0K Sep 17  2018 work&lt;br /&gt;
&lt;br /&gt;
NOTE: wynton uses automount.  /bks will appear empty until you specifically ls the disk you want.  ls /bks may appear blank but if you do ls /bks/soft or /bks/ex9, the disk should automatically mount when you list it.  If it&#039;s not working, then something&#039;s wrong. &lt;br /&gt;
&lt;br /&gt;
* 4 here is the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_Wynton&amp;diff=11835</id>
		<title>Using Wynton</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_Wynton&amp;diff=11835"/>
		<updated>2019-07-05T22:37:32Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is how to use Wynton with DOCK/ZINC&lt;br /&gt;
&lt;br /&gt;
https://ucsf-hpc.github.io/wynton/status/index.html&lt;br /&gt;
&lt;br /&gt;
* 1 get an account @ https://ucsf-hpc.github.io/wynton/about/join.html&lt;br /&gt;
* 2 login&lt;br /&gt;
 $ &#039;&#039;&#039;ssh &amp;lt;username&amp;gt;@wynlog1.compbio.ucsf.edu&#039;&#039;&#039;&lt;br /&gt;
    OR&lt;br /&gt;
 $ &#039;&#039;&#039;$ ssh &amp;lt;username&amp;gt;@log2.wynton.ucsf.edu&#039;&#039;&#039;&lt;br /&gt;
* 3 here are the disks:&lt;br /&gt;
 [benwong@wynlog1 ~]$ &#039;&#039;&#039;ls -lh /bks&#039;&#039;&#039; total 93K&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 Oct  7  2018 ex1&lt;br /&gt;
 drwxr-xr-x. 10 root  root   10 Oct  7  2018 ex2&lt;br /&gt;
 drwxr-xr-x. 19 root  root   19 Oct  7  2018 ex3&lt;br /&gt;
 drwxr-xr-x.  9 root  root    9 Oct  7  2018 ex4&lt;br /&gt;
 drwxr-xr-x. 14 root  root   14 Oct  7  2018 ex5&lt;br /&gt;
 drwxr-xr-x.  9 root  root    9 Oct  7  2018 ex6&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 Jul 17  2018 ex7&lt;br /&gt;
 drwxr-xr-x.  8 root  root    8 May  3  2018 ex8&lt;br /&gt;
 drwxr-xr-x. 10 root  root   10 Jun 11 16:15 ex9&lt;br /&gt;
 drwxrwxr-x. 67 42024 1010 4.0K Mar 15 15:18 soft&lt;br /&gt;
 drwxr-xr-x. 46 root  root 4.0K Sep 17  2018 work&lt;br /&gt;
&lt;br /&gt;
NOTE: wynton uses automount.  /bks will appear empty until you specifically ls the disk you want.  ls /bks may appear blank but if you do ls /bks/soft or /bks/ex9, the disk should automatically mount when you list it.  If it&#039;s not working, then something&#039;s wrong. &lt;br /&gt;
&lt;br /&gt;
* 4 here is the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11833</id>
		<title>PuppetTricks</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11833"/>
		<updated>2019-07-02T00:00:55Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Creating a new Puppet Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of tricks and tips for using Puppet to administer systems.&lt;br /&gt;
&lt;br /&gt;
The names &#039;&#039;&#039;master&#039;&#039;&#039;, &#039;&#039;&#039;puppetmaster&#039;&#039;&#039;, and &#039;&#039;&#039;foreman&#039;&#039;&#039; all refer to (at the time of writing this) alpha. The name &#039;&#039;&#039;client&#039;&#039;&#039; refers to any machine that is maintained by puppet.&lt;br /&gt;
&lt;br /&gt;
==Creating a new Puppet Module==&lt;br /&gt;
Puppet code consists of Puppet modules.  Modules are self contained bundles of code and data that exist to manage a particular technology.  Modules consist of classes which consist of resource types. &amp;lt;br /&amp;gt;&lt;br /&gt;
Our puppet modules exist in two places:  /opt/bks/src/cluster/puppet/modules &amp;amp; /etc/puppet/modules &amp;lt;br /&amp;gt;&lt;br /&gt;
We write new Puppet module configs in the /opt directory but when we build the packages, they go to /etc/puppet/modules.  Any changes to Puppet code should occur in the /opt directory then built later.  &lt;br /&gt;
&lt;br /&gt;
To generate a new Puppet module, we first go to /opt/bks/src/cluster/puppet/modules.  Decide on what you want to call it.  Notice in this directory, everything is called bks-&amp;lt;module name&amp;gt;.  This is because Puppet wants you to put the author&#039;s name first prior to the module name.  You should name your module the same way with &amp;quot;bks-&amp;quot; in front of the module name.  &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me creating a new module: bks-selinux&lt;br /&gt;
&lt;br /&gt;
1) Generate a new Puppet module.  The generate command produces a basic skeleton of a typical Puppet module structure.  We&#039;ll need to edit it to our liking.  &lt;br /&gt;
 [root@alpha ~]# &#039;&#039;&#039;cd /opt/bks/src/cluster/puppet/modules/&#039;&#039;&#039;&lt;br /&gt;
 [root@alpha modules]# puppet module generate bks-selinux&lt;br /&gt;
 Generating module at /share/utils/bks/src/cluster/puppet/modules/bks-selinux&lt;br /&gt;
 bks-selinux&lt;br /&gt;
 bks-selinux/spec&lt;br /&gt;
 bks-selinux/spec/spec_helper.rb&lt;br /&gt;
 bks-selinux/manifests&lt;br /&gt;
 bks-selinux/manifests/init.pp&lt;br /&gt;
 bks-selinux/tests&lt;br /&gt;
 bks-selinux/tests/init.pp&lt;br /&gt;
 bks-selinux/Modulefile&lt;br /&gt;
 bks-selinux/README&lt;br /&gt;
&lt;br /&gt;
2) We want to copy a SELinux configuration file to the destination nodes.  I made this configuration file, sgehald.pp, and it must be copied to other nodes.  First, it should be copied to the module&#039;s directory. &lt;br /&gt;
I make a directory in the bks-selinux directory named files then copy the SELinux config file there. &lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;mkdir files&#039;&#039;&#039;&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;cp /tmp/sgehald.pp files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Edit the module&#039;s manifests/init.pp with desired configuration information.  Here I am telling Puppet to copy a SELinux .pp file from the Puppetmaster to destination nodes with proper ownership and permissions.  Afterwards, I tell Puppet to ensure that the sgehald selmodule is loaded.  The require means that the selmodule command will not run unless the sgehald.pp file exists.  &lt;br /&gt;
Note that puppet:///selinux/sgehald.pp refers to sgehald.pp which exists inside the file directory of puppet module, bks-selinux,.  &lt;br /&gt;
 class selinux {&lt;br /&gt;
  file {&#039;/usr/share/selinux/targeted/sgehald.pp&#039;:&lt;br /&gt;
    ensure =&amp;gt; present,&lt;br /&gt;
    owner  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    group  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    mode   =&amp;gt; 644,&lt;br /&gt;
    source =&amp;gt; &#039;puppet:///selinux/sgehald.pp&#039;,&lt;br /&gt;
  }&lt;br /&gt;
  selmodule {&#039;sgehald&#039;:&lt;br /&gt;
    ensure      =&amp;gt; present,&lt;br /&gt;
    syncversion =&amp;gt; true,&lt;br /&gt;
    require     =&amp;gt; File [&#039;/usr/share/selinux/targeted/sgehald.pp&#039;],&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
4) After we&#039;re finished editing the init.pp file, we should verify the contents are syntactically correct.  Use puppet parser validate against the init.pp file to verify this.  If you get no output, Puppet thinks your init.pp file is fine&lt;br /&gt;
 [root@alpha manifests]# puppet parser validate init.pp&lt;br /&gt;
&lt;br /&gt;
5) Now that init.pp file is fine, it&#039;s time to build the module.  While in the module directory, issue the following command to create a new Puppet package: &lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module build .&#039;&#039;&#039; &lt;br /&gt;
 Building /share/utils/bks/src/cluster/puppet/modules/bks-selinux for release&lt;br /&gt;
 pkg/bks-selinux-0.0.1.tar.gz&lt;br /&gt;
 &lt;br /&gt;
6) The previous command created a package but it is not yet usable in production.  To make it usable, do a puppet module install commmand with the -f flag. &lt;br /&gt;
(why do we use an -f flag?  I tried the same command without and with the -f flag and you should see)&lt;br /&gt;
&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Downloading from http://forge.puppetlabs.com ...&lt;br /&gt;
 Error: Could not find release information for this module (bks/selinux) (HTTP 410)&lt;br /&gt;
 Error: Try &#039;puppet help module install&#039; for usage&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install -f pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Installing -- do not interrupt ...&lt;br /&gt;
 /etc/puppet/modules&lt;br /&gt;
 └── bks-selinux (v0.0.1)&lt;br /&gt;
&lt;br /&gt;
7) After running a puppet module install, check /etc/puppet/modules.  There should be an selinux module directory now.  &lt;br /&gt;
 [root@alpha manifests]# &#039;&#039;&#039;ls -lhd /etc/puppet/modules/selinux/&#039;&#039;&#039;&lt;br /&gt;
 drwxr-xr-x. 6 root root 4.0K Jul  1 13:50 /etc/puppet/modules/selinux/&lt;br /&gt;
&lt;br /&gt;
8) To put this Puppet module into production, we must go to foreman.ucsf.bkslab.org.  Then, Configure -&amp;gt; Puppet Classes -&amp;gt; Import from puppetmaster.cluster.ucsf.bkslab.org.  Select both Production and Development environments and say yes.  From there, you have to figure which nodes need this particular Puppet module.  Since this SELinux fix existed to avoid GPU job failures, I activated the Puppet Module on cluster/noautogpu host group.  Then, all nodes now have the proper SELinux permission to run GPU jobs!&lt;br /&gt;
&lt;br /&gt;
== Regenerating a Certificate ==&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
    $ sudo service puppet stop&lt;br /&gt;
    $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~&lt;br /&gt;
    $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60&lt;br /&gt;
&lt;br /&gt;
=== On Server (within 60 seconds) ===&lt;br /&gt;
    $ sudo puppet cert clean &amp;lt;client hostname&amp;gt;&lt;br /&gt;
    $ sudo puppet cert sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
       &#039;&#039;&#039;OR&#039;&#039;&#039; if you wish to allow DNS aliases&lt;br /&gt;
    $ sudo puppet cert --allow-dns-alt-names sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note this can also be done through Foreman by going to the [https://foreman.ucsf.bkslab.org/smart_proxies/1-puppetmaster-cluster-ucsf-bkslab-org/puppetca Infrastructure -&amp;gt; Smart Proxies -&amp;gt; Puppetmaster -&amp;gt; Certificates page]&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
The previous run should finish without errors (errors are in purple). It should then be possible to run `sudo puppet agent -t` without any waiting or errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== changing mounts, dbraw ===&lt;br /&gt;
&lt;br /&gt;
 cd /opt/bks/src/cluster/puppet/modules/bks-nfs_mounts/files/dbraw&lt;br /&gt;
or edit&lt;br /&gt;
 manifests/init.pp&lt;br /&gt;
&lt;br /&gt;
Then from nfs_mounts directory&lt;br /&gt;
&lt;br /&gt;
* 1) Bump version in Modulefile&lt;br /&gt;
* 2) puppet module build .&lt;br /&gt;
* 3) puppet module install -f pkg/bks-nfs_mounts-0.0.X.tar.gz&lt;br /&gt;
* 4) proceed to standard goat sacrifice procedure&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11832</id>
		<title>PuppetTricks</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=PuppetTricks&amp;diff=11832"/>
		<updated>2019-07-02T00:00:17Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Added how to create a Puppet Module from scratch along with steps and console output&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of tricks and tips for using Puppet to administer systems.&lt;br /&gt;
&lt;br /&gt;
The names &#039;&#039;&#039;master&#039;&#039;&#039;, &#039;&#039;&#039;puppetmaster&#039;&#039;&#039;, and &#039;&#039;&#039;foreman&#039;&#039;&#039; all refer to (at the time of writing this) alpha. The name &#039;&#039;&#039;client&#039;&#039;&#039; refers to any machine that is maintained by puppet.&lt;br /&gt;
&lt;br /&gt;
==Creating a new Puppet Module==&lt;br /&gt;
Puppet code consists of Puppet modules.  Modules are self contained bundles of code and data that exist to manage a particular technology.  Modules consist of classes which consist of resource types. &amp;lt;br /&amp;gt;&lt;br /&gt;
Our puppet modules exist in two places:  /opt/bks/src/cluster/puppet/modules &amp;amp; /etc/puppet/modules &amp;lt;br /&amp;gt;&lt;br /&gt;
We write new Puppet module configs in the /opt directory but when we build the packages, they go to /etc/puppet/modules.  Any changes to Puppet code should occur in the /opt directory then built later.  &lt;br /&gt;
&lt;br /&gt;
To generate a new Puppet module, we first go to /opt/bks/src/cluster/puppet/modules.  Decide on what you want to call it.  Notice in this directory, everything is called bks-&amp;lt;module name&amp;gt;.  This is because Puppet wants you to put the author&#039;s name first prior to the module name.  You should name your module the same way with &amp;quot;bks-&amp;quot; in front of the module name.  &lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me creating a new module: bks-selinux&lt;br /&gt;
&lt;br /&gt;
1) Generate a new Puppet module.  The generate command produces a basic skeleton of a typical Puppet module structure.  We&#039;ll need to edit it to our liking.  &lt;br /&gt;
 [root@alpha ~]# cd /opt/bks/src/cluster/puppet/modules/&lt;br /&gt;
 [root@alpha modules]# puppet module generate bks-selinux&lt;br /&gt;
 Generating module at /share/utils/bks/src/cluster/puppet/modules/bks-selinux&lt;br /&gt;
 bks-selinux&lt;br /&gt;
 bks-selinux/spec&lt;br /&gt;
 bks-selinux/spec/spec_helper.rb&lt;br /&gt;
 bks-selinux/manifests&lt;br /&gt;
 bks-selinux/manifests/init.pp&lt;br /&gt;
 bks-selinux/tests&lt;br /&gt;
 bks-selinux/tests/init.pp&lt;br /&gt;
 bks-selinux/Modulefile&lt;br /&gt;
 bks-selinux/README&lt;br /&gt;
&lt;br /&gt;
2) We want to copy a SELinux configuration file to the destination nodes.  I made this configuration file, sgehald.pp, and it must be copied to other nodes.  First, it should be copied to the module&#039;s directory. &lt;br /&gt;
I make a directory in the bks-selinux directory named files then copy the SELinux config file there. &lt;br /&gt;
 [root@alpha bks-selinux]# mkdir files&lt;br /&gt;
 [root@alpha bks-selinux]# cp /tmp/sgehald.pp files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Edit the module&#039;s manifests/init.pp with desired configuration information.  Here I am telling Puppet to copy a SELinux .pp file from the Puppetmaster to destination nodes with proper ownership and permissions.  Afterwards, I tell Puppet to ensure that the sgehald selmodule is loaded.  The require means that the selmodule command will not run unless the sgehald.pp file exists.  &lt;br /&gt;
Note that puppet:///selinux/sgehald.pp refers to sgehald.pp which exists inside the file directory of puppet module, bks-selinux,.  &lt;br /&gt;
 class selinux {&lt;br /&gt;
  file {&#039;/usr/share/selinux/targeted/sgehald.pp&#039;:&lt;br /&gt;
    ensure =&amp;gt; present,&lt;br /&gt;
    owner  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    group  =&amp;gt; &#039;root&#039;,&lt;br /&gt;
    mode   =&amp;gt; 644,&lt;br /&gt;
    source =&amp;gt; &#039;puppet:///selinux/sgehald.pp&#039;,&lt;br /&gt;
  }&lt;br /&gt;
  selmodule {&#039;sgehald&#039;:&lt;br /&gt;
    ensure      =&amp;gt; present,&lt;br /&gt;
    syncversion =&amp;gt; true,&lt;br /&gt;
    require     =&amp;gt; File [&#039;/usr/share/selinux/targeted/sgehald.pp&#039;],&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
4) After we&#039;re finished editing the init.pp file, we should verify the contents are syntactically correct.  Use puppet parser validate against the init.pp file to verify this.  If you get no output, Puppet thinks your init.pp file is fine&lt;br /&gt;
 [root@alpha manifests]# puppet parser validate init.pp&lt;br /&gt;
&lt;br /&gt;
5) Now that init.pp file is fine, it&#039;s time to build the module.  While in the module directory, issue the following command to create a new Puppet package: &lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module build .&#039;&#039;&#039; &lt;br /&gt;
 Building /share/utils/bks/src/cluster/puppet/modules/bks-selinux for release&lt;br /&gt;
 pkg/bks-selinux-0.0.1.tar.gz&lt;br /&gt;
 &lt;br /&gt;
6) The previous command created a package but it is not yet usable in production.  To make it usable, do a puppet module install commmand with the -f flag. &lt;br /&gt;
(why do we use an -f flag?  I tried the same command without and with the -f flag and you should see)&lt;br /&gt;
&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Downloading from http://forge.puppetlabs.com ...&lt;br /&gt;
 Error: Could not find release information for this module (bks/selinux) (HTTP 410)&lt;br /&gt;
 Error: Try &#039;puppet help module install&#039; for usage&lt;br /&gt;
 [root@alpha bks-selinux]# &#039;&#039;&#039;puppet module install -f pkg/bks-selinux-0.0.1.tar.gz&#039;&#039;&#039; &lt;br /&gt;
 Preparing to install into /etc/puppet/modules ...&lt;br /&gt;
 Installing -- do not interrupt ...&lt;br /&gt;
 /etc/puppet/modules&lt;br /&gt;
 └── bks-selinux (v0.0.1)&lt;br /&gt;
&lt;br /&gt;
7) After running a puppet module install, check /etc/puppet/modules.  There should be an selinux module directory now.  &lt;br /&gt;
 [root@alpha manifests]# ls -lhd /etc/puppet/modules/selinux/&lt;br /&gt;
 drwxr-xr-x. 6 root root 4.0K Jul  1 13:50 /etc/puppet/modules/selinux/&lt;br /&gt;
&lt;br /&gt;
8) To put this Puppet module into production, we must go to foreman.ucsf.bkslab.org.  Then, Configure -&amp;gt; Puppet Classes -&amp;gt; Import from puppetmaster.cluster.ucsf.bkslab.org.  Select both Production and Development environments and say yes.  From there, you have to figure which nodes need this particular Puppet module.  Since this SELinux fix existed to avoid GPU job failures, I activated the Puppet Module on cluster/noautogpu host group.  Then, all nodes now have the proper SELinux permission to run GPU jobs!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regenerating a Certificate ==&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
    $ sudo service puppet stop&lt;br /&gt;
    $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~&lt;br /&gt;
    $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60&lt;br /&gt;
&lt;br /&gt;
=== On Server (within 60 seconds) ===&lt;br /&gt;
    $ sudo puppet cert clean &amp;lt;client hostname&amp;gt;&lt;br /&gt;
    $ sudo puppet cert sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
       &#039;&#039;&#039;OR&#039;&#039;&#039; if you wish to allow DNS aliases&lt;br /&gt;
    $ sudo puppet cert --allow-dns-alt-names sign &amp;lt;client hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note this can also be done through Foreman by going to the [https://foreman.ucsf.bkslab.org/smart_proxies/1-puppetmaster-cluster-ucsf-bkslab-org/puppetca Infrastructure -&amp;gt; Smart Proxies -&amp;gt; Puppetmaster -&amp;gt; Certificates page]&lt;br /&gt;
&lt;br /&gt;
=== On Client ===&lt;br /&gt;
The previous run should finish without errors (errors are in purple). It should then be possible to run `sudo puppet agent -t` without any waiting or errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== changing mounts, dbraw ===&lt;br /&gt;
&lt;br /&gt;
 cd /opt/bks/src/cluster/puppet/modules/bks-nfs_mounts/files/dbraw&lt;br /&gt;
or edit&lt;br /&gt;
 manifests/init.pp&lt;br /&gt;
&lt;br /&gt;
Then from nfs_mounts directory&lt;br /&gt;
&lt;br /&gt;
* 1) Bump version in Modulefile&lt;br /&gt;
* 2) puppet module build .&lt;br /&gt;
* 3) puppet module install -f pkg/bks-nfs_mounts-0.0.X.tar.gz&lt;br /&gt;
* 4) proceed to standard goat sacrifice procedure&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11830</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11830"/>
		<updated>2019-07-01T18:13:04Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting: D-Bus Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
If it does not look like this, let the sysadmin know!  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Job Fails to Submit &amp;amp; Status is &#039;Fizzled Out&#039;===&lt;br /&gt;
A job that fails to submit successfully from the desktop is caused by a lack of passwordless SSH.  You need to have an ssh-key enabled between your desktop and the SGE head nodes (gimel/gimel2).  Please see: http://wiki.docking.org/index.php/SSH_public_key_authentication for the Linux section and set the remote_host as either gimel or gimel2.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.&lt;br /&gt;
RESOLVED: http://wiki.docking.org/index.php/SELinux_notes&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep&#039;s multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a compute node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes under six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 ### (name your key &#039;compute_to_gimel&#039;) ###&lt;br /&gt;
 $ cat ~/.ssh/compute_to_gimel.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=SELinux_notes&amp;diff=11829</id>
		<title>SELinux notes</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=SELinux_notes&amp;diff=11829"/>
		<updated>2019-07-01T18:08:50Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SELinux is the bane of many administrators and yours truly is no exception.  &lt;br /&gt;
&lt;br /&gt;
When an SELinux denial occurs, it may not be obvious.  You may get a permission error but have perfectly fine Linux permissions.  The issue may reside in SELinux permissions which are called SELinux contexts.  To view an SELinux context, do an ls with the -Z flag.  &lt;br /&gt;
&lt;br /&gt;
Here is the SELinux context of an executable: &lt;br /&gt;
 [root@n-1-141 ~]# &#039;&#039;&#039;ls -lhZ /bin/dbus-daemon&#039;&#039;&#039; &lt;br /&gt;
 -rwxr-xr-x. root root &#039;&#039;&#039;system_u:object_r:dbusd_exec_t:s0&#039;&#039;&#039; /bin/dbus-daemon&lt;br /&gt;
&lt;br /&gt;
Typically, SELinux context is divided into four parts: user, type, role, and level&lt;br /&gt;
&lt;br /&gt;
The above SELinux context above is: &lt;br /&gt;
 SELinux user: system_u&lt;br /&gt;
 SELinux role: object_r&lt;br /&gt;
 SELinux type: dbusd_exec_t&lt;br /&gt;
 SELinux level: s0&lt;br /&gt;
&lt;br /&gt;
===Example: SELinux Denials in Schrodinger===&lt;br /&gt;
&lt;br /&gt;
Around Spring of 2019, I had a huge amount of issues with Schrodinger GPU jobs failing for apparently little reason.  The failures occurred on the compute nodes such as n-1-126, n-1-141 and n-9-34,36.  The error messages kept complaining about &amp;quot;arguments to dbus_move_error()&amp;quot;.  Eventually, for the heck of it, we tried turning off SELinux and then the software worked.  But, we don&#039;t want to just turn SELinux off just since it does work well as a security measure.  This is how we worked around it in SELinux: &lt;br /&gt;
&lt;br /&gt;
1) Investigate /var/log/audit/audit.log.  This is the log file for any SELinux allowance or denial.  &amp;lt;br /&amp;gt; &lt;br /&gt;
2) The audit.log file can be notoriously difficult to read because of the dense amount of information.  Also try installing tools like setools and setroubleshoot.  &amp;lt;br /&amp;gt; &lt;br /&gt;
3) Find relevant denial messages with sealert -a /var/log/audit/audit.log or grep for denial messages &amp;lt;br /&amp;gt; &lt;br /&gt;
My denial messages looked like this: &lt;br /&gt;
 [root@n-1-141 ~]# &#039;&#039;&#039;grep denied /var/log/audit/audit.log&#039;&#039;&#039;&lt;br /&gt;
 type=USER_AVC msg=audit(1562000684.669:92823): user pid=4595 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg=&#039;avc:  denied  { send_msg } for msgtype=method_return dest=:1.314 spid=4888 tpid=11427 scontext=system_u:system_r:hald_t:s0 tcontext=system_u:system_r:sge_job_t:s0 tclass=dbus  exe=&amp;quot;/bin/dbus-daemon&amp;quot; sauid=81 hostname=? addr=? terminal=?&#039;&lt;br /&gt;
 type=USER_AVC msg=audit(1562000897.290:92831): user pid=4595 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg=&#039;avc:  denied  { send_msg } for msgtype=method_return dest=:1.315 spid=4888 tpid=13754 scontext=system_u:system_r:hald_t:s0 tcontext=system_u:system_r:sge_job_t:s0 tclass=dbus  exe=&amp;quot;/bin/dbus-daemon&amp;quot; sauid=81 hostname=? addr=? terminal=?&lt;br /&gt;
&lt;br /&gt;
Take note of the following: &amp;lt;br /&amp;gt;&lt;br /&gt;
scontext is the SELinux context of the source process which initiated a request &amp;lt;br /&amp;gt;&lt;br /&gt;
tcontext is the SELinux context of the target process that the source process is attempting to access &lt;br /&gt;
&lt;br /&gt;
You can see that scontext and tcontext differ in the SELinux type which may sometimes cause issues.  &lt;br /&gt;
&lt;br /&gt;
4) Use audit2allow to view what you need to do to resolve the SELinux conflicts.  audit2allow reads the conflict messages in audit.log and then outputs what you need to do to resolve the issue.  &lt;br /&gt;
 [root@n-1-141 audit]# &#039;&#039;&#039;audit2allow -a&#039;&#039;&#039; &lt;br /&gt;
 #============= hald_t ==============&lt;br /&gt;
 allow hald_t sge_job_t:dbus send_msg;&lt;br /&gt;
&lt;br /&gt;
5) Use audit2allow with -M flag to generate a new semanage module that will edit SELinux policy and resolve conflict.  The name following the -M can be customized&lt;br /&gt;
 [root@n-1-141 ~]# &#039;&#039;&#039;audit2allow -a -M sgehald&#039;&#039;&#039;&lt;br /&gt;
 ******************** IMPORTANT ***********************&lt;br /&gt;
 To make this policy package active, execute:&lt;br /&gt;
 semodule -i sgehald.pp&lt;br /&gt;
&lt;br /&gt;
 The previous command will generate two files, a binary and a type enforcement file&lt;br /&gt;
 [root@n-1-141 ~]# &#039;&#039;&#039;ls -lh sgehald*&#039;&#039;&#039;&lt;br /&gt;
 -rw-r--r--. 1 root root 911 Jul  1 10:59 sgehald.pp&lt;br /&gt;
 -rw-r--r--. 1 root root 163 Jul  1 10:59 sgehald.te&lt;br /&gt;
&lt;br /&gt;
6) Install the policy package with semodule: &lt;br /&gt;
 [root@n-1-141 ~]# &#039;&#039;&#039;semodule -i sgehald.pp&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===teague notes===&lt;br /&gt;
Usually if there is a problem with an selinux context, it’s usually the type.&lt;br /&gt;
For http you want the types to match what’s in the /etc/httpd/ directory.  There are generally three types for http: content, logs and conf.  Here is how I got the wiki to work:&lt;br /&gt;
&lt;br /&gt;
 chcon -t httpd_config_t /domains/wiki.ucsf.bkslab.org/wiki.ucsf.bkslab.org.conf&lt;br /&gt;
 chcon -R -t httpd_log_t /domains/wiki.ucsf.bkslab.org/logs&lt;br /&gt;
 chcon -R -t httpd_user_content_t /domains/wiki.ucsf.bkslab.org/htdocs&lt;br /&gt;
 chcon -R -t httpd_sys_script_rw_t /domains/wiki.ucsf.bkslab.org/htdocs/images&lt;br /&gt;
 chcon -R -t httpd_sys_script_exec_t /domains/wiki.ucsf.bkslab.org/htdocs/extensions&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/pear&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/php&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/mysql (?)&lt;br /&gt;
 setsebool -P httpd_can_sendmail 1&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
 sestatus&lt;br /&gt;
 getsebool -a | grep httpd&lt;br /&gt;
HOW I GOT SELINUX WORKING RIGHT FOR USER WEBSITES:&lt;br /&gt;
 chcon -R -t httpd_log_t logs&lt;br /&gt;
 chcon -R -t httpd_user_content_t public_html&lt;br /&gt;
 chcon -R -t httpd_config_t tdemers.ucsf.bkslab.org.conf&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/pear&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/php&lt;br /&gt;
 chcon -R -t httpd_user_script_exec_t /usr/share/mysql (?)&lt;br /&gt;
 setsebool -P httpd_can_sendmail 1&lt;br /&gt;
 setsebool -P httpd_can_network_connect on&lt;br /&gt;
 setsebool -P httpd_can_network_connect_db on&lt;br /&gt;
 setsebool -P httpd_enable_homedirs on &amp;lt;br /&amp;gt;&lt;br /&gt;
 2097148404 1572864000 2097152000    1269939&lt;br /&gt;
&lt;br /&gt;
=== on alpha ===&lt;br /&gt;
 cd /nfs/db4/dbraw/zinc&lt;br /&gt;
 chcon system_u:object_r:nfs_t:s0 ??&lt;br /&gt;
rebuild, etc&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11768</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11768"/>
		<updated>2019-05-24T21:00:37Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
If it does not look like this, let the sysadmin know!  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Job Fails to Submit &amp;amp; Status is &#039;Fizzled Out&#039;===&lt;br /&gt;
A job that fails to submit successfully from the desktop is caused by a lack of passwordless SSH.  You need to have an ssh-key enabled between your desktop and the SGE head nodes (gimel/gimel2).  Please see: http://wiki.docking.org/index.php/SSH_public_key_authentication for the Linux section and set the remote_host as either gimel or gimel2.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep&#039;s multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a compute node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes under six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 ### (name your key &#039;compute_to_gimel&#039;) ###&lt;br /&gt;
 $ cat ~/.ssh/compute_to_gimel.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11767</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11767"/>
		<updated>2019-05-24T20:48:28Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting: Multi-process jobs only finishes a single process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Ligprep&#039;s multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a compute node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes under six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 ### (name your key &#039;compute_to_gimel&#039;) ###&lt;br /&gt;
 $ cat ~/.ssh/compute_to_gimel.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=CSD&amp;diff=11766</id>
		<title>CSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=CSD&amp;diff=11766"/>
		<updated>2019-05-24T18:18:59Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Added &amp;#039;How to update CSD with data upgrade&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Cambridge Structural Database contains crystallographic data on small organic molecules (much like the PDB).&lt;br /&gt;
Our license for 2014 is installed on sgehead in [[cluster 1]].&lt;br /&gt;
&lt;br /&gt;
login to sgehead and run the following command to correctly initialize your environment:&lt;br /&gt;
 source /nfs/software/csd/current/env.csh&lt;br /&gt;
You can then run Conquest by executing the command:&lt;br /&gt;
 cq&lt;br /&gt;
In case you are prompted for a licence for any reason, it is located in&lt;br /&gt;
 /nfs/software/csd/current/csd/csd_licence.dat&lt;br /&gt;
If this fails with the error Tcl Error about no display, you may have to login using:&lt;br /&gt;
 ssh -Y sgehead&lt;br /&gt;
Which forwards your X session.&lt;br /&gt;
If you want help using ConQuest, try the documentation:&lt;br /&gt;
 http://www.ccdc.cam.ac.uk/support/documentation/conquest/ConQuest/toc.html&lt;br /&gt;
&lt;br /&gt;
===Applying Data Updates===&lt;br /&gt;
&lt;br /&gt;
We get emails from CCDC that announce updates.  For whatever reason, the automatic update via the GUI doesn&#039;t work for us, probaby due to the way we route software from nfs-soft to the rest of the cluster so we manually download the update packages from CCDC.  scp or rsync the runfile from CCDC to nfs-soft&#039;s /tmp directory.  &lt;br /&gt;
&lt;br /&gt;
Run these updates on bet/nfs-soft directly: &lt;br /&gt;
                                           &lt;br /&gt;
 [root@bet tmp]# &#039;&#039;&#039;./CSDDataUpdate-May19-linux-x64-installer.run&#039;&#039;&#039; &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 Welcome to the CSD 2019 Data Update Setup Wizard.&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 Please read the following License Agreement. You must accept the terms of this &lt;br /&gt;
 agreement before continuing with the installation.&lt;br /&gt;
 &lt;br /&gt;
 Press [Enter] to continue:&lt;br /&gt;
 Use of this software is governed by an Agreement between the CCDC&lt;br /&gt;
 and your organisation. A copy of the standard Licence Agreement can&lt;br /&gt;
 be viewed by copying this URL and pasting it into your browser&#039;s &lt;br /&gt;
 address bar:  https://downloads.ccdc.cam.ac.uk/licence_agreement.txt&lt;br /&gt;
 If you have any questions, please contact admin@ccdc.cam.ac.uk&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Press [Enter] to continue: &lt;br /&gt;
 &lt;br /&gt;
 Do you accept this license? [y/n]: &#039;&#039;&#039;y&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 The location of your CSD System data.&lt;br /&gt;
 &lt;br /&gt;
 Defaults: &lt;br /&gt;
 &lt;br /&gt;
     Windows   : C:\Program Files (x86)\CCDC\CSD_2019\CSD_540\&lt;br /&gt;
     Linux     : INSTALL_DIR/CCDC/CSD_2019/csd/&lt;br /&gt;
     Mac       : /Applications/CCDC/CSD_2019/DATA/CSD_540&lt;br /&gt;
   &lt;br /&gt;
             &lt;br /&gt;
 &lt;br /&gt;
 Installation Directory [/csd]: &#039;&#039;&#039;/export/soft/csd/current/CSD_2019/csd&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 Setup is now ready to begin installing CSD 2019 Data Update on your computer.&lt;br /&gt;
 &lt;br /&gt;
 Do you want to continue? [Y/n]: &#039;&#039;&#039;y&#039;&#039;&#039; &lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 Please wait while Setup installs CSD 2019 Data Update on your computer.&lt;br /&gt;
 &lt;br /&gt;
 Installing&lt;br /&gt;
 0% ______________ 50% ______________ 100%&lt;br /&gt;
 ######################################### &lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 Setup has finished installing CSD 2019 Data Update on your computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[:Category:Software]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal]]&lt;br /&gt;
[[Category:Cheminformatics]]&lt;br /&gt;
[[Category:Databases]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Commercial]]&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11760</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11760"/>
		<updated>2019-05-21T21:12:59Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: added issue regarding DNS servers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
 &lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Troubleshooting: License checking failing on desktops===&lt;br /&gt;
We had an issue where our license server was running with ideal conditions yet some of our desktops failed to locate the license when Schrodinger software was started.  The license check programs would pass and clear but the software would fail during license check.  This can be caused by DNS routing issues.  We had a case where Campus IT had added additional DNS servers to the DHCP configuration which meant that our DNS server located at 169.230.26.93 would get pushed away.  While on a desktop, try to verify the contents of your file /etc/resolv.conf.  It should look something like this: &lt;br /&gt;
&lt;br /&gt;
 server 169.230.26.93&lt;br /&gt;
 server 128.218.254.10&lt;br /&gt;
 server 128.218.254.40&lt;br /&gt;
 search desktop.ucsf.bkslab.org ucsf.bkslab.org bkslab.org compbio.ucsf.edu ucsf.edu&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes.  These parallel processes would be spawned as six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 $ cat ~/.ssh/&amp;lt;new key&amp;gt;.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11759</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11759"/>
		<updated>2019-05-20T20:53:18Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Get a License File: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Cluster 0 &lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cluster2&lt;br /&gt;
 Host ID: this_host&lt;br /&gt;
 Machine Name: bet&lt;br /&gt;
 FlexLM Server Port: 27008&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
  &lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes.  These parallel processes would be spawned as six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 $ cat ~/.ssh/&amp;lt;new key&amp;gt;.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11758</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11758"/>
		<updated>2019-05-20T20:08:04Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Troubleshooting Schrodinger Issues */  Added section about multi-process jobs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
  &lt;br /&gt;
===Troubleshooting: D-Bus Errors=== &lt;br /&gt;
We had a period where our jobs were dying upon submission.  We would get this strange error message: &lt;br /&gt;
&lt;br /&gt;
 process 23478: arguments to dbus_move_error() were incorrect, assertion &amp;quot;(dest) == NULL || !dbus_error_is_set ((dest))&amp;quot; failed in file dbus-errors.c line 278.&lt;br /&gt;
 This is normally a bug in some application using the D-Bus library.&lt;br /&gt;
 D-Bus not built with -rdynamic so unable to print a backtrace&lt;br /&gt;
 Fatal Python error: Aborted&lt;br /&gt;
&lt;br /&gt;
It turns out, this was due to SELinux being on.  As a temporary workaround, I have disabled SELinux on hosts that were experiencing this issue.  We&#039;ll need to dig deeper in /var/log/audit/audit.log to diagnose what was wrong.  &lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: All processes go onto the same GPU===&lt;br /&gt;
When we submit GPU jobs via Maestro/Desmond, we can choose the number of GPUs we use in the run.  However, when we first did this while declaring that we wanted four GPUs to be used in a process, Schrodinger would allocate the four separate processes all on the same GPU.  To address this, we have to log into the GPU nodes and set the GPUs into exclusive mode.  This means that no more than one process would run on a GPU at a time.  &lt;br /&gt;
&lt;br /&gt;
 $ nvidia-smi -c 3&lt;br /&gt;
&lt;br /&gt;
Found on this webpage: https://www.schrodinger.com/kb/1834&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting: Multi-process jobs only finishes a single process===&lt;br /&gt;
&lt;br /&gt;
Ligprep jobs get sent to a node to begin.  We&#039;ve been sending ligprep jobs that would utilize six additional parallel processes.  These parallel processes would be spawned as six sub-jobs.  Unfortunately, when we first tried, only the head process would spawn but non of the sub-jobs would get submitted.  This happened because of the way Schrodinger tries to spawn additional subprocesses.  The head job would run on a compute node and then try to contact an SGE submit host (gimel,gimel2) via SSH.  If you do not have passwordless SSH enabled, the job would fail to spawn sub-jobs.  What you need to do is create an ssh-key in your home directory that would solely be used when an SSH connection is initialized between a compute node and gimel/gimel2.  Since your home directory is NFS-mounted across all nodes on the cluster, you only need to create an ssh-key and append the public key to your authorized_keys file under .ssh.  &lt;br /&gt;
&lt;br /&gt;
 $ ssh-keygen (follow steps and don&#039;t make a password) &lt;br /&gt;
 $ cat ~/.ssh/&amp;lt;new key&amp;gt;.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
 $ vi ~/.ssh/config&lt;br /&gt;
  Host gimel gimel2&lt;br /&gt;
     IdentityFile ~/.ssh/compute_to_gimel&lt;br /&gt;
&lt;br /&gt;
This way, the process on the compute node can successfully contact the SGE submission hosts and spawn additional subprocesses. &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11757</id>
		<title>Schrodinger</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Schrodinger&amp;diff=11757"/>
		<updated>2019-05-20T19:26:07Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Wrote config files regarding schrodinger&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SCHRODINGER - getting it running&lt;br /&gt;
&lt;br /&gt;
= Get a License File: =&lt;br /&gt;
Get an email about Schrodinger license keys ready for retrieval.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Click the link that follows: &amp;quot;please use this form to generate the license file:&amp;quot;&amp;lt;br /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In the License Retrieval Assistant, make sure you have the following information for the respective categories: &amp;lt;br /&amp;gt;&lt;br /&gt;
Host ID: 0015605f526c &amp;lt;br /&amp;gt;&lt;br /&gt;
Machine Name: nis.compbio.ucsf.edu &amp;lt;br /&amp;gt;&lt;br /&gt;
FLEXIm Server Port: 2700 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugging: =&lt;br /&gt;
Cluster 0, all schrodinger files are located locally on nfshead2:/raid3 but the commands below should be executed on nis as user tdemers.  &lt;br /&gt;
&lt;br /&gt;
Make sure that the variable $LM_LICENSE_FILE has port@same_exact_server_name_as_in_license_file.  The license.dat file must contain: &lt;br /&gt;
&lt;br /&gt;
 SERVER nis.compbio.ucsf.edu 0015605f526c 27000&lt;br /&gt;
 VENDOR SCHROD PORT=53000&lt;br /&gt;
&lt;br /&gt;
Make sure the port is open in iptables&lt;br /&gt;
 source /raid3/software/schrodinger/current.sh &lt;br /&gt;
Try some combination of the following:&lt;br /&gt;
&lt;br /&gt;
 $SCHRODINGER/licadmin STAT -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin REREAD -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERDOWN&lt;br /&gt;
 $SCHRODINGER/licadmin SERVERUP -l $SCHRODINGER/lmgrd.log -c $SCHRODINGER/license.dat&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger on Cluster 0 =&lt;br /&gt;
First you need to go to the website and download the software.  You should end up with two files: Schrodinger Worflow … .zip and Schrodinger Suites …..tar&lt;br /&gt;
scp both these files to the server, to the schrodinger directory.&lt;br /&gt;
On the server, in the schrodinger directory mkdir MonthYear.  cd into that directory Untar the tar file and run the INSTALL script.  At the end you’ll see something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*) Licensing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
    You will need one or more licenses before you can run the&lt;br /&gt;
    software you have just installed. &amp;lt;br /&amp;gt; &lt;br /&gt;
    Please note the following information, which you will need in&lt;br /&gt;
    order to generate a license key: &amp;lt;br /&amp;gt;&lt;br /&gt;
    Host ID: 001e0bd543b8&lt;br /&gt;
    Machine name: nfshead2.bkslab.org &amp;lt;br /&amp;gt;&lt;br /&gt;
    If you are not performing this installation on your license&lt;br /&gt;
    server, you will need the output of: &amp;lt;br /&amp;gt;&lt;br /&gt;
    $SCHRODINGER/machid -hostid&lt;br /&gt;
&lt;br /&gt;
= Installing Schrodinger 2019 on Cluster 2 = &lt;br /&gt;
===Install===&lt;br /&gt;
https://www.schrodinger.com/downloads/releases&lt;br /&gt;
&lt;br /&gt;
Select the Linux 64-bit version.  Download it to your local computer first.  Then scp the tarball over the nfs-soft in the appropriate directory.  Extract the tarball and you&#039;ll get a bunch of smaller tarfiles.  &lt;br /&gt;
&lt;br /&gt;
 # ls&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64.tar&lt;br /&gt;
 # tar -xvf Schrodinger_Suites_2019-1_Linux-x86_64.tar &lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/canvas-v3.9-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/mcpro-v5.3-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/desmond-v5.7-Linux-x86_64.tar.gz&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/INSTALL&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Schrodinger_Suites_2019-1_Linux-x86_64/CHECKSUM.md5&lt;br /&gt;
&lt;br /&gt;
https://www.schrodinger.com/license-installation-instructions&lt;br /&gt;
&lt;br /&gt;
We do not need to untar these individually.  The INSTALL script takes care of nearly everything.  All we have to do is set the path of where we want the installed programs to go to.  &lt;br /&gt;
&lt;br /&gt;
 [root@bet ~]# export SCHRODINGER=/export/soft/schrodinger/2019-1/&lt;br /&gt;
 [root@bet ~]# ./INSTALL&lt;br /&gt;
&lt;br /&gt;
The install script will ask you where you&#039;re running your license server.  We run the license server on the same server as the installation server so tell the software that it will run on 27008@bet&lt;br /&gt;
 &lt;br /&gt;
===Set Environment Files===&lt;br /&gt;
&lt;br /&gt;
Notice we set the SCHROD_LICENSE_FILE as &#039;27008@bet&#039;.  We do not use the FQDN.  This is because the desktops are on the public network (compbio.ucsf.edu) while the cluster is on a private network (cluster.ucsf.bkslab.org).  If we use the FQDN, the desktops may recognize the domain but not the cluster and vice versa.  Therefore, we will reference the license server as simply &#039;bet&#039;&lt;br /&gt;
&lt;br /&gt;
env.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export SCHRODINGER=&amp;quot;/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 export SCHRODINGER_THIRDPARTY=&amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 export SCHRODINGER_PDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 export SCHRODINGER_UTILITIES=&amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RCP=&amp;quot;scp&amp;quot;&lt;br /&gt;
 export SCHRODINGER_RSH=&amp;quot;ssh&amp;quot;&lt;br /&gt;
 export PSP_BLASTDB=&amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DATA=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 export PSP_BLAST_DIR=&amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 export SCHROD_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export LM_LICENSE_FILE=&amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 export PATH=&amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
env.csh&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 setenv SCHRODINGER &amp;quot;/mnt/nfs/soft/schrodinger/2019-1&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_THIRDPARTY &amp;quot;$SCHRODINGER/thirdparty&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_PDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/pdb&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_UTILITIES &amp;quot;$SCHRODINGER/utilities&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RCP &amp;quot;scp&amp;quot;&lt;br /&gt;
 setenv SCHRODINGER_RSH &amp;quot;ssh&amp;quot;&lt;br /&gt;
 setenv PSP_BLASTDB &amp;quot;$SCHRODINGER_THIRDPARTY/database/blast/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DATA &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/data/&amp;quot;&lt;br /&gt;
 setenv PSP_BLAST_DIR &amp;quot;$SCHRODINGER_THIRDPARTY/bin/Linux-x86/blast/&amp;quot;&lt;br /&gt;
 setenv SCHROD_LICENSE_FILE &amp;quot;27008@bet&amp;quot;&lt;br /&gt;
 setenv PATH &amp;quot;${SCHRODINGER}:${SCHRODINGER_UTILITIES}:${PATH}:${SCHRODINGER_THIRDPARTY}/desmond_to_trj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Licensing===&lt;br /&gt;
&lt;br /&gt;
Edit the license file line that contains &#039;SERVER&#039;.  For Server, we will put &#039;this_host&#039; instead of the hostname.  This way, the license server will be recognized by any of its DNS hostnames regardless of different domains.  &lt;br /&gt;
 SERVER this_host 80c16e65897d 27008&lt;br /&gt;
&lt;br /&gt;
===Schrodinger Hosts &amp;amp; Queue Config Files===&lt;br /&gt;
&lt;br /&gt;
The schrodinger.hosts file exists within the schrodinger current installation directory.  schrodinger.hosts contains the list of queues available for schrodinger to use.  The first host entry should just be a localhost entry to allow users to run Schrodinger on their local machine.  Other host entries will contain information such as what queue to use, how many processors are available, what GPUs exist, if parallelization is enabled, etc.  &lt;br /&gt;
&lt;br /&gt;
schrodinger.hosts file&lt;br /&gt;
 Name: gimel-sge&lt;br /&gt;
 host: gimel&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 Name: gimel2-sge&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q gpu.q -pe local %NPROC% -l gpu=1&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 32&lt;br /&gt;
 gpgpu: 0, nvidia&lt;br /&gt;
 gpgpu: 1, nvidia&lt;br /&gt;
 gpgpu: 2, nvidia&lt;br /&gt;
 gpgpu: 3, nvidia&lt;br /&gt;
 parallel: 1&lt;br /&gt;
 &lt;br /&gt;
 name: gimel2-n923q&lt;br /&gt;
 host: gimel2&lt;br /&gt;
 queue: SGE&lt;br /&gt;
 qargs: -q n-9-23.q -pe local %NPROC%&lt;br /&gt;
 tmpdir: /scratch&lt;br /&gt;
 processors: 80&lt;br /&gt;
 parallel: 1&lt;br /&gt;
&lt;br /&gt;
Since we use opengrid engine, we must configure the queue config file that exists for SGE.  This file is located in the $SCHRODINGER/queues/SGE/config.&lt;br /&gt;
&lt;br /&gt;
 QPATH=/usr/bin/&lt;br /&gt;
 QPROFILE=/nfs/ge/ucsf.bks/cell/common/settings.sh&lt;br /&gt;
 QSUB=qsub&lt;br /&gt;
 QDEL=qdel&lt;br /&gt;
 QSTAT=qstat&lt;br /&gt;
 LICENSE_CHECKING=yes&lt;br /&gt;
  &lt;br /&gt;
===Troubleshooting Schrodinger Issues=== &lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11736</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11736"/>
		<updated>2019-05-10T23:22:07Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Libvirt, Hypervisors, and TLS */  correction of paths&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
&lt;br /&gt;
 # this section doesn&#039;t need to be done if they symlinks already exist &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.&lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to the libvirt-relevant sections on both the puppetmaster AND the hypervisors.  Otherwise, foreman cannot interact with the hypervisors/VMs.  &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/private/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful)&lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I was getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11735</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11735"/>
		<updated>2019-05-10T23:20:28Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Libvirt, Hypervisors, and TLS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
&lt;br /&gt;
 # this section doesn&#039;t need to be done if they symlinks already exist &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.&lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to the libvirt-relevant sections on both the puppetmaster AND the hypervisors.  Otherwise, foreman cannot interact with the hypervisors/VMs.  &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful)&lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I was getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11734</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11734"/>
		<updated>2019-05-10T18:58:43Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Possible Other Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
&lt;br /&gt;
 # this section doesn&#039;t need to be done if they symlinks already exist &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.&lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to the libvirt-relevant sections on both the puppetmaster AND the hypervisors.  Otherwise, foreman cannot interact with the hypervisors/VMs.  &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful)&lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I was getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11733</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11733"/>
		<updated>2019-05-10T18:58:23Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Libvirt, Hypervisors, and TLS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
&lt;br /&gt;
 # this section doesn&#039;t need to be done if they symlinks already exist &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.&lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to the libvirt-relevant sections on both the puppetmaster AND the hypervisors.  Otherwise, foreman cannot interact with the hypervisors/VMs.  &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful)&lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I am getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.  &lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11732</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11732"/>
		<updated>2019-05-10T18:57:21Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Renewing Foreman&amp;#039;s certificates (in progress) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
&lt;br /&gt;
 # this section doesn&#039;t need to be done if they symlinks already exist &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.&lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to several locations on both the puppetmaster AND the hypervisors. &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful) &lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I am getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.  &lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11731</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11731"/>
		<updated>2019-05-10T18:56:32Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: added section for TLS on hypervisors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Libvirt, Hypervisors, and TLS===&lt;br /&gt;
alpha/puppetmaster is used to manage the VMs.  To add to the hassle of renewing Puppet certificates, we also have to copy the renewed certificates to several locations on both the puppetmaster AND the hypervisors. &lt;br /&gt;
&lt;br /&gt;
Only do this once on the puppetmaster (hostname will depend on which name you used while regenerating SSL certs.  I used alpha.ucsf.bkslab.org.pem): &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname of puppetmaster&amp;gt;.pem to /etc/pki/libvirt/clientcert.pem &lt;br /&gt;
  copy /var/lib/puppet/ssl/private_keys/alpha.ucsf.bkslab.org.pem to /etc/pki/libvirt/private/clientkey.pem&lt;br /&gt;
&lt;br /&gt;
We have several hypervisors, so this may need to be repeated on each one.  Do this on the hypervisors: &lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/ca.pem to /etc/pki/CA/cacert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/servercert.pem&lt;br /&gt;
  copy /var/lib/puppet/ssl/certs/private_keys/&amp;lt;hostname&amp;gt;.pem to /etc/pki/libvirt/serverkey.pem&lt;br /&gt;
  service libvirtd restart (if you did anything wrong, this will fail.  Be careful) &lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I am getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This was a foreman SSL error.  This happened because foreman was still using the old SSL certs that existed in /var/lib/puppet/ssl/certs.  It was referencing a certificate file called alpha.cluster.ucsf.bkslab.org.  The certificate I renewed was called alpha.ucsf.bkslab.org.  I had to go to foreman.ucsf.bkslab.org then click Administer -&amp;gt; Settings -&amp;gt; Auth.  I had to adjust the lines for ssl_certificate and ssl_priv_key to point to the new certificates I made.  Then, foreman-proxy was working again.  &lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zfs&amp;diff=11724</id>
		<title>Zfs</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zfs&amp;diff=11724"/>
		<updated>2019-05-06T21:32:10Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Example: Fixing degraded pool, replacing faulted disk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ZFS - Zettabyte Filesystem&lt;br /&gt;
&lt;br /&gt;
== Beginning ZFS instances ==&lt;br /&gt;
&lt;br /&gt;
There are only two commmands to interact with ZFS.  &lt;br /&gt;
&lt;br /&gt;
 zpool: used to create a ZFS vdev (virtual device).  vdevs are composed of physical devices.  &lt;br /&gt;
 zfs: used to create/interact with a ZFS dataset.  ZFS datasets are akin to logical volumes&lt;br /&gt;
&lt;br /&gt;
 # zpool creation syntax&lt;br /&gt;
 zpool create &amp;lt;poolname&amp;gt; &amp;lt;vdev(s)&amp;gt; &lt;br /&gt;
 # Create a zpool of six raidz2 vdevs, each with six drives.  Includes two SSDs to used as a mirrored SLOG and one SSD as an L2ARC read cache.  (example commmand was run on qof) &lt;br /&gt;
 zpool create ex9 raidz2 sda sdb sdc sdd sde sdf raidz2 sdg sdh sdi sdj sdk sdl raidz2 sdm sdn sdo sdp sdq sdr raidz2 sds sdt sdu sdv sdw sdx raidz2 sdy sdz sdaa sdab sdac sdad raidz2 sdae sdaf sdag sdah sdai sdaj log mirror ata-INTEL_SSDSC2KG480G7_BTYM740603E0480BGN ata-INTEL_SSDSC2KG480G7_BTYM7406019K480BGN cache ata-INTEL_SSDSC2KG480G7_BTYM740602GN480BGN&lt;br /&gt;
  [root@qof ~]# zpool status&lt;br /&gt;
  pool: ex9&lt;br /&gt;
  state: ONLINE&lt;br /&gt;
  scan: none requested&lt;br /&gt;
  config:&lt;br /&gt;
  NAME                                            STATE     READ WRITE CKSUM&lt;br /&gt;
  ex9                                             ONLINE       0     0     0&lt;br /&gt;
  raidz2-0                                      ONLINE       0     0     0&lt;br /&gt;
    sda                                         ONLINE       0     0     0&lt;br /&gt;
    sdb                                         ONLINE       0     0     0&lt;br /&gt;
    sdc                                         ONLINE       0     0     0&lt;br /&gt;
    sdd                                         ONLINE       0     0     0&lt;br /&gt;
    sde                                         ONLINE       0     0     0&lt;br /&gt;
    sdf                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-1                                      ONLINE       0     0     0&lt;br /&gt;
    sdg                                         ONLINE       0     0     0&lt;br /&gt;
    sdh                                         ONLINE       0     0     0&lt;br /&gt;
    sdi                                         ONLINE       0     0     0&lt;br /&gt;
    sdj                                         ONLINE       0     0     0&lt;br /&gt;
    sdk                                         ONLINE       0     0     0&lt;br /&gt;
    sdl                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-2                                      ONLINE       0     0     0&lt;br /&gt;
    sdm                                         ONLINE       0     0     0&lt;br /&gt;
    sdn                                         ONLINE       0     0     0&lt;br /&gt;
    sdo                                         ONLINE       0     0     0&lt;br /&gt;
    sdp                                         ONLINE       0     0     0&lt;br /&gt;
    sdq                                         ONLINE       0     0     0&lt;br /&gt;
    sdr                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-3                                      ONLINE       0     0     0&lt;br /&gt;
    sds                                         ONLINE       0     0     0&lt;br /&gt;
    sdt                                         ONLINE       0     0     0&lt;br /&gt;
    sdu                                         ONLINE       0     0     0&lt;br /&gt;
    sdv                                         ONLINE       0     0     0&lt;br /&gt;
    sdw                                         ONLINE       0     0     0&lt;br /&gt;
    sdx                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-4                                      ONLINE       0     0     0&lt;br /&gt;
    sdy                                         ONLINE       0     0     0&lt;br /&gt;
    sdz                                         ONLINE       0     0     0&lt;br /&gt;
    sdaa                                        ONLINE       0     0     0&lt;br /&gt;
    sdab                                        ONLINE       0     0     0&lt;br /&gt;
    sdac                                        ONLINE       0     0     0&lt;br /&gt;
    sdad                                        ONLINE       0     0     0&lt;br /&gt;
  raidz2-5                                      ONLINE       0     0     0&lt;br /&gt;
    sdae                                        ONLINE       0     0     0&lt;br /&gt;
    sdaf                                        ONLINE       0     0     0&lt;br /&gt;
    sdag                                        ONLINE       0     0     0&lt;br /&gt;
    sdah                                        ONLINE       0     0     0&lt;br /&gt;
    sdai                                        ONLINE       0     0     0&lt;br /&gt;
    sdaj                                        ONLINE       0     0     0&lt;br /&gt;
  logs&lt;br /&gt;
  mirror-6                                      ONLINE       0     0     0&lt;br /&gt;
    ata-INTEL_SSDSC2KG480G7_BTYM740603E0480BGN  ONLINE       0     0     0&lt;br /&gt;
    ata-INTEL_SSDSC2KG480G7_BTYM7406019K480BGN  ONLINE       0     0     0&lt;br /&gt;
  cache&lt;br /&gt;
  ata-INTEL_SSDSC2KG480G7_BTYM740602GN480BGN    ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
Adding a zfs filesystem: &lt;br /&gt;
&lt;br /&gt;
Using qof as an example, I will create a child filesystem under ex9 named archive that will be mounted under /export/ex9/archive.  This archive will be used to backup user data.&lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ zfs list&lt;br /&gt;
 NAME          USED  AVAIL  REFER  MOUNTPOINT&lt;br /&gt;
 ex9          2.39T   249T  2.39T  /export/ex9&lt;br /&gt;
 -bash-4.2$ sudo zfs create -o mountpoint=/export/ex9/archive ex9/archive &lt;br /&gt;
 -bash-4.2$ zfs list&lt;br /&gt;
 NAME          USED  AVAIL  REFER  MOUNTPOINT&lt;br /&gt;
 ex9          2.39T   249T  2.39T  /export/ex9&lt;br /&gt;
 ex9/archive   192K   249T   192K  /export/ex9/archive&lt;br /&gt;
&lt;br /&gt;
== Adding L2ARC Read Cache to a zpool==&lt;br /&gt;
 # Look for available SSDs in /dev/disk/by-id/&lt;br /&gt;
 # Choose an available SSD to use for read cache.  Then decide which pool you want to put the cache on. &lt;br /&gt;
 Syntax: zpool add &amp;lt;zpool name&amp;gt; &amp;lt;cache/log&amp;gt; &amp;lt;path to disk&amp;gt;&lt;br /&gt;
 $ sudo zpool add ex6 cache /dev/disk/by-id/ata-INTEL_SSDSC2KG480G7_BTYM72830AV6480BGN&lt;br /&gt;
&lt;br /&gt;
== Tuning ZFS options ==&lt;br /&gt;
  # stores extended attributes as system attributes to improve performance&lt;br /&gt;
  $ zfs xattr=sa &amp;lt;zfs dataset name&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  # Turn on ZFS lz4 compression.  Use this for compressible dataset such as many files with text &lt;br /&gt;
  $ zfs set compression=lz4 &amp;lt;zfs dataset name&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  # Turn off access time for improved disk performance (so that the OS doesn&#039;t write a new time every time a file is accessed)&lt;br /&gt;
  $ zfs set atime=off &amp;lt;zfs dataset name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  NOTE: ZFS performance degrades tremendously when the zpool is over 80% used.  To avoid this, I have set a quota to 80% of the 248TB in qof/nfs-ex9.&lt;br /&gt;
  # To set a quota of 200TB on ZFS dataset:&lt;br /&gt;
  $ zfs set quota=200T &amp;lt;zfs dataset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # To remove a quota from a ZFS dataset:&lt;br /&gt;
  $ zfs set quota=none &amp;lt;zfs dataset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, ZFS pools/mounts do not have ACLs active.  &lt;br /&gt;
  # to active access control lists on a zpool&lt;br /&gt;
  $ sudo zfs set acltype=posixacl &amp;lt;pool name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== situation ==&lt;br /&gt;
 zpool status&lt;br /&gt;
 zfs list&lt;br /&gt;
 zfs get all&lt;br /&gt;
&lt;br /&gt;
== mount after reboot ==&lt;br /&gt;
 zfs set mountpoint=/export/db2 db2 &lt;br /&gt;
&lt;br /&gt;
== when you put in a new disk ==&lt;br /&gt;
 fdisk -l &lt;br /&gt;
to see what is new&lt;br /&gt;
&lt;br /&gt;
 sudo zpool create -f /srv/db3 raidz2 /dev/sdaa  /dev/sdab  /dev/sdac  /dev/sdad  /dev/sdae  /dev/sdaf  /dev/sdag  /dev/sdah  /dev/sdai  /dev/sdaj  /dev/sdak  /dev/sdal  &lt;br /&gt;
 sudo zpool add -f /srv/db3 raidz2  /dev/sdam  /dev/sdan  /dev/sdao  /dev/sdap  /dev/sdaq  /dev/sdar  /dev/sdas  /dev/sdat  /dev/sdau  /dev/sdav  /dev/sdaw  /dev/sdax&lt;br /&gt;
&lt;br /&gt;
 zfs unmount db3&lt;br /&gt;
&lt;br /&gt;
 zfs mount db3&lt;br /&gt;
&lt;br /&gt;
= latest = &lt;br /&gt;
 zpool create -f db3 raidz2  /dev/sdy /dev/sdz  /dev/sdaa  /dev/sdab  /dev/sdac  /dev/sdad  /dev/sdae  /dev/sdaf  /dev/sdag  /dev/sdah  /dev/sdai  /dev/sdaj&lt;br /&gt;
 zpool add -f db3 raidz2 /dev/sdak  /dev/sdal  /dev/sdam  /dev/sdan  /dev/sdao  /dev/sdap  /dev/sdaq  /dev/sdar  /dev/sdas  /dev/sdat  /dev/sdau  /dev/sdav&lt;br /&gt;
&lt;br /&gt;
 zpool create -f db4 raidz2 /dev/sdax /dev/sday /dev/sdaz /dev/sdba  /dev/sdbb  /dev/sdbc  /dev/sdbd  /dev/sdbe  /dev/sdbf  /dev/sdbg  /dev/sdbh  /dev/sdbi &lt;br /&gt;
 zpool add -f db4 raidz2 /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm /dev/sdbn /dev/sdbo /dev/sdbp /dev/sdbq /dev/sdbr /dev/sdbs /dev/sdbt /dev/sdbu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Fri Jan 19 2018 = &lt;br /&gt;
&lt;br /&gt;
 zpool create -f db5 raidz2 /dev/sdbw /dev/sdbx /dev/sdby /dev/sdbz /dev/sdca  /dev/sdcb  /dev/sdcc  /dev/sdcd  /dev/sdce  /dev/sdcf  /dev/sdcg  /dev/sdch&lt;br /&gt;
 zpool add -f db5 raidz2 /dev/sdci /dev/sdcj /dev/sdck /dev/sdcl /dev/sdcm /dev/sdcn /dev/sdco /dev/sdcp /dev/sdcq /dev/sdcr /dev/sdcs /dev/sdct&lt;br /&gt;
 zfs mount db5&lt;br /&gt;
&lt;br /&gt;
= Wed Jan 24 2018 = &lt;br /&gt;
On tsadi&lt;br /&gt;
 zpool create -f ex1 mirror /dev/sdaa /dev/sdab /dev/sdac /dev/sdad /dev/sdae&lt;br /&gt;
 zpool add -f ex1 mirror /dev/sdaf /dev/sdag /dev/sdah /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex2 mirror /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj&lt;br /&gt;
 zpool add -f ex2 /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo&lt;br /&gt;
 zpool create -f ex3 mirror /dev/sdp /dev/sdq /dev/sdr /dev/sds /dev/sdt&lt;br /&gt;
 zpool add -f ex3 mirror /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy&lt;br /&gt;
 zpool create -f ex4 mirror /dev/sdz /dev/sdak /dev/sdal&lt;br /&gt;
 zpool add -f ex4 mirror /dev/sdam /dev/sdan /dev/sdao&lt;br /&gt;
&lt;br /&gt;
On tsadi&lt;br /&gt;
 zpool create -f ex1 mirror /dev/sdaa /dev/sdab mirror /dev/sdac /dev/sdad mirror /dev/sdae /dev/sdaf mirror /dev/sdag /dev/sdah mirror  /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex2 mirror  /dev/sdf /dev/sdg mirror /dev/sdh /dev/sdi mirror /dev/sdj /dev/sdk mirror /dev/sdl /dev/sdm mirror /dev/sdn /dev/sdo&lt;br /&gt;
 zpool create -f ex3 mirror /dev/sdp /dev/sdq mirror /dev/sdr /dev/sds mirro /dev/sdt /dev/sdu mirror /dev/sdv /dev/sdw mirror /dev/sdx /dev/sdy&lt;br /&gt;
 zpool create -f ex4 mirror /dev/sdz /dev/sdak /dev/sdal  mirror /dev/sdam mirror /dev/sdan /dev/sdao&lt;br /&gt;
&lt;br /&gt;
On lamed&lt;br /&gt;
 zpool create -f ex5 mirror /dev/sdaa /dev/sdab mirror /dev/sdac /dev/sdad mirror /dev/sdae /dev/sdaf mirror /dev/sdag /dev/sdah mirror  /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex6 mirror  /dev/sda /dev/sdb mirror /dev/sdc /dev/sdd mirror /dev/sde /dev/sdf mirror /dev/sdg /dev/sdh mirror /dev/sdi /dev/sdj&lt;br /&gt;
 zpool create -f ex7 mirror  /dev/sdk /dev/sdl mirror /dev/sdm /dev/sdn mirror /dev/sdo /dev/sdp mirror /dev/sdq /dev/sdr mirror /dev/sds /dev/sdt&lt;br /&gt;
 zpool create -f ex8 mirror /dev/sdu /dev/sdv mirror /dev/sdw /dev/sdx mirror /dev/sdy /dev/sdz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zfs mount &lt;br /&gt;
== recovery from accidental pool destruction ==&lt;br /&gt;
 umount /mnt /mnt2&lt;br /&gt;
 mdadm -S /dev/md125/dev/md126/dev/md127&lt;br /&gt;
&lt;br /&gt;
 sfdisk -d /dev/sda &amp;lt; sda.sfdisk&lt;br /&gt;
 sfdisk -d /dev/sdb &amp;lt; sdb.sfdisk&lt;br /&gt;
 sfdisk /dev/sda &amp;lt; sdb.sfdisk&lt;br /&gt;
&lt;br /&gt;
 mdadm --detail /dev/md127&lt;br /&gt;
 mdadm -A -R /dev/md127/dev/sdb2/dev/sda2&lt;br /&gt;
 mdadm /dev/md127 -a /dev/sda2&lt;br /&gt;
 mdadm --detail /dev/md127&lt;br /&gt;
 echo check &amp;gt; /sys/block/md127/md/sync_action&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
 mdadm --detail /dev/md126&lt;br /&gt;
 mdadm -A -R /dev/md126/dev/sdb3/dev/sda3&lt;br /&gt;
 mdadm /dev/md126 -a /dev/sda3&lt;br /&gt;
 mdadm --detail /dev/md126&lt;br /&gt;
 echo check &amp;gt; /sys/block/md126/md/sync_action&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Also switched the bios to boot from hd2 instead of hd1 (or something)&lt;br /&gt;
&lt;br /&gt;
* Recreate zpool with correct drives&lt;br /&gt;
* Point an instance photorec at each of the wiped drives set to recover files of the following types: .gz, .solv (custom definition)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE:  If you destroyed your zpool with command &#039;zpool destroy&#039;, you can use the command &#039;zpool import&#039; to view destroyed pools and recover the pool by doing &#039;zpool import &amp;lt;zpool name&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Example: Fixing degraded pool, replacing faulted disk=&lt;br /&gt;
On Feb 22, 2019, one of nfs-ex9&#039;s disks became faulty.  &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;zpool status&#039;&#039;&#039;&lt;br /&gt;
 pool: ex9&lt;br /&gt;
 state: DEGRADED&lt;br /&gt;
 status: One or more devices are faulted in response to persistent errors.&lt;br /&gt;
 	Sufficient replicas exist for the pool to continue functioning in a&lt;br /&gt;
 	degraded state.&lt;br /&gt;
 action: Replace the faulted device, or use &#039;zpool clear&#039; to mark the device&lt;br /&gt;
 	repaired.&lt;br /&gt;
   scan: scrub canceled on Fri Feb 22 11:31:25 2019&lt;br /&gt;
 config:&lt;br /&gt;
          raidz2-5                                      DEGRADED     0     0     0&lt;br /&gt;
 sdae                                        ONLINE       0     0     0&lt;br /&gt;
 sdaf                                        ONLINE       0     0     0&lt;br /&gt;
 sdag                                        ONLINE       0     0     0&lt;br /&gt;
 sdah                                        FAULTED     18     0     0  too many errors&lt;br /&gt;
 sdai                                        ONLINE       0     0     0&lt;br /&gt;
 sdaj                                        ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did the following: &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;sudo zpool offline ex9 sdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then I went to the server room to see that disk 1 still had a red light due to the fault.  I pulled the disk out.  Inserted a fresh one of the same brand, a Seagate Exos X12.  The server detected the new disk and set the disk name as /dev/sdb, just like the one I just pulled out.  Finally, I did the following command. &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;sudo zpool replace ex9 /dev/sdah&#039;&#039;&#039;&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;zpool status&#039;&#039;&#039;&lt;br /&gt;
  pool: ex9&lt;br /&gt;
 state: DEGRADED&lt;br /&gt;
 status: One or more devices is currently being resilvered.  The pool will&lt;br /&gt;
 continue to function, possibly in a degraded state.&lt;br /&gt;
 action: Wait for the resilver to complete.&lt;br /&gt;
  scan: resilver in progress since Tue Mar 19 14:06:33 2019&lt;br /&gt;
 1.37G scanned out of 51.8T at 127M/s, 118h33m to go&lt;br /&gt;
 37.9M resilvered, 0.00% done&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 	  raidz2-5                                      DEGRADED     0     0     0&lt;br /&gt;
    sdae                                        ONLINE       0     0     0&lt;br /&gt;
    sdaf                                        ONLINE       0     0     0&lt;br /&gt;
    sdag                                        ONLINE       0     0     0&lt;br /&gt;
    replacing-3                                 DEGRADED     0     0     0&lt;br /&gt;
      old                                       FAULTED     18     0     0  too many errors&lt;br /&gt;
      sdah                                      ONLINE       0     0     0  (resilvering)&lt;br /&gt;
    sdai                                        ONLINE       0     0     0&lt;br /&gt;
    sdaj                                        ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
Resilvering is the process of a disk being rebuilt from its parity group.  Once it is finished, you should be good to go again. &lt;br /&gt;
&lt;br /&gt;
For qof/nfs-ex9, we had an issue with the disk LED for /dev/sdah still showing up red despite the resilvering occurring.  To return the disk LED to a normal status, issue the following command: &lt;br /&gt;
 $ &#039;&#039;&#039;sudo ledctl normal=/dev/&amp;lt;disk id&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
 Example: $ &#039;&#039;&#039;sudo ledctl normal=/dev/sdah&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Curator]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zfs&amp;diff=11723</id>
		<title>Zfs</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zfs&amp;diff=11723"/>
		<updated>2019-05-06T21:31:50Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Example: Fixing degraded pool, replacing faulted disk */  added section on how to normalize LED state&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ZFS - Zettabyte Filesystem&lt;br /&gt;
&lt;br /&gt;
== Beginning ZFS instances ==&lt;br /&gt;
&lt;br /&gt;
There are only two commmands to interact with ZFS.  &lt;br /&gt;
&lt;br /&gt;
 zpool: used to create a ZFS vdev (virtual device).  vdevs are composed of physical devices.  &lt;br /&gt;
 zfs: used to create/interact with a ZFS dataset.  ZFS datasets are akin to logical volumes&lt;br /&gt;
&lt;br /&gt;
 # zpool creation syntax&lt;br /&gt;
 zpool create &amp;lt;poolname&amp;gt; &amp;lt;vdev(s)&amp;gt; &lt;br /&gt;
 # Create a zpool of six raidz2 vdevs, each with six drives.  Includes two SSDs to used as a mirrored SLOG and one SSD as an L2ARC read cache.  (example commmand was run on qof) &lt;br /&gt;
 zpool create ex9 raidz2 sda sdb sdc sdd sde sdf raidz2 sdg sdh sdi sdj sdk sdl raidz2 sdm sdn sdo sdp sdq sdr raidz2 sds sdt sdu sdv sdw sdx raidz2 sdy sdz sdaa sdab sdac sdad raidz2 sdae sdaf sdag sdah sdai sdaj log mirror ata-INTEL_SSDSC2KG480G7_BTYM740603E0480BGN ata-INTEL_SSDSC2KG480G7_BTYM7406019K480BGN cache ata-INTEL_SSDSC2KG480G7_BTYM740602GN480BGN&lt;br /&gt;
  [root@qof ~]# zpool status&lt;br /&gt;
  pool: ex9&lt;br /&gt;
  state: ONLINE&lt;br /&gt;
  scan: none requested&lt;br /&gt;
  config:&lt;br /&gt;
  NAME                                            STATE     READ WRITE CKSUM&lt;br /&gt;
  ex9                                             ONLINE       0     0     0&lt;br /&gt;
  raidz2-0                                      ONLINE       0     0     0&lt;br /&gt;
    sda                                         ONLINE       0     0     0&lt;br /&gt;
    sdb                                         ONLINE       0     0     0&lt;br /&gt;
    sdc                                         ONLINE       0     0     0&lt;br /&gt;
    sdd                                         ONLINE       0     0     0&lt;br /&gt;
    sde                                         ONLINE       0     0     0&lt;br /&gt;
    sdf                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-1                                      ONLINE       0     0     0&lt;br /&gt;
    sdg                                         ONLINE       0     0     0&lt;br /&gt;
    sdh                                         ONLINE       0     0     0&lt;br /&gt;
    sdi                                         ONLINE       0     0     0&lt;br /&gt;
    sdj                                         ONLINE       0     0     0&lt;br /&gt;
    sdk                                         ONLINE       0     0     0&lt;br /&gt;
    sdl                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-2                                      ONLINE       0     0     0&lt;br /&gt;
    sdm                                         ONLINE       0     0     0&lt;br /&gt;
    sdn                                         ONLINE       0     0     0&lt;br /&gt;
    sdo                                         ONLINE       0     0     0&lt;br /&gt;
    sdp                                         ONLINE       0     0     0&lt;br /&gt;
    sdq                                         ONLINE       0     0     0&lt;br /&gt;
    sdr                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-3                                      ONLINE       0     0     0&lt;br /&gt;
    sds                                         ONLINE       0     0     0&lt;br /&gt;
    sdt                                         ONLINE       0     0     0&lt;br /&gt;
    sdu                                         ONLINE       0     0     0&lt;br /&gt;
    sdv                                         ONLINE       0     0     0&lt;br /&gt;
    sdw                                         ONLINE       0     0     0&lt;br /&gt;
    sdx                                         ONLINE       0     0     0&lt;br /&gt;
  raidz2-4                                      ONLINE       0     0     0&lt;br /&gt;
    sdy                                         ONLINE       0     0     0&lt;br /&gt;
    sdz                                         ONLINE       0     0     0&lt;br /&gt;
    sdaa                                        ONLINE       0     0     0&lt;br /&gt;
    sdab                                        ONLINE       0     0     0&lt;br /&gt;
    sdac                                        ONLINE       0     0     0&lt;br /&gt;
    sdad                                        ONLINE       0     0     0&lt;br /&gt;
  raidz2-5                                      ONLINE       0     0     0&lt;br /&gt;
    sdae                                        ONLINE       0     0     0&lt;br /&gt;
    sdaf                                        ONLINE       0     0     0&lt;br /&gt;
    sdag                                        ONLINE       0     0     0&lt;br /&gt;
    sdah                                        ONLINE       0     0     0&lt;br /&gt;
    sdai                                        ONLINE       0     0     0&lt;br /&gt;
    sdaj                                        ONLINE       0     0     0&lt;br /&gt;
  logs&lt;br /&gt;
  mirror-6                                      ONLINE       0     0     0&lt;br /&gt;
    ata-INTEL_SSDSC2KG480G7_BTYM740603E0480BGN  ONLINE       0     0     0&lt;br /&gt;
    ata-INTEL_SSDSC2KG480G7_BTYM7406019K480BGN  ONLINE       0     0     0&lt;br /&gt;
  cache&lt;br /&gt;
  ata-INTEL_SSDSC2KG480G7_BTYM740602GN480BGN    ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
Adding a zfs filesystem: &lt;br /&gt;
&lt;br /&gt;
Using qof as an example, I will create a child filesystem under ex9 named archive that will be mounted under /export/ex9/archive.  This archive will be used to backup user data.&lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ zfs list&lt;br /&gt;
 NAME          USED  AVAIL  REFER  MOUNTPOINT&lt;br /&gt;
 ex9          2.39T   249T  2.39T  /export/ex9&lt;br /&gt;
 -bash-4.2$ sudo zfs create -o mountpoint=/export/ex9/archive ex9/archive &lt;br /&gt;
 -bash-4.2$ zfs list&lt;br /&gt;
 NAME          USED  AVAIL  REFER  MOUNTPOINT&lt;br /&gt;
 ex9          2.39T   249T  2.39T  /export/ex9&lt;br /&gt;
 ex9/archive   192K   249T   192K  /export/ex9/archive&lt;br /&gt;
&lt;br /&gt;
== Adding L2ARC Read Cache to a zpool==&lt;br /&gt;
 # Look for available SSDs in /dev/disk/by-id/&lt;br /&gt;
 # Choose an available SSD to use for read cache.  Then decide which pool you want to put the cache on. &lt;br /&gt;
 Syntax: zpool add &amp;lt;zpool name&amp;gt; &amp;lt;cache/log&amp;gt; &amp;lt;path to disk&amp;gt;&lt;br /&gt;
 $ sudo zpool add ex6 cache /dev/disk/by-id/ata-INTEL_SSDSC2KG480G7_BTYM72830AV6480BGN&lt;br /&gt;
&lt;br /&gt;
== Tuning ZFS options ==&lt;br /&gt;
  # stores extended attributes as system attributes to improve performance&lt;br /&gt;
  $ zfs xattr=sa &amp;lt;zfs dataset name&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  # Turn on ZFS lz4 compression.  Use this for compressible dataset such as many files with text &lt;br /&gt;
  $ zfs set compression=lz4 &amp;lt;zfs dataset name&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  # Turn off access time for improved disk performance (so that the OS doesn&#039;t write a new time every time a file is accessed)&lt;br /&gt;
  $ zfs set atime=off &amp;lt;zfs dataset name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  NOTE: ZFS performance degrades tremendously when the zpool is over 80% used.  To avoid this, I have set a quota to 80% of the 248TB in qof/nfs-ex9.&lt;br /&gt;
  # To set a quota of 200TB on ZFS dataset:&lt;br /&gt;
  $ zfs set quota=200T &amp;lt;zfs dataset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # To remove a quota from a ZFS dataset:&lt;br /&gt;
  $ zfs set quota=none &amp;lt;zfs dataset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, ZFS pools/mounts do not have ACLs active.  &lt;br /&gt;
  # to active access control lists on a zpool&lt;br /&gt;
  $ sudo zfs set acltype=posixacl &amp;lt;pool name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== situation ==&lt;br /&gt;
 zpool status&lt;br /&gt;
 zfs list&lt;br /&gt;
 zfs get all&lt;br /&gt;
&lt;br /&gt;
== mount after reboot ==&lt;br /&gt;
 zfs set mountpoint=/export/db2 db2 &lt;br /&gt;
&lt;br /&gt;
== when you put in a new disk ==&lt;br /&gt;
 fdisk -l &lt;br /&gt;
to see what is new&lt;br /&gt;
&lt;br /&gt;
 sudo zpool create -f /srv/db3 raidz2 /dev/sdaa  /dev/sdab  /dev/sdac  /dev/sdad  /dev/sdae  /dev/sdaf  /dev/sdag  /dev/sdah  /dev/sdai  /dev/sdaj  /dev/sdak  /dev/sdal  &lt;br /&gt;
 sudo zpool add -f /srv/db3 raidz2  /dev/sdam  /dev/sdan  /dev/sdao  /dev/sdap  /dev/sdaq  /dev/sdar  /dev/sdas  /dev/sdat  /dev/sdau  /dev/sdav  /dev/sdaw  /dev/sdax&lt;br /&gt;
&lt;br /&gt;
 zfs unmount db3&lt;br /&gt;
&lt;br /&gt;
 zfs mount db3&lt;br /&gt;
&lt;br /&gt;
= latest = &lt;br /&gt;
 zpool create -f db3 raidz2  /dev/sdy /dev/sdz  /dev/sdaa  /dev/sdab  /dev/sdac  /dev/sdad  /dev/sdae  /dev/sdaf  /dev/sdag  /dev/sdah  /dev/sdai  /dev/sdaj&lt;br /&gt;
 zpool add -f db3 raidz2 /dev/sdak  /dev/sdal  /dev/sdam  /dev/sdan  /dev/sdao  /dev/sdap  /dev/sdaq  /dev/sdar  /dev/sdas  /dev/sdat  /dev/sdau  /dev/sdav&lt;br /&gt;
&lt;br /&gt;
 zpool create -f db4 raidz2 /dev/sdax /dev/sday /dev/sdaz /dev/sdba  /dev/sdbb  /dev/sdbc  /dev/sdbd  /dev/sdbe  /dev/sdbf  /dev/sdbg  /dev/sdbh  /dev/sdbi &lt;br /&gt;
 zpool add -f db4 raidz2 /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm /dev/sdbn /dev/sdbo /dev/sdbp /dev/sdbq /dev/sdbr /dev/sdbs /dev/sdbt /dev/sdbu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Fri Jan 19 2018 = &lt;br /&gt;
&lt;br /&gt;
 zpool create -f db5 raidz2 /dev/sdbw /dev/sdbx /dev/sdby /dev/sdbz /dev/sdca  /dev/sdcb  /dev/sdcc  /dev/sdcd  /dev/sdce  /dev/sdcf  /dev/sdcg  /dev/sdch&lt;br /&gt;
 zpool add -f db5 raidz2 /dev/sdci /dev/sdcj /dev/sdck /dev/sdcl /dev/sdcm /dev/sdcn /dev/sdco /dev/sdcp /dev/sdcq /dev/sdcr /dev/sdcs /dev/sdct&lt;br /&gt;
 zfs mount db5&lt;br /&gt;
&lt;br /&gt;
= Wed Jan 24 2018 = &lt;br /&gt;
On tsadi&lt;br /&gt;
 zpool create -f ex1 mirror /dev/sdaa /dev/sdab /dev/sdac /dev/sdad /dev/sdae&lt;br /&gt;
 zpool add -f ex1 mirror /dev/sdaf /dev/sdag /dev/sdah /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex2 mirror /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj&lt;br /&gt;
 zpool add -f ex2 /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo&lt;br /&gt;
 zpool create -f ex3 mirror /dev/sdp /dev/sdq /dev/sdr /dev/sds /dev/sdt&lt;br /&gt;
 zpool add -f ex3 mirror /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy&lt;br /&gt;
 zpool create -f ex4 mirror /dev/sdz /dev/sdak /dev/sdal&lt;br /&gt;
 zpool add -f ex4 mirror /dev/sdam /dev/sdan /dev/sdao&lt;br /&gt;
&lt;br /&gt;
On tsadi&lt;br /&gt;
 zpool create -f ex1 mirror /dev/sdaa /dev/sdab mirror /dev/sdac /dev/sdad mirror /dev/sdae /dev/sdaf mirror /dev/sdag /dev/sdah mirror  /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex2 mirror  /dev/sdf /dev/sdg mirror /dev/sdh /dev/sdi mirror /dev/sdj /dev/sdk mirror /dev/sdl /dev/sdm mirror /dev/sdn /dev/sdo&lt;br /&gt;
 zpool create -f ex3 mirror /dev/sdp /dev/sdq mirror /dev/sdr /dev/sds mirro /dev/sdt /dev/sdu mirror /dev/sdv /dev/sdw mirror /dev/sdx /dev/sdy&lt;br /&gt;
 zpool create -f ex4 mirror /dev/sdz /dev/sdak /dev/sdal  mirror /dev/sdam mirror /dev/sdan /dev/sdao&lt;br /&gt;
&lt;br /&gt;
On lamed&lt;br /&gt;
 zpool create -f ex5 mirror /dev/sdaa /dev/sdab mirror /dev/sdac /dev/sdad mirror /dev/sdae /dev/sdaf mirror /dev/sdag /dev/sdah mirror  /dev/sdai /dev/sdaj&lt;br /&gt;
 zpool create -f ex6 mirror  /dev/sda /dev/sdb mirror /dev/sdc /dev/sdd mirror /dev/sde /dev/sdf mirror /dev/sdg /dev/sdh mirror /dev/sdi /dev/sdj&lt;br /&gt;
 zpool create -f ex7 mirror  /dev/sdk /dev/sdl mirror /dev/sdm /dev/sdn mirror /dev/sdo /dev/sdp mirror /dev/sdq /dev/sdr mirror /dev/sds /dev/sdt&lt;br /&gt;
 zpool create -f ex8 mirror /dev/sdu /dev/sdv mirror /dev/sdw /dev/sdx mirror /dev/sdy /dev/sdz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zfs mount &lt;br /&gt;
== recovery from accidental pool destruction ==&lt;br /&gt;
 umount /mnt /mnt2&lt;br /&gt;
 mdadm -S /dev/md125/dev/md126/dev/md127&lt;br /&gt;
&lt;br /&gt;
 sfdisk -d /dev/sda &amp;lt; sda.sfdisk&lt;br /&gt;
 sfdisk -d /dev/sdb &amp;lt; sdb.sfdisk&lt;br /&gt;
 sfdisk /dev/sda &amp;lt; sdb.sfdisk&lt;br /&gt;
&lt;br /&gt;
 mdadm --detail /dev/md127&lt;br /&gt;
 mdadm -A -R /dev/md127/dev/sdb2/dev/sda2&lt;br /&gt;
 mdadm /dev/md127 -a /dev/sda2&lt;br /&gt;
 mdadm --detail /dev/md127&lt;br /&gt;
 echo check &amp;gt; /sys/block/md127/md/sync_action&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
 mdadm --detail /dev/md126&lt;br /&gt;
 mdadm -A -R /dev/md126/dev/sdb3/dev/sda3&lt;br /&gt;
 mdadm /dev/md126 -a /dev/sda3&lt;br /&gt;
 mdadm --detail /dev/md126&lt;br /&gt;
 echo check &amp;gt; /sys/block/md126/md/sync_action&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Also switched the bios to boot from hd2 instead of hd1 (or something)&lt;br /&gt;
&lt;br /&gt;
* Recreate zpool with correct drives&lt;br /&gt;
* Point an instance photorec at each of the wiped drives set to recover files of the following types: .gz, .solv (custom definition)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE:  If you destroyed your zpool with command &#039;zpool destroy&#039;, you can use the command &#039;zpool import&#039; to view destroyed pools and recover the pool by doing &#039;zpool import &amp;lt;zpool name&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Example: Fixing degraded pool, replacing faulted disk=&lt;br /&gt;
On Feb 22, 2019, one of nfs-ex9&#039;s disks became faulty.  &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;zpool status&#039;&#039;&#039;&lt;br /&gt;
 pool: ex9&lt;br /&gt;
 state: DEGRADED&lt;br /&gt;
 status: One or more devices are faulted in response to persistent errors.&lt;br /&gt;
 	Sufficient replicas exist for the pool to continue functioning in a&lt;br /&gt;
 	degraded state.&lt;br /&gt;
 action: Replace the faulted device, or use &#039;zpool clear&#039; to mark the device&lt;br /&gt;
 	repaired.&lt;br /&gt;
   scan: scrub canceled on Fri Feb 22 11:31:25 2019&lt;br /&gt;
 config:&lt;br /&gt;
          raidz2-5                                      DEGRADED     0     0     0&lt;br /&gt;
 sdae                                        ONLINE       0     0     0&lt;br /&gt;
 sdaf                                        ONLINE       0     0     0&lt;br /&gt;
 sdag                                        ONLINE       0     0     0&lt;br /&gt;
 sdah                                        FAULTED     18     0     0  too many errors&lt;br /&gt;
 sdai                                        ONLINE       0     0     0&lt;br /&gt;
 sdaj                                        ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did the following: &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;sudo zpool offline ex9 sdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then I went to the server room to see that disk 1 still had a red light due to the fault.  I pulled the disk out.  Inserted a fresh one of the same brand, a Seagate Exos X12.  The server detected the new disk and set the disk name as /dev/sdb, just like the one I just pulled out.  Finally, I did the following command. &lt;br /&gt;
&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;sudo zpool replace ex9 /dev/sdah&#039;&#039;&#039;&lt;br /&gt;
 -bash-4.2$ &#039;&#039;&#039;zpool status&#039;&#039;&#039;&lt;br /&gt;
  pool: ex9&lt;br /&gt;
 state: DEGRADED&lt;br /&gt;
 status: One or more devices is currently being resilvered.  The pool will&lt;br /&gt;
 continue to function, possibly in a degraded state.&lt;br /&gt;
 action: Wait for the resilver to complete.&lt;br /&gt;
  scan: resilver in progress since Tue Mar 19 14:06:33 2019&lt;br /&gt;
 1.37G scanned out of 51.8T at 127M/s, 118h33m to go&lt;br /&gt;
 37.9M resilvered, 0.00% done&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 	  raidz2-5                                      DEGRADED     0     0     0&lt;br /&gt;
    sdae                                        ONLINE       0     0     0&lt;br /&gt;
    sdaf                                        ONLINE       0     0     0&lt;br /&gt;
    sdag                                        ONLINE       0     0     0&lt;br /&gt;
    replacing-3                                 DEGRADED     0     0     0&lt;br /&gt;
      old                                       FAULTED     18     0     0  too many errors&lt;br /&gt;
      sdah                                      ONLINE       0     0     0  (resilvering)&lt;br /&gt;
    sdai                                        ONLINE       0     0     0&lt;br /&gt;
    sdaj                                        ONLINE       0     0     0&lt;br /&gt;
&lt;br /&gt;
Resilvering is the process of a disk being rebuilt from its parity group.  Once it is finished, you should be good to go again. &lt;br /&gt;
&lt;br /&gt;
For qof/nfs-ex9, we had an issue with the disk LED for /dev/sdah still showing up red despite the resilvering occurring.  To return the disk LED to a normal status, issue the following command: &lt;br /&gt;
 $ sudo ledctl normal=/dev/&amp;lt;disk id&amp;gt;&lt;br /&gt;
 Example: $ sudo ledctl normal=/dev/sdah&lt;br /&gt;
&lt;br /&gt;
[[Category:Curator]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11678</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11678"/>
		<updated>2019-04-26T19:19:04Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Possible Other Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  I don&#039;t believe our puppet modules handled restarting sssd when it encountered a new certificate.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I am getting this when trying to remove a host: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11677</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11677"/>
		<updated>2019-04-26T19:18:48Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  I don&#039;t believe our puppet modules handled restarting sssd when it encountered a new certificate.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Possible Other Errors===&lt;br /&gt;
&lt;br /&gt;
I am getting: &amp;quot;Remove Reverse DNS record for n-5-35.cluster.ucsf.bkslab.org task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert ce...) for proxy https://foreman.cluster.ucsf.bkslab.org:8443/dns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11615</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11615"/>
		<updated>2019-04-08T19:47:34Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
&lt;br /&gt;
===Clearing old certificates===&lt;br /&gt;
When both the Puppet &amp;amp; Foreman certificates are renewed, you will have an entire cluster of machines that have certificates that reference the old ca.pem.  You have to regenerate them all.  Follow the instructions on: http://wiki.docking.org/index.php/PuppetTricks in the Regenerating a Certificate page.  Track which ones you do as it&#039;d be annoying to do any machine more than once.  I don&#039;t believe our puppet modules handled restarting sssd when it encountered a new certificate.  Make sure to restart sssd after a puppet client run.  &lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11614</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11614"/>
		<updated>2019-04-08T19:44:14Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
A big thanks to these two blogs for pointing me in the right direction: &lt;br /&gt;
 Sean the Sysadmin: http://www.scrosby.com/2017/06/renewing-puppet-ca-and-puppet-master.html&lt;br /&gt;
 Flying Circus: https://blog.flyingcircus.io/2017/09/01/how-to-renew-puppet-ca-and-server-certificates-in-place/&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11613</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11613"/>
		<updated>2019-04-08T19:41:13Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Renewing Foreman&amp;#039;s certificates (in progress) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
Follow the commands in the README file while in the /etc/foreman/ssl directory.  Only do this step after you&#039;ve done the Puppet certificates in the previous section.  &lt;br /&gt;
The foreman related commands here rely on the ca.pem generated by the previous puppet commands.  &lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd when this is done.  &lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11612</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11612"/>
		<updated>2019-04-08T19:38:46Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl                      (check the README file here.  In our cluster, our Puppet certs and Foreman certs are different.  You need to generate Foreman certs separately)&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf               (tells you the puppet master and puppet client FQDNs for the puppetmaster)&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Install_Miniconda&amp;diff=11603</id>
		<title>Install Miniconda</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Install_Miniconda&amp;diff=11603"/>
		<updated>2019-03-29T21:20:54Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: conda environment sharing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
Get miniconda shell script from anaconda/continuum  &lt;br /&gt;
 [username@n-9-34 ~]$ &#039;&#039;&#039;wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh&#039;&#039;&#039;&lt;br /&gt;
 --2018-10-16 14:52:55--  https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh&lt;br /&gt;
 Resolving repo.continuum.io... 104.16.18.10, 104.16.19.10, 2400:cb00:2048:1::6810:130a, ...&lt;br /&gt;
 Connecting to repo.continuum.io|104.16.18.10|:443... connected.&lt;br /&gt;
 HTTP request sent, awaiting response... 200 OK&lt;br /&gt;
 Length: 62574861 (60M) [application/x-sh]&lt;br /&gt;
 Saving to: “Miniconda3-latest-Linux-x86_64.sh”&lt;br /&gt;
 100%[======================================&amp;gt;] 62,574,861   107M/s   in 0.6s&lt;br /&gt;
 2018-10-16 14:52:55 (107 MB/s) - “Miniconda3-latest-Linux-x86_64.sh” saved [62574861/62574861]&lt;br /&gt;
&lt;br /&gt;
Run miniconda3 installer&lt;br /&gt;
 [username@n-9-34 ~]$ &#039;&#039;&#039;bash Miniconda3-latest-Linux-x86_64.sh&#039;&#039;&#039; &lt;br /&gt;
 Welcome to Miniconda3 4.5.11&lt;br /&gt;
 ...&lt;br /&gt;
 (follow wizard steps and miniconda3 will be installed)&lt;br /&gt;
 Do you accept the license terms? [yes|no]&lt;br /&gt;
 [no] &amp;gt;&amp;gt;&amp;gt; &#039;&#039;&#039;yes&#039;&#039;&#039;&lt;br /&gt;
 Miniconda3 will now be installed into this location:&lt;br /&gt;
 /nfs/home/&amp;lt;username&amp;gt;/miniconda3&lt;br /&gt;
  - Press ENTER to confirm the location&lt;br /&gt;
  - Press CTRL-C to abort the installation&lt;br /&gt;
  - Or specify a different location below&lt;br /&gt;
 [/nfs/home/&amp;lt;username&amp;gt;/miniconda3] &amp;gt;&amp;gt;&amp;gt; &#039;&#039;&#039;/nfs/home/&amp;lt;username&amp;gt;/miniconda3&#039;&#039;&#039;&lt;br /&gt;
 Do you wish the installer to prepend the Miniconda3 install location&lt;br /&gt;
 to PATH in your /nfs/home/&amp;lt;username&amp;gt;/.bashrc ? [yes|no]&lt;br /&gt;
 [no] &amp;gt;&amp;gt;&amp;gt; &#039;&#039;&#039;yes&#039;&#039;&#039;&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Thank you for installing Miniconda3!&lt;br /&gt;
&lt;br /&gt;
Log out then log back in OR run shell so your shell (bash or csh/tcsh) will be aware of the newly installed conda commands.&lt;br /&gt;
&lt;br /&gt;
Create a new conda environment with packages of your choosing.  In this example, I will create an openeye python3 environment with relevant packages.&lt;br /&gt;
$ conda create --name &amp;lt;environment name&amp;gt; &amp;lt;additional packages to install in environment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $ &#039;&#039;&#039;conda create --name oepython3 python=3&#039;&#039;&#039;&lt;br /&gt;
 Solving environment: done&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Proceed ([y]/n)? y&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 Preparing transaction: done&lt;br /&gt;
 Verifying transaction: done&lt;br /&gt;
 Executing transaction: done&lt;br /&gt;
&lt;br /&gt;
List your conda environments.  See that the environment you just created is there.&lt;br /&gt;
&lt;br /&gt;
 [username@n-9-34 ~]$ &#039;&#039;&#039;conda info --envs&#039;&#039;&#039;&lt;br /&gt;
 # conda environments:&lt;br /&gt;
 #&lt;br /&gt;
 base                  *  /nfs/home/&amp;lt;username&amp;gt;/miniconda3&lt;br /&gt;
 oepython3                /nfs/home/&amp;lt;username&amp;gt;/miniconda3/envs/oepython3&lt;br /&gt;
&lt;br /&gt;
Activate your conda environment to customize it or work with it.  I will be adjusting my openeye environment.&lt;br /&gt;
 &lt;br /&gt;
 [&amp;lt;username&amp;gt;@n-9-34 ~]$ &#039;&#039;&#039;source activate oepython3&#039;&#039;&#039;&lt;br /&gt;
 (oepython3) [&amp;lt;username&amp;gt;@n-9-34 ~]$&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t need your conda environment anymore.  Deactivate it.&lt;br /&gt;
 (oepython3) [&amp;lt;username&amp;gt;@n-9-34 ~]$ &#039;&#039;&#039;conda deactivate&#039;&#039;&#039;&lt;br /&gt;
 [&amp;lt;username&amp;gt;@n-9-34 ~]$&lt;br /&gt;
&lt;br /&gt;
===Sharing Conda Environments===&lt;br /&gt;
&lt;br /&gt;
If you run into a coworker whose using a conda environment and you would like the same environment, ask your coworker to export the environment into a YAML file.&lt;br /&gt;
 $ conda env export &amp;gt; environment.yml&lt;br /&gt;
&lt;br /&gt;
The user who wants to use that environment file will create a new environment with the YAML file as an argument&lt;br /&gt;
 $ conda env create -f environment.yml&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11601</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11601"/>
		<updated>2019-03-27T19:33:02Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
I got a great deal of clues based on the configuration files located in the following areas:&lt;br /&gt;
 /etc/foreman&lt;br /&gt;
 /etc/foreman/ssl&lt;br /&gt;
 /etc/puppet&lt;br /&gt;
 /etc/puppet/puppet.conf&lt;br /&gt;
 /etc/httpd/conf.d&lt;br /&gt;
 /etc/httpd/conf.d/05-foreman-ssl.conf (tells you what SSL certificates files foreman looks at)&lt;br /&gt;
 /etc/httpd/conf.d/25-puppet.conf      (tells you what certificate name that the puppetmaster uses)&lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because certname in [master] section of /etc/puppet/puppet.conf has this name)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
 Starting httpd: [Wed Mar 27 12:28:24 2019] [warn] module passenger_module is already loaded, skipping&lt;br /&gt;
                                                           [  OK  ]&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11600</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11600"/>
		<updated>2019-03-27T19:25:25Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Procedure to Renew SSL Certificates on Puppet Master */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 # If this fails, a mistake was made.  Check /var/log/httpd.  &lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11599</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11599"/>
		<updated>2019-03-27T19:23:21Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Procedure to Renew Puppet Certificates on Puppet Master */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew SSL Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11598</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11598"/>
		<updated>2019-03-27T19:22:58Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: /* Procedure to Renew Puppet Certificates */  title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew Puppet Certificates on Puppet Master===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11597</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11597"/>
		<updated>2019-03-27T19:22:14Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Note about private keys&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
===Procedure to Renew Puppet Certificates===&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
&lt;br /&gt;
Copy the existing certificate authority&#039;s key and the puppetmaster&#039;s private key (Only certificates expire.  Private keys do not so they can be reused).  &lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
Restart httpd&lt;br /&gt;
 [root@alpha ~]# service httpd start&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11596</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11596"/>
		<updated>2019-03-27T19:07:07Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
 [root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11595</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11595"/>
		<updated>2019-03-27T19:06:15Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Added more commands to page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
First of all, stop httpd.  Puppet master and Foreman run via httpd&lt;br /&gt;
[root@alpha ~]# service httpd stop&lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
 subject= /CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create directories to stage new valid periods (I determined puppetmaster.cluster.ucsf.bkslab.org.pem was the .pem file we need because it had the most DNS alt names)&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# cd /root/puppet_renewal&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
 [root@alpha ~]# mkdir /root/puppet_renewal/puppetmaster/certs&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca&lt;br /&gt;
 [root@alpha ~]# cp /var/lib/puppet/ssl/private_keys/mypuppetmaster.cluster.ucsf.bkslab.org.pem /root/puppet_renewal/puppetmaster/private_keys&lt;br /&gt;
&lt;br /&gt;
Create an openssl configuration file&lt;br /&gt;
 [root@alpha ~]# vi puppet_renewal/renewpuppet.cnf&lt;br /&gt;
 &#039;&#039;renewpuppet.cnf&#039;&#039;&lt;br /&gt;
 [ v3_ca ]&lt;br /&gt;
 basicConstraints= CA:TRUE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 # authorityKeyIdentifier= keyid:always,issuer:always&lt;br /&gt;
 keyUsage = critical, cRLSign, keyCertSign&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039; &lt;br /&gt;
 &lt;br /&gt;
 [ v3 ]&lt;br /&gt;
 basicConstraints= CA:FALSE&lt;br /&gt;
 subjectKeyIdentifier= hash&lt;br /&gt;
 nsComment = &#039;Puppet Ruby/OpenSSL Internal Certificate&#039;&lt;br /&gt;
 keyUsage = critical, digitalSignature, keyEncipherment&lt;br /&gt;
 extendedKeyUsage = critical, serverAuth, clientAuth&lt;br /&gt;
 subjectAltName = @alt_names &lt;br /&gt;
 &lt;br /&gt;
 [ alt_names ]&lt;br /&gt;
 DNS.1 = puppet&lt;br /&gt;
 DNS.2 = puppet.ucsf.bkslab.org&lt;br /&gt;
 DNS.3 = puppet.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.4 = puppetmaster&lt;br /&gt;
 DNS.5 = puppetmaster.ucsf.bkslab.org&lt;br /&gt;
 DNS.6 = puppetmaster.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.7 = alpha&lt;br /&gt;
 DNS.8 = alpha.ucsf.bkslab.org&lt;br /&gt;
 DNS.9 = alpha.cluster.ucsf.bkslab.org&lt;br /&gt;
 DNS.10 = alpha.compbio.ucsf.edu&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
Replace Puppet&#039;s ca_crt.pem, ca.pem, and puppetmaster.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/ca/ca_crt.pem&lt;br /&gt;
  [root@alpha ~]# puppet_renewal/ca/ca_crt.pem /var/lib/puppet/ssl/certs/ca.pem&lt;br /&gt;
  [root@alpha ~]# cp puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem /var/lib/puppet/ssl/certs/puppetmaster.cluster&lt;br /&gt;
.ucsf.bkslab.org.pem&lt;br /&gt;
&lt;br /&gt;
===Renewing Foreman&#039;s certificates (in progress)===&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Sysadmin]]&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11591</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11591"/>
		<updated>2019-03-26T01:46:17Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Investigate /etc/foreman/ssl/README&lt;br /&gt;
cluster2 on foreman&lt;br /&gt;
&lt;br /&gt;
 #openssl genrsa -aes128 -out foreman.key 2048&lt;br /&gt;
 openssl genrsa -out foreman.key 2048&lt;br /&gt;
 openssl req -new -out foreman.csr -key foreman.key -config foreman.cnf &lt;br /&gt;
 openssl req -text -in foreman.csr -noout&lt;br /&gt;
 openssl x509 -req -in foreman.csr -CA /var/lib/puppet/ssl/ca/ca_crt.pem -CAkey /var/lib/puppet/ssl/ca/ca_key.pem -CAserial /var/lib/puppet/ssl/ca/serial -out foreman.crt -days 1730 &lt;br /&gt;
 &lt;br /&gt;
 openssl rsa -in foreman.key -out foreman.key-unlocked&lt;br /&gt;
 &lt;br /&gt;
 ln -s foreman.key-unlocked key.pem&lt;br /&gt;
 ln -s foreman.crt cert.pem&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Network_Access_Control&amp;diff=11590</id>
		<title>Network Access Control</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Network_Access_Control&amp;diff=11590"/>
		<updated>2019-03-25T23:43:32Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Created NAC page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Network Access Control (NAC) is incoming on April 9th.  If you don&#039;t have ForeScout installed or don&#039;t have an exemption, your public network machines cannot access the wired or wireless internet.  &lt;br /&gt;
&lt;br /&gt;
For both Mac OS X or Windows, go here: &lt;br /&gt;
 https://software.ucsf.edu/content/nac-network-access-control/&lt;br /&gt;
====Mac OS X==== &lt;br /&gt;
Install the 24.22 MB package&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
Install the 16.9 MB package &lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
Linux computers must apply for an exception.  They must be registered at:&lt;br /&gt;
 https://ucsf.service-now.com/ess/device.  &lt;br /&gt;
Then get an exemption request from SecureConnector Network Access Control from: &lt;br /&gt;
 https://ucsf.service-now.com/ess/it_security.do  &lt;br /&gt;
For the business justification, just state you have a Linux computer.&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11587</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11587"/>
		<updated>2019-03-25T19:10:24Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: Changing directory names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal/ca/ca_new.csr -signkey /root/puppet_renewal/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal/ca/ca_crt.pem -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# # openssl x509 -extfile /root/puppet_renewal/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11584</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11584"/>
		<updated>2019-03-22T22:19:54Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal-20190321/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal-20190321/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal-20190321/ca/ca_new.csr -signkey /root/puppet_renewal-20190321/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal-20190321/ca/ca_crt.pem -extfile /root/puppet_renewal-20190321/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal-20190321]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal-20190321/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal-20190321/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -extfile /root/puppet_renewal-20190321/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal-20190321/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal-20190321/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal-20190321/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11583</id>
		<title>Renewing Puppet Certificates</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Renewing_Puppet_Certificates&amp;diff=11583"/>
		<updated>2019-03-22T21:31:34Z</updated>

		<summary type="html">&lt;p&gt;Benrwong: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On March 7th of 2019, our SSL certificates for Puppet/Foreman and TLS LDAP all reached their five year expiration period.  This has caused Puppet and Foreman to stop working and our authentication server cannot be accessed.  I cannot create new users that are recognized by the cluster.  And users cannot login to machines that they have previously never logged into.  You can imagine the trouble this has caused.  As of March 22, I have not solved this yet but I will be documenting my attempts to fix this.  &lt;br /&gt;
&lt;br /&gt;
Get subject of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -subject&lt;br /&gt;
&lt;br /&gt;
Get serial of original certificate&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/ca/ca_crt.pem -noout -serial&lt;br /&gt;
 serial=01&lt;br /&gt;
&lt;br /&gt;
Extract info from puppetmaster cert&lt;br /&gt;
 [root@alpha ~]# openssl x509 -in /var/lib/puppet/ssl/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -text -noout \&lt;br /&gt;
 -certopt no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_subject,no_issuer,no_pubkey,no_sigdump,no_aux&lt;br /&gt;
&lt;br /&gt;
Create certificate signing request with existing files &lt;br /&gt;
 [root@alpha ~]# openssl req -key /root/puppet_renewal-20190321/ca/ca_key.pem -new -batch -subj &amp;quot;/CN=Puppet CA: alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal-20190321/ca/ca_new.csr&lt;br /&gt;
&lt;br /&gt;
Create a new CA certificate&lt;br /&gt;
 [root@alpha ~]#openssl x509 -req -days 3650 -in /root/puppet_renewal-20190321/ca/ca_new.csr -signkey /root/puppet_renewal-20190321/ca/ca_key.pem \&lt;br /&gt;
 -out /root/puppet_renewal-20190321/ca/ca_crt.pem -extfile /root/puppet_renewal-20190321/renewpuppet.cnf -extensions v3_ca -set_serial 1&lt;br /&gt;
 Signature ok&lt;br /&gt;
 subject=/CN=Puppet CA: alpha.ucsf.bkslab.org&lt;br /&gt;
 Getting Private key&lt;br /&gt;
&lt;br /&gt;
Get serial number for your existing CA&lt;br /&gt;
 [root@alpha puppet_renewal-20190321]# echo $((0x`cat /var/lib/puppet/ssl/ca/serial`))&lt;br /&gt;
 451&lt;br /&gt;
&lt;br /&gt;
Create new certificate signing request with puppet server&#039;s key&lt;br /&gt;
 openssl req -key /root/puppet_renewal-20190321/puppetmaster/private_keys/puppetmaster.cluster.ucsf.bkslab.org.pem -new \&lt;br /&gt;
 -batch -subj &amp;quot;/CN=alpha.ucsf.bkslab.org&amp;quot; -out /root/puppet_renewal-20190321/mypuppetmaster.csr&lt;br /&gt;
&lt;br /&gt;
Create new puppet master&#039;s certificate&lt;br /&gt;
 openssl x509 -extfile /root/puppet_renewal-20190321/renewpuppet.cnf -extensions v3 -req -days 1825 -in /root/puppet_renewal-20190321/mypuppetmaster.csr \&lt;br /&gt;
 -CA /root/puppet_renewal/ca/ca_crt.pem -CAkey /root/puppet_renewal-20190321/ca/ca_key.pem -CAcreateserial \&lt;br /&gt;
 -out /root/puppet_renewal-20190321/puppetmaster/certs/puppetmaster.cluster.ucsf.bkslab.org.pem -sha256 -set_serial 451&lt;/div&gt;</summary>
		<author><name>Benrwong</name></author>
	</entry>
</feed>