<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>@Summitt Dweller’s Personal Blog - Work</title>
    <link>https://blog.summittdweller.com/tags/work/</link>
    <description>All entries in Work on Personal Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Mon, 20 Nov 2023 19:00:04 +0000</lastBuildDate>
    <atom:link href="https://blog.summittdweller.com/tags/work/" rel="self" type="application/rss+xml" />
    
      
      <item>
        <title>Improving My Azure Blob Storage</title>
        <link>https://blog.summittdweller.com/microposts/2023/11/improving-my-azure-blob-storage/</link>
        <pubDate>Mon, 20 Nov 2023 19:00:04 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/microposts/2023/11/improving-my-azure-blob-storage/</guid>
        <description>&lt;p&gt;I use Azure Blob Storage quite a bit these days, at work and here at home.  Recently a student I&amp;rsquo;ve been working with turned my attention to &lt;a href=&#34;https://learn.microsoft.com/en-us/training/modules/blob-storage-image-upload-static-web-apps/1-introduction&#34;&gt;this post from Microsoft&lt;/a&gt; and this week I&amp;rsquo;m going to take a crack at putting it to use, perhaps in association with this blog.&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Upgrading Matomo PHP</title>
        <link>https://blog.summittdweller.com/posts/2023/06/upgrading-matomo-php/</link>
        <pubDate>Mon, 12 Jun 2023 19:30:18 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2023/06/upgrading-matomo-php/</guid>
        <description>&lt;p&gt;This afternoon I&amp;rsquo;m adding &lt;code&gt;https://digital.grinnell.edu&lt;/code&gt; (site ID is 17) to my own Matomo instance and I&amp;rsquo;m prompted to upgrade PHP on that Matomo droplet (DigitalOcean).  I did so quite easily following &lt;a href=&#34;https://www.digitalocean.com/community/questions/upgrade-php-from-7-2-to-7-4-on-centos-8-and-apache&#34;&gt;Upgrade PHP from 7.2 to 7.4 on CentOS 8 and Apache&lt;/a&gt;.  I&amp;rsquo;ve also updated my Drupal version, and some modules, in &lt;a href=&#34;https://digital.grinnell.edu&#34;&gt;https://digital.grinnell.edu&lt;/a&gt; along with adding the &lt;code&gt;matomo&lt;/code&gt; module, but that module is now reporting:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    The validation of &amp;quot;http://analytics.summittservices.com/matomo.php&amp;quot; failed with error &amp;quot;Error opening socket ssl://analytics.summittservices.com:443&amp;quot; (HTTP code 0).
    The validation of &amp;quot;https://analytics.summittservices.com/matomo.php&amp;quot; failed with error &amp;quot;Error opening socket ssl://analytics.summittservices.com:443&amp;quot; (HTTP code 0).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hmmm&amp;hellip;wonder what&amp;rsquo;s up with that?&lt;/p&gt;
&lt;p&gt;So, I tried this&amp;hellip;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Last login: Mon Jun 12 19:21:45 2023 from 162.243.190.66
[root@centos-s-1vcpu-1gb-nyc1-01 ~]# sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/summittservices.com-0001.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewing an existing certificate for summittservices.com and analytics.summittservices.com
Reloading nginx server after certificate renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/summittservices.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewing an existing certificate for summittservices.com and www.summittservices.com
Reloading nginx server after certificate renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all renewals succeeded: 
  /etc/letsencrypt/live/summittservices.com-0001/fullchain.pem (success)
  /etc/letsencrypt/live/summittservices.com/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;hellip;and&amp;hellip; NO more validation errors!  Yay!&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Cyclone 1965 Completed</title>
        <link>https://blog.summittdweller.com/microposts/2023/05/cyclone-1965-completed/</link>
        <pubDate>Wed, 24 May 2023 18:23:56 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/microposts/2023/05/cyclone-1965-completed/</guid>
        <description>&lt;p&gt;This morning I was dealing with the 1965 edition of the Grinnell College yearbook, &lt;em&gt;Cyclone 1965&lt;/em&gt;, in Digital.Grinnell.  That&amp;rsquo;s a monster of a yearbook, 278 pages and a .pdf that&amp;rsquo;s almost 1.4 GB in size.&lt;/p&gt;
&lt;p&gt;In order to get the .pdf to upload I tried a number of tricks, the only one that worked was a modification of &lt;a href=&#34;https://static.grinnell.edu/dlad-blog/posts/097-book-ingest-in-digital-grinnell/&#34;&gt;Book Ingest in Digital.Grinnell&lt;/a&gt;   The key command was&amp;hellip;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker cp &amp;quot;/mnt/storage/Yearbooks/Cyclone 1965/lib_1965cycloneyearbook_0002.pdf&amp;quot; isle-apache-dg:/var/www/sites/default/files/book.pdf
&lt;/code&gt;&lt;/pre&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Wrap EVERYTHING in NPM!</title>
        <link>https://blog.summittdweller.com/posts/2023/05/wrap-everything-in-npm/</link>
        <pubDate>Fri, 19 May 2023 22:27:00 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2023/05/wrap-everything-in-npm/</guid>
        <description>&lt;p&gt;So, &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;npm&lt;/code&gt; seem to be all the rage these days, and perhaps for good reason.  I recently fell in love with &lt;a href=&#34;https://www.11ty.dev&#34;&gt;Eleventy/11ty&lt;/a&gt; over &lt;a href=&#34;https://gohugo.io&#34;&gt;Hugo&lt;/a&gt; because it&amp;rsquo;s Javascript, not Go, and it&amp;rsquo;s elegantly simple with tons of flexibility.  I recently tried to add &lt;em&gt;Pagefind&lt;/em&gt; search to a Hugo static web site (see &lt;a href=&#34;https://static.grinnell.edu/dlad-blog/posts/143-significant-rootstalk-retooling/&#34;&gt;https://static.grinnell.edu/dlad-blog/posts/143-significant-rootstalk-retooling/&lt;/a&gt;).  If &lt;em&gt;Rootstalk&lt;/em&gt;, an Azure Static Web App was framed in &lt;code&gt;node.js&lt;/code&gt;, as both &lt;em&gt;Eleventy&lt;/em&gt; and &lt;em&gt;Pagefind&lt;/em&gt; are, there would be no problem.  The Azure scripts used to deploy those frameworks are far more customizable than Hugo, and there&amp;rsquo;s documentation to prove it.&lt;/p&gt;
&lt;p&gt;So, how might I approach combining Hugo with Pagefind in the cloud?  Well, &lt;a href=&#34;https://web.archive.org/web/20220818082611/https://www.blogtrack.io/blog/powerful-blog-setup-with-hugo-and-npm/&#34;&gt;A Powerful Blog Setup with Hugo and NPM&lt;/a&gt;* by Tom Hombergs looked like a promising place to start.  The process that Tom advocates leverages a neat little package called &lt;a href=&#34;https://www.npmjs.com/package/hugo-bin&#34;&gt;hugo-bin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;*&lt;em&gt;The links provided above and below are to a Wayback Machine capture of the original post.&lt;/em&gt;&lt;/p&gt;
&lt;h1 id=&#34;that-was-too-easy&#34;&gt;That Was Too Easy!&lt;/h1&gt;
&lt;p&gt;Wrapping my Hugo site in an NPM package was so easy that I forgot to document it&amp;hellip; and maybe I really didn&amp;rsquo;t need too.  Time to catch up, so here&amp;rsquo;s a brief sysnopsis of what I did&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;following-toms-excellent-advice&#34;&gt;Following Tom&amp;rsquo;s Excellent Advice&lt;/h2&gt;
&lt;p&gt;I started by studying &lt;a href=&#34;https://web.archive.org/web/20220818082611/https://www.blogtrack.io/blog/powerful-blog-setup-with-hugo-and-npm/&#34;&gt;A Powerful Blog Setup with Hugo and NPM&lt;/a&gt; and quickly found that I could easily follow it almost verbatim.  Since I already had &lt;code&gt;npm&lt;/code&gt; and &lt;code&gt;Hugo&lt;/code&gt; installed I skipped ahead to the section titled &amp;ldquo;Setting Up a Hugo Project&amp;rdquo; and then to the &lt;code&gt;npx&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt; commands there.  My experience, mostly in commands, looked like this on my Mac Mini workstation.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd ~/GitHub/
# Named the new project npm-rootstalk so it would not confilct with any of my existing `rootstalk...` directories
mkdir npm-rootstalk      
cd npm-rootstalk
npx hugo new site . --force
# Copied the contents of my old project into the new one and then removed whatever I no longer needed
cp -fr ~/GitHub/rootstalk/. .  
# Installed Pagefind...
npm install pagefind
git init
# I created a new empty repo in GitHub called npm-rootstalk, then...
git remote add origin https://github.com/Digital-Grinnell/npm-rootstalk 
git add . 
git commit -m &amp;quot;Initial commit of new npm-wrapped Hugo project&amp;quot;
git push
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Having secured a new repo I moved to running Hugo locally, then polishing my &lt;code&gt;package.json&lt;/code&gt; scripts as Tom did.  I now have a &lt;code&gt;package.json&lt;/code&gt; that reads like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;name&amp;quot;: &amp;quot;npm-rootstalk&amp;quot;,
  &amp;quot;version&amp;quot;: &amp;quot;1.0.0&amp;quot;,
  &amp;quot;description&amp;quot;: &amp;quot;Rootstalk website built with Hugo and the Lightbi theme inside an NPM package.  May 2023.&amp;quot;,
  &amp;quot;main&amp;quot;: &amp;quot;index.js&amp;quot;,
  &amp;quot;scripts&amp;quot;: {
    &amp;quot;test&amp;quot;: &amp;quot;echo \&amp;quot;Error: no test specified\&amp;quot; &amp;amp;&amp;amp; exit 1&amp;quot;,
    &amp;quot;build&amp;quot;: &amp;quot;npm run hugo:build &amp;amp;&amp;amp; npx pagefind --source public&amp;quot;,
    &amp;quot;do:build&amp;quot;: &amp;quot;hugo -d public &amp;amp;&amp;amp; npx pagefind --source public&amp;quot;,
    &amp;quot;azure:build&amp;quot;: &amp;quot;hugo -d public --baseURL=\&amp;quot;https://yellow-wave-0e513e510.3.azurestaticapps.net/\&amp;quot; &amp;amp;&amp;amp; npx pagefind --source public&amp;quot;,
    &amp;quot;clean&amp;quot;: &amp;quot;npm run hugo:clean&amp;quot;,
    &amp;quot;serve&amp;quot;: &amp;quot;npm run hugo:build &amp;amp;&amp;amp; npx pagefind --source public --bundle-dir ../static/_pagefind &amp;amp;&amp;amp; npm run hugo:serve&amp;quot;,
    &amp;quot;hugo:build&amp;quot;: &amp;quot;hugo -d public&amp;quot;,
    &amp;quot;hugo:serve&amp;quot;: &amp;quot;hugo server&amp;quot;,
    &amp;quot;hugo:clean&amp;quot;: &amp;quot;rm -rf build resources public&amp;quot;
  },
  &amp;quot;author&amp;quot;: &amp;quot;Mark A. McFate&amp;quot;,
  &amp;quot;license&amp;quot;: &amp;quot;ISC&amp;quot;,
  &amp;quot;dependencies&amp;quot;: {
    &amp;quot;hugo-bin&amp;quot;: &amp;quot;^0.102.0&amp;quot;,
    &amp;quot;pagefind&amp;quot;: &amp;quot;^0.12.0&amp;quot;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&#34;it-works&#34;&gt;It Works!&lt;/h1&gt;
&lt;p&gt;Now I just use &lt;code&gt;npm run serve&lt;/code&gt; to build the Hugo site, index it with Pagefind, and serve it locally at &lt;a href=&#34;http://localhost:1313&#34;&gt;http://localhost:1313&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;a-staging-site-in-azure&#34;&gt;A Staging Site in Azure&lt;/h1&gt;
&lt;p&gt;I can simply push changes to the &lt;code&gt;main&lt;/code&gt; branch of the &lt;code&gt;npm-rootstalk&lt;/code&gt; repo to trigger an Azure (aka GitHub Actions) rebuild, indexing and deployment of the site to &lt;a href=&#34;https://yellow-wave-0e513e510.3.azurestaticapps.net/&#34;&gt;this address&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;a-new-production-branch&#34;&gt;A New Production Branch&lt;/h1&gt;
&lt;p&gt;Pushing to production is just as simple, I just have to push changes to the new &lt;code&gt;production&lt;/code&gt; branch of the code and my app spec at DigitalOcean (see below) takes care of building, indexing, and deploying to &lt;a href=&#34;https://rootstalk.grinnell.edu&#34;&gt;https://rootstalk.grinnell.edu&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That DO app spec reads like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;alerts:
- rule: DEPLOYMENT_FAILED
- rule: DOMAIN_FAILED
domains:
- domain: rootstalk.grinnell.edu
  type: PRIMARY
- domain: prairiejournal.grinnell.edu
  type: ALIAS
envs:
- key: TZ
  scope: RUN_AND_BUILD_TIME
  value: America/Chicago
- key: HUGO_MATOMO_ID
  scope: RUN_AND_BUILD_TIME
  value: &amp;quot;15&amp;quot;
ingress:
  rules:
  - component:
      name: npm-rootstalk
    match:
      path:
        prefix: /
name: npm-rootstalk
region: nyc
static_sites:
- build_command: npm run build
  environment_slug: node-js
  github:
    branch: production
    deploy_on_push: true
    repo: Digital-Grinnell/npm-rootstalk
  name: npm-rootstalk
  source_dir: /
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;It&amp;rsquo;s heavenly!  And that&amp;rsquo;s all for now.&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Moved GC Azure Billing</title>
        <link>https://blog.summittdweller.com/microposts/2023/04/moved-gc-azure-billing/</link>
        <pubDate>Mon, 03 Apr 2023 15:53:47 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/microposts/2023/04/moved-gc-azure-billing/</guid>
        <description>&lt;p&gt;Took steps this morning to move billing for my GC/library Azure services to the library&amp;rsquo;s credit card.&lt;/p&gt;
</description>
      </item>
      
    
  </channel>
</rss>
