<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mindaugas Žvirblis on Medium]]></title>
        <description><![CDATA[Stories by Mindaugas Žvirblis on Medium]]></description>
        <link>https://medium.com/@ituoga?source=rss-f4386fcb26f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3jB_GFmGSJjzruN0.</url>
            <title>Stories by Mindaugas Žvirblis on Medium</title>
            <link>https://medium.com/@ituoga?source=rss-f4386fcb26f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 08:37:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ituoga/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hashicorp Nomad cluster with docker swarm overlay network, traefik and dns discovery without consul]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">init swarm cluster:</p><p class="medium-feed-link"><a href="https://medium.com/@ituoga/hashicorp-nomad-cluster-with-docker-swarm-overlay-network-traefik-and-dns-discovery-without-consul-4eaa8f4896af?source=rss-f4386fcb26f2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ituoga/hashicorp-nomad-cluster-with-docker-swarm-overlay-network-traefik-and-dns-discovery-without-consul-4eaa8f4896af?source=rss-f4386fcb26f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4eaa8f4896af</guid>
            <category><![CDATA[nomad]]></category>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[example]]></category>
            <category><![CDATA[traefik]]></category>
            <category><![CDATA[cluster]]></category>
            <dc:creator><![CDATA[Mindaugas Žvirblis]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 08:45:10 GMT</pubDate>
            <atom:updated>2025-01-11T08:45:10.619Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[realtime golang web with data-star]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Here is tiny example of how simple and clean &#x201C;live&#x201D; things can be in golang using https://data-star.dev</p><p class="medium-feed-link"><a href="https://medium.com/@ituoga/realtime-golang-web-with-data-star-88071dc7a6e8?source=rss-f4386fcb26f2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ituoga/realtime-golang-web-with-data-star-88071dc7a6e8?source=rss-f4386fcb26f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/88071dc7a6e8</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[realtime]]></category>
            <category><![CDATA[templ]]></category>
            <category><![CDATA[data-star]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Mindaugas Žvirblis]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 15:49:04 GMT</pubDate>
            <atom:updated>2024-10-20T15:49:04.328Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Mariadb Galera Cluster with Hashicorp Nomad and Consul Connect]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In first article, you can find how to start nomad and consul in dev mode:</p><p class="medium-feed-link"><a href="https://medium.com/@ituoga/mariadb-galera-cluster-with-hashicorp-nomad-and-consul-connect-5028af8364c0?source=rss-f4386fcb26f2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ituoga/mariadb-galera-cluster-with-hashicorp-nomad-and-consul-connect-5028af8364c0?source=rss-f4386fcb26f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5028af8364c0</guid>
            <category><![CDATA[nomad]]></category>
            <category><![CDATA[galera-cluster]]></category>
            <category><![CDATA[consul]]></category>
            <category><![CDATA[mariadb]]></category>
            <category><![CDATA[hashicorp]]></category>
            <dc:creator><![CDATA[Mindaugas Žvirblis]]></dc:creator>
            <pubDate>Tue, 22 Aug 2023 08:38:20 GMT</pubDate>
            <atom:updated>2023-08-22T08:38:20.840Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[CloudFlare tunnel with Hashicorp Nomad with Consul connect]]></title>
            <link>https://medium.com/@ituoga/cloudflare-tunnel-with-hashicorp-nomad-with-consul-connect-19309138e033?source=rss-f4386fcb26f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/19309138e033</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[consul]]></category>
            <category><![CDATA[nomad]]></category>
            <dc:creator><![CDATA[Mindaugas Žvirblis]]></dc:creator>
            <pubDate>Tue, 22 Aug 2023 07:09:03 GMT</pubDate>
            <atom:updated>2023-08-22T07:09:03.337Z</atom:updated>
            <content:encoded><![CDATA[<p>First thing we need is to start our nomad and consul services ( i will use dev mode for this article )</p><pre>nomad agent -dev-connect<br>consul agent -server -dev</pre><p>Then, go to to CloudFlare choose your account and go to “Zero Trust” section. Go to “Access” and then “Tunnels”. Create new Tunnel, and choose “docker” version. Then, grab “token” and put in job or nomad env/vault.</p><p>Then, you need to create Public Hostname. I will use dom.tld as domain.</p><p>Eeasiest way to create wildcard domain would be to create some.dom.tld with target “http://127.0.0.1:8080” and then rename dns record to “*” and create *.dom.tld Public Hostname to “http://127.0.0.1:8080”. Once you done, run this job.</p><pre>job &quot;cftunnel&quot; {<br>  type = &quot;service&quot;<br><br>  group &quot;cftunnel&quot; {<br><br>    network {<br>      mode = &quot;bridge&quot;<br>    }<br><br>    service {<br>      name = &quot;cftunnel&quot;<br>      provider = &quot;consul&quot;<br>      address_mode = &quot;auto&quot;<br>      tags = [&quot;traefik.enable=true&quot;]<br>      connect {<br>        sidecar_service {<br>          proxy {<br>            upstreams {<br>              destination_name = &quot;traefik-consul&quot;<br>              local_bind_port  = 8080<br>            }<br>          }<br>        }<br>      }<br>    }<br><br>    task &quot;cftunnel&quot; {<br>      driver = &quot;docker&quot;<br><br>      config {<br>        privileged = true<br>        image        = &quot;cloudflare/cloudflared:latest&quot;<br>        command      = &quot;tunnel&quot;<br>        args         = [&quot;--no-autoupdate&quot;, &quot;run&quot;, &quot;--token&quot;, &quot;$TOKEN&quot;]<br>      }<br><br>      resources {<br>        cpu    = 100<br>        memory = 256<br>      }<br>      template {<br>        env = true<br>        destination = &quot;local/env&quot;<br>        data = &lt;&lt;EOF<br>TOKEN=[get token from nomad vars, consul kv or vault or just put it here]<br>EOF<br>      }<br>    }<br>  }<br>}</pre><p>Now we need something to listen on <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a> so I will use traefik container with connect support . Consul connect forwards traefik service port to CloudFlare tunnel container and binds to localhost:8080 port so all *.dom.tld comes to traefik.</p><pre>job &quot;traefik&quot; {<br>  type = &quot;service&quot;<br>  meta {<br>    version = &quot;1&quot;<br>  }<br>  group &quot;traefik&quot; {<br>    network {<br>      mode = &quot;bridge&quot;<br>      port &quot;http&quot; {<br>        to = 8080<br>      }<br>    }<br>    service {<br>      name         = &quot;traefik&quot;<br>      tags         = [&quot;traefik.enable=true&quot;]<br>      port         = &quot;http&quot;<br>      provider     = &quot;consul&quot;<br>      address_mode = &quot;auto&quot;<br>      connect {<br>        native = true<br>      }<br>    }<br>    service {<br>      name         = &quot;traefik-consul&quot;<br>      port         = &quot;8080&quot;<br>      provider     = &quot;consul&quot;<br>      address_mode = &quot;auto&quot;<br>      connect {<br>        sidecar_service{}<br>      }<br>      tags         = [&quot;traefik.enable=true&quot;]<br>    }<br><br>    task &quot;traefik&quot; {<br>      driver = &quot;docker&quot;<br><br>      config {<br>        privileged = true<br>        image = &quot;shoenig/traefik:connect&quot;<br>        ports = [&quot;http&quot;]<br>        args = [<br>          &quot;--providers.consulcatalog.connectaware=true&quot;,<br>          &quot;--providers.consulcatalog.connectbydefault=true&quot;,<br>          &quot;--providers.consulcatalog.exposedbydefault=false&quot;,<br>          &quot;--entrypoints.traefik.address=:${NOMAD_PORT_admin}&quot;,<br>          &quot;--serverstransport.insecureskipverify=true&quot;,<br>          &quot;--api.insecure=true&quot;,<br>          &quot;--entrypoints.web.address=0.0.0.0:${NOMAD_PORT_http}&quot;,<br>        ]<br>      }<br><br>    }<br>  }<br>}</pre><p>And finnaly, we need something to serve. I will use 3 nginx services with html contents of Nomad Allocation ID.</p><pre>job &quot;nginx&quot; {<br>  datacenters = [&quot;dc1&quot;]<br><br>  group &quot;nginx&quot; {<br>    count = 3<br>    network {<br>      port &quot;http&quot; {<br>        to = 80<br>      }<br>      mode = &quot;bridge&quot;<br>    }<br><br>    service {<br>        name         = &quot;nginx&quot;<br>        provider     = &quot;consul&quot;<br>        address_mode = &quot;auto&quot;<br>        port         = &quot;80&quot;<br>        tags = [<br>          &quot;traefik.enable=true&quot;,<br>          &quot;traefik.http.routers.${NOMAD_ALLOC_ID}.entrypoints=web&quot;,<br>          &quot;traefik.http.routers.${NOMAD_ALLOC_ID}.rule=Host(`yoursubdomain.yourdomain.com`)&quot;<br>        ]<br>        connect {<br>          sidecar_service {}<br>        } <br>      }<br>    task &quot;nginx&quot; {<br>      driver = &quot;docker&quot;<br><br>      config {<br>        image = &quot;nginx:latest&quot;<br>        ports = [&quot;http&quot;]<br>        volumes = [<br>          &quot;local/index.html:/usr/share/nginx/html/index.html&quot;<br>        ]<br>      }<br><br>      resources {<br>        cpu    = 500 # 500 MHz<br>        memory = 256 # 256MB<br><br>      }<br><br>      template {<br>        data        = &lt;&lt;EOF<br>{{ env &quot;NOMAD_ALLOC_ID&quot; }}<br>EOF<br>        destination = &quot;local/index.html&quot;<br>        perms       = &quot;0755&quot;<br>      }<br>    }<br>  }<br>}</pre><p>replace “yoursubdomain.yourdomain.com” with your real subdomain.dom.tld and refresh few times. it Traefik should balance through 3 nginx services.</p><p>And that’s it. No exposed ports. And you can bind any domain to your tunnel’s hostname as CNAME and define it in task tag for Traefik.</p><p>If you have any questions, write in commands and i will try to answer.</p><p>#hashicrop #nomad #consul #cloudflare #tunnel #zerotrust</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19309138e033" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>