<?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: Andrea Montes</title>
    <description>The latest articles on DEV Community by Andrea Montes (@mamontesp).</description>
    <link>https://dev.to/mamontesp</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%2F1016870%2Ff424c16b-e70c-4ded-992e-ee6f9d2bd0c0.jpeg</url>
      <title>DEV Community: Andrea Montes</title>
      <link>https://dev.to/mamontesp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mamontesp"/>
    <language>en</language>
    <item>
      <title>Linode + DEV Hackathon: Airflow running in Linode + daemon setup</title>
      <dc:creator>Andrea Montes</dc:creator>
      <pubDate>Mon, 20 Feb 2023 00:39:38 +0000</pubDate>
      <link>https://dev.to/mamontesp/linode-dev-hackathon-2ll6</link>
      <guid>https://dev.to/mamontesp/linode-dev-hackathon-2ll6</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I built a gist to install airflow (workflow + scheduler) in Linode&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Smooth Shifters&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://143.42.142.188:8080" rel="noopener noreferrer"&gt;http://143.42.142.188:8080&lt;/a&gt; (you won't be able to log in but you will see the airflow instance running)&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7onapym783guo3k8ftpw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7onapym783guo3k8ftpw.png" alt="First view Airflow running in Linode" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Foctw0ybet84g8atyodmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Foctw0ybet84g8atyodmz.png" alt="Evidence of dags runs in Airflow - running in Linode" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;Airflow is running in linode. A daemon was set as well to enable accessibility to the tool. &lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/mamontesp/2d2fb5aa7ab880f257cbed25951da5f1" rel="noopener noreferrer"&gt;https://gist.github.com/mamontesp/2d2fb5aa7ab880f257cbed25951da5f1&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;MIT License&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I need airflow in my work, but I have some security restrictions to create an airflow instance in the cloud provider the company uses. Linode offers a straightforward way to fast testing a tool like airflow&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;I used the PyPI version of Airflow, created a virtual environment with python and in there, I did the airflow install. Then, I started the airflow webserver. All the instructions are in the gist file provided :) &lt;/p&gt;

&lt;p&gt;I wanted to use my own user in Linode, but got several issues granting permissions, I figured some out, but at the end I just needed to test airflow, so I switched to root and complete the install. It would be good to have a tutorial to set new users.&lt;/p&gt;

&lt;p&gt;Also when trying to use my own new user, shell command navigation wasn't working (pressing arrows wasn't navigating across my command history), I was able to solve that out running this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo chsh -s /bin/bash &amp;lt;username&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Finally, I needed to create a daemon to keep up airflow, I also included the instructions that I followed to accomplished that. &lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Airflow: &lt;a href="https://airflow.apache.org/docs/apache-airflow/stable/index.html" rel="noopener noreferrer"&gt;https://airflow.apache.org/docs/apache-airflow/stable/index.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;YouTube Course in Linux TV to get more confident with Linux general commands: &lt;a href="https://www.youtube.com/watch?v=2733cRPudvI&amp;amp;list=PLT98CRl2KxKGj-VKtApD8-zCqSaN2mD4w" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=2733cRPudvI&amp;amp;list=PLT98CRl2KxKGj-VKtApD8-zCqSaN2mD4w&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Daemon creation process: &lt;a href="https://baykara.medium.com/how-to-daemonize-a-process-or-service-with-systemd-c34501e646c9" rel="noopener noreferrer"&gt;https://baykara.medium.com/how-to-daemonize-a-process-or-service-with-systemd-c34501e646c9&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let's connect
&lt;/h2&gt;

&lt;p&gt;Mastodon: @&lt;a href="mailto:mamontesp@fosstodon.org"&gt;mamontesp@fosstodon.org&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/andrea-montes-5a9a25b1/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/andrea-montes-5a9a25b1/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devmeme</category>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
