<?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: Ganesh Tiwari</title>
    <description>The latest articles on DEV Community by Ganesh Tiwari (@gat786).</description>
    <link>https://dev.to/gat786</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%2F302204%2F95c16cc9-1c06-4cdc-98ac-92b9f838d98e.jpeg</url>
      <title>DEV Community: Ganesh Tiwari</title>
      <link>https://dev.to/gat786</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gat786"/>
    <language>en</language>
    <item>
      <title>Deploying any Web Service on Azure App Service (We will use docker)</title>
      <dc:creator>Ganesh Tiwari</dc:creator>
      <pubDate>Mon, 08 Feb 2021 10:52:05 +0000</pubDate>
      <link>https://dev.to/gat786/deploying-any-web-service-on-azure-app-service-we-will-use-docker-1kl1</link>
      <guid>https://dev.to/gat786/deploying-any-web-service-on-azure-app-service-we-will-use-docker-1kl1</guid>
      <description>&lt;p&gt;Deploying a Web API is essential for every project nowadays and if you are trying to do so yourself you have many options available from the cloud providers which are already present in the market and Azure is a very promising option in them. While choosing Azure the easiest way to setup your Web-API is through &lt;a href="https://docs.microsoft.com/en-us/azure/app-service/" rel="noopener noreferrer"&gt;Azure App Service&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now App Service out of the box supports PHP, JavaScript, NodeJS, dotnet, dotnet core, Java, Python and Ruby. Meaning you can just connect your repository where you are working with the web-api to the Azure App Service, and it will automatically work with deploying it as soon as you push any commits or changes.&lt;/p&gt;




&lt;p&gt;Note that -&lt;br&gt;
Docker Containers are nothing but self-contained applications. &lt;/p&gt;

&lt;p&gt;i.e. Whenever you want to run a container you build a docker image which contains all the dependencies it will need to run. &lt;br&gt;
And then you run the image which when is running, we call it as a container. &lt;/p&gt;



&lt;p&gt;While doing that is an effective there are other ways to deploy on App Service i.e. Using Docker Containers. Now using docker containers makes things&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open - You have complete idea about how your application is running and what environment it is in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Controlled - You will have to specify every detail about how you want this application to be built so the whole building process is under your control.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's start with writing a docker file for a standard &lt;a href="https://github.com/tiangolo/fastapi" rel="noopener noreferrer"&gt;FastAPI&lt;/a&gt; project. &lt;/p&gt;

&lt;p&gt;Hoping that your project is itself in a virtual environment and every dependency your application needs is installed in your environment we will pipe down all the python packages in your environment to a requirements.txt file which will be in the root of your folder like this. &lt;/p&gt;

&lt;p&gt;To see which packages your current environment has type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip freeze 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we have to do is write the contents of this output in our &lt;code&gt;requirements.txt&lt;/code&gt; file which you can do manually or just use this command from the virtual environment console when it is activated&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip freeze &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same command should work fine on Windows as well as Linux. &lt;/p&gt;

&lt;p&gt;Now that we have a &lt;code&gt;reqirements.txt&lt;/code&gt; file with requirements of our environment we want to create a Dockerfile with instructions of how this image is going to be build.&lt;/p&gt;

&lt;p&gt;Assuming you are in the root directory of your project, what you want to do is create a file named &lt;code&gt;Dockerfile&lt;/code&gt; and write the contents as below.&lt;/p&gt;

&lt;p&gt;Creating a file on Linux can be done like &lt;code&gt;touch Dockerfile&lt;/code&gt; and on Windows can be done like &lt;code&gt;echo "" &amp;gt; Dockerfile&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM python:3.8-slim-buster

COPY requirements.txt .

RUN pip3 install -r requirements.txt

EXPOSE 80

COPY ./app /app

CMD ["python", "-m","uvicorn","app.main:app","--host","0.0.0.0","--port","80"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now what a Dockerfile does is gives line by line instruction as to how an image must be built now in our case we have a sweet 6 lines is &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The base image for building our personalized image should be &lt;a href="https://hub.docker.com/layers/python/library/python/3.8-slim-buster/images/sha256-fead43562234f12d7873784248f229709cb30fa642d3481e446079232e96566b?context=explore" rel="noopener noreferrer"&gt;python:3.8-slim-buster&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the &lt;code&gt;requirements.txt&lt;/code&gt; file from the root folder of project into our docker images root folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install all the dependencies we have listed in our &lt;code&gt;requirements.txt&lt;/code&gt; file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expose Port 80 for http incoming traffic so that when we run our app on this port it will be broadcasted to the host on which we run the container. &lt;br&gt;
F.Y.I. port 80 is port for all the http traffic thats why we are using it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy all the contents in the &lt;code&gt;app&lt;/code&gt; folder to &lt;code&gt;app&lt;/code&gt; folder in our docker image. &lt;br&gt;
F.Y.I &lt;code&gt;app&lt;/code&gt; folder contains all the source code for our web-api.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run command for our server to get started on localhost &lt;code&gt;0.0.0.0&lt;/code&gt; and port &lt;code&gt;80&lt;/code&gt; and since the file i.e. &lt;code&gt;main.py&lt;/code&gt; in which our app is located is inside &lt;code&gt;/app&lt;/code&gt; folder we write &lt;code&gt;app.main&lt;/code&gt; and &lt;code&gt;:app&lt;/code&gt; for the FastAPI app variable declared inside &lt;code&gt;main.py&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After you have created one such Dockerfile the command to build an image from this Dockerfile would be -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; tag-name-for-your-image &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will check the dockerfile in the &lt;code&gt;.&lt;/code&gt; directory and build the image according to its content. It will download the base-image, download all the python dependencies make a bundle out of it and save it as a docker image with a tag &lt;code&gt;tag-name-for-your-image&lt;/code&gt;. You should choose a useful tagname to recognize your images.&lt;/p&gt;

&lt;p&gt;If it successfully creates an image then running that image will be 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;docker run &lt;span class="nt"&gt;--name&lt;/span&gt; container-name &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 tag-name-for-your-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything goes well you will be presented with an output which looks like this.&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%2Fi%2Fbonz4b0bahysux9kbmkm.png" 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%2Fi%2Fbonz4b0bahysux9kbmkm.png" alt="Terminal Output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now is the time that you start your Postman Client and check whether the app successfully works or not. If it does then we are more than halfway done. 😎🙌&lt;/p&gt;

&lt;p&gt;Running a docker container is as easy as fetching the image from a container registry and doing executing the &lt;code&gt;RUN&lt;/code&gt; command from the Dockerfile. &lt;/p&gt;

&lt;p&gt;So, for Azure App service to be able to pull it and run it we need to put it on some Container registry. Azure has its own container registry named Azure Container Registry &lt;code&gt;ACR&lt;/code&gt; which we will be using here. You can go on Azure Portal and create a container registry in your preferred location and then follow along this blog post.&lt;/p&gt;

&lt;p&gt;The best way to build and upload docker images to ACR is through CI/CD i.e. Continuous Integration and Continuous Deployment. With Azure DevOps building a pipeline for doing the same is just a process of few clicks.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Sign into your Azure DevOps Account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new project.&lt;br&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%2Fi%2F0buccngu2bcrtgq928yi.png" 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%2Fi%2F0buccngu2bcrtgq928yi.png" alt="Create a project example"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new pipeline &lt;br&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%2Fi%2Ff48aptav4c6o0zyfxfjq.png" 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%2Fi%2Ff48aptav4c6o0zyfxfjq.png" alt="Create a new pipeline"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select code repository to be from GitHub.&lt;br&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%2Fi%2Flct13mhj53wg1v6k1gdg.png" 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%2Fi%2Flct13mhj53wg1v6k1gdg.png" alt="Select GitHub as source for code"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the repository in which your code is deployed at.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After you have got your code from the repository next step is to create a YAML pipeline to build and push your image to your registry. Select an appropriate task for your pipeline &lt;br&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%2Fi%2F82e8ultghce6marmhwts.png" 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%2Fi%2F82e8ultghce6marmhwts.png" alt="Select appropriate task for your pipeline"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After selecting the proper task all you must do is select the Container registry which you created in the earlier part as your registry and provide a repository name for your image to be uploaded to.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bamm! 🔥 Although it was a big task, we did it!&lt;/p&gt;

&lt;p&gt;We only have deploying part remaining now, let's do it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to your Azure Portal. Click on create a new resource -&amp;gt; Create a new Web App.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill in the details as per your wishes here is a short example of what I wrote&lt;br&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%2Fi%2Fv6b9e4p5qspteapvs6mg.png" 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%2Fi%2Fv6b9e4p5qspteapvs6mg.png" alt="Example Web Api"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the Registry as Azure Container registry and registry name and repository name as to the details which you would have chosen before.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure you select the latest tag in order to deploy the image.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fi%2Fnunmq68e8ivjxa35a3i2.png" 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%2Fi%2Fnunmq68e8ivjxa35a3i2.png" alt="docker image options"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on Review + Create button on the bottom and then Create Button after it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Done! Azure will now pull the image from ACR and run it as a Web App. With this method of deployment you can run code of any language you want on Azure as long as you can create a docker file for it. 👍😍&lt;/p&gt;

&lt;p&gt;Thats all for this blog post. I hope to continuously write more blog posts and grow my collection of carefully written blogs. I hope that this one helped you out.&lt;/p&gt;

&lt;p&gt;Follow me on &lt;a href="https://twitter.com/igat786" rel="noopener noreferrer"&gt;twitter&lt;/a&gt; to get further connected with me. I will watching the comments section if you find any doubts about this blog do let me know. :)&lt;/p&gt;

</description>
      <category>docker</category>
      <category>azure</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Using Power Automate to ease your tasks.</title>
      <dc:creator>Ganesh Tiwari</dc:creator>
      <pubDate>Mon, 24 Aug 2020 17:31:14 +0000</pubDate>
      <link>https://dev.to/gat786/using-power-automate-to-ease-your-tasks-3lfp</link>
      <guid>https://dev.to/gat786/using-power-automate-to-ease-your-tasks-3lfp</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ki8Uj-wt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/63tebge261ktiw5qqh9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ki8Uj-wt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/63tebge261ktiw5qqh9t.png" alt="Power Automate Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So while I have been using Power Automate or Microsoft Flow for a long time now and I absolutely love the way it works and how it can be utilized to ease your day to day tasks. &lt;/p&gt;

&lt;p&gt;Speaking about my perspective as a programmer and an Event organizer who personally organizes events and helps members in the community do the same Power Automate comes handy a lot of times.&lt;/p&gt;

&lt;p&gt;You can use it for any task that you think that can be automated and requires little to no interference of yours. Although, the whole Power Platform is great we are only interested in Power Automate this time around. 🔥 Lets Go ⚡&lt;/p&gt;

&lt;p&gt;Power Automate as its name suggests is an automation tool in the Microsoft's suites of things and which can be easily used to develop flows (aka. a list of events that you want to automate). Now these flows can be critical things such as looking at a SharePoint Folder for updates as well as can be used to do random things such as like a tweet that you were mentioned in.&lt;/p&gt;

&lt;p&gt;Now enough of introduction Lets build something to show you powers of it.&lt;/p&gt;

&lt;p&gt;What shall we build?&lt;/p&gt;

&lt;p&gt;I have an idea. We can build something that solves a real-world problem easily. The problem we are going to solve here is sending automatic updates to parents about how their student is performing in exams after an exam by automatically sending grades after a result excel sheet is created.&lt;/p&gt;

&lt;p&gt;What do you need?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Microsoft Account (if its 365 you can do even more things)&lt;/li&gt;
&lt;li&gt;Excel sheet with list of people you want to send an email to. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's, do it. &lt;/p&gt;

&lt;p&gt;Go to &lt;a href="https://flow.microsoft.com"&gt;Power Automate Website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Login using your Microsoft Account and make sure to have that excel sheet handy in which you have your list of details.&lt;/p&gt;

&lt;p&gt;After you have logged in the Account you will be greeted with a screen where it will list all the things it can do and is able to do. I will guide you through it.&lt;/p&gt;

&lt;p&gt;Click on the Create Flow Button in the Left Navigation Drawer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--obgPAaMN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6kos7yt8dz2r0mimmmyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--obgPAaMN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6kos7yt8dz2r0mimmmyw.png" alt="Create a Flow Button from Left Nav"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And on the next page select the Instant Flow Card.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OcPxtJQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s2fskyyrkngae9yhdvux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OcPxtJQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s2fskyyrkngae9yhdvux.png" alt="Click on the Instant Flow Card"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now here in this page there are 5 options I will explain them as much as I can.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Automated Flow - &lt;br&gt;
A Flow which is automatically run on happening of some event. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instant Flow - &lt;br&gt;
A Flow which can be run as per your needs upon a click of a button. (which we will be doing here.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduled Flow - &lt;br&gt;
Think of this as a scheduled thing which will happen upon specified time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UI Flow -&lt;br&gt;
UI Flow is like Robotic Process Automation which can automate some stuff that you do on your PC like filling out a form in a legacy application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Business process flow -&lt;br&gt;
It is a multistep business process that can be automated. I haven't tried it so I can't tell anything specifically.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's Complete our Flow -&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lt-mx9Ag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2h905gcy2lgasljfo6j3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lt-mx9Ag--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2h905gcy2lgasljfo6j3.png" alt="type a name and select the option of manually triggering that action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter a name and select the option of manually triggering the action and click on create.&lt;/p&gt;

&lt;p&gt;After the Flow is created you will see a webpage like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3NO60ECB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fkfkzs16d30fbewzxms0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3NO60ECB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fkfkzs16d30fbewzxms0.png" alt="Created Empty Flow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the New Step button below the empty Flow created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U64SRfrU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nmwxm40torol3nx4h1h9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U64SRfrU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nmwxm40torol3nx4h1h9.png" alt="Click on the new step button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following will open a dialog listing all the things you can do with a new step. But in this scenario, we are going to search for the step from which we can read the list of rows in a table. Search for it select the step. It should look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MFgH3Pwc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bmghdbtll3rqc3lhkuiw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MFgH3Pwc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bmghdbtll3rqc3lhkuiw.png" alt="Search for `list rows in a table` and select the step"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep in mind this step has two valid options. i.e. You can either do the step in OneDrive for Business or regular OneDrive choose accordingly.&lt;/p&gt;

&lt;p&gt;Select the excel sheet from your OneDrive. If you don't have the file on OneDrive already than go and upload it and then select it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4gk1fp8M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/amayml5x9n8b9b6nbm1i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4gk1fp8M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/amayml5x9n8b9b6nbm1i.png" alt="Select the excel file from OneDrive"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Make sure all the data should be in a table. In the photo my data was in Table1 table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is a snap shot of what my excel sheet's table header looks like if you are left wondering about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HAYBI2vs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dg75fbjgs3k31nffl3zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HAYBI2vs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dg75fbjgs3k31nffl3zy.png" alt="Name, Email, Subject Name, Marks Obtained, Parents Name"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you have selected the file we are almost done. We must add one more step to send the emails to the email-address present in every field. So, search for the step named as Send an email and select it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G2ht2EKO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fmsu2pg3dxgczdz07wpi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G2ht2EKO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fmsu2pg3dxgczdz07wpi.png" alt="Send an email step selection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you have selected the option it will ask you to authenticate yourself and sign in using your outlook email address. After you are done it will return to the flow page and you will have to fill in the details for sending emails. First, select the &lt;em&gt;To&lt;/em&gt; Field in the step. In your table you should have an email field where email addresses are stored select that. You should automatically see the header fields from your table if not then click on the show dynamic content link below the field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ifz7G9B5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jrfougwh26kt3wa09ppe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ifz7G9B5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jrfougwh26kt3wa09ppe.png" alt="Select header where email addresses are saved"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Something like this should be shown after you have done that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OOfqyaC3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f3tnigvt3xy4nzawrdyf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OOfqyaC3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f3tnigvt3xy4nzawrdyf.png" alt="After selecting the field view"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that you must draft the email as you want to send to the receiver. You can add dynamic content like you did in the previous step. &lt;/p&gt;

&lt;p&gt;Here is the format I made for your reference.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--brIa830V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/usitdtsq4rnh4ypg1be9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--brIa830V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/usitdtsq4rnh4ypg1be9.png" alt="Sample Draft Email Snapshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And Badum tash 🔥🎇 we are done.&lt;br&gt;
We successfully wrote our first flow which now can be triggered as per our needs. Dont Forget to save the flow. 😉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z9vZaI0L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/32c8oi3kftsqwzljpgas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z9vZaI0L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/32c8oi3kftsqwzljpgas.png" alt="Save Button image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you are done with the things mentioned you can click on the button &lt;code&gt;test&lt;/code&gt; which is right after save button to test it out. It will send a mail to everyone in the field and will test whether everything works as expected. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--quh_b7N9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2e2uys9a3mt2fqpnrmkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--quh_b7N9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2e2uys9a3mt2fqpnrmkc.png" alt="run button in flow details page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now after you have set it up you can accept all the things it asks you to accept and click on run to let the test run. 🤞🏼 everything should go correctly, and every mail should be sent. &lt;/p&gt;

&lt;p&gt;If you have liked my content Feel free to give a like on this post. &lt;/p&gt;

&lt;p&gt;Follow me on other socials if you want to get connected with me 😊 &lt;br&gt;
Thats it. Have a wonderful day ;)&lt;/p&gt;

</description>
      <category>powerplatform</category>
      <category>automation</category>
      <category>nocode</category>
    </item>
    <item>
      <title>Writing Your First DevOps Pipeline from Scratch for Android Apps.</title>
      <dc:creator>Ganesh Tiwari</dc:creator>
      <pubDate>Mon, 27 Jul 2020 19:26:57 +0000</pubDate>
      <link>https://dev.to/gat786/writing-your-first-devops-pipeline-from-scratch-for-android-apps-4o88</link>
      <guid>https://dev.to/gat786/writing-your-first-devops-pipeline-from-scratch-for-android-apps-4o88</guid>
      <description>&lt;p&gt;Before Beginning the topic of Writing a pipeline it is essential for you to understand what DevOps is and why would you want to setup a DevOps for your project or your upcoming project.&lt;/p&gt;

&lt;p&gt;If you know the common terminologies, you can skip over to here&lt;/p&gt;

&lt;p&gt;The term DevOps is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DevOps is a set of practices that combines software development (Dev) and IT operations (Ops).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to quote &lt;a href="https://en.wikipedia.org/wiki/Continuous_integration" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt; and according to me (considering I'm pretty new to this field) it is a series of practices and stuff that you will do in a software development phase to make your software development easier and more streamlined. These practices include Continuous Integration or CI and Continuous Development or CD. &lt;/p&gt;

&lt;p&gt;CI is integrating codes from developers into a main streamlined repository to keep a main repo with all the code changes. In DevOps world Continuous Integration becomes something like building and testing each commit or change in the repo. It is like every time a change is made on your repository the code will be built automatically and tests will be run (if you have written them ;)) to check the quality of your product. &lt;/p&gt;

&lt;p&gt;Continuous Deployment is to quote &lt;a href="https://en.wikipedia.org/wiki/Continuous_deployment" rel="noopener noreferrer"&gt;Wikipedia&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;Continuous deployment (CD) is a software engineering approach in which software functionalities are delivered frequently through automated deployments.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again my take on this is automated deployment of the builds that have been done through CI to the targeted audience in order to release the pressure from developer to have to manually do that (if you are a developer you already know how far we can go to automate stuff).&lt;/p&gt;

&lt;p&gt;Here comes our friend &lt;a href="https://devops.azure.com" rel="noopener noreferrer"&gt;Azure DevOps&lt;/a&gt; to help us out with these things. You can create pipelines to do the things that have been mentioned before for your project to do it all automatically whenever you push an update to your repository.&lt;/p&gt;

&lt;p&gt;So now that you know all of this let's jump into the real talk of this blog!&lt;/p&gt;

&lt;p&gt;Writing a build pipeline for your Android application&lt;/p&gt;

&lt;p&gt;Step 1) &lt;/p&gt;

&lt;p&gt;Create a project in Azure DevOps Portal Go &lt;a href="https://devops.azure.com" rel="noopener noreferrer"&gt;here&lt;/a&gt; and sign up using your azure account.&lt;/p&gt;

&lt;p&gt;P.S. if you are a student developer you can use &lt;a href="https://aka.ms/azure4students" rel="noopener noreferrer"&gt;Azure For Students&lt;/a&gt; Subscription for free to get 100$ for a year to use on Azure. For some reasons if you don't have an Azure Subscription attend a regional event organized by a Microsoft Student Partner or Microsoft Learn Student Ambassador to get codes for activating your Account. :) Thank me later for this advice. &lt;/p&gt;

&lt;p&gt;The Project creation screen for me looked like this&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%2Fi%2F73yekhpy2r4n4ixpalua.png" 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%2Fi%2F73yekhpy2r4n4ixpalua.png" alt="Project Creation Screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating a project, you can do many things such as setup boards to track progress, Track Repos in Azure Repos, see different Artifacts that your pipelines have created, Edit, and run different pipelines for your project but we will jump to creating and editing pipeline.&lt;/p&gt;

&lt;p&gt;Step 2) Creating a pipeline &lt;/p&gt;

&lt;p&gt;Open your project and click on the pipelines option on the left-hand side your screen.&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%2Fi%2Fvawfshnqqy213xiavm5z.png" 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%2Fi%2Fvawfshnqqy213xiavm5z.png" alt="Pipelines Option"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Create New Pipeline Button on the following screen you will see and then select GitHub as your Repository Source [if you have some other sources select it, I won't mind]. &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%2Fi%2F8uu0gehezkpup5no357k.png" 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%2Fi%2F8uu0gehezkpup5no357k.png" alt="Create Pipeline Option"&gt;&lt;/a&gt;&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%2Fi%2Fpk9ye0gjgh4x7h48yem4.png" 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%2Fi%2Fpk9ye0gjgh4x7h48yem4.png" alt="Select Repository Hosted On"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will need an android project on your account to follow along this blog and if you don't have any as of now you can fork my repo &lt;a href="https://github.com/gat786/quoteiko" rel="noopener noreferrer"&gt;QuoteIko&lt;/a&gt; as of now to follow along.&lt;/p&gt;

&lt;p&gt;Now after you have selected your repo it will automatically suggest you a few options upon seeing the project structure. You must select the android one from the options.&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%2Fi%2Ftbrmwb85hv3jn57epl8w.png" 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%2Fi%2Ftbrmwb85hv3jn57epl8w.png" alt="select android option"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and after you have done that it will automatically generate a pipeline.yml file for you that describes the things this pipeline would do.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trigger:
- master

pool:
  vmImage: 'macos-latest'

steps:
- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: 'assembleDebug'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this pipeline will do is easy the first two lines describe as to which triggers it will run upon. like in this case triggers on the master branch.&lt;/p&gt;

&lt;p&gt;The pool describes on which VM it will run on. Here it is prewritten as macos but I have seen lesser build times on linux pools so I will recommend you use &lt;code&gt;ubuntu-latest&lt;/code&gt; for your pools. and then the last field is steps in which each step is something the pool will perform.&lt;/p&gt;

&lt;p&gt;Here in our case it is the Gradle task which will ensure that we have the specified Gradle version installed and will run the command according to inputs that is in this case &lt;br&gt;
&lt;code&gt;gradlew assembleDebug&lt;/code&gt; and options is nothing but just increasing the ram allocated to the gradle process. &lt;/p&gt;

&lt;p&gt;If you were to develop a Release version app you can write the step as below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;steps:
- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: 'assembleRelease'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end, your pipeline file should look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: 'assembleDebug'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And boom there you go!. &lt;/p&gt;

&lt;p&gt;If you had any questions regarding any of the things feel free to contact me at any of the given platforms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/ganeshtiwari786" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://linkedin.com/in/gat786" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;&lt;br&gt;
&lt;a href="https://instagram.com/iwrotestan" rel="noopener noreferrer"&gt;instagram&lt;/a&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>android</category>
      <category>kotlin</category>
    </item>
  </channel>
</rss>
