<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Chris🌱Parnin</title>
    <description>The latest articles on Forem by Chris🌱Parnin (@chrisparnin).</description>
    <link>https://forem.com/chrisparnin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F92720%2Fd701ef6e-41f9-49ae-9345-6fec0be6445d.jpg</url>
      <title>Forem: Chris🌱Parnin</title>
      <link>https://forem.com/chrisparnin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/chrisparnin"/>
    <language>en</language>
    <item>
      <title>slim: Create a micro-vm from a Dockerfile</title>
      <dc:creator>Chris🌱Parnin</dc:creator>
      <pubDate>Thu, 13 Jun 2019 12:54:39 +0000</pubDate>
      <link>https://forem.com/chrisparnin/slim-create-a-micro-vm-from-a-dockerfile-21od</link>
      <guid>https://forem.com/chrisparnin/slim-create-a-micro-vm-from-a-dockerfile-21od</guid>
      <description>&lt;p&gt;&lt;code&gt;slim&lt;/code&gt; will build a micro-vm from a Dockerfile. Slim works by building and extracting a rootfs from a Dockerfile, and then merging that filesystem with a small minimal kernel that runs in RAM.&lt;/p&gt;

&lt;p&gt;This results in a real VM that can boot instantly, while using very limited resources. If done properly, slim can allow you to design and build immutable unikernels for running services, or build tiny and embedded development environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build a micro-vm
&lt;/h3&gt;

&lt;p&gt;Create a micro-vm from a Dockerfile. Use &lt;code&gt;build&lt;/code&gt; command with a directory containing a &lt;a href="https://github.com/ottomatica/slim/tree/master/images/alpine3.8-simple" rel="noopener noreferrer"&gt;Dockerfile&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ slim build images/alpine3.8-simple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting image is only 23MB! It can be used in virtual box, kvm, or hyper-kit. &lt;/p&gt;

&lt;h3&gt;
  
  
  Running a micro-vm
&lt;/h3&gt;

&lt;p&gt;Provision a new instance of the given micro-vm image as a virtual machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ slim run micro1 alpine3.8-simple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Demo
&lt;/h3&gt;

&lt;p&gt;This short demo illustrates an image being built, booting with hyper kit in 3 seconds, and then accessing the vm from ssh.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5f36rlv11ll4h0ybpnqs.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5f36rlv11ll4h0ybpnqs.gif" alt="slim" width="795" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding out more
&lt;/h3&gt;

&lt;p&gt;Please see the &lt;a href="https://github.com/ottomatica/slim/" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; for more information!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>virtualization</category>
      <category>showdev</category>
    </item>
    <item>
      <title>opunit! sanity checks for vms, containers, and servers.</title>
      <dc:creator>Chris🌱Parnin</dc:creator>
      <pubDate>Wed, 24 Oct 2018 15:30:12 +0000</pubDate>
      <link>https://forem.com/chrisparnin/opunit-30j0</link>
      <guid>https://forem.com/chrisparnin/opunit-30j0</guid>
      <description>&lt;p&gt;When building/maintaining vm images, containers, and servers as part of your infrastructure or CI/CD pipeline how do you verify that you built the right thing?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;opunit verify&lt;/code&gt; is a simple &lt;a href="https://github.com/ottomatica/opunit/"&gt;open-source tool&lt;/a&gt; that will run sanity checks against an environment. Things like, is a service running on a port, can my instance resolve dns, did the right version of a package/tool get installed?&lt;/p&gt;

&lt;p&gt;Running opunit, will then give a test report, much like a &lt;code&gt;mocha&lt;/code&gt; or other testing frameworks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mHo_OlJb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/9158546/47369653-29e20080-d6b2-11e8-8098-b64c59d282c6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mHo_OlJb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/9158546/47369653-29e20080-d6b2-11e8-8098-b64c59d282c6.png" alt="opunit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To setup the checks, you just need to provide a simple configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Basic&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;checks&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;startup"&lt;/span&gt;
    &lt;span class="na"&gt;checks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;availability&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8080&lt;/span&gt;
          &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          
         &lt;span class="na"&gt;cmd&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;node --version&lt;/span&gt;
         &lt;span class="na"&gt;range&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^10.x.x&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can also connect to running containers or remote servers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="c"&gt;# Just give address and ssh key:&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;opunit verify root@example.com:2222 &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;opunit.yml path&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; ~/.ssh/server_rsa

&lt;span class="c"&gt;# Or name/sha of container&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;opunit verify &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;opunit.yml path&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;docker container name or &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;


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



&lt;p&gt;Try it out! Request any new features you think would be cool!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g opunit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>devops</category>
      <category>infrastructure</category>
      <category>vms</category>
      <category>docker</category>
    </item>
    <item>
      <title>What would you put in a Software Engineering Basics Workshop?</title>
      <dc:creator>Chris🌱Parnin</dc:creator>
      <pubDate>Sat, 18 Aug 2018 12:50:47 +0000</pubDate>
      <link>https://forem.com/chrisparnin/software-engineering-basics-workshop-5827</link>
      <guid>https://forem.com/chrisparnin/software-engineering-basics-workshop-5827</guid>
      <description>&lt;p&gt;For a couple of years, I have been teaching a workshop/bootcamp for new software engineering students in a few courses. This is the material we try to cover on day 1, just to make sure everyone is up to speed.&lt;/p&gt;

&lt;p&gt;This is the outline of materials and activities. Click links to see material.&lt;/p&gt;

&lt;p&gt;What do you think? Anything to add/tweak/change?&lt;/p&gt;

&lt;h1&gt;
  
  
  Software Engineering Basics
&lt;/h1&gt;

&lt;p&gt;In this workshop, you will setup a local (or virtual environment) consisting of several tools, programming languages, and libraries, to support software engineering work.  You will also practice workflows needed to be productive in software engineering.&lt;/p&gt;

&lt;p&gt;The primary goal of this workshop is for you have to have installed and learned a set of relevant tools (and processes in your head) for software development.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/Setup.md#setup"&gt;Setup&lt;/a&gt;.
Getting started. Get some tools on your machine. 

&lt;ul&gt;
&lt;li&gt;[ ] Practice: Installed package manager for os.&lt;/li&gt;
&lt;li&gt;[ ] Installed git, java, python2, nodejs&lt;/li&gt;
&lt;li&gt;[ ] Optional: Make Windows Awesome&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/Shells.md#shells"&gt;Shells&lt;/a&gt;.
Basic overview of unix shells, shell programming, and windows shell tips.

&lt;ul&gt;
&lt;li&gt;[ ] Practice: Run commands to analyze data&lt;/li&gt;
&lt;li&gt;[ ] Setup env variable.&lt;/li&gt;
&lt;li&gt;[ ] Optional: Write a shell script.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/Git.md#git"&gt;Version Control with Git&lt;/a&gt;.
Basic overview of git. Two interactive tutorials for learning commands.

&lt;ul&gt;
&lt;li&gt;[ ] Complete basic Git tutorial&lt;/li&gt;
&lt;li&gt;[ ] Complete 4 levels in &lt;em&gt;Introduction to Git Commits&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Practice: Creating a repo&lt;/li&gt;
&lt;li&gt;[ ] Optional: Solve all git branching levels&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/MarkdownEditors.md#markdown"&gt;Markdown and IDES&lt;/a&gt;.
Overview of markdown basics, lists, code, tables. Recommended editors for code. Creating Github Pages.

&lt;ul&gt;
&lt;li&gt;[ ] Install IDE(s)/Editors&lt;/li&gt;
&lt;li&gt;[ ] Practice: Update markdown in README.md&lt;/li&gt;
&lt;li&gt;[ ] Optional: Create a GitHub Pages (gh-pages branch) &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/Environments.md#Environments"&gt;Virtual Environments&lt;/a&gt;.
Tools for creating and managing virtual computing environments.

&lt;ul&gt;
&lt;li&gt;[ ] Install VirtualBox and Baker&lt;/li&gt;
&lt;li&gt;[ ] Create a simple virtual machine&lt;/li&gt;
&lt;li&gt;[ ] Optional: Create your own environment&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/chrisparnin/EngineeringBasics/blob/master/OnlineTools.md#online-tools"&gt;Task Management&lt;/a&gt;.
Using Github issues and Trello boards for task management.

&lt;ul&gt;
&lt;li&gt;[ ] Create issue on GitHub with this checklist (filled in) &lt;/li&gt;
&lt;li&gt;[ ] Try trello&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>discuss</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Baker, a simple tool for provisioning virtual machines and containers.</title>
      <dc:creator>Chris🌱Parnin</dc:creator>
      <pubDate>Tue, 14 Aug 2018 14:36:24 +0000</pubDate>
      <link>https://forem.com/chrisparnin/baker-a-simple-tool-for-provisioning-virtual-machines-and-containers-156l</link>
      <guid>https://forem.com/chrisparnin/baker-a-simple-tool-for-provisioning-virtual-machines-and-containers-156l</guid>
      <description>&lt;p&gt;Meet Baker! --- a simple tool for provisioning virtual machines and containers. &lt;/p&gt;

&lt;p&gt;Baker allows you to quickly create development environments for developing and running your code. With one tool, you have the functionality of vagrant, docker, ansible, and task runners like grunt.&lt;/p&gt;

&lt;p&gt;This example creates a simple development environment for using mkdocs, a static site generator in python.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;baker-docs&lt;/span&gt;
&lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8000&lt;/span&gt;
&lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;python2&lt;/span&gt;
&lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mkdocs build&lt;/span&gt;
  &lt;span class="na"&gt;serve&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mkdocs serve -a 0.0.0.0:8000&lt;/span&gt;
  &lt;span class="na"&gt;gh-deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mkdocs gh-deploy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quickly provision a VM with docker.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker-env&lt;/span&gt;
&lt;span class="na"&gt;vm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ip&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;192.168.8.8&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;docker&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use baker, just place a &lt;code&gt;baker.yml&lt;/code&gt; file in your current code repository, then run &lt;code&gt;baker bake&lt;/code&gt;. You can run &lt;code&gt;baker ssh&lt;/code&gt; to access your environment or run commands inside the environment with &lt;code&gt;baker run&lt;/code&gt;. Your code is accessible in the baker environment via a shared folder.&lt;/p&gt;

&lt;p&gt;For more details, checkout &lt;a href="https://docs.getbaker.io"&gt;docs.getbaker.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
