<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>@Summitt Dweller’s Personal Blog - Wieting</title>
    <link>https://blog.summittdweller.com/tags/wieting/</link>
    <description>All entries in Wieting on Personal Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Mon, 30 Jan 2023 14:45:01 -0600</lastBuildDate>
    <atom:link href="https://blog.summittdweller.com/tags/wieting/" rel="self" type="application/rss+xml" />
    
      
      <item>
        <title>Gating My Content</title>
        <link>https://blog.summittdweller.com/posts/2023/01/gating-content/</link>
        <pubDate>Mon, 30 Jan 2023 14:45:01 -0600</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2023/01/gating-content/</guid>
        <description>&lt;h1 id=&#34;gating-content-in-jamstack-sites&#34;&gt;Gating Content in JAMstack Sites&lt;/h1&gt;
&lt;p&gt;This section&amp;rsquo;s title was borrowed from a &lt;a href=&#34;https://www.stackbit.com/&#34;&gt;Stackbit&lt;/a&gt; article with the same title, &lt;a href=&#34;https://www.stackbit.com/blog/gating-content-jamstack&#34;&gt;Gating Content in JAMstack Sites&lt;/a&gt;.  Working through that article to password protect some of the content at &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt; is my tech pursit today.&lt;/p&gt;
&lt;h1 id=&#34;nope-not-on-netlify&#34;&gt;Nope, Not on Netlify&lt;/h1&gt;
&lt;p&gt;&amp;#x1f626;
Last evening I took a shot at implementing the &lt;em&gt;Netlify Identity&lt;/em&gt; tricks from the aforementioned article, but could not easily get it to work.  The problem, I think, is that the &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt; on &lt;em&gt;Netlify&lt;/em&gt; already uses &lt;em&gt;Netlify Identity&lt;/em&gt; for authentication of my &lt;em&gt;Netlify CMS&lt;/em&gt; forms, and adding a second, separate instance of that service isn&amp;rsquo;t trivial and perhaps isn&amp;rsquo;t even feasible.  I also tried implementing some quick &lt;a href=&#34;https://www.npmjs.com/package/staticrypt&#34;&gt;Staticrypt&lt;/a&gt; CLI protection but that also failed.  &lt;em&gt;Netlify&lt;/em&gt; does provide a really quick and painless solution, but it costs $20/month, at a minimum, to enable it.&lt;/p&gt;
&lt;h1 id=&#34;new-staticrypt-strategy&#34;&gt;New Staticrypt Strategy?&lt;/h1&gt;
&lt;p&gt;So, my next shot at this will involve creating a new &lt;a href=&#34;https://www.11ty.dev/&#34;&gt;Eleventy&lt;/a&gt; site just for the Wieting&amp;rsquo;s protected content.  Wish me luck and follow along here if you like.&lt;/p&gt;
&lt;h1 id=&#34;trying-azure-devops&#34;&gt;Trying Azure DevOps&lt;/h1&gt;
&lt;p&gt;I recently created a personal Azure account, registered to &lt;em&gt;summitt.dweller@gmail.com&lt;/em&gt;, and last evening (January 31, 2023) I took a dive into &lt;a href=&#34;&#34;&gt;Azure DevOps&lt;/a&gt; under that account.  The &amp;ldquo;welcome&amp;rdquo; email that I received says I now have an &amp;ldquo;organization&amp;rdquo; URL at &lt;a href=&#34;https://dev.azure.com/summittdweller&#34;&gt;https://dev.azure.com/summittdweller&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I jumped into Azure DevOps because it looks like within that environment I can establish a Content Management System (CMS) not unlike the &lt;em&gt;NetlifyCMS&lt;/em&gt; (or perhaps it IS NCMS) that I run for the Wieting Theatre, hosted with Netlify.com.  I really like &lt;em&gt;NetlifyCMS&lt;/em&gt;, but thus far I&amp;rsquo;ve had limited success with it, and ONLY at Netlify.com where the user authentication process is nicely streamlined.  I hope that Azure DevOps has user authentication that&amp;rsquo;s just as easy to manage, and at less cost.&lt;/p&gt;
&lt;p&gt;So, I guess the strategy now is to see what Azure DevOps has to offer, rather than venturing further with &lt;a href=&#34;https://www.npmjs.com/package/staticrypt&#34;&gt;Staticrypt&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;That&amp;rsquo;s a TEMPORAY wrap, this post isn&amp;rsquo;t finished just yet.&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Migrating the Wieting Site in Drupal 8</title>
        <link>https://blog.summittdweller.com/posts/2020/02/migrating-the-wieting-site-in-drupal-8/</link>
        <pubDate>Fri, 28 Feb 2020 00:00:00 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2020/02/migrating-the-wieting-site-in-drupal-8/</guid>
        <description>&lt;h1 id=&#34;migrating-the-wieting-site-in-drupal-8&#34;&gt;Migrating the Wieting Site in Drupal 8&lt;/h1&gt;
&lt;p&gt;Sorry for my extended absence here, I&amp;rsquo;ve been uber-busy with work, but have also been able to work a little (lots of long nights and weekends) on a long-overdue update of &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt; in &lt;em&gt;Drupal 8&lt;/em&gt;.  It&amp;rsquo;s true, I have been thinking about moving that site to make it static, almost certainly using &lt;em&gt;Hugo&lt;/em&gt;, but I thought before doing so I&amp;rsquo;d give &lt;em&gt;Drupal 8&lt;/em&gt; one more try.  I&amp;rsquo;m pleased to report that it&amp;rsquo;s working nicely again.  Here&amp;rsquo;s how I did it, and how I plan to keep it updated&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;saved-by-docker-compose-drupal&#34;&gt;Saved by &amp;ldquo;docker-compose-drupal&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;I actually started the process of migrating and updating &lt;a href=&#34;https://wieting.tamatoledo.com&#34;&gt;the Wieting website&lt;/a&gt; in &lt;em&gt;Docksal&lt;/em&gt;, but I failed&amp;hellip; I could never figure out how to reliably and easily push my work to production from there.  &lt;em&gt;Docksal&lt;/em&gt; just seems to wrap so much of itself into the &lt;code&gt;cli&lt;/code&gt; container that drives it, I found it difficult to de-couple from that in production.&lt;/p&gt;
&lt;p&gt;So I went looking elsewhere and discovered &lt;a href=&#34;https://devwithlando.org&#34;&gt;Lando&lt;/a&gt;, and I did considerable work with it because &lt;em&gt;Lando&lt;/em&gt;, at least in the case of &lt;em&gt;Drupal&lt;/em&gt;, builds a 3-part development stack that looks a lot like what I wanted to deploy in production.  The parts of a &lt;em&gt;Lando&lt;/em&gt; stack, and my production stack, are the same:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An &lt;code&gt;nginx&lt;/code&gt; web server container,&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;mysql&lt;/code&gt; or &lt;code&gt;mariadb&lt;/code&gt; database container, and&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;php&lt;/code&gt; codebase container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But once again I had trouble figuring out exactly how to push that development stack to production.  So, I went looking again for an open (and by that I mean &amp;ldquo;free&amp;rdquo; and freely modifiable) production-ready stack configuration that uses the 3-parts I had in mind.  I found &lt;a href=&#34;https://github.com/mogtofu33/docker-compose-drupal&#34;&gt;docker-compose-drupal&lt;/a&gt; and almost immediately created &lt;a href=&#34;https://github.com/SummittDweller/docker-compose-drupal&#34;&gt;my own fork&lt;/a&gt; of that project. Using &lt;a href=&#34;https://github.com/SummittDweller/docker-compose-drupal&#34;&gt;my &lt;code&gt;docker-compose-drupal&lt;/code&gt; fork&lt;/a&gt; I set off to build a production instance, NOT a development instance, on my &lt;code&gt;summitt-dweller-DO-docker&lt;/code&gt; droplet at &lt;em&gt;DigitalOcean&lt;/em&gt;.  That project came to life in &lt;code&gt;/opt/docker-compose-drupal&lt;/code&gt; there.&lt;/p&gt;
&lt;p&gt;The evolution of &lt;code&gt;summitt-dweller-DO-docker:/opt/docker-compose-drupal&lt;/code&gt; was quite an adventure, in large part because the &lt;em&gt;Wieting&amp;rsquo;s&lt;/em&gt; web site had gone almost a year without any updates.  That meant upgrading the &lt;em&gt;Drupal&lt;/em&gt; core from version 8.2.? to version 8.8.2, along with countless modules that had changed rather dramatically, so there were lots of bumps along the way.  I also had to move the site from a multi-site configuration, the old site lived in a container at &lt;code&gt;/var/www/html/web/sites/wieting&lt;/code&gt;, to a &lt;em&gt;default&lt;/em&gt; configuration that lives in the container at &lt;code&gt;/var/www/localhost/web/sites/default&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Fortunately, &lt;a href=&#34;https://github.com/mogtofu33/docker-compose-drupal&#34;&gt;docker-compose-drupal&lt;/a&gt; includes some nice scripts and features to help with things like that, and they are nicely documented in the &lt;a href=&#34;https://github.com/mogtofu33/docker-compose-drupal/blob/master/README.md&#34;&gt;project&amp;rsquo;s README.md&lt;/a&gt; file.  I&amp;rsquo;ll elaborate on a few of the key features later in this post, but most of what I did during the migration and update is water-under-the-bridge, and should not need to be repeated, ever, so I won&amp;rsquo;t elaborate on all of it here.  It&amp;rsquo;s worth noting here that the work I did in my fork all happened in a branch named &lt;code&gt;wieting&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;moved-to-wieting-d8-do&#34;&gt;Moved to &amp;ldquo;wieting-D8-DO&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;Once I had a new site working as I&amp;rsquo;d hoped, I wanted to begin a fresh new development and update cycle, so I used a process I&amp;rsquo;ve documented in my work blog: &lt;a href=&#34;https://static.grinnell.edu/blogs/McFateM/posts/065-create-new-github-project-from-a-branch/&#34;&gt;&amp;ldquo;How to Create a New GitHub Repo from an Existing Branch&amp;rdquo;&lt;/a&gt;. That work created the &lt;em&gt;Wieting&lt;/em&gt; site&amp;rsquo;s new home, &lt;a href=&#34;https://github.com/SummittDweller/wieting-D8-DO&#34;&gt;https://github.com/SummittDweller/wieting-D8-DO&lt;/a&gt;, based on the &lt;em&gt;wieting&lt;/em&gt; branch of the aforementioned fork of &lt;em&gt;docker-compose-drupal&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;site-update-workflow&#34;&gt;Site Update Workflow&lt;/h2&gt;
&lt;p&gt;Having built the &lt;a href=&#34;https://github.com/SummittDweller/wieting-D8-DO&#34;&gt;wieting-D8-DO&lt;/a&gt; project I need a reliable workflow that I could use to keep it up-to-date.  I created that workflow by migrating the existing production site at &lt;code&gt;summitt-dweller-DO-docker:/opt/docker-compose-drupal&lt;/code&gt;, where it responded as &lt;em&gt;&lt;a href=&#34;https://Wieting.TamaToledo.org&#34;&gt;https://Wieting.TamaToledo.org&lt;/a&gt;&lt;/em&gt;, to a new staging copy at &lt;code&gt;summitt-dweller-DO-docker:/opt/wieting-D8-DO&lt;/code&gt;, where it would respond, temporarily, at my designated &amp;ldquo;staging&amp;rdquo; address, &lt;em&gt;&lt;a href=&#34;https://Wieting.SummittServices.com&#34;&gt;https://Wieting.SummittServices.com&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;While working as &lt;em&gt;administrator&lt;/em&gt; on &lt;code&gt;summitt-dweller-DO-docker&lt;/code&gt; the entire command-line process looked like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;echo $(date --iso-8601)
cd /opt/docker-compose-drupal
git ls-files --others --ignored --exclude-standard &amp;gt; $(date --iso-8601).ignored.list
tar czvf $(date --iso-8601).ignored.list.tar.gz --files-from $(date --iso-8601).ignored.list
gpg --encrypt --recipient summitt.dweller@gmail.com $(date --iso-8601).ignored.list.tar.gz
rm -fr $(date --iso-8601).ignored.list.tar.gz
cd /opt
git clone https://github.com/SummittDweller/wieting-D8-DO.git
cd wieting-D8-DO
cp -f ../docker-compose-drupal/2020-02-27.ignored.list.tar.gz.gpg .
gpg --decrypt 2020-02-27.ignored.list.tar.gz.gpg &amp;gt; ignored.tar.gz
tar xzvf ignored.tar.gz
rm -f ignored.tar.gz
cd ../docker-compose-drupal
scripts/mysql dump
mv -f database/dump/dump.sql /opt/wieting-D8-DO/database/mysql-init
cd /opt/wieting-D8-DO
nano .env
nano docker-compose.yml
docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;breaking-the-workflow-down&#34;&gt;Breaking the Workflow Down&lt;/h3&gt;
&lt;p&gt;Moving the site from &lt;code&gt;/opt/docker-compose-drupal&lt;/code&gt; and &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt;, to &lt;code&gt;/opt/wieting-D8-DO&lt;/code&gt; and &lt;a href=&#34;https://Wieting.SummittServices.com&#34;&gt;https://Wieting.SummittServices.com&lt;/a&gt; is a command-line process like this, with comments&amp;hellip;&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Comments / Commands&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;# Set the working directory to the server&amp;rsquo;s project root, then &lt;code&gt;git clone&lt;/code&gt; the &lt;em&gt;wieting-D8-DO&lt;/em&gt; project.&lt;br/&gt; &lt;code&gt;cd /opt&lt;/code&gt; &lt;br/&gt; &lt;code&gt;git clone https://github.com/SummittDweller/wieting-D8-DO.git&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Save today&amp;rsquo;s date in ISO 8601 format to &lt;code&gt;${today}&lt;/code&gt;; we will use it a few times later on. &lt;br/&gt; &lt;code&gt;today=$(date --iso-8601)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Set working directory to the initial project. Put the site into &amp;lsquo;maintenance_mode&amp;rsquo;, flush all caches, dump a copy of the project&amp;rsquo;s database, move previously dumped databases to an &lt;em&gt;.inactive&lt;/em&gt; directory, and move the dumped database so it will initialze the new site upon startup. &lt;br/&gt; &lt;code&gt;cd /opt/docker-compose-drupal&lt;/code&gt; &lt;br/&gt; &lt;code&gt;scripts/drush sset system.maintenance_mode 1 --input-format=integer&lt;/code&gt; &lt;br/&gt; &lt;code&gt;scripts/drush cr&lt;/code&gt; &lt;br/&gt; &lt;code&gt;scripts/mysql dump -f dump_${today}.sql&lt;/code&gt; &lt;br/&gt; &lt;code&gt;mv -f /opt/wieting-D8-DO/database/mysql-init/*.sql /opt/wieting-D8-DO/database/mysql-init/.inactive/&lt;/code&gt; &lt;br/&gt; &lt;code&gt;mv -f database/dump/dump_${today}.sql /opt/wieting-D8-DO/database/mysql-init/&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Fetch a list of ignored files, then &lt;em&gt;tar&lt;/em&gt; the ignored files to make an archive, and encrypt the tarball for security purposes, then remove the itermediate tarball. &lt;br/&gt; &lt;code&gt;git ls-files --others --ignored --exclude-standard &amp;gt; ${today}.ignored.list&lt;/code&gt; &lt;br/&gt; &lt;code&gt;tar czvf ${today}.ignored.list.tar.gz --files-from ${today}.ignored.list&lt;/code&gt; &lt;br/&gt; &lt;code&gt;gpg --encrypt --recipient summitt.dweller@gmail.com ${today}.ignored.list.tar.gz&lt;/code&gt; &lt;br/&gt; &lt;code&gt;rm -fr ${today}.ignored.list.tar.gz&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Now set the working directory to the new project, copy the tarball from the old site to the new one, decrypt and then restore/extract the tarball contents, and finally, remove the intermediate tarball. &lt;br/&gt; &lt;code&gt;cd /opt/wieting-D8-DO&lt;/code&gt; &lt;br/&gt; &lt;code&gt;cp -f ../docker-compose-drupal/${today}.ignored.list.tar.gz.gpg .&lt;/code&gt; &lt;br/&gt; &lt;code&gt;gpg --decrypt ${today}.ignored.list.tar.gz.gpg &amp;gt; ignored.tar.gz&lt;/code&gt; &lt;br/&gt; &lt;code&gt;tar xzvf ignored.tar.gz&lt;/code&gt; &lt;br/&gt; &lt;code&gt;rm -f ignored.tar.gz&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Working in the new directory, edit the &lt;em&gt;.env&lt;/em&gt; file to set &lt;code&gt;PROJECT_NAME&lt;/code&gt;, &lt;code&gt;NGINX_HOST_HTTP_PORT&lt;/code&gt; and &lt;code&gt;NGINX_HOST_HTTPS_PORT&lt;/code&gt; that won&amp;rsquo;t conflict with existing names. &lt;br/&gt; &lt;code&gt;nano .env&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Still in the new directory, edit the &lt;em&gt;docker-compose.yml&lt;/em&gt; file to set the &lt;em&gt;nginx&lt;/em&gt; service &lt;code&gt;labels:&lt;/code&gt; to include  &lt;code&gt;traefik.frontend.rule=Host:wieting.SummittServices.com&lt;/code&gt;, to properly address the new site. &lt;br/&gt; &lt;code&gt;nano docker-compose.yml&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Spin up the new site for testing. &lt;br/&gt; &lt;code&gt;docker-compose up -d&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;# Turn off &amp;lsquo;maintenance_mode&amp;rsquo; in both sites. &lt;br/&gt; &lt;code&gt;/opt/docker-compose-drupal/scripts/drush sset system.maintenance_mode 0 --input-format=integer&lt;/code&gt; &lt;br/&gt; &lt;code&gt;/opt/wieting-D8-DO/scripts/drush sset system.maintenance_mode 0 --input-format=integer&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;That worked nicely!  Time to end this saga, but I&amp;rsquo;ll return shortly, in another post, to document my workflow for ongoing maintenance and updates.  Until next time&amp;hellip;&lt;/p&gt;
</description>
      </item>
      
    
  </channel>
</rss>
