Skip to content

Commit

Permalink
commiting to main
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdoiel committed Oct 14, 2024
1 parent 57da2a8 commit 21b12da
Show file tree
Hide file tree
Showing 25 changed files with 78 additions and 62 deletions.
3 changes: 1 addition & 2 deletions INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ <h1 id="installation-for-development-of-cold">Installation for
<h2 id="required-software">Required software</h2>
<ol type="1">
<li>Git (to clone the cold repository on GitHub)</li>
<li>Deno &gt;= 1.46.3 (to run the public and management web
services)</li>
<li>Deno &gt;= 2.0 (to run the public and management web services)</li>
<li>Dataset &gt;= 2.1.22 (datasetd provides the JSON API for cold public
and admin services)</li>
<li>Pandoc &gt; 3.1 (to build or update documation)</li>
Expand Down
2 changes: 1 addition & 1 deletion README_Admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h2 id="requirements">Requirements</h2>
<ul>
<li><a href="https://github.com/caltechlibrary/dataset">Dataset</a>
&gt;= 2.1.18 (running COLD Admin)</li>
<li><a href="https://deno.land">Deno</a> &gt;= 1.46.4 (used to build the
<li><a href="https://deno.land">Deno</a> &gt;= 2.0 (used to build the
app and compile services) (build COLD Admin)</li>
<li><a href="https://pandoc.org">Pandoc</a> &gt;= 3.1 (render
documentation and version.ts) (build COLD Admin)</li>
Expand Down
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h3 id="operating-systems">Operating Systems</h3>
</ul>
<h3 id="software-requiremets">Software Requiremets</h3>
<ul>
<li>Deno &gt;= 1.46.3</li>
<li>Deno &gt;= 2.0</li>
<li>GNU Make</li>
<li>Pandoc &gt;= 3.1</li>
<li>datasetd &gt;= 2.1.22</li>
Expand Down
14 changes: 7 additions & 7 deletions cold_admin.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

<section>
<h1 id="name">NAME</h1>
<p>cold_admin</p>
<p>cold</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>cold_admin <a href="#options">OPTIONS</a></p>
<p>cold <a href="#options">OPTIONS</a></p>
<h1 id="description">DESCRIPTION</h1>
<p>cold_admin provides the admin interface for cold. Cold is implemented
using dataset collections for object persistence and relies on datasetd
for JSON API to each collection.</p>
<p>cold provides the admin interface for cold. Cold is implemented using
dataset collections for object persistence and relies on datasetd for
JSON API to each collection.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>help</dt>
Expand Down Expand Up @@ -62,12 +62,12 @@ <h1 id="options">OPTIONS</h1>
</dd>
</dl>
<h1 id="example">EXAMPLE</h1>
<p>cold_admin is setup to run at <a href="http://localhost:8111"
<p>cold is setup to run at <a href="http://localhost:8111"
class="uri">http://localhost:8111</a>. The static content hosted in the
“/var/www/html/cold/app” directory. The datasetd service is setup to run
at <a href="http://localhost:8112" class="uri">http://localhost:8112</a>
supporting the people, groups and vocabularies dataset collections.</p>
<pre class="shell"><code>cold_admin -port=8111 -htdocs=/var/www/html/cold/app -apiUrl=http://localhost:8112</code></pre>
<pre class="shell"><code>cold -port=8111 -htdocs=/var/www/html/cold/app -apiUrl=http://localhost:8112</code></pre>
</section>

<footer>
Expand Down
24 changes: 24 additions & 0 deletions crontab-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
45 7 * * 1-5 /Sites/cold/sync_caltech_directory.bash
20 changes: 10 additions & 10 deletions deployment.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h1 id="deploying-cold">Deploying <strong>cold</strong></h1>
<p>Deploying cold on a remote system requires manual setup. You will
need the following software to successfully build and deploy.</p>
<ul>
<li>Deno &gt;= 1.46.3</li>
<li>Dataset &gt;= 2.1.21</li>
<li>Deno &gt;= 2.0</li>
<li>Dataset &gt;= 2.1.22</li>
<li>Pandoc &gt;= 3.1</li>
<li>GNU Make</li>
<li>Git</li>
Expand All @@ -41,13 +41,13 @@ <h2 id="deployment-steps">Deployment steps</h2>
exist.</li>
<li>Clone the repository, e.g. clone to <code>/Sites/cold</code> and
change into the repository directory</li>
<li>Run <code>make</code> to build the binary for the cold service</li>
<li>Run Deno tasks <code>setup</code> (if the collections don’t exist)
and <code>build</code> to build the binary for the cold service</li>
<li>Copy <code>cold.service-example</code> to <code>cold.service</code>,
edit it and move it appropirate place in your Systemd service
directory</li>
<li>Symbolicly link <code>cold.service</code> to
edit it and move to <code>/etc/systemd/system/</code></li>
<li>Copy <code>cold_api.service-example</code> to
<code>cold_api.service</code>, edit it and and move to
<code>/etc/systemd/system/</code></li>
<li>Edit the service file and make the paths are correct.</li>
<li>Reload the systemd daemon,
<code>sudo systemctl daemon-reload</code></li>
<li>Enable the services (only needed the first time, may return a
Expand Down Expand Up @@ -80,14 +80,14 @@ <h2 id="deployment-steps">Deployment steps</h2>
cd /Sites
git clone git@github.com:caltechlibrary/cold
cd cold
make
deno task setup
deno task build
cp cold.service-example cold.service
nano cold.service
sudo ln cold.service /etc/systemd/system/
sudo mv cold.service /etc/systemd/system/
cp cold_api.service-example cold_api.service
nano cold_api.service
sudo ln cold_api.service /etc/systemd/system/
sudo mv cold_api.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable cold.service
sudo systemctl enable cold_api.service
Expand Down
23 changes: 11 additions & 12 deletions deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Deploying cold on a remote system requires manual setup. You will need the following software to successfully build and deploy.

- Deno >= 2.0
- Dataset >= 2.1.21
- Dataset >= 2.1.22
- Pandoc >= 3.1
- GNU Make
- Git
Expand All @@ -17,18 +17,17 @@ My current recommendation is the following.

1. Setup the directory to hold he web application if it doesn't exist.
2. Clone the repository, e.g. clone to `/Sites/cold` and change into the repository directory
3. Run `make` to build the binary for the cold service
5. Copy `cold.service-example` to `cold.service`, edit it and move it appropirate place in your Systemd service directory
6. Symbolicly link `cold.service` to `/etc/systemd/system/`
7. Edit the service file and make the paths are correct.
8. Reload the systemd daemon, `sudo systemctl daemon-reload`
9. Enable the services (only needed the first time, may return a warning about symbolic link)
3. Run Deno tasks `setup` (if the collections don't exist) and `build` to build the binary for the cold service
5. Copy `cold.service-example` to `cold.service`, edit it and move to `/etc/systemd/system/`
6. Copy `cold_api.service-example` to `cold_api.service`, edit it and and move to `/etc/systemd/system/`
7. Reload the systemd daemon, `sudo systemctl daemon-reload`
8. Enable the services (only needed the first time, may return a warning about symbolic link)
a. `sudo systemctl enable cold.service`
b. `sudo systemctl enable cold_api.service`
10. Start the services using `systemctl` in the usual way
9. Start the services using `systemctl` in the usual way
a. `sudo systemctl start cold.service`
b. `sudo systemctl start cold_api.service`
11. Test web services using elinks. If you get a gateway error it means datasetd isn't runining correctly in port 8111. Debug with curl, systemctl status, journalctl.
10. Test web services using elinks. If you get a gateway error it means datasetd isn't runining correctly in port 8111. Debug with curl, systemctl status, journalctl.

You can configure Apache to reverse proxy to the cold service running on port 8111 where it should enforce access control.

Expand All @@ -44,14 +43,14 @@ sudo chmod 775 /Sites/
cd /Sites
git clone git@github.com:caltechlibrary/cold
cd cold
make
deno task setup
deno task build
cp cold.service-example cold.service
nano cold.service
sudo ln cold.service /etc/systemd/system/
sudo mv cold.service /etc/systemd/system/
cp cold_api.service-example cold_api.service
nano cold_api.service
sudo ln cold_api.service /etc/systemd/system/
sudo mv cold_api.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable cold.service
sudo systemctl enable cold_api.service
Expand Down
38 changes: 16 additions & 22 deletions directory_sync.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,19 @@
</nav>

<section>
<pre><code># NAME

cold

# SYNOPSIS

cold [OPTIONS]

# DESCRIPTION

cold synchronizes the content between Caltech Directory and CaltechPEOPLE.
It uses the COLD Admin API as well as the Caltech Directory website content as a
data source.

Assuming COLD Admin is running on it&#39;s standard ports no configuration is needed.

cold is suitable to run from a cronjob on the same machine which hosts COLD.

# OPTIONS</code></pre>
<h1 id="name">NAME</h1>
<p>directory_sync</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>directory_sync <a href="#options">OPTIONS</a></p>
<h1 id="description">DESCRIPTION</h1>
<p>directory_sync synchronizes the content between Caltech Directory and
CaltechPEOPLE. It uses the COLD Admin API as well as the Caltech
Directory website content as a data source.</p>
<p>Assuming COLD Admin is running on it’s standard ports no
configuration is needed.</p>
<p>directory_sync is suitable to run from a cronjob on the same machine
which hosts COLD.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>help</dt>
<dd>
Expand Down Expand Up @@ -68,9 +62,9 @@
</dd>
</dl>
<h1 id="example">EXAMPLE</h1>
<p>cold is setup to contact {directoryUrl} to harvest directory
content.</p>
<pre class="shell"><code>cold</code></pre>
<p>directory_sync is setup to contact https://directory.caltech.edu to
harvest directory content.</p>
<pre class="shell"><code>directory_sync</code></pre>
</section>

<footer>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2 id="details">Details</h2>
front end web server (e.g. Apache2+Shibboleth).</strong></p>
<h2 id="requirements">Requirements</h2>
<ul>
<li>Deno &gt;= 1.46.3</li>
<li>Deno &gt;= 2.0</li>
<li>Dataset &gt;= 2.1.22 (using SQL JSON storage)</li>
<li>The following are required to build the UI and compile the assets
needed by <strong>COLD</strong>
Expand Down
Binary file added pagefind/fragment/en-US_41e84da.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_61ca6b3.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_84c2c31.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_8e5987a.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_9b94066.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_b5f2781.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_d953407.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en-US_e7ebea9.pf_fragment
Binary file not shown.
Binary file added pagefind/index/en-US_2922374.pf_index
Binary file not shown.
2 changes: 1 addition & 1 deletion pagefind/pagefind-entry.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.1","languages":{"en-US":{"hash":"en-US_f18a88852ca02","wasm":"en-US","page_count":12}}}
{"version":"1.1.0","languages":{"en-US":{"hash":"en-US_a9af2ae37feae","wasm":"en-US","page_count":12}}}
Loading

0 comments on commit 21b12da

Please sign in to comment.