<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://drobnak.com/feed/index.xml" rel="self" type="application/atom+xml" /><link href="https://drobnak.com/" rel="alternate" type="text/html" /><updated>2021-09-08T21:38:42-05:00</updated><id>https://drobnak.com/feed/index.xml</id><title type="html">Matt D’s Blog</title><subtitle>A random blog.
</subtitle><entry><title type="html">Choosing Container Storage</title><link href="https://drobnak.com/2021/05/08/Choosing-Container-Storage.html" rel="alternate" type="text/html" title="Choosing Container Storage" /><published>2021-05-08T00:00:00-05:00</published><updated>2021-05-08T00:00:00-05:00</updated><id>https://drobnak.com/2021/05/08/Choosing-Container-Storage</id><content type="html" xml:base="https://drobnak.com/2021/05/08/Choosing-Container-Storage.html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In updating the website infrastructure to be more modern, I figured it would overall be simple - and it was. Put each item into a container, and then run it under an Orchestrator (Nomad) for…reasons. But, like all good plans, the devil was in the details. All was fine when it was one node. Then I thought, well, why not make it a 3 node cluster, providing some resiliency and allowing the underlying Orchestration and service discovery components to work in a cluster like they are designed to. So that works great…except how do I make sure the data I’m referring to (like this website) is the same on all of the nodes?&lt;/p&gt;

&lt;h2 id=&quot;contenders&quot;&gt;Contenders&lt;/h2&gt;
&lt;p&gt;The major contenders out there for shared container storage are:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;CEPH&lt;/li&gt;
  &lt;li&gt;Portworx&lt;/li&gt;
  &lt;li&gt;iSCSI + automation (many vendors)&lt;/li&gt;
  &lt;li&gt;Cloud specific volume drivers (AWS / Azure / GCP volumes)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are others such as Rancher’s Longhorn, but while that is well integrated into Kubernetes, running with just plain Docker volume support does not seem to be there. As I’m running my containers on Nomad, on virtual machines not in the cloud, this eliminates the last option. Automated provisioning of iSCSI volumes are a good option if your vendor has support for Kubernetes or at least Docker.&lt;/p&gt;

&lt;p&gt;I also didn’t look into OpenEBS, but that may have been a mistake. We’ll see.&lt;/p&gt;

&lt;h2 id=&quot;ceph&quot;&gt;CEPH&lt;/h2&gt;
&lt;p&gt;CEPH makes the most sense here, and is what I wanted to go with, but alas, that was not in the cards.&lt;/p&gt;

&lt;p&gt;Previously the back-end to CEPH had a FileStore option as well as BlueStore, which is now the default. This works great as long as you have enough RAM. But, the nodes I am working with only have 2 GBs of RAM, which as the requirements warn you ahead of time - is not enough. The main difference between FileStore and BlueStore is that FileStore is built upon standard filesystems like ext4 and xfs, where BlueStore removes that layer from the mix. The downside is that BlueStore also has its own cache - which wants 2GB of RAM by default. 2GB - 2GB…is zero for anything else. So you can see how that might be an issue. In theory you can change the cache size setting, but in the end, the OSD (the storage service) kept crashing, and it was just not a good experience.&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Using cephadm it was pretty simple to get it going&lt;/li&gt;
  &lt;li&gt;Full stack setup including monitoring / web control out of the box&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Memory usage&lt;/li&gt;
  &lt;li&gt;cephadm very opaque as to what it was going to do&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I had beefier machines to work with, this is likely where I would have stopped, as it supports both shared file systems and block storage.&lt;/p&gt;

&lt;h2 id=&quot;portworx&quot;&gt;Portworx&lt;/h2&gt;
&lt;p&gt;I stumbled upon Portworx via the Hashicorp learn &lt;a href=&quot;https://learn.hashicorp.com/tutorials/nomad/stateful-workloads-portworx?in=nomad/stateful-workloads&quot;&gt;site&lt;/a&gt; when looking at all of the options available to run items which require state. The installation was relatively easy, but I missed two very important pieces:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The cluster ID in the command needed to be replaced with the cluster ID from the Portworx licensing site.&lt;/li&gt;
  &lt;li&gt;There’s no easy way to actually load a Portworx Essentials license on a non-kubernetes host&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As a result, nothing else I would write here would matter, as the cost to license this software is astronomical - $0.55/machine*hours. My instances are running 24x7, which is ~720 hours/month. 3 machines. Yeah, no. So this software could be the best…which it’s OK, but it’s repackaged btrfs + networking magic + an NFS server. It better be making me breakfast for the pricing they want. Next.&lt;/p&gt;

&lt;h2 id=&quot;linstor&quot;&gt;LINSTOR&lt;/h2&gt;
&lt;p&gt;I had seen this a few times, because of my previous work with another product from LINBIT - &lt;a href=&quot;https://linbit.com/drbd/&quot;&gt;DRBD&lt;/a&gt; which I’ve used in the past at work with a large amount of success to keep nodes in sync, and for migrating virtual machines between hosts without shared storage.&lt;/p&gt;

&lt;p&gt;LINSTOR basically takes their DRBD product and adds automation on top of it to work with anything - it provides a REST API, a reasonable CLI, and integration with both a Docker driver and a CSI driver for Kubernetes.
It’s got a pretty simple architecture of a controller which tell satellite boxes what to do. What’s nice is you don’t have to have storage on the nodes - you can mount any of the resources remotely over the network only.&lt;/p&gt;

&lt;p&gt;I ran through the installation, cleaned off the data drive, and added it to the pool. Everything looked great - until I tried to create a volume with Docker. It wouldn’t work. But this was again self-inflicted wounds as a result of me not paying attention to the warning that the node name I gave it didn’t match the host name. This was because I was using WireGuard tunnels between the nodes, and had used those hostnames as the node references. The correct way to do this was to add the node with the actual node hostname, and the desired IP address to be used as an additional parameter.&lt;/p&gt;

&lt;p&gt;Once that was done, we were in business. I moved the Commento DB to a volume, which worked great. I then tried to move a MongDB volume and kept getting strange errors such as:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Error message:        Invalid name: Name length 64 is greater than maximum length 48

Error context:
    The specified resource name '9f54e6561fe90a90b34331f5b988a9a2f42f5ccbf2ef8d99e65f0e58b74a6bd4' is invalid.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which… I have no idea what caused that. I did, however, find a solution. I tested the same volume using a different container image (ubuntu:latest) and it mounted and came up just fine. So it was something unique to the container. I brought up a new empty container, exported and re-imported it so that it would flatten, and it works just fine with that image. No idea why, but not my problem right now. :) I fought with that for 2 days, so I hope to not have to revisit that any time soon.&lt;/p&gt;

&lt;p&gt;The only other problem is that if the controller is rebooted, the satellites need to be restarted for it to pick up on their state for some reason. This might be because of my WireGuard settings, and I will be adding keepalive there and seeing if that makes this go away.&lt;/p&gt;

&lt;p&gt;Additionally, shared (RWX) storage is left to the user to implement via a &lt;a href=&quot;https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#ch-linstor-gateway&quot;&gt;gateway&lt;/a&gt;. For now I may just manually sync the nodes for this part. One problem at a time. :)&lt;/p&gt;

&lt;p&gt;So for now, I’m mostly happy with LINSTOR, appreciate it being fully open source, and with a foundation that’s been around a &lt;strong&gt;long&lt;/strong&gt; time, and &lt;em&gt;works&lt;/em&gt;.&lt;/p&gt;</content><author><name></name></author><summary type="html">Introduction In updating the website infrastructure to be more modern, I figured it would overall be simple - and it was. Put each item into a container, and then run it under an Orchestrator (Nomad) for…reasons. But, like all good plans, the devil was in the details. All was fine when it was one node. Then I thought, well, why not make it a 3 node cluster, providing some resiliency and allowing the underlying Orchestration and service discovery components to work in a cluster like they are designed to. So that works great…except how do I make sure the data I’m referring to (like this website) is the same on all of the nodes?</summary></entry><entry><title type="html">Nomad, Traefik, and HTTPS</title><link href="https://drobnak.com/2021/04/25/Nomad-Traefik-and-HTTPS.html" rel="alternate" type="text/html" title="Nomad, Traefik, and HTTPS" /><published>2021-04-25T00:00:00-05:00</published><updated>2021-04-25T00:00:00-05:00</updated><id>https://drobnak.com/2021/04/25/Nomad-Traefik-and-HTTPS</id><content type="html" xml:base="https://drobnak.com/2021/04/25/Nomad-Traefik-and-HTTPS.html">&lt;h2 id=&quot;load-balancing-options-available&quot;&gt;Load Balancing Options available&lt;/h2&gt;
&lt;p&gt;Once jobs have been migrated to running on Nomad, you’ll need to put something in front of it in order to route traffic to the correct destination, if you are running multiple web sites.&lt;/p&gt;

&lt;p&gt;There are a multitude of options here, such as HAProxy, Nginx or Envoy. HAProxy and Nginx use consul-template to generate configuration on the fly. There could probably be a similar setup created for Envoy. I was hoping to be able to use Envoy for my front-end load balancer as Consul makes use of it for Consul Connect (service mesh). However, at this time there aren’t the correct hooks in place to easily make use of the Consul service catalog. That leaves two main options left - Fabio and Traefik. Fabio is super easy to use, but isn’t very fancy. Traefik is a little more complex, but very powerful. Both of these have native support for getting service information from Consul. Having used Fabio in the past, I decided to see if the extra effort was worth it for Traefik. Traefik has a commercial offering as well as the open source version, and seems to be in active development. Development rate for Fabio is a little slower, but again, it does work for what it does. Traefik also has support for ACME, while Fabio does not. For my home lab, this was important.&lt;/p&gt;

&lt;p&gt;The Hashicorp Learn documentation for Load Balancing with Traefik (available &lt;a href=&quot;https://learn.hashicorp.com/tutorials/nomad/load-balancing-traefik&quot;&gt;here&lt;/a&gt;) does a great job of getting you going. On top of that, the upstream &lt;a href=&quot;https://doc.traefik.io/traefik/&quot;&gt;documentation&lt;/a&gt; provides a very large amount of information.&lt;/p&gt;

&lt;p&gt;Unfortunately, both fail to address a scenario which I think one may see quite a bit - backend instances which are running HTTPS. Security concerns drive the need to have all traffic encrypted, even internally. For some scenarios, Consul Connect (service mesh) may be the answer but I don’t think this appropriate in all scenarios.&lt;/p&gt;

&lt;h2 id=&quot;configuration-overview&quot;&gt;Configuration Overview&lt;/h2&gt;
&lt;p&gt;While the tutorial has the configuration in a TOML file, most of that can be specified on the command line.&lt;/p&gt;

&lt;p&gt;For instance, this is the stanza for my Traefik setup:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;task &quot;traefik&quot; {
  driver = &quot;docker&quot;

  config {
    image        = &quot;traefik:v2.4&quot;
    network_mode = &quot;host&quot;
    args = [
      &quot;--api.dashboard=true&quot;,
      &quot;--api.insecure=true&quot;,
      &quot;--entrypoints.traefik.address=&amp;lt;Internal IP&amp;gt;:8888&quot;,
      &quot;--entrypoints.web.address=:80&quot;,
      &quot;--entrypoints.web.http.redirections.entryPoint.to=websecure&quot;,
      &quot;--entrypoints.web.http.redirections.entryPoint.scheme=https&quot;,
      &quot;--entrypoints.websecure.address=:443&quot;,
      &quot;--entrypoints.websecure.http.tls=true&quot;,
      &quot;--providers.consulCatalog=true&quot;,
      &quot;--providers.consulCatalog.prefix=traefik&quot;,
      &quot;--providers.consulCatalog.exposedByDefault=false&quot;,
      &quot;--providers.file.directory=/configuration/&quot;,
      &quot;--providers.file.watch=true&quot;,
    ]
    volumes = [
      &quot;/home/docker_data/traefik/static:/configuration&quot;,
    ]
  }
  resources {
    cpu    = 500
    memory = 128
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some things to note here:
&lt;code class=&quot;highlighter-rouge&quot;&gt;providers.consulCatalog.prefix=traefik&lt;/code&gt; – this value must match the tags of your jobs. If you say &lt;code class=&quot;highlighter-rouge&quot;&gt;foobar&lt;/code&gt; instead of &lt;code class=&quot;highlighter-rouge&quot;&gt;traefik&lt;/code&gt;, then it must be &lt;code class=&quot;highlighter-rouge&quot;&gt;foobar.http&lt;/code&gt;…&lt;/p&gt;

&lt;p&gt;I have auto-redirection to https set up for everything. For my home lab, I don’t have this as the default, and instead put it in each service config.&lt;/p&gt;

&lt;p&gt;In addition to using the Consul Catalog, we do have file-based configuration, which you’ll see why shortly.&lt;/p&gt;

&lt;h2 id=&quot;problem&quot;&gt;Problem&lt;/h2&gt;
&lt;p&gt;So the assumption is that the TLS (HTTPS) session will end at Traefik and a cleartext connection will be opened to the HTTP server in the background at whatever port it is registered at in Nomad / Consul. The documentation implies that you can have HTTPS but to me it was very unclear.&lt;/p&gt;

&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;/h2&gt;
&lt;p&gt;The answer is that whenever you register a service like this:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  service {
    name = &quot;drobnak-com-ssl&quot;
    port = &quot;https&quot;
    tags = [
      &quot;traefik.enable=true&quot;,
      &quot;traefik.http.routers.dc.rule=Host(`drobnak.com`) || Host(`www.drobnak.com`)&quot;,
    ]
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You are implicitly creating a loadbalancer for the service. Therefore we can set additional options which allow us to update parameters for the connection to the backend servers.&lt;/p&gt;

&lt;p&gt;By updating the block to look like this:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  service {
    name = &quot;drobnak-com-ssl&quot;
    port = &quot;https&quot;
    tags = [
      &quot;traefik.enable=true&quot;,
      &quot;traefik.http.routers.dc.rule=Host(`drobnak.com`) || Host(`www.drobnak.com`)&quot;,
      &quot;traefik.http.services.dc.loadbalancer.server.scheme=https&quot;,
    ]
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can see we have told Traefik that the connection to the backend server will be https. However, this will probably give you errors, unless you’ve added the IP address of the backend into the SAN (Subject Alternative Name) value for the SSL certificate. If we write it like this:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  service {
    name = &quot;drobnak-com-ssl&quot;
    port = &quot;https&quot;
    tags = [
      &quot;traefik.enable=true&quot;,
      &quot;traefik.http.routers.dc.rule=Host(`drobnak.com`) || Host(`www.drobnak.com`)&quot;,
      &quot;traefik.http.services.dc.loadbalancer.server.scheme=https&quot;,
      &quot;traefik.http.services.dc.loadbalancer.serversTransport=drobnakCom@file&quot;,
    ]
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We can Tell Traefik that there are specific options to use when talking to the backend servers. Unfortunately, serversTransport configuration settings at this time &lt;em&gt;cannot&lt;/em&gt; be read in via the tags method that the other items are. So your options are kubernetes, or in a file. Obviously we’re going to use a file here.&lt;/p&gt;

&lt;p&gt;So, inside of /home/docker_data/traefik/static/transports.toml we have:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[http.serversTransports.drobnakCom]
  serverName = &quot;drobnak.com&quot;
  rootCAs = [ &quot;/configuration/cloudflare-root.crt&quot; ]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This tells Traefik to use the server name &lt;code class=&quot;highlighter-rouge&quot;&gt;drobnak.com&lt;/code&gt; in the HTTPS request to the backend. Problem solved.&lt;/p&gt;

&lt;h2 id=&quot;manual-configuration&quot;&gt;Manual configuration&lt;/h2&gt;
&lt;p&gt;What if we have some services which aren’t in Nomad quite yet? I had two such things running on the server itself, and that was easily solved by putting another file in place.&lt;/p&gt;

&lt;p&gt;Inside of /home/docker_data/traefik/static/static_urls.tom we have:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  [http.routers.drobnak-commento]
    rule = &quot;Host(`commento.drobnak.com`)&quot;
    service = &quot;drobnak-commento&quot;

[http.services]
    [http.services.drobnak-commento]
        [[http.services.drobnak-commento.loadBalancer.servers]]
          url = &quot;http://localhost:8080&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which basically mirrors the setup of the tags.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;After figuring out the HTTPS backend problem, I’ve been very happy with Traefik so far. While I would have liked to deploy only one technology (Envoy), without extra glue (like Gloo – get it), it wasn’t possible. So I’ll let consul handle the Envoy details, and try and minimize the amount of manual configuration with Traefik. I hope this information helps you.&lt;/p&gt;</content><author><name></name></author><summary type="html">Load Balancing Options available Once jobs have been migrated to running on Nomad, you’ll need to put something in front of it in order to route traffic to the correct destination, if you are running multiple web sites.</summary></entry><entry><title type="html">Nutrition Part 2</title><link href="https://drobnak.com/2019/08/30/Nutrition-Part-2.html" rel="alternate" type="text/html" title="Nutrition Part 2" /><published>2019-08-30T00:00:00-05:00</published><updated>2019-08-30T00:00:00-05:00</updated><id>https://drobnak.com/2019/08/30/Nutrition-Part-2</id><content type="html" xml:base="https://drobnak.com/2019/08/30/Nutrition-Part-2.html">&lt;h2 id=&quot;phase-4-follow-up&quot;&gt;Phase 4 Follow-up&lt;/h2&gt;
&lt;p&gt;This is a follow-up on my post from a couple of months ago. Since then I’ve tested a few things out, some studies have come out, and I think I know at least my short term plan.&lt;/p&gt;

&lt;h3 id=&quot;take-1&quot;&gt;Take 1&lt;/h3&gt;
&lt;p&gt;I definitely do not eat like I did before January 2019 any more. I still have a sweet tooth at times, but I’ve got that mostly under control, I think. Except for this past week. I went a little nuts, but I’ve also been working my butt off to try and make up for it. Restarting on Monday I’ll cut down the sugars to Friday night / Saturday only basically.&lt;/p&gt;

&lt;p&gt;Key points:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Staying in ketosis is not a goal. If it happens, great. Not an issue if I go out of it.&lt;/li&gt;
  &lt;li&gt;I was doing Bulletproof, then did Paleo for a short time, and now my goal is low-carb (&amp;lt;150 net carbohydrates a day).&lt;/li&gt;
  &lt;li&gt;I’m doing real (not ‘Bulletproof’) Intermittent Fasting at least 2 days a week.&lt;/li&gt;
  &lt;li&gt;I’m doing a protein fast once a month or so. Since cycling out of ketosis isn’t a priority, and I’m inducing autophagy with an actual 16 hour fast, this isn’t strictly necessary. But going full vegetarian for a day once a month isn’t going to hurt anyone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ll list a major category and then what my approach to it is.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Dairy: I don’t think I’m lactose intolerant, but I may have a casein sensitivity. Turns out acne can be brought on by this. So, I limit the amount of dairy I consume. I’ll try to keep this under a few items a week which contain dairy. For instance, I’ll either have my coffee black, or with coconut milk or almond milk. Oat milk is OK too. But on Saturday I may get a coffee with half &amp;amp; half or heavy cream. Or I’ll have an egg sandwich with cheese.&lt;/li&gt;
  &lt;li&gt;Wheat: It turns out that there &lt;em&gt;is no advantage&lt;/em&gt; to avoiding wheat / wheat gluten if you are not sensitive to it or have Celiac disease (this was from a recent Australian government study). I have no ill effects when eating wheat, so it is back in my diet. However, as part of being low-carb, I do watch what I am eating. Not eating giant helpings of pasta, or 4 sandwiches in a day, etc. With regard to bread I’ll probably stick to high quality sourdough bread, however. But it is nice to be able to eat real noodles, such as with ramen.&lt;/li&gt;
  &lt;li&gt;Soy: With the exception of fermented soy (soy sauce, miso paste, etc), I am still avoiding this. Definitely no soy milk, attempt to avoid soybean oil, soy lecithin (an emulsifier).&lt;/li&gt;
  &lt;li&gt;Corn: Always thought this was a nutritional dud, so no reason to eat it if wheat is back on the table. (ie back to flour tortillas or grain free tortillas, not corn.)&lt;/li&gt;
  &lt;li&gt;Starches: Sweet potato is still better for you than white potatoes, plantains are good, cassava is good, etc. Basically just avoiding white potatoes.&lt;/li&gt;
  &lt;li&gt;Sweeteners: I’m not sure about sugar alcohols, but I’m OK with them for now. Sugar in small amounts, honey in small amounts, sugar alcohols OK, stevia and monkfruit ok. No to artificial sweeteners (Aspartame, Splenda, etc) except if I’m having a sip of a diet soda. I generally don’t consume diet soda anyway.&lt;/li&gt;
  &lt;li&gt;Drinks: Water, iced tea, coffee. Spirits OK. Ciders were good but potentially higher carb then one would like. Beer is back on the table but only in small amounts, again carb content.&lt;/li&gt;
  &lt;li&gt;Meats: Definitely eating more chicken than I was before. Pork still OK. Steak still OK, but eating less than before. Fish is good, especially Salmon due to high Omega 3 fat content.&lt;/li&gt;
  &lt;li&gt;Fats: More unsaturated fats now - eat more avocados. :) Saturated fat is OK, but not excessive amounts. Bulletproof coffee is out except for protein fast days, and then it’s 1 tsp of each, not 2 tbsp. Cook with coconut oil, butter, avocado oil. No corn, soy, or canola oils. Nor margarine.&lt;/li&gt;
  &lt;li&gt;Fruits: Ok, but treat as if it’s a treat, unless the fruit is also high in fiber (eg raspberries).&lt;/li&gt;
  &lt;li&gt;Nightshades: (Tomatoes, eggplant, onions, peppers). No issue, totally fine.&lt;/li&gt;
  &lt;li&gt;Processed food: Avoiding. Limiting things like deli meats, no cereal, no potato chips, hot dogs, etc. Haven’t had a doughnut since starting this new way of eating, but will probably limit - too many bad things in one spot - high carbs, fried, high sugar…&lt;/li&gt;
  &lt;li&gt;Legumes: Peanuts, beans… Peanuts are overrated (except peanut M&amp;amp;Ms), I’ve found things made with almond butter are just as awesome. Jury is still out on the beans thing, I need to do more research. For now avoiding beans, although I had lentils the other night at a Mediterranean place, but I assume they were soaked long enough to get rid of a bunch of the oxalates. So, avoiding for now, for the most part.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;So, for the most part, I am avoiding: corn, soy, beans, crappy food. I’m trying to be sensible about the amount of carbohydrates I consume. I’m trying to not let my sweet tooth rule me.&lt;/p&gt;

&lt;p&gt;I’ve also decided that I need to be active for at least 30 minutes a day. That means a minimum of 30 minutes of walking. Or walking + some exercising, etc. No day should be a complete sit-on-your-butt day. Always need to move a bit. I’m trying to build up a little more muscle now that I’m pretty lean. My efforts are working - I can do 30 push-ups in 40 seconds, and about the same amount of sit-ups. I used to have to be against a wall to be able to do that, but now have enough core strength that’s not an issue.&lt;/p&gt;

&lt;p&gt;I’ll also try to limit sweets consumption to the weekend only.&lt;/p&gt;

&lt;p&gt;I’ll post what I ate in a few weeks. I’ll also be in South America for 2 weeks, so that should be interesting too…&lt;/p&gt;</content><author><name></name></author><summary type="html">Phase 4 Follow-up This is a follow-up on my post from a couple of months ago. Since then I’ve tested a few things out, some studies have come out, and I think I know at least my short term plan.</summary></entry><entry><title type="html">Nutrition, Dieting, Data, and Snake Oil</title><link href="https://drobnak.com/2019/06/30/Nutrition-Dieting-Data-and-Snake-Oil.html" rel="alternate" type="text/html" title="Nutrition, Dieting, Data, and Snake Oil" /><published>2019-06-30T00:00:00-05:00</published><updated>2019-06-30T00:00:00-05:00</updated><id>https://drobnak.com/2019/06/30/Nutrition-Dieting-Data-and-Snake-Oil</id><content type="html" xml:base="https://drobnak.com/2019/06/30/Nutrition-Dieting-Data-and-Snake-Oil.html">&lt;h2 id=&quot;background-and-rationale&quot;&gt;Background and Rationale&lt;/h2&gt;
&lt;p&gt;It’s been a busy year in many, many ways. Back in July last year I decided that I weighed a little too much, when my BMI (Body Mass Index) tipped out of the ‘normal’ range (18-24 I think) into the ‘overweight’ range when I went from 24.9 to 25…This made me re-evaluate what I was doing and adjust my eating. The first things I did were to ensure the only thing I was drinking was unsweetened items (water, tea, coffee). Soda was definitely a very infrequent thing at this point. Since moving to OR, I consume less alcohol than when I was in NY, so that also helped, but wasn’t making the impact I hoped for. I cut down on my sweets consumption - less ice cream and chocolate, but I have a huge sweet tooth, so that only worked to a smaller extent.&lt;/p&gt;

&lt;h2 id=&quot;changes&quot;&gt;Changes&lt;/h2&gt;
&lt;p&gt;Fast forward to Nov - December time-frame - 23andMe ran a Black Friday specicial on their kit, and so I got their ‘detailed’ analysis kit for $99, which is 50% off. The results that came back showed me some data which confirmed suspicions, and some surprising data. I had talked to two coworkers who were gluten intolerant (but not Celiac disease), and of similar generic background. One of the things they mentioned was that it potentially showed up as high triglycerides, and indeed my checkup had showed just that. So I thought perhaps removing gluten from my diet may be wise.&lt;/p&gt;

&lt;p&gt;Around this time I visited a friend in California who happened to be on a ketogenic (or keto as everyone shortens it to) diet. He cooked me some pretty awesome food over the weekend, and also explained that for some people being in ketosis provided additional mental sharpness. Ketosis is the state when your body is burning fat, not sugar, as the primary fuel.&lt;/p&gt;

&lt;p&gt;Given what my coworkers had told me, and the fact that the food was delicious, I thought about going on a keto diet. Another coworker was getting prepared meals delivered to his house, and all he had to do was microwave it. This same company had a keto plan that was breakfast, lunch, and dinner. So with a foolproof method to try this out, I started on January 13, 2019 on the keto journey. I did some reading that said I should take some supplements to help ease into the diet, and so I went to GNC to buy some stuff. I talked to the people there, and they had good things to say about the diet. However, both being athletic, they said they stopped the diet after 3 months or so because it was easy to lose more weight than desired (not necessarily muscle mass, but overall weight) without eating an insane amount of calories. One associate told me about Dave Asprey and his book “Head Strong”. More about that later.&lt;/p&gt;

&lt;h3 id=&quot;phase-1-full-time-ketogenic-dieting&quot;&gt;Phase 1, Full-Time Ketogenic Dieting&lt;/h3&gt;
&lt;p&gt;There are more advanced ways to do keto than to just be in ketosis at all times. But, that’s not where we are starting. We are starting with the simplest form - get into ketosis and stay there. As I started, thankfully I didn’t really experience much of the ‘keto flu’ symptoms, because I was hydrating myself, and not quite as addicted to sugar as most - even though my craving for ice cream would suggest otherwise. As a result of having 21 meals a week sent to me, it was very hard to mess up - just eat what you’re given and don’t snack. Or have a single piece of cheese. Ok, that’s all doable. And it worked.&lt;/p&gt;

&lt;p&gt;I was losing weight, and feeling better than I had in a very long time. Most of the food tasted great, and I tried things I wouldn’t otherwise. I now eat (but certainly am not craving) mushrooms in more forms than I did before. Olives, on the other hand, are still in the ‘no’ column.&lt;/p&gt;

&lt;p&gt;As I’m eating this food from FarmToFit, I am also reading the book “Head Strong” and understanding the journey Dave Asprey took in order to fix his own life, get in better shape, and perform at his highest mental potential. If that all sounds like marketing, well, spoiler, some of it probably is. Dave stresses the importance of high quality food as being a big deal. A concern that I then had was that I couldn’t verify where the food was coming from. I was going to have to start cooking.&lt;/p&gt;

&lt;h3 id=&quot;phase-2-the-bulletproof-diet&quot;&gt;Phase 2, The Bulletproof Diet&lt;/h3&gt;
&lt;p&gt;In March we had a quarterly meet-up in NY, so I paused FarmToFit. I ate out every so often, so I had 3 or 4 meals that I ended up freezing. I went to NY, armed with a set of recipes from the Bulletproof Diet book to make. Mom ended up cooking it for the most part, but she said they weren’t so hard to make. A stew, baked salmon with spinach, things like that. It all tasted great, so I figured I’d try some of it.&lt;/p&gt;

&lt;p&gt;I ended up starting to cook a few of the basic recipes, and found some others on their blog. I made use of my Instant Pot (electric pressure cooker), and I was off. I was cooking, it was kind of exciting. And I was in control of what I was eating. I switched my breakfast to only be Bulletproof Coffee. More on that later. The idea was that it would keep you satisfied until lunch time, which it did. You’ll understand why soon enough. Lunch was a slight pain, as part of the diet is also about how you cook your food, and not damaging fats and proteins, and therefore the microwave is definitely frowned upon. But I made do.&lt;/p&gt;

&lt;p&gt;In order to try and ensure you are running at your most optimum (aka Bulletproof) level, certain things are cut out of available foods. No dairy aside from butter, no beans, no soy, and no grains. However, it’s a ‘spectrum’, so almost nobody follows it 100%. Which, I appreciate, as it makes it easier to stick with the parts that you do follow.&lt;/p&gt;

&lt;p&gt;An aspect of the diet, which is what puts this in the &lt;em&gt;Cyclical ketosis&lt;/em&gt; category, is that on every Saturday, you eat a good amount of carbs (like 150g worth, vs 35-50 usually), which knocks you out of ketosis. You also reduce your protein intake, and the theory is this aids in ‘cellular cleanup.’ That is an actual thing, it’s called autophagy. Not marketing, this time. It made for interesting meals - Bulletproof Coffee for breakfast, Guacamole and Cucumbers for lunch, and a sweet potato for dinner. Weird, but doable.&lt;/p&gt;

&lt;p&gt;And so I cooked, and I ate, and I was pretty happy. Until it was time for my next physical.&lt;/p&gt;

&lt;h3 id=&quot;results&quot;&gt;Results&lt;/h3&gt;
&lt;h4 id=&quot;weight&quot;&gt;Weight&lt;/h4&gt;
&lt;p&gt;The weight and body fat percentage results have been awesome:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/Weight_2018-07-11_to_2019-06-29.png&quot; alt=&quot;Weight Lost&quot; /&gt;
&lt;img src=&quot;/img/BodyFat_2018-07-11_to_2019-06-29.png&quot; alt=&quot;Body Fat Lost&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A note about the body-fat numbers: I totally don’t believe the &lt;em&gt;absolute&lt;/em&gt; values. There’s no way I have only 10.6% body-fat. However, I do believe in the &lt;em&gt;relative&lt;/em&gt; numbers. In other words, I totally believe I lost body-fat. I’m quite happy with the change.&lt;/p&gt;

&lt;p&gt;As one may have figured out, I’ve dropped a bit below my goal numbers. The fix for this is simple - start working out. I am now working out twice a week to add on some additional muscle mass and tone everything up. Overall I’m quite happy with where I am.&lt;/p&gt;

&lt;h4 id=&quot;health&quot;&gt;Health&lt;/h4&gt;
&lt;p&gt;My health, on the other hand, is not quite as pretty of a picture. I had my yearly physical and my cholesterol numbers were not very different from last year’s, but that was not a great state to be in. My triglycerides had gone down, but there were still higher than they should have been. However, both last year’s and this year’s test were a few hours after lunch on a Friday. So that apparently can mess with your triglycerides number. Most on a keto diet have fairly low numbers, and I didn’t. This concerned me.
So I ordered an independent test and had blood drawn - 10 vials worth. This was a comprehensive set of tests to determine vitamins, red blood count, white blood count, inflammation, thyroid health, etc. A baseline. A key differentiation here is that this would be in a fasted state, not eating anything for at least 12 hours prior. Therefore I would get accurate triglycerides.&lt;/p&gt;

&lt;h5 id=&quot;snake-oil&quot;&gt;Snake Oil&lt;/h5&gt;
&lt;p&gt;The results were even more upsetting. I expected awesome triglycerides levels, as I was not taking in sugars, and eating low carb. I expected my LDL to be within range, perhaps a little elevated by most standards, but I expected my HDL to be about 50-60 which would be great.&lt;/p&gt;

&lt;p&gt;Yeah, that didn’t happen. LDL was higher than previous tests, &lt;em&gt;146&lt;/em&gt; vs &lt;em&gt;118&lt;/em&gt;, another marker which showed I had a lot of LDL &lt;em&gt;particles&lt;/em&gt;, not just a high concentration of LDL. This was not good. Additionally, my HDL was &lt;em&gt;38&lt;/em&gt;. Bad. Ok, what’s going on here?&lt;/p&gt;

&lt;h4 id=&quot;the-science-of-nutrition-and-more-snake-oil&quot;&gt;The ‘science’ of nutrition and more Snake Oil&lt;/h4&gt;
&lt;p&gt;As one can guess from the heading, nutritional research is all over the place. In this case here, some bad information led to some bad decisions on my part which lead to my bad cholestrol numbers.
One of the key concepts in the Bulletproof Diet is the idea of &lt;em&gt;Bulletproof Intermittent Fasting&lt;/em&gt;, which is Dave’s ‘modified’ intermittent fasting that is supposed to be easier to get through because you start the morning off with a Bulletproof Coffee. This is coffee (Bulletproof brand of course), butter or ghee (clarified butter), and MCT oil (Bulletproof Brain Octane Oil of course).&lt;br /&gt;
Bulletproof branded coffee - in theory this is tested for all sorts of mold, that is ‘rampant’ across the entire coffee industry.&lt;br /&gt;
Butter contains butyric acid which is supposed to help with the body’s production of hormones.&lt;br /&gt;
Brain Octane Oil is MCT oil (Medium Chain Triglycerides) which is “100%” C8, which is basically used by the body as fuel quickly. It’s not actually 100%, it’s apparently not possible with current processes, but that’s how it’s marketed. However, on sale, it’s good for the price, and decent quality.&lt;/p&gt;

&lt;p&gt;So you take all of that, shove it in a blender, and drink it, and it keeps you satisfied for hours. Sure it does. Quantities of the oil and butter range from 1 teaspoon to 2 tablespoons depending on how long you’ve been drinking this and hunger level. Well, I was doing 2 tablespoons butter, and 2 tablespoons MCT oil. That is 38 grams of saturated fat, in my first ‘meal’ of the day. 25 grams is what the default ‘target’ value is in MyFitnessPal for the entire day. Do you see where perhaps my cholesterol problems are coming from? Immediately I cut the MCT oil to 1 tbsp, and 0.5 tbsp butter. Incidentally this tasted way better. Way too much butter.&lt;/p&gt;

&lt;p&gt;So, my coworker suggested I try with just plain coffee, and see how my energy levels are. This is where I did additional research, and found that Dave was conflating the idea that Bulletproof Coffee would not break an Intermittent Fast, with the idea that it would not break you &lt;em&gt;out of keto&lt;/em&gt;.  Long story short - just a method to sell you more Brain Octane Oil and overpriced coffee. When I drank just plain coffee, it was very similar to what I was doing before, maybe 0.5 cups more of coffee. Not a big deal.&lt;/p&gt;

&lt;p&gt;Research shows anything over 50 calories will definitely stop your Intermittent Fast. So, no more Bulletproof coffee. Back to eating breakfast (likely hardboiled eggs) on Tuesday, Thursday, and Sunday. Monday, Wednesday, and Friday I’ll do an Intermittent Fast and get the actual benefits of that (the cellular cleanup I talked about earlier – this is the real thing this time.)  Saturday is going to be my day I break out of ketosis still, but beyond that I’m not sure what the plan is yet. Sunday I like to cook pancakes and eggs, so that’s definitely a breakfast eating day.&lt;/p&gt;

&lt;p&gt;So, given the results, I’m drinking plain coffee only, and expect a much better result when I re-test in a few months. More monounsatured fats, like avocados, are definitely in my future. Saturated fats like butter are fine for cooking with, but not extra consumption just by itself like I had done.&lt;/p&gt;

&lt;h3 id=&quot;phase-3-clean-cyclical-ketogenic-dieting&quot;&gt;Phase 3, Clean, Cyclical Ketogenic Dieting&lt;/h3&gt;
&lt;p&gt;This is where I am now. Basically the Bulletproof diet, removing the ‘need’ for some of the branded products. So, yeah, my coffee is just fine thank you. Incidentally, Bulletproof Coffee is private label Portland Roasting Company. Which their brand is 50% less expensive. For what amounts to me, to be the same thing.&lt;/p&gt;

&lt;p&gt;Dave Asprey has a huge mold allergy. This kind of fueled his obsession with it. And I think that’s the key - I think he became obsessed, and turned that into a marketing lever.&lt;/p&gt;

&lt;p&gt;Additionally, I’m not lactose intolerant, so I’ll put that back too. So at least for now, I’m back eating cheese and drinking heavy cream.&lt;/p&gt;

&lt;p&gt;So, high quality foods, cyclical keto, avoid grains 99% of the time, minimal dairy. Protein fast every 2-4 weeks. That’s the plan.&lt;/p&gt;

&lt;h3 id=&quot;phase-4-&quot;&gt;Phase 4, ???&lt;/h3&gt;
&lt;p&gt;No idea what the future holds. Will I stay where I am? Will I transition to a low-carb, but not keto diet? This allows you to not track things as closely, but it also means more fluctuations in weight, and perhaps some more unknowns. More research is necessary.&lt;/p&gt;</content><author><name></name></author><summary type="html">Background and Rationale It’s been a busy year in many, many ways. Back in July last year I decided that I weighed a little too much, when my BMI (Body Mass Index) tipped out of the ‘normal’ range (18-24 I think) into the ‘overweight’ range when I went from 24.9 to 25…This made me re-evaluate what I was doing and adjust my eating. The first things I did were to ensure the only thing I was drinking was unsweetened items (water, tea, coffee). Soda was definitely a very infrequent thing at this point. Since moving to OR, I consume less alcohol than when I was in NY, so that also helped, but wasn’t making the impact I hoped for. I cut down on my sweets consumption - less ice cream and chocolate, but I have a huge sweet tooth, so that only worked to a smaller extent.</summary></entry><entry><title type="html">Modernization</title><link href="https://drobnak.com/2019/01/19/Modernization.html" rel="alternate" type="text/html" title="Modernization" /><published>2019-01-19T00:00:00-06:00</published><updated>2019-01-19T00:00:00-06:00</updated><id>https://drobnak.com/2019/01/19/Modernization</id><content type="html" xml:base="https://drobnak.com/2019/01/19/Modernization.html">&lt;p&gt;I’ve modernized the blog a bit. This is now powered by Jekyll CMS. I’ll be replacing the comments section over the next few days as I gather some additional time to get it done.
I’ll probably move some of my Facebook posts over here too, if I can figure out how to export them.&lt;/p&gt;</content><author><name></name></author><summary type="html">I’ve modernized the blog a bit. This is now powered by Jekyll CMS. I’ll be replacing the comments section over the next few days as I gather some additional time to get it done. I’ll probably move some of my Facebook posts over here too, if I can figure out how to export them.</summary></entry><entry><title type="html">Housekeeping</title><link href="https://drobnak.com/2015/11/08/Housekeeping.html" rel="alternate" type="text/html" title="Housekeeping" /><published>2015-11-08T12:42:00-06:00</published><updated>2015-11-08T12:42:00-06:00</updated><id>https://drobnak.com/2015/11/08/Housekeeping</id><content type="html" xml:base="https://drobnak.com/2015/11/08/Housekeeping.html">&lt;p&gt;I did some more housekeeping and now we’re on a non-ancient OS again. I almost accidentally lost the backup of the site. Whoops.&lt;br /&gt;
Using some options which should improve the site even more than before. I have a nice puppet manifest to set it all up, too. This makes it easy to reinstall things.&lt;/p&gt;</content><author><name></name></author><summary type="html">I did some more housekeeping and now we’re on a non-ancient OS again. I almost accidentally lost the backup of the site. Whoops. Using some options which should improve the site even more than before. I have a nice puppet manifest to set it all up, too. This makes it easy to reinstall things.</summary></entry><entry><title type="html">Xenons</title><link href="https://drobnak.com/2015/08/30/Xenons.html" rel="alternate" type="text/html" title="Xenons" /><published>2015-08-30T22:30:00-05:00</published><updated>2015-08-30T22:30:00-05:00</updated><id>https://drobnak.com/2015/08/30/Xenons</id><content type="html" xml:base="https://drobnak.com/2015/08/30/Xenons.html">&lt;p&gt;As of today, I finally have working Bi-Xenon functionality. Wiring up two simple pins took almost an hour due to having to remove panels by the driver footwell to get ahold of the wire as it’s being fished back into the passenger compartment. But it was completely worth it, and I can now say my Halogen to Bi-Xenon conversion is complete.&lt;/p&gt;</content><author><name></name></author><summary type="html">As of today, I finally have working Bi-Xenon functionality. Wiring up two simple pins took almost an hour due to having to remove panels by the driver footwell to get ahold of the wire as it’s being fished back into the passenger compartment. But it was completely worth it, and I can now say my Halogen to Bi-Xenon conversion is complete.</summary></entry><entry><title type="html">Updates</title><link href="https://drobnak.com/2015/08/28/Updates.html" rel="alternate" type="text/html" title="Updates" /><published>2015-08-28T06:55:00-05:00</published><updated>2015-08-28T06:55:00-05:00</updated><id>https://drobnak.com/2015/08/28/Updates</id><content type="html" xml:base="https://drobnak.com/2015/08/28/Updates.html">&lt;p&gt;Moved the server off of Lighttpd. I added in some vhosts for use later, and cleaned up the generated URLs. I also used puppet to make it happen, so it only took me about ~7 minutes to switch everything over.&lt;/p&gt;</content><author><name></name></author><summary type="html">Moved the server off of Lighttpd. I added in some vhosts for use later, and cleaned up the generated URLs. I also used puppet to make it happen, so it only took me about ~7 minutes to switch everything over.</summary></entry><entry><title type="html">New Year, New Look</title><link href="https://drobnak.com/2015/04/15/New-Year,-New-Look.html" rel="alternate" type="text/html" title="New Year, New Look" /><published>2015-04-15T20:59:00-05:00</published><updated>2015-04-15T20:59:00-05:00</updated><id>https://drobnak.com/2015/04/15/New-Year,-New-Look</id><content type="html" xml:base="https://drobnak.com/2015/04/15/New-Year,-New-Look.html">&lt;p&gt;Upgraded Serendipity, changed the theme, and turned on captchas. Too much comment spam. Thankfully it all got auto-moderated anyway.&lt;br /&gt;
&lt;br /&gt;
Things are good. Just got back from Japan with grandma. Car stuff is still fun.&lt;br /&gt;
&lt;br /&gt;
Life is busy.&lt;/p&gt;</content><author><name></name></author><summary type="html">Upgraded Serendipity, changed the theme, and turned on captchas. Too much comment spam. Thankfully it all got auto-moderated anyway. Things are good. Just got back from Japan with grandma. Car stuff is still fun. Life is busy.</summary></entry><entry><title type="html">Car Stuff</title><link href="https://drobnak.com/2014/02/09/Car-Stuff.html" rel="alternate" type="text/html" title="Car Stuff" /><published>2014-02-09T13:17:37-06:00</published><updated>2014-02-09T13:17:37-06:00</updated><id>https://drobnak.com/2014/02/09/Car-Stuff</id><content type="html" xml:base="https://drobnak.com/2014/02/09/Car-Stuff.html">&lt;p&gt;Lots of stuff going on with my car, I’ve added a turbocharger to it.&lt;br /&gt;
&lt;br /&gt;
I’m using the Technique Tuning Stage 1 kit for the BMW 330.&lt;br /&gt;
&lt;br /&gt;
See &lt;a href=&quot;http://forum.e46fanatics.com/showthread.php?t=998346&quot;&gt;here&lt;/a&gt; for more information on the original install.&lt;br /&gt;
&lt;br /&gt;
See &lt;a href=&quot;http://forum.e46fanatics.com/showthread.php?t=1008506&quot;&gt;here&lt;/a&gt; for what I’m doing with it now.&lt;/p&gt;</content><author><name></name></author><summary type="html">Lots of stuff going on with my car, I’ve added a turbocharger to it. I’m using the Technique Tuning Stage 1 kit for the BMW 330. See here for more information on the original install. See here for what I’m doing with it now.</summary></entry></feed>