<?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>DEV Community: Halil Kaskavalci</title>
    <description>The latest articles on DEV Community by Halil Kaskavalci (@kaskavalci).</description>
    <link>https://dev.to/kaskavalci</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%2F733992%2F46d644a2-0563-4275-89e8-81f5b617fcae.jpeg</url>
      <title>DEV Community: Halil Kaskavalci</title>
      <link>https://dev.to/kaskavalci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaskavalci"/>
    <language>en</language>
    <item>
      <title>Docker Desktop Alternatives</title>
      <dc:creator>Halil Kaskavalci</dc:creator>
      <pubDate>Sat, 13 Nov 2021 10:39:01 +0000</pubDate>
      <link>https://dev.to/kaskavalci/docker-desktop-alternatives-4nbm</link>
      <guid>https://dev.to/kaskavalci/docker-desktop-alternatives-4nbm</guid>
      <description>&lt;p&gt;Docker recently updated &lt;a href="https://www.docker.com/blog/updating-product-subscriptions/"&gt;its license&lt;/a&gt;. This made Docker for Desktop a paid product for enterprises. In this post, you will learn about your alternatives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does Docker Desktop do?
&lt;/h2&gt;

&lt;p&gt;Docker is for Linux systems. In order to run containers, you need a Linux operating system. If you use MacOS or Windows, then you will need a Linux VM in order to run Docker commands. This is where Docker Desktop comes in.&lt;/p&gt;

&lt;p&gt;Docker desktop is an end to end solution that includes a VM, Linux distribution and docker daemon that runs inside it. Your host machine communicates with the VM to run docker commands in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the Docker Desktop alternatives?
&lt;/h2&gt;

&lt;p&gt;There are couple of alternatives if you want to get rid of Docker Desktop for any reason. Some are mature, some are still in early stages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Podman
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://podman.io/"&gt;Podman&lt;/a&gt; is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. It is open source. It is a docker replacement. Podman is compatible with Docker API and CLI. You can switch as easy as &lt;code&gt;alias docker=podman&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, podman still lacks some features such as supporting Docker socket by default or compose features. Community is actively working to fill the gaps.&lt;/p&gt;

&lt;p&gt;Installation guide (Mac only)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install podman&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;podman
&lt;span class="c"&gt;# Download VM&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;podman machine init
&lt;span class="c"&gt;# Start the VM&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;podman machine start
&lt;span class="c"&gt;# Start using podman. (save this to your shell profile)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;docker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;podman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Support for applications that need to use docker socket (DOCKER_HOST). See podman &lt;a href="https://github.com/containers/podman/issues/11397"&gt;issue #11397&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a SSH tunnel to the guest OS&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;ssh &lt;span class="nt"&gt;-nNT&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt;/tmp/podman.sock:/run/user/1000/podman/podman.sock &lt;span class="nt"&gt;-i&lt;/span&gt; ~/.ssh/podman-machine-default ssh://core@localhost:55591
&lt;span class="c"&gt;# Use podman as DOCKER_HOST&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DOCKER_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'unix:///tmp/podman.sock'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Minikube
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://minikube.sigs.k8s.io/docs/start/"&gt;minikube&lt;/a&gt; is a managed VM to run Kubernetes on your local machine. It is possible to configure it to spit out environment configuration for Docker and Podman.&lt;/p&gt;

&lt;p&gt;You will need minikube to be running in order to use Docker commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install minikube&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;minikube
&lt;span class="c"&gt;# Start local cluster&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;minikube start
&lt;span class="c"&gt;# Consume docker env&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;minikube docker-env&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that you will run a complete kubernetes cluster to run Docker commands. This may or may not be an issue for your setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rancher Desktop
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://rancherdesktop.io/"&gt;Rancher Desktop&lt;/a&gt; is another alternative to Docker Desktop. It is maintained by &lt;a href="https://rancher.com/"&gt;Rancher&lt;/a&gt;. In my experience I wasn't able to fully integrate it. It is under active development. It is definitely an alternative.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I have been using podman actively for a week now. In my experience, podman is the slimmest and stable alternative to Docker Desktop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading / watching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=1Al9lzpFzn0&amp;amp;t=3475s"&gt;Docker Desktop Licensing Changes: DevOps and Docker Live Show&lt;/a&gt; 🎬&lt;/li&gt;
&lt;li&gt;&lt;a href="https://matt-rickard.com/docker-desktop-alternatives/"&gt;An Overview of Docker Desktop Alternatives&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://itnext.io/goodbye-docker-desktop-hello-minikube-3649f2a1c469"&gt;Goodbye Docker Desktop, Hello Minikube!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.docker.com/blog/the-magic-behind-the-scenes-of-docker-desktop/"&gt;The Magic Behind the Scenes of Docker Desktop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>podman</category>
      <category>minikube</category>
    </item>
    <item>
      <title>Upgrade OpenTelemetry Go Instrumentation Libraries in Microservices</title>
      <dc:creator>Halil Kaskavalci</dc:creator>
      <pubDate>Sat, 23 Oct 2021 07:29:00 +0000</pubDate>
      <link>https://dev.to/kaskavalci/upgrade-open-telemetry-go-instrumentation-libraries-in-microservices-57kh</link>
      <guid>https://dev.to/kaskavalci/upgrade-open-telemetry-go-instrumentation-libraries-in-microservices-57kh</guid>
      <description>&lt;p&gt;&lt;a href="https://opentelemetry.io/" rel="noopener noreferrer"&gt;OpenTelemetry&lt;/a&gt; is the work-in-progress merge of OpenCensus and OpenTracing. It is still in early stages as of 2021. We are using its instrumentation libraries &lt;a href="https://github.com/open-telemetry/opentelemetry-go" rel="noopener noreferrer"&gt;opentelemetry-go&lt;/a&gt; and [opentelemetry-go-contrib]&lt;a href="https://github.com/open-telemetry/opentelemetry-go-contrib/" rel="noopener noreferrer"&gt;https://github.com/open-telemetry/opentelemetry-go-contrib/&lt;/a&gt;) for our Go services. &lt;/p&gt;

&lt;p&gt;This post is about how to upgrade your instrumentation libraries in a micro service environment. You guessed it, it's not straightforward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrade is easy, just run go get
&lt;/h2&gt;

&lt;p&gt;Yes and no. Opentelemtry-go is still actively being developed and is not General Release yet. So, expect breaking changes. Some packages may be renamed or disappear completely. When you upgrade, you need to be aware of breaking changes and stop using the deprecated packages or methods.&lt;/p&gt;

&lt;p&gt;You can either review &lt;a href="https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt; which offers a great history of features, bug fixes and breaking changes. PR numbers for every breaking change are given next to the line. For instance:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Metric SDK/API implementation type InstrumentKind moves into sdkapi sub-package. (#2091)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Just search for PR #2091 in the repository and find out what has changed. Within that PR maintainers should also fix all references for this breaking change in the codebase so you know what to change to adopt the breaking change.&lt;/p&gt;

&lt;p&gt;Sometimes though, there are too many breaking change you can follow. Then, I recommend checking their examples. In &lt;a href="https://github.com/open-telemetry/opentelemetry-go/tree/main/example" rel="noopener noreferrer"&gt;example&lt;/a&gt; folder there are small examples how you can use certain functionalities. Such as, exporting to Prometheus. Verify if what you are doing in your code matches with the steps there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrade is done, what's with microservices?
&lt;/h2&gt;

&lt;p&gt;If you have a single service that does not depend on others, you can skip that part. Imagine the following scenario.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgte0x4eq748ifndq0d8u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgte0x4eq748ifndq0d8u.jpg" alt="Service Dependency"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this dependency graph, Service A and Service B both use otel v0.20.0. Service B depends on Service A. Now, Service B wants to upgrade to otel v0.25.0. That may not work. Even though every dependency in Service B is now compatible with otel v0.25.0, since Service B depends on Service A, go mod will still download otel v0.20.0 artifacts. When there are breaking changes, you will see an error of &lt;code&gt;ambiguous import&lt;/code&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;go mod tidy
github.com/your-service imports
        go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin tested by
        go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin.test imports
        go.opentelemetry.io/contrib/propagators/b3: ambiguous import: found package go.opentelemetry.io/contrib/propagators/b3 &lt;span class="k"&gt;in &lt;/span&gt;multiple modules:
        go.opentelemetry.io/contrib/propagators v0.20.0 &lt;span class="o"&gt;(&lt;/span&gt;~/workspace/gow/pkg/mod/go.opentelemetry.io/contrib/propagators@v0.20.0/b3&lt;span class="o"&gt;)&lt;/span&gt;
        go.opentelemetry.io/contrib/propagators/b3 v1.0.0 &lt;span class="o"&gt;(&lt;/span&gt;~/workspace/gow/pkg/mod/go.opentelemetry.io/contrib/propagators/b3@v1.0.0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There will be no references to &lt;code&gt;v0.20.0&lt;/code&gt; in your go.mod file since you are not using it. However, in go.sum you can find the hashes of the previous version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Just tell me how to solve it already
&lt;/h2&gt;

&lt;p&gt;Upgrade with respect to your dependency graph. In our scenario, you will need to upgrade otel in Service A first. Then, upgrade Service A dependency in Service B. That will likely give otel dependency errors to you. Upgrade otel dependencies and resolve breaking changes.&lt;/p&gt;

&lt;p&gt;Congratulations, you have upgraded your instrumentation libraries.&lt;/p&gt;

</description>
      <category>go</category>
      <category>opentelemetry</category>
      <category>microservices</category>
    </item>
  </channel>
</rss>
