<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jeff Beeman's Blog]]></title><description><![CDATA[Just a simple blog.]]></description><link>https://jeffbeeman.com</link><generator>GatsbyJS</generator><lastBuildDate>Sun, 18 Apr 2021 17:48:01 GMT</lastBuildDate><item><title><![CDATA[Notes regarding Gatsby deployment to a Cloudflare Worker using GitLab CI]]></title><description><![CDATA[Rough notes below for now package.json Added a  line to facilitate build and deploy:  gitlab-ci.yml GitLab CI configuration Add Cloudflare…]]></description><link>https://jeffbeeman.com/gitlab-ci/</link><guid isPermaLink="false">https://jeffbeeman.com/gitlab-ci/</guid><pubDate>Sat, 17 Apr 2021 23:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Rough notes below for now&lt;/h2&gt;
&lt;h3&gt;package.json&lt;/h3&gt;
&lt;p&gt;Added a &lt;code class=&quot;language-text&quot;&gt;scripts&lt;/code&gt; line to facilitate build and deploy: &lt;code class=&quot;language-text&quot;&gt;&amp;quot;publish&amp;quot;: &amp;quot;npm run build &amp;amp;&amp;amp; wrangler publish&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;gitlab-ci.yml&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;yml&quot;&gt;&lt;pre class=&quot;language-yml&quot;&gt;&lt;code class=&quot;language-yml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; node&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;latest

&lt;span class=&quot;token key atrule&quot;&gt;cache&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;CI_COMMIT_REF_SLUG&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;paths&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; node_modules/
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; .cache/
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; public/

&lt;span class=&quot;token key atrule&quot;&gt;before_script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; npm &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;version
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; node &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;version
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; npm install &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;g gatsby&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;cli
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; npm install &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;g @cloudflare/wrangler

&lt;span class=&quot;token key atrule&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token comment&quot;&gt;# Use `npm ci` because it&apos;s faster than `npm install` and designed for this context.&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; npm ci
    &lt;span class=&quot;token comment&quot;&gt;# Env vars are CF_ACCOUNT_ID, CF_API_TOKEN, CF_ZONE_ID and set in GitLab CI settings. &lt;/span&gt;
    &lt;span class=&quot;token comment&quot;&gt;# Note that these variables must *not* be protected.&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; npm run publish
  &lt;span class=&quot;token key atrule&quot;&gt;only&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; main&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;GitLab CI configuration&lt;/h3&gt;
&lt;p&gt;Add Cloudflare-related environment variables to GitLab CI/CD settings for the project, under “Variables”  Variables should &lt;em&gt;not&lt;/em&gt; be protected, otherwise GitLab CI won’t see them properly (banged my head against this for a bit).&lt;/p&gt;
&lt;p&gt;The variables are self-explanatory as you setup with your Cloudflare tokens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;CF_ACCOUNT_ID&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;CF_API_TOKEN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;CF_ZONE_ID&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;[https://www.gatsbyjs.com/docs/deploying-to-gitlab-pages/]&lt;/li&gt;
&lt;li&gt;[https://blog.vence.tech/posts/ci-cd-pipeline-on-gitlab/]&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Notes regarding my local Drupal development environment on Ubuntu 20.04 LTS with WSL 2 on Windows]]></title><description><![CDATA[I’ve been working on getting my local Windows development up and running. Here’s some brief documentation of the steps I’ve followed. Get…]]></description><link>https://jeffbeeman.com/wsl-ubuntu/</link><guid isPermaLink="false">https://jeffbeeman.com/wsl-ubuntu/</guid><pubDate>Sat, 17 Apr 2021 11:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve been working on getting my local Windows development up and running. Here’s some brief documentation of the steps I’ve followed.&lt;/p&gt;
&lt;h2&gt;Get WSL and Ubuntu installed&lt;/h2&gt;
&lt;p&gt;Install WSL on Windows 10 [https://docs.microsoft.com/en-us/windows/wsl/install-win10]&lt;/p&gt;
&lt;p&gt;I was running Ubuntu 18.04 LTS from a while ago, so I updated to Ubuntu 20.04 LTS as the Linux distribution. If you’re just starting out, I recommend jumping right to Ubuntu 20.04. I also chose to run WSL 2, which is covered in the link above.&lt;/p&gt;
&lt;h2&gt;Install Drupal web server dependencies&lt;/h2&gt;
&lt;p&gt;Update all the things&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;apt update &amp;amp;&amp;amp; apt upgrade &amp;amp;&amp;amp; apt-get dist-upgrade&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install some utilities we’ll need&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;apt install git bash-completion tasksel&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install LAMP server&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;tasksel install lamp-server&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install additional PHP dependencies&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;apt install php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Secure MySQL&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;mysql_secure_installation&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Enable apache rewrite and restart:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;a2enmod rewrite &amp;amp;&amp;amp; service apache2 restart&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Updating from Ubuntu 18.04 to Ubuntu 20.04&lt;/h2&gt;
&lt;p&gt;If this is something you need to do, here’s how I did it:&lt;/p&gt;
&lt;p&gt;Note: Run all these steps as root: &lt;code class=&quot;language-text&quot;&gt;sudo -u root -s&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Update all the things&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;apt update &amp;amp;&amp;amp; apt upgrade &amp;amp;&amp;amp; apt-get dist-upgrade&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Update to Ubuntu 20.04 LTS&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;do-release-upgrade -d&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content:encoded></item><item><title><![CDATA[Complicated Basics]]></title><description><![CDATA[Over the coming weeks I’ll be working through the process of rebuilding my blog using Gatsby as the front end. Why am I doing this? Well, I…]]></description><link>https://jeffbeeman.com/complicated-basics/</link><guid isPermaLink="false">https://jeffbeeman.com/complicated-basics/</guid><pubDate>Tue, 06 Apr 2021 17:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Over the coming weeks I’ll be working through the process of rebuilding my blog using Gatsby as the front end.&lt;/p&gt;
&lt;p&gt;Why am I doing this? Well, I’m pretty bad about keeping a full CMS up to date when it’s just for my personal site. I’m busy, and struggle to keep up.&lt;/p&gt;
&lt;p&gt;Why Gatsby? I have to admit, Gatsby is a bit daunting to me at the moment. There are simpler static site generators I could be using. So, why did I choose Gatsby? I went this route because while, for the moment, I’ll be using locally stored, static markdown files for the content on the site eventually I’d like to move to a new, simple decoupled Drupal backend powered by Drupal’s excellent JSON:API. The path from here to there is a bit long, though, so I’m starting simple.&lt;/p&gt;
&lt;p&gt;Wait, you just said maintaining a CMS was too much work. Yep, it is - when the CMS is accessible to the world and contains everything from the frontend to the backend of the site. With a decoupled architecture, I can keep a lean, mean Drupal configuration behind the scenes. That site will be far easier to maintain and keep up to date.&lt;/p&gt;
&lt;p&gt;In the meantime, I’ll use Gatsby’s local static content store to track my progress. I chose to start with the &lt;a href=&quot;https://github.com/gatsbyjs/gatsby-starter-blog&quot;&gt;gatsby-starter-blog&lt;/a&gt; project.&lt;/p&gt;</content:encoded></item></channel></rss>