<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.0.0">Jekyll</generator><link href="https://sketchingtech.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://sketchingtech.com/" rel="alternate" type="text/html" /><updated>2020-12-03T12:30:25+01:00</updated><id>https://sketchingtech.com/feed.xml</id><icon>https://sketchingtech.com/images/icon/favicon.ico</icon><title type="html">SketchingTech</title><subtitle></subtitle><entry><title type="html">DevNet Journey</title><link href="https://sketchingtech.com/automation/Devnet-Certification-Journey.html" rel="alternate" type="text/html" title="DevNet Journey" /><published>2020-06-01T02:00:01+02:00</published><updated>2020-06-01T02:00:01+02:00</updated><id>https://sketchingtech.com/automation/Devnet-Certification-Journey</id><content type="html" xml:base="https://sketchingtech.com/automation/Devnet-Certification-Journey.html">&lt;p&gt;Everybody is aware of the different technologies or advances that are impacting our workplace (e.g. Blockchain, AI, Machine Learning, Automation, etc.). In my case, as a network engineer, I see the silos crumbling and companies still trying to figure out, who and what are the resources needed, or how to transform their processes to align themselves, so they can leverage these technologies.&lt;/p&gt;

&lt;p&gt;Personally, I think that the best way to solve these questions, is to understand the underlying dynamics or ways of working of the people involved in them, so, taking this into account and since I’m not yet completely detached from my technical side and responsibilities, I see these certifications as a great opportunity to experience on my own these challenges, find a middle ground and better understand what are the new capabilities of the roles involved.&lt;/p&gt;

&lt;figure style=&quot;width: 300px&quot; class=&quot;align-right&quot;&gt;
 &lt;img src=&quot;/images/posts/Devnet-Certification-Journey/Cert-levels.png&quot; alt=&quot;&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;Cisco’s DevNet new certifications, at the moment, only reach the professional level, but the expert level is on the way.&lt;/p&gt;

&lt;p&gt;What is interesting about this, are not the certificates per se (I have never been a huge lover of certificates), but the actual information that is available.
Since I’ve never been a developer, I don’t really know if there would be something “new” for them to learn, but there is probably something for everyone.&lt;/p&gt;

&lt;h3 id=&quot;Study Plan&quot;&gt;Study Plan&lt;/h3&gt;

&lt;p&gt;So, I had the same question that everybody does, ¿Where do I start?&lt;/p&gt;

&lt;p&gt;Luckily, I found what I consider some really &lt;a href=&quot;http://njrusmc.net/jobaid/jobaid.html&quot; title=&quot;Study Guides&quot;&gt;well-constructed guides&lt;/a&gt; from &lt;a href=&quot;https://linkedin.com/in/njrusmc&quot; title=&quot;Nicholas Russos's LinkedIn&quot;&gt;Nicholas Russo&lt;/a&gt; that I will be using. I recommend everyone to take a look at them and also his Pluralsight courses.&lt;/p&gt;

&lt;p&gt;In my new &lt;a href=&quot;/DevNet-Collection/&quot; title=&quot;DevNet Collection&quot;&gt;&lt;b&gt;DevNet Collection&lt;/b&gt;&lt;/a&gt;, I’ll be tackling topics from Cisco exams overviews so I can use them as refresher notes and they might be useful to you too.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/Devnet-Certification-Journey/exam.png&quot; style=&quot;width: 50px&quot; class=&quot;align-left&quot; alt=&quot;image-left&quot; /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://developer.cisco.com/certification/exam-topic-associate/&quot; title=&quot;DEVASC 200-901&quot;&gt;&lt;b&gt;DEVASC 200-901 - Exam overview:&lt;/b&gt;&lt;/a&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;Software Development and Design - 5%&lt;/li&gt;
 &lt;li&gt;Understanding and Using APIs - 20%&lt;/li&gt;
 &lt;li&gt;Cisco Platforms and Development - 15%&lt;/li&gt;
 &lt;li&gt;Application Deployment and Security - 15%&lt;/li&gt;
 &lt;li&gt;Infrastructure and Automation - 20%&lt;/li&gt;
 &lt;li&gt;Network Fundamentals - 15%&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/Devnet-Certification-Journey/exam.png&quot; style=&quot;width: 50px&quot; class=&quot;align-left&quot; alt=&quot;image-left&quot; /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://developer.cisco.com/certification/exam-topic-core/&quot; title=&quot;DEVCOR 350-901&quot;&gt;&lt;b&gt;DEVCOR 350-901 - Exam Overview:&lt;/b&gt;&lt;/a&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;Software Development and Design - 20%&lt;/li&gt;
 &lt;li&gt;Using APIs - 20%&lt;/li&gt;
 &lt;li&gt;Cisco Platforms - 20%&lt;/li&gt;
 &lt;li&gt;Application Deployment and Security - 20%&lt;/li&gt;
 &lt;li&gt;Infrastructure and Automation - 20%&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@chatelp?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&quot; title=&quot;Pierre Châl-Innocenti&quot;&gt;Pierre Châl-Innocenti&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/@chatelp?utm_medium=referral&amp;amp;utm_campaign=photographer-credit&amp;amp;utm_content=creditCopyText&quot; title=&quot;Unsplash&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;</content><author><name>William Simoes</name></author><category term="Cisco" /><category term="DevNet" /><summary type="html">Everybody is aware of the different technologies or advances that are impacting our workplace (e.g. Blockchain, AI, Machine Learning, Automation, etc.). In my case, as a network engineer, I see the silos crumbling and companies still trying to figure out, who and what are the resources needed, or how to transform their processes to align themselves, so they can leverage these technologies.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://sketchingtech.com/images/posts/Devnet-Certification-Journey/hero.png" /><media:content medium="image" url="https://sketchingtech.com/images/posts/Devnet-Certification-Journey/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Cisco Wireless Licensing</title><link href="https://sketchingtech.com/wireless/Cisco-wireless-licensing.html" rel="alternate" type="text/html" title="Cisco Wireless Licensing" /><published>2020-03-31T20:21:00+02:00</published><updated>2020-03-31T20:21:00+02:00</updated><id>https://sketchingtech.com/wireless/Cisco-wireless-licensing</id><content type="html" xml:base="https://sketchingtech.com/wireless/Cisco-wireless-licensing.html">&lt;p&gt;With the introduction of new Wireless LAN Controllers (WLC) and Access Points (APs), Cisco changed the licensing mode to align these technologies with their smart licensing scheme. With this transition many questions arise regarding the migration or upgrade process of your legacy infrastructure to support new technologies.&lt;/p&gt;

&lt;p&gt;Before this change, the licensing was perpetual and related to the WLC, now the licenses are subscription-based and associated to the APs.&lt;/p&gt;

&lt;p&gt;The new WLC in the scope of this post is the Cisco Catalyst 9800 Series Wireless Controllers, which require mandatory Smart Licensing. This provides ease of use for Cisco DNA license management, consumption, and tracking.&lt;/p&gt;

&lt;p&gt;No licenses are required to boot up a C9800 WLC. However, &lt;b&gt;in order to connect any access points to the controller, Cisco DNA licenses are required&lt;/b&gt;. The different cases can be summarized with the following chart:&lt;/p&gt;

&lt;figure class=&quot;align-center&quot;&gt;
  &lt;img src=&quot;/images/posts/Cisco-wireless-licensing/Licensing_Flowchart.jpg&quot; alt=&quot;&quot; /&gt;
  &lt;figcaption&gt;&lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/catalyst-9800-series-wireless-controllers/datasheet-c78-742434.html#Licensing&quot;&gt;Licensing Flowchart.&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3 id=&quot;Supported Platforms&quot;&gt;Cisco DNA wireless subscription supported platforms.&lt;/h3&gt;

&lt;p&gt;According to Cisco &lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/catalyst-9100ax-access-points/guide-c07-742134.html&quot; title=&quot;Cisco Ordering Guide&quot;&gt;documentation&lt;/a&gt; these are the platform supported by the subscription-based model&lt;/p&gt;

&lt;p&gt;Access-point platforms:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt; All &lt;a href=&quot;https://www.cisco.com/c/en/us/solutions/enterprise-networks/802-11ac-solution/index.html&quot; tittle=&quot;802.11ac Wave2&quot;&gt;Cisco Aironet 802.11ac Wave 2 access points&lt;/a&gt; and Cisco Catalyst 9100 Access Points are fully supported.&lt;/li&gt;
 &lt;li&gt;Cisco Aironet 802.11ac Wave 1 access points are supported with limited capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wireless LAN Controller (WLC) platforms:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Cisco &lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/3504-wireless-controller/datasheet-c78-738484.html&quot; tittle=&quot;Cisco 3504 WLC&quot;&gt;3504&lt;/a&gt;, &lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/5520-wireless-controller/datasheet-c78-734257.html&quot; tittle=&quot;Cisco 5520 WLC&quot;&gt;5520&lt;/a&gt;, &lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/8540-wireless-controller/datasheet-c78-734258.html&quot; tittle=&quot;Cisco 8540 WLC&quot;&gt;8540&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;Cisco &lt;a href=&quot;https://www.cisco.com/c/en/us/products/collateral/wireless/catalyst-9800-series-wireless-controllers/nb-06-cat9800-wirel-guide-ctp-en.pdf&quot; tittle=&quot;Cisco C9800 WLC&quot;&gt;Catalyst 9800 controller&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even though this information is widely available, I still had some doubts about the next steps or the natural migration process for some cases.&lt;/p&gt;

&lt;p&gt;By the time of this post writing, I’ve only come across these three scenarios, but they might be useful to extrapolate for any case not explicitly stated here.&lt;/p&gt;

&lt;p&gt;In all cases, as always, we have to take into account the &lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/wireless/compatibility/matrix/compatibility-matrix.html&quot; tittle=&quot;Wireless Solutions Compatibility Matrix&quot;&gt;compatibility matrix&lt;/a&gt; for the different platforms, and I’m assuming that, generally speaking, this is correct for each case.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Keep older controllers that &lt;i&gt;DO NOT&lt;/i&gt; support DNA subscription (e.g. 5508):&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
  &lt;li&gt;New AP models are not supported and the DNA license should not be bought since it won't be supported.&lt;/li&gt;
  &lt;li&gt;If the controller doesn't have enough licenses to support a higher number of APs, a license upgrade should be bought as always (perpetual in WLC) for the amount needed (e.g. L-LIC-CT5508-UPG)&lt;/li&gt;
 &lt;/ul&gt;

&lt;li&gt;&lt;b&gt;Keep older controllers that &lt;i&gt;support&lt;/i&gt; DNA subscription (e.g. 5520):&lt;/b&gt;&lt;/li&gt;
 &lt;ul&gt;
  &lt;li&gt;Within these controllers, both licensing models can coexist. (perpetual and subscription), so there is no need to migrate previous licenses from perpetual to DNA.&lt;/li&gt;
  &lt;li&gt;If the APs are supported (e.g. AIR-AP3802I-E-K9) and support the new licensing model (DNA), you can start buying the APs with the DNA license included (if needed), since these controllers support this licensing mode.&lt;/li&gt;
  &lt;li&gt;No changes in the controller related to the licensing must be done, it's still Right to Use (RTU).
&lt;br /&gt;
What happens behind the scene is that any new AP with mandatory DNA subscription (9100, 4800) brings a &quot;&lt;i&gt;WLC-AP-T&lt;/i&gt;&quot; code, which can be used in any controller.
&lt;br /&gt;
With this code the increment of RTU licenses is permitted in the WLC by as many units as there were acquired.&lt;/li&gt;
 &lt;/ul&gt;

&lt;li&gt;&lt;b&gt;Change older controllers for &lt;i&gt;new ones&lt;/i&gt; (e.g. C9800):&lt;/b&gt;&lt;/li&gt;
 &lt;ul&gt;
  &lt;li&gt;As stated before, the use of Smart Licensing in this controller is &lt;b&gt;mandatory&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;All supported APs must be bought with the new licensing model (DNA).&lt;/li&gt;
  &lt;li&gt;Regarding the older licenses (perpetual in WLC), these must be migrated to a subscription license (DNA), buying &quot;AIR-DNA licenses&quot; and asking the partner for migration credits (promotion).&lt;/li&gt;
  &lt;li&gt;The licenses will be taken from the pools defined in the smart account, for new APs and for migrated ones. The smart licensing configuration for this new controller can be found in &lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/wireless/controller/9800/16-12/config-guide/b_wl_16_12_cg/smart-licensing.html&quot; tittle=&quot;C9800 Configuration Guide&quot;&gt;Cisco's Guide&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/ol&gt;

&lt;p&gt;To close this topic for now, is worth to note, that there is a &lt;a href=&quot;https://www.cisco.com/c/en/us/solutions/enterprise-networks/promotions-free-trials/catalyst-9800-wireless-controllers-promotion.html&quot; tittle=&quot;50% off Catalyst 9800&quot;&gt;promotion&lt;/a&gt; at the moment from 50% off within cisco for the new C9800 ordering at least 100 AP licenses.&lt;/p&gt;

&lt;p&gt;Regarding the migration credits, they should be applied by Cisco Partners or resellers, same as the final discount if any, these are complementary and non-exclusive.&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@faceline?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&quot; title=&quot;Thomas Martinsen&quot;&gt;Thomas Martinsen&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/s/photos/business?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&quot; title=&quot;Unsplash&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;</content><author><name>William Simoes</name></author><category term="Cisco" /><category term="Licensing" /><summary type="html">With the introduction of new Wireless LAN Controllers (WLC) and Access Points (APs), Cisco changed the licensing mode to align these technologies with their smart licensing scheme. With this transition many questions arise regarding the migration or upgrade process of your legacy infrastructure to support new technologies.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://sketchingtech.com/images/posts/Cisco-wireless-licensing/hero.png" /><media:content medium="image" url="https://sketchingtech.com/images/posts/Cisco-wireless-licensing/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Starting the Blog</title><link href="https://sketchingtech.com/cloud/Starting-the-blog.html" rel="alternate" type="text/html" title="Starting the Blog" /><published>2019-12-10T13:30:37+01:00</published><updated>2019-12-10T13:30:37+01:00</updated><id>https://sketchingtech.com/cloud/Starting-the-blog</id><content type="html" xml:base="https://sketchingtech.com/cloud/Starting-the-blog.html">&lt;p&gt;As I was looking for new ways to get in touch with cloud services, and to have an archive where I could dump all the information I might find useful, I stumbled upon Maris Elsins’s &lt;b&gt;&lt;a href=&quot;https://blog.pythian.com/how-to-build-a-cost-effective-serverless-blogging-platform-on-gcp-part-1/&quot; title=&quot;Maris Elsins's post&quot;&gt;post&lt;/a&gt;&lt;/b&gt; on &lt;q&gt;How To Build A Cost-Effective Serverless Blogging Platform On GCP&lt;/q&gt;, and it caught might attention, since it combines a good amount of topics that I needed to refresh or I’ve never had the chance to put in practice in a project. I will give it a try and just hope I don’t need to change this platform in the near future.&lt;/p&gt;

&lt;p&gt;My intention with this post is to write a summary (for my future reference too) of what Maris explains in more depth in his. Here are the ingredients for this recipe:&lt;/p&gt;

&lt;h3 id=&quot;recipe&quot;&gt;Recipe.&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;/images/posts/Starting-the-blog/recipe.png&quot; style=&quot;height: 270px&quot; class=&quot;round-align-left&quot; alt=&quot;image-left&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href=&quot;https://www.docker.com/&quot; title=&quot;Docker&quot;&gt;Docker&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://git-scm.com/&quot; title=&quot;Git&quot;&gt;Git&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://jekyllrb.com&quot; title=&quot;Jekyll&quot;&gt;Jekyll&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://cloud.google.com/source-repositories/&quot; title=&quot;GCP Source Repository&quot;&gt;GCP Source Repository&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://cloud.google.com/container-registry&quot; title=&quot;GCP Container Registry&quot;&gt;GCP Container Registry&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://cloud.google.com/cloud-build&quot; title=&quot;GCP Cloud Build&quot;&gt;GCP Cloud Build&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;&lt;a href=&quot;https://cloud.google.com/appengine/&quot; title=&quot;GCP App Engine&quot;&gt;GCP App Engine&lt;/a&gt; (Mandatory)&lt;/li&gt;
 &lt;li&gt;Custom Domain (Optional)&lt;/li&gt;
 &lt;li&gt;Unix/Linux Host (Optional) - In my case I used a VM with CentOS7&lt;/li&gt;
 &lt;li&gt;Jekyll Themes (Optional)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
The idea behind of how this serverless blog works, is shown in the next figure extracted from Maris’s post, where you can see the workflow for the publication of a new blog post (like this one that you are reading).&lt;/p&gt;
&lt;h3 id=&quot;Post Workflow&quot;&gt;Workflow for blog post publishing.&lt;/h3&gt;
&lt;figure class=&quot;align-center&quot;&gt;
  &lt;img src=&quot;/images/posts/Starting-the-blog/GCPServerlessBlog0.png&quot; alt=&quot;&quot; /&gt;
  &lt;figcaption&gt;&lt;a href=&quot;https://blog.pythian.com/how-to-build-a-cost-effective-serverless-blogging-platform-on-gcp-part-1/&quot;&gt;Workflow for a blog post publishing.&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The first thing that I needed to do was to provision the host where I was going to install all the necessary tools for my blogger environment. First I tried to just move forward and deploy Docker directly on Windows 10 and it was actually a nightmare for me, so I went for the old Linux. Since I wanted to be as close to a Red Hat distro as possible, I deployed a CentOS7 minimal VM.&lt;/p&gt;

&lt;h3 id=&quot;environment-install&quot;&gt;Docker, Git, Source Code Repository &amp;amp; Jekyll Installations.&lt;/h3&gt;

&lt;p&gt;For &lt;b&gt;Docker installation&lt;/b&gt;, I just followed the steps in the &lt;b&gt;&lt;a href=&quot;https://docs.docker.com/install/linux/docker-ce/centos/&quot; title=&quot;docker-install-doc&quot;&gt;documentation&lt;/a&gt;&lt;/b&gt;. But for &lt;b&gt;Git&lt;/b&gt; it wasn’t straight forward, since the available version for CentOS7 is 1.8.3 and there has been some improvements for GCP authentication within 2.0.5. So I needed to learn something new, how to compile Git’s source code, fortunately Maris pointed to this useful &lt;b&gt;&lt;a href=&quot;https://tecadmin.net/install-git-2-0-on-centos-rhel-fiedora/&quot; title=&quot;git-compile&quot;&gt;post&lt;/a&gt;&lt;/b&gt; on how to do exactly that, and procedure is as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;- Step 1: Install Required Packages:&lt;/b&gt;

 # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
 # yum install gcc perl-ExtUtils-MakeMaker

&lt;b&gt;- Step 2: Uninstall any prior installation of Git through RPM file or Yum package manager.&lt;/b&gt;

 # yum remove git

&lt;b&gt;- Step 3: Download, extract and compile Git source.&lt;/b&gt;

 # cd /usr/src
 # wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
 # tar xzf git-2.0.5.tar.gz

 # cd git-2.0.5
 # make prefix=/usr/local/git all
 # make prefix=/usr/local/git install
 # echo &quot;export PATH=$PATH:/usr/local/git/bin&quot; &amp;gt;&amp;gt; /etc/bashrc
 # source /etc/bashrc

&lt;b&gt;- Step 4: Check successful installation of Git version 2.0.5.&lt;/b&gt;

# git --version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;gcp-sr&quot;&gt;GCP Source Repository:&lt;/h4&gt;

&lt;p&gt;Now that I had Git already installed, I needed to create the repository to commit all changes that I’ll make to the blog code.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;- Step 1: Login to you Google account, create a &lt;a href=&quot;https://cloud.google.com/resource-manager/docs/creating-managing-projects&quot; title=&quot;create-gcp-project&quot;&gt;GCP project&lt;/a&gt;, and install &lt;a href=&quot;https://cloud.google.com/sdk/install&quot; title=&quot;install-gcsdk&quot;&gt;Google Cloud SDK&lt;/a&gt;&lt;/b&gt;

&lt;b&gt;- Step 2: Configure the SDK.&lt;/b&gt;

$ gcloud init

&lt;b&gt;- Step 3: Create the source repository and enable the API service for the project.&lt;/b&gt;

$ gcloud source repos create [repository-name]

&lt;b&gt;- Step 4: Clone the empty repository from GCP to the workstation.&lt;/b&gt;

$ cd [repository-name-localdir]
$ gcloud source repos clone [repository-name]

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;jekyll&quot;&gt;Jekyll:&lt;/h4&gt;

&lt;p&gt;Since the serverless blog is based on the use of Docker, I deployed the default &lt;a href=&quot;https://github.com/envygeeks/jekyll-docker/blob/master/README.md&quot; title=&quot;jekyll-docker&quot;&gt;Jekyll Docker image&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Personally, I think that understanding and working with Jekyll was the hardest part for me, since I haven’t worked with CSS, or a static web page generators before, I even changed the default theme for the blog, so I think it made it somewhat confusing.&lt;/p&gt;

&lt;p&gt;In Maris Elsins’s blog posts, he writes the procedure with a different structure and more depth, this might be easier to follow for someone, but here, I’m just trying to compress all the steps I followed.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ docker pull jekyll/jekyll
$ cd [repository-name-localdir]

&lt;b&gt;- Start a container, obtain an interactive bash session, and create the initial blog site structure by running jekyll new.&lt;/b&gt;

$ docker run --rm --publish 4000:4000 --volume=&quot;$PWD:/srv/jekyll&quot; --privileged -it jekyll/jekyll:latest bash
$ jekyll new /srv/jekyll

&lt;b&gt;- You could run jekyll server to test the blog, using your VM's IP and 4000 port (e.g. http://192.168.33.13:4000/)
#I would like to point out that this would depend on your VM configuration, if the network connection is NAT, bridged, etc.&lt;/b&gt;

$ jekyll serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Later, we will need to create a new Docker image as a baseline to automate the generation of our static web page from within GCP, but before doing that, we should create a script, so it’s already included in this Docker image.&lt;/p&gt;

&lt;p&gt;To use the GCP Cloud Build, Maris found some issues using generating the web page on the default directory because of some file access privilege issues, I haven’t had the time or knowledge to see if there is a better solution to this, but for now, what Maris states as a workaround works just fine.&lt;/p&gt;

&lt;p&gt;Here is where the script comes into play, it will simply copy all the files to some local directory (/u01) inside the container to work with them, and then will copy back the built _site folder.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bash-4.4# echo &quot;rm -rf /u01 /srv/jekyll/_site &amp;gt; /dev/null
mkdir /u01
chmod 777 /srv/jekyll /u01
cp -r /srv/jekyll/* /u01/
cd /u01/
JEKYLL_ENV=production jekyll build
cp -r /u01/_site /srv/jekyll/
rm -rf /u01 &amp;gt; /dev/null&quot; &amp;gt; /root/init_build.sh

bash-4.4# chmod a+x /root/init_build.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally, from another session, commit the changes to a Docker image while the container is running, so all the downloaded dependencies and the script, will be included.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;- Get the Container ID for the running container.&lt;/b&gt;

$ docker ps -a

&lt;b&gt;- Make a &quot;snapshot&quot; of the running container. Docker images pushed to the GCP Container Registry need to follow a specific naming of [HOSTNAME]/[PROJECT-ID]/[IMAGE].&lt;/b&gt;

$ docker container commit [CONTAINER ID] gcr.io/[PROJECT-ID]/jekyll:latest
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Within the &lt;i&gt;[repository-name-localdir]/&lt;/i&gt;, the &lt;i&gt;_site&lt;/i&gt; directory is the generated version of the static pages, and &lt;i&gt;.sass-cache&lt;/i&gt; is some caching mechanism that Jekyll uses. Both of these locations are excluded in &lt;i&gt;.gitignore&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;To make some customizations of the blog, you can edit the &lt;i&gt;_config.yml&lt;/i&gt; to change the theme of the blog, add plugins and adjust other parameters that you could check within Jekyll minimal theme &lt;a href=&quot;https://github.com/pages-themes/minimal&quot; title=&quot;minimal-doc&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;GCP Container Registry, Cloud Build and APP Engine&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/Starting-the-blog/CRegistry.png&quot; style=&quot;width: 150px&quot; class=&quot;round-align-left&quot; alt=&quot;image-left&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Container Registry&lt;/b&gt; is a private container image registry that runs on Google Cloud. To make use of the registry you will need to select or create a Cloud project, make sure that billing is enabled for your Google Cloud project and enable the Container Registry API, for all this you can just follow the documentation provided by Google.&lt;/p&gt;

&lt;p&gt;Since we have already configured de GCP SDK and Docker, we now have to configure Docker to use the gcloud command-line tool as a credential helper to authenticate the requests. This is a one line command and you are only required to do it once.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gcloud auth configure-docker

&lt;b&gt;- Push the already committed docker image to your project Registry&lt;/b&gt;

$ docker push gcr.io/[PROJECT-ID]/jekyll:latest
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/Starting-the-blog/CBuild.png&quot; style=&quot;width: 150px&quot; class=&quot;round-align-left&quot; alt=&quot;image-left&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Cloud Build&lt;/b&gt; is a service that executes a build to your specifications in a “&lt;i&gt;cloudbuild.yaml&lt;/i&gt;” file, and produce artifacts such as Docker containers or Java archives on Google Cloud Platform infrastructure.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;- Create the yaml file in the root of the repository&lt;/b&gt;
$ cat cloudbuild.yaml
steps:
  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', '--rm', '--volume=/workspace:/srv/jekyll', '--privileged', 'gcr.io/[PROJECT-ID]/jekyll:latest', '/root/init_build.sh']
  - name: &quot;gcr.io/cloud-builders/gcloud&quot;
    args: [&quot;app&quot;, &quot;deploy&quot;]
timeout: &quot;600s&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/Starting-the-blog/AppEngine.png&quot; style=&quot;width: 150px&quot; class=&quot;round-align-left&quot; alt=&quot;image-left&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;App Engine&lt;/b&gt; is a fully managed serverless application platform that allows you to build, deploy and scale applications seamlessly, supports popular development languages and a wide range of developer tools.&lt;/p&gt;

&lt;p&gt;In this case, we are using Python2.7 as Maris explains in his post, I think it won’t be a problem to use Python3.6, but being in the safe side, I would like to review in more depth the implications of using that version, price-wise and code-wise.&lt;/p&gt;

&lt;p&gt;To use the App Engine, We need to create an “&lt;i&gt;app.yaml&lt;/i&gt;” file to tell the App Engine how the deployment needs to be done.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;$ cat app.yaml&lt;/b&gt;
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
  static_files: _site/index.html
  upload: _site/index.html
  secure: always
  redirect_http_response_code: 301
- url: /(.*)
  static_files: _site/\1
  upload: _site/(.*)
  secure: always
  redirect_http_response_code: 301
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We would now have some new files available to commit and push to the GCP repository, so we should do so.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;- Step 5: Commit the new files to the master and push them to the remote repository.&lt;/b&gt;
$ git add -A
$ git status
$ git commit -m &quot;initial commit&quot;
$ git push origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now the Docker image is uploaded, all the files needed (&lt;i&gt;cloudbuild.yaml&lt;/i&gt; and &lt;i&gt;app.yaml&lt;/i&gt;) are in place and the blog is ready to be deployed using the App Engine.&lt;/p&gt;

&lt;p&gt;When deploying an app for a project for the first time, it will ask for the region where we want the application and this cannot be changed.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;b&gt;$ gcloud app deploy&lt;/b&gt;
Choose the region where you want your App Engine application located and continue with the deployment
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After the deployment is completed, you could access the app via &lt;i&gt;https://[PROJECT-ID].appspot.com&lt;/i&gt;&lt;/p&gt;

&lt;h3 id=&quot;putting_all_together&quot;&gt;Cherry on top - Putting it all together&lt;/h3&gt;

&lt;p&gt;At this point, we have just created/uploaded the different components into GCP, and ran the application for the first time in order to test it, but we have one piece left that brings everything together, and that is the Cloud Build Trigger.&lt;/p&gt;

&lt;p&gt;This will initiate the previous &lt;i&gt;cloudbuild.yaml&lt;/i&gt; when a commit to the master branch of the repository happens.&lt;/p&gt;

&lt;p&gt;Before configuring the Trigger, and to avoid problems in the deployment workflow, there are a couple of things we need to have in place:&lt;/p&gt;

&lt;ul&gt;
 &lt;li&gt; The &quot;App Engine Admin API&quot; needs to be enabled by navigating to &quot;APIs &amp;amp; Services&quot;. You can search for it in the Library.&lt;/li&gt;
 &lt;li&gt; App Engine Admin API needs to be enabled for the Service account that the Cloud Build uses, this will look like &quot;&lt;i&gt;[ID]@cloudbuild.gserviceaccount.com&lt;/i&gt;&quot;. In other words, Cloud Build needs to have permissions to deploy the app.&lt;br /&gt;Navigate to &quot;IAM &amp;amp; Admin&quot; -&amp;gt; &quot;IAM&quot;, find the service account listed, and add &quot;App Engine Admin&quot; role to that account as stated in the following image:&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class=&quot;align-center&quot;&gt;
  &lt;img src=&quot;/images/posts/Starting-the-blog/Cloud_Build_Service_Role.png&quot; alt=&quot;&quot; /&gt;
  &lt;figcaption&gt;&lt;a href=&quot;https://blog.pythian.com/how-to-build-a-cost-effective-serverless-blogging-platform-on-gcp-part-2/&quot;&gt;Adding the &quot;App Engine Admin&quot; role to the service account.&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;With the correct roles in place, we can now proceed and configure the Trigger.
Go to “Cloud Build” -&amp;gt; “Triggers” in GCP Cloud Console, enable the Cloud Build API in case it’s disabled and then create a trigger.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Select &quot;Cloud Source Repository&quot; option.&lt;/li&gt;
  &lt;li&gt;Select the name of your repository.&lt;/li&gt;
  &lt;li&gt;Provide the following options:
    &lt;ul&gt;
      &lt;li&gt;Name.&lt;/li&gt;
      &lt;li&gt;&quot;Branch&quot; as Trigger Type.&lt;/li&gt;
      &lt;li&gt;Choose the yaml file as the Build Configuration.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now the cycle is closed, after creating the trigger, every commit to the master branch will execute the build configuration file, build the new static web pages with jekyll and redeploy the app.&lt;/p&gt;

&lt;p&gt;Additionally, I would like to apply some improvements to this deployment. If by any chance I do work in this improvements, I’ll add a link to the related posts with more information.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Next Steps:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;In Maris's post, there is the option to add the comment section using Disqus, but I'm not completely convinced of using that one in particular, so I'll be looking forward to add the comment section using other service.&lt;/li&gt;
 &lt;li&gt;Price capping for services used in GCP to prevent any unwanted charges.&lt;/li&gt;
 &lt;li&gt;Others not yet defined.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;Additional tips:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;To change the default domain given by google, you can follow Google's documentation on &lt;a href=&quot;https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains&quot; title=&quot;App Engine Custom Domain&quot;&gt;custom domains mappings&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;If by any chance you lose access to your still deployed docker container, you could login back in with &quot;&lt;i&gt;docker exec -it [container] bash&lt;/i&gt;&quot;, and you can look for the name or ID of the target container with &quot;&lt;i&gt;docker ps&lt;/i&gt;&quot;.&lt;/li&gt;
 &lt;li&gt;In my case, by the time of writing this post, I've changed several times the hardware where I deployed the initial CentOS VM, which made me redeploy my environment a couple times and clone the repository from GCP.
&lt;br /&gt;&lt;br /&gt;
I don't know for sure (yet) the technical reason for this, but I encountered problems related to the privileges needed to run jekyll within docker, since it seems that even if you are &quot;privileged&quot; for the docker container, from the container you are not allowed to write into the directories where the container is deployed, depends if the directory was created with root user or not, I think.
&lt;br /&gt;&lt;br /&gt;
As you can notice I'm not a systems expert :), but following the process without a root user (as you should), you shouldn't encounter any problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all for this post, I’m happy to share my notes with you, I hope it is useful to you as it is for me.&lt;/p&gt;

&lt;p&gt;If you want to give any feedback, please feel free to reach me through social media.&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@jesuskiteque?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&quot; title=&quot;Jesus Kiteque&quot;&gt;Jesus Kiteque&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/s/photos/business?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&quot; title=&quot;Unsplash&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;</content><author><name>William Simoes</name></author><category term="GCP" /><category term="Blog" /><summary type="html">As I was looking for new ways to get in touch with cloud services, and to have an archive where I could dump all the information I might find useful, I stumbled upon Maris Elsins’s post on How To Build A Cost-Effective Serverless Blogging Platform On GCP, and it caught might attention, since it combines a good amount of topics that I needed to refresh or I’ve never had the chance to put in practice in a project. I will give it a try and just hope I don’t need to change this platform in the near future.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://sketchingtech.com/images/posts/Starting-the-blog/hero.png" /><media:content medium="image" url="https://sketchingtech.com/images/posts/Starting-the-blog/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>