<?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[Google Developer Student Clubs TIET - Medium]]></title>
        <description><![CDATA[We are a bunch of computer-savvy college community kids, here to change the world, bit by bit! - Medium]]></description>
        <link>https://medium.com/developer-student-clubs-tiet?source=rss----c488dd24ad11---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Google Developer Student Clubs TIET - Medium</title>
            <link>https://medium.com/developer-student-clubs-tiet?source=rss----c488dd24ad11---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:40:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/developer-student-clubs-tiet" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Guide to Google Girl Hackathon]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/a-guide-to-google-girl-hackathon-6af4b243d4a8?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/6af4b243d4a8</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[stem]]></category>
            <dc:creator><![CDATA[Deepanshi Sharma]]></dc:creator>
            <pubDate>Thu, 11 Apr 2024 04:20:53 GMT</pubDate>
            <atom:updated>2024-04-12T14:17:21.506Z</atom:updated>
            <content:encoded><![CDATA[<p>Last year, I came across this opportunity and thought how great it would be if I won such a prestigious hackathon. Did I win it? Let’s find out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9Gfa2a8v5XlrJpqJ.jpg" /></figure><p>Google Girl Hackathon is not only a hackathon. It is a program designed for girls in Engineering to inculcate problem-solving and innovation skills. It is divided into multiple rounds, which include learning cohorts, problem-solving rounds, quizzes, and the grand finale, a hackathon.</p><h3>Round 1</h3><p>In 2023, Round 1 was a problem-solving round for everyone. It consisted of 2 Medium-Hard Level DSA Questions. The first question was really easy to understand but fairly challenging to optimise. And the second question required Hashmaps. I was able to solve both questions partially.</p><p><em>Tip: Your LinkedIn profile and resume are also considered shortlisting factors, so keep them updated!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*vx3q-M0azkoGrEDpQBsqqA.png" /></figure><h3>Round 2</h3><p>Round 2 was all about learning cohorts, where the Google Team conducted really amazing workshops. Senior software engineers from Google shared their experiences with us and told us about their lives at Google.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S9pk3nO8Fn9QQa4H" /><figcaption>1st VIrtual Workshop on the Art of Writing Idiomatic Code</figcaption></figure><p>These workshops were different for different branches. Mine was for Computer Science. After these workshops, online assessments were taken, according to respective branches. Some had MCQ Questions, but mine consisted of 2 DSA Questions of hard level. I was able to solve both of them completely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*GlaMv1P_14ud5oKG6k5tNQ.png" /></figure><h3>Round 3</h3><p>Now, this was the final round, the Hackathon. We were given a problem statement according to our branch(again!). We were supposed to submit an algorithm to solve the problem.</p><p>Here is the link to the problem statement provided to me: <a href="https://docs.google.com/document/d/1OmNSV0AmM2mPTz-4FZh2s3HBo95LziZn9aV8VH9DNPI/edit?usp=sharing">Problem Statement</a></p><p>I worked day and night for this round. But alas, I could not make it to the Presentation Round. But what’s the fun in Hackathons if you don’t lose a few eh?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*sOFLD6VqFK5QCasqaypdYw.png" /></figure><p>PS. I also got an opportunity to interview with google because of Google Girl Hackathon.</p><p>Thanks for the read!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6af4b243d4a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/a-guide-to-google-girl-hackathon-6af4b243d4a8">A Guide to Google Girl Hackathon</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating your own chat server with C]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/creating-your-own-chat-server-with-c-34f11c752ffb?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/34f11c752ffb</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[chat]]></category>
            <dc:creator><![CDATA[Shreeya Chatterji]]></dc:creator>
            <pubDate>Sat, 14 Oct 2023 04:34:07 GMT</pubDate>
            <atom:updated>2023-10-14T04:34:07.282Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From Facebook to Instagram to WhatsApp every major hit🎯 application includes a chatting feature💬. Chatting is specially an important part for games. In this article I will go through the code to create a chat server using TCP socket programming👩‍💻.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8A_96tM6ZhElvok_.jpg" /><figcaption>Source- Wallpaper Access</figcaption></figure><p>To create a chat server we must first understand what it actually is. A chat server is a software application that enables real-time communication between users over a network, typically the internet. It’s a server instance that provides resources for a chat service. The server accepts messages sent by the user of a chat client and forwards them to the recipient(s).</p><h3>What is TCP?</h3><p>Transmission Control Protocol (TCP) is a standard that defines how to establish and maintain a network conversation by which applications can exchange data.</p><p>TCP works with the Internet Protocol (<a href="https://www.techtarget.com/searchunifiedcommunications/definition/Internet-Protocol">IP</a>), which defines how computers send <a href="https://www.techtarget.com/searchnetworking/definition/packet">packets</a> of data to each other. Together, TCP and IP are the basic rules that define the internet. The Internet Engineering Task Force (IETF) defines TCP in the Request for Comment (RFC) standards document number 793.</p><p>In the Open Systems Interconnection (<a href="https://www.techtarget.com/searchnetworking/definition/OSI">OSI</a>) communication model, TCP covers parts of Layer 4, the transport layer, and parts of Layer 5, the session layer.</p><p>When a web server sends an <a href="https://www.theserverside.com/definition/HTML-Hypertext-Markup-Language">HTML</a> file to a client, it uses the hypertext transfer protocol (<a href="https://www.techtarget.com/whatis/definition/HTTP-Hypertext-Transfer-Protocol">HTTP</a>) to do so. The HTTP program layer asks the TCP layer to set up the connection and send the file. The TCP stack divides the file into data packets, numbers them and then forwards them individually to the IP layer for delivery.</p><p>Thus, creating a simple TCP chat server can be your beginning to creating online web chat server.</p><h3>Why TCP?</h3><p>TCP guarantees the integrity of data sent over the network, regardless of the amount. For this reason, it is used to transmit data from other higher-level protocols that require all transmitted data to arrive.</p><p>Some other protocols and their functions include the following:</p><ul><li><strong>Secure Shell (</strong><a href="https://www.techtarget.com/searchsecurity/definition/Secure-Shell"><strong>SSH</strong></a><strong>), File Transfer Protocol (FTP), </strong><a href="https://www.techtarget.com/searchnetworking/definition/Telnet"><strong>Telnet</strong></a><strong>:</strong> For peer-to-peer file sharing, and, in Telnet’s case, logging into another user’s computer to access a file.</li><li><strong>Simple Mail Transfer Protocol (</strong><a href="https://www.techtarget.com/whatis/definition/SMTP-Simple-Mail-Transfer-Protocol"><strong>SMTP</strong></a><strong>), Post Office Protocol (POP), Internet Message Access Protocol (IMAP):</strong> For sending and receiving email.</li><li><strong>HTTP:</strong> For web access.</li></ul><p>These examples all exist at the application layer of the <a href="https://www.techtarget.com/searchnetworking/definition/TCP-IP">TCP/IP stack</a> and send data downwards to TCP on the transport layer.</p><h3>Who is the Client?</h3><p>The client is basically the party that requests some services from the server. Without the server the client is basically not functional.</p><p>In a client-server model, a client is a user or machine that requests services from a server. For example, a web browser like Google Chrome or Firefox is a client.</p><p>The client initiates a connection request to the server. The client’s job is to:</p><ul><li>Connect to the server</li><li>Send a message to the server</li><li>Receive a response from the server</li><li>Terminate the connection</li></ul><h3>Who is the Server?</h3><p>A TCP server is an application that listens for TCP connections from TCP clients. The server can be run on the same machine as the client or on a different machine.</p><p>The server’s job is to:</p><ul><li>Listen on a well-known port or IP address and port pair</li><li>Accept connections from TCP clients</li><li>Organize data so that it can be transmitted between the server and the client</li><li>Guarantee the integrity of the data being communicated over a network</li><li>Ensure the connection remains live until communication begins</li></ul><h3>How to get started?</h3><p>First we must jot down the steps to creating a chat server in TCP. So that we can better understand how the communication will take place between the client and server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/0*2uFELW2x0xdAOcGW.png" /><figcaption>Flowchart to understand the communication process (Source: GFG)</figcaption></figure><p>The flowchart above describes the main functions in the Client and Server required to build the connection and begin the chatting between the client and server.</p><h3>Understanding the process for the code:</h3><p>The entire process can be broken down into following steps:</p><p><strong>TCP Server –</strong></p><ol><li>using create(), Create TCP socket.</li><li>using bind(), Bind the socket to server address.</li><li>using listen(), put the server socket in a passive mode, where it waits for the client to approach the server to make a connection</li><li>using accept(), At this point, connection is established between client and server, and they are ready to transfer data.</li><li>Go back to Step 3.</li></ol><p><strong>TCP Client –</strong></p><ol><li>Create TCP socket.</li><li>connect newly created client socket to server.</li></ol><h3><em>Now let’s code!</em></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FekjmhJUGHJm7FC4Juo%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FekjmhJUGHJm7FC4Juo%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FekjmhJUGHJm7FC4Juo%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/bdb2a34dbf66410c42ee230142e5163f/href">https://medium.com/media/bdb2a34dbf66410c42ee230142e5163f/href</a></iframe><blockquote><strong>NOTE</strong>✨: It is suggested you do this on a Linux Operating system. If you do not have a Linux Based OS you may try doing it on an online virtual machine or on any virtual machine on your desktop.</blockquote><h3>SERVER</h3><pre>#include&lt;sys/types.h&gt; //including data types<br>#include&lt;sys/socket.h&gt; //listening<br>#include&lt;netdb.h&gt; //provide network db operations<br>#include&lt;fcntl.h&gt; //open the connection<br>#include&lt;unistd.h&gt; //close the connection<br>#include&lt;stdio.h&gt; <br>#include&lt;string.h&gt;<br><br>int main()<br>{<br> char str[100]; //receiving data<br> char sendline1[100];<br> bzero(sendline1,100);<br> int listen_fd,comm_fd;<br> struct sockaddr_in servaddr; //IPv4_IPv6, IP add, PORT add<br> <br> //creating a socket, address family inet(using v4),use INET6 for v6<br> listen_fd=socket(AF_INET,SOCK_STREAM,0);<br> //SOCK_STREAM = TCP, SOCK_DGRAM = UDP<br> //0 is default protocol not flag operation<br> <br> <br> bzero(str,100); //want to make 100 bytes 0<br> bzero(&amp;servaddr,sizeof(servaddr)); //initialize all values with 0<br> <br> //defining server address..passing those 3 parameters<br> servaddr.sin_family=AF_INET; //IPv4<br> servaddr.sin_addr.s_addr=htonl(INADDR_ANY);<br> //server will connect with any IP addr<br> //htonl is used to convert host byte into network byte<br> servaddr.sin_port=htons(21000);<br> //0 to 65,535....first 1024 ports are fixed<br> <br> <br> //binding server addr with socket<br> bind(listen_fd,(struct sockaddr *)&amp;servaddr,sizeof(servaddr));<br> <br> //listening <br> listen(listen_fd,5); //5 clients can be connected to the server<br> <br> //to establish connection with client...like a pipeline<br> comm_fd=accept(listen_fd,(struct sockaddr *)NULL,NULL);<br> <br> //client initializing data<br> while(1){<br> recv(comm_fd,str,100,0); //hardcoded 100 because we do not know length of incoming stream<br> printf(&quot;Client: %s&quot;,str);<br> printf(&quot;Your message: &quot;);<br> fgets(sendline1,100,stdin);<br> send(comm_fd,sendline1,strlen(sendline1),0);<br> bzero(sendline1,100);<br> //0 is flag operation...tells abt successfull and unsuccessfull op<br> }<br> close(comm_fd);<br>}</pre><h3>CLIENT</h3><pre>#include&lt;sys/types.h&gt;<br>#include&lt;sys/socket.h&gt;<br>#include&lt;netdb.h&gt;<br>#include&lt;arpa/inet.h&gt;<br>#include&lt;stdio.h&gt;<br>#include&lt;string.h&gt;<br><br><br>int main()<br>{<br> int sockfd;<br> char sendline[100];<br> char recvline[100];<br> struct sockaddr_in servaddr;<br> sockfd=socket(AF_INET,SOCK_STREAM,0);<br> bzero(sendline,100);<br> bzero(recvline,100);<br> bzero(&amp;servaddr,sizeof(servaddr));<br> servaddr.sin_family=AF_INET;<br> servaddr.sin_port=htons(21000);<br> servaddr.sin_addr.s_addr=inet_addr(&quot;127.0.0.1&quot;);<br> connect(sockfd,(struct sockaddr *)&amp;servaddr,sizeof(servaddr));<br> <br> while(1){<br> printf(&quot;Your Message: &quot;);<br> fgets(sendline,100,stdin);<br> send(sockfd,sendline,strlen(sendline),0);<br> recv(sockfd,recvline,100,0);<br> printf(&quot;Server : %s&quot;,recvline);<br> }<br> <br>}</pre><p>The descriptions for the important functions is provided in the first code which will help you understand the functions and map out the flowchart to the code.</p><h3>How to run the codes?</h3><p>First we compile the codes.</p><pre>gcc server.c -o server<br>gcc client.c -o client</pre><p>Then run the server.</p><pre>./server</pre><p>In a different terminal run the client.</p><pre>./client</pre><p>Now in the client terminal you may begin the chatting. And reply in the server terminal. This is how your outputs will look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*iGmAAKz3SB8Kv5CD1j_WNg.png" /><figcaption>The server terminal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*FbYbYifZn67zVdM_npp5VA.png" /><figcaption>The client terminal</figcaption></figure><h3>Congratulations! You have built your very own chat server!✨🥳</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oz9ZE2Oo9zRC%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oz9ZE2Oo9zRC%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3oz9ZE2Oo9zRC%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="195" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c97920c676e2b8d1b1e450eece58d77/href">https://medium.com/media/5c97920c676e2b8d1b1e450eece58d77/href</a></iframe><p><strong>EXERCISE:</strong> Now you may try adding a break condition so that the application stops on entering a codeword like “exit”.</p><p>I have tried to be as accurate as possible. Feel free to drop any suggestions or doubts in the comments section below.</p><h3>“Hustle on and Keep Learning! Peace ☮️”</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34f11c752ffb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/creating-your-own-chat-server-with-c-34f11c752ffb">Creating your own chat server with C</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionize Your Jenkins Workflow with Prometheus and Grafana Monitoring]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/revolutionize-your-jenkins-workflow-with-prometheus-and-grafana-monitoring-b01aa7c9152?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/b01aa7c9152</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Jogesh Gupta]]></dc:creator>
            <pubDate>Sat, 14 Oct 2023 04:33:11 GMT</pubDate>
            <atom:updated>2023-10-14T04:33:11.842Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Prometheus is a time series database used for collecting metrics from an application and we visualize it in form of charts and graphs on grafana.</blockquote><blockquote>Check out my blog on <a href="https://medium.com/@jogeshgupta963/docker-containers-101-a-beginners-guide-f96114014ee3"><strong>Docker </strong></a>in case you are having trouble with it.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aC8R-6W7hiizU99BLMRrNw.jpeg" /><figcaption>Grafana Dashboard</figcaption></figure><h4><em>/ What do you mean by monitoring and why is it needed?</em></h4><p>A typical system is usually architected as a microservice. What happens if suddenly you wake up someday and see that your authentication service is down? Naturally, you rush to fix it. Now, in a microservice environment the issue could be in the same service or the service authService depends on. It could take hours to find the bug and fix it just by looking at the code and individual logs of your servers. Very Difficult, right? To avoid these situations and fix our systems at super speed we incorporate amonitoring system in our application.</p><h4>Metrics, Logs and Traces</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*jjfV9JQX4MdzAHxTQKduYg.png" /></figure><p><strong>Metrics </strong>are numerical data of a system . <strong>Logs </strong>are collection of logs at a single place from all the services, <strong>Traces </strong>provide visibility into how requests behave as they move throughout the entire system</p><h4><strong>Jenkins Monitoring</strong></h4><p>Let’s start monitoring jenkins, a ci/cd tool. Since running jenkins requires a server, monitoring it is one of the tasks as a Devops Engineer.</p><h4>Setting up Prometheus Grafana and Jenkins</h4><p>Lets Start with writing our <em>docker-compose.yaml file </em>in our root directory or you can clone the <a href="https://github.com/jogeshgupta963/monitoring">git repository</a> for the configurations</p><pre>version: &quot;3&quot;<br><br>services:<br>    grafana:<br>        image: grafana/grafana<br>        container_name: grafana<br>        user: &quot;0:0&quot;<br>        ports:<br>            - 3000:3000<br>        volumes:<br>            - ./data/grafana:/var/lib/grafana<br><br>    prom:<br>        image: prom/prometheus<br>        container_name: prometheus<br>        ports:<br>            - 9090:9090<br>        volumes:<br>            - ./config/prometheus.yml:/etc/prometheus/prometheus.yml<br>    node-exporter:<br>        image: prom/node-exporter:latest<br>        container_name: node-exporter<br>        ports:<br>            - 9100:9100<br>    jenkins:<br>        image: jenkins/jenkins:latest<br>        container_name: jenkins<br>        ports:<br>            - 8080:8080<br>            - 50000:50000<br>        volumes:<br>            - ./jenkins:/var/jenkins_home</pre><blockquote>Create a config/prometheus.yml file next</blockquote><pre>global:<br>    scrape_interval: 15s # By default, scrape targets every 15 seconds.<br><br>    # Attach these labels to any time series or alerts when communicating with<br>    # external systems (federation, remote storage, Alertmanager).<br>    external_labels:<br>        monitor: &quot;codelab-monitor&quot;<br><br># A scrape configuration containing exactly one endpoint to scrape:<br># Here it&#39;s Prometheus itself.<br>scrape_configs:<br>    # The job name is added as a label `job=&lt;job_name&gt;` to any timeseries scraped from this config.<br>    - job_name: &quot;prometheus&quot;<br><br>      # Override the global default and scrape targets from this job every 5 seconds.<br>      scrape_interval: 5s<br><br>      static_configs:<br>          - targets: [&quot;localhost:9090&quot;]<br>    - job_name: &quot;node_exporter&quot;<br><br>      # Override the global default and scrape targets from this job every 5 seconds.<br>      scrape_interval: 5s<br><br>      static_configs:<br>          - targets: [&quot;host.docker.internal:9100&quot;]<br>    - job_name: &quot;jenkins&quot;<br>      metrics_path: /prometheus<br>      # Override the global default and scrape targets from this job every 5 seconds.<br>      scrape_interval: 5s<br><br>      static_configs:<br>          - targets: [&quot;host.docker.internal:8080&quot;]<br>   </pre><p>Now run <em>docker-compose up -d </em>and wait till all 4 containers are running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mCUnT6jYrO1UpoZDdfydw.png" /></figure><p>Visit Prometheus on localhost:9090. Navigate to Status &gt; Targets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZfsZ5Di9YP_EkDyTOuQ5JQ.png" /><figcaption>The jenkins error is okay uptil now</figcaption></figure><p>Next, visit jenkins on localhost:8080, you would be prompted with a password screen, open you IDE, navigate to root directory, a jenkins folder should have been created , open <em>jenkins/secrets/initialAdminpassword</em> and copy paste password in you browser.</p><p>Click on install suggested plugins, continue to the Jenkins Dashboard.</p><p>Next navigate to manage Jenkins/plugins/available Plugins. Search <strong>Prometheus and install the plugin </strong><a href="https://plugins.jenkins.io/prometheus">Prometheus metrics</a><br>Restart Jenkins if required and after installing the plugin restart or refresh prometheus and Jenkins will be up and running inside prometheus</p><h3>Grafana</h3><ol><li>Visit <strong>localhost:3000/ -&gt; both username and password should be admin</strong></li><li>Click on<strong> Add your first data source</strong></li><li>Select <strong>Prometheus</strong></li><li>Go to terminal and and type <strong>docker inspect prometheus | grep IPAddress</strong></li><li>Copy the IPAdress (eg: 172.9.0.4)</li><li>Go back to browser and and type the <strong>promethes server URL </strong>(eg: <a href="http://172.18.0.4:9090/">http://172.18.0.4:9090</a> )</li><li>Scroll down and select <strong>save and test</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T6symPx-y0kBztL79IMWzA.png" /></figure><p>8. Go back to home and click on create new dashboard &gt; Add Visualization&gt; Add data source(prometheus)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_P_RhkX0pCx-8d_8jkA9Fg.png" /></figure><p>9. Select metrics and create your illustrations</p><p><strong>Conclusion</strong></p><p>In this article, we talked monitoring your jenkins application using prometheus and grafana</p><p>Share this article with your peers. Reach out to me on <a href="http://github.com/jogeshgupta963">GitHub</a> or <a href="https://www.linkedin.com/in/jogesh-gupta/">LinkedIn</a> for any queries.</p><p>Drop me a line in the comments if I’ve made any mistakes or could be helpful in anyway.</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b01aa7c9152" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/revolutionize-your-jenkins-workflow-with-prometheus-and-grafana-monitoring-b01aa7c9152">Revolutionize Your Jenkins Workflow with Prometheus and Grafana Monitoring</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Brain and the Brawn: The Intersection of Generative AI and Vision Pro]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/the-brain-and-the-brawn-the-intersection-of-generative-ai-and-vision-pro-876016fa925?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/876016fa925</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Aamna Abdin]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 13:54:37 GMT</pubDate>
            <atom:updated>2023-09-13T13:54:37.133Z</atom:updated>
            <content:encoded><![CDATA[<p>A technological tango like no other, as the enthralling convergence between generative artificial intelligence (AI) and vision processing (Vision Pro) takes centre stage. A dynamic duo – the brainpower of AI and the brawn of visual perception. From healthcare to education, transportation to entertainment, this convergence has birthed a new era of possibilities.</p><p>You may be curious about the essence of Artificial Intelligence (AI) and Vision Processing, their intersection despite their seemingly exclusive nature, and the revolutionary impact they are poised to unleash upon the world. The issue of how they would impact people’s lives also has to be addressed. You may also wonder if this convergence is connected to Apple’s newest offering, Vision Pro. As you get closer to the article’s conclusion, you can relax knowing that these queries will be answered.</p><p>Imagine a large stage on which generative AI performs as a master magician, creating magnificent illusions and altering our idea of what is feasible. Vision processing takes on the role of the astute helper, smoothly integrating these illusions into our experience and blurring the line between what is real and what is not. In a more technical sense, AI refers to the development of computer systems capable of performing tasks that typically require human intelligence, such as recognizing patterns, making decisions, and understanding natural language. Vision Processing, on the other hand, focuses on the ability of machines to interpret and understand visual information, enabling them to analyze images and videos with precision.</p><p><strong>1. Beyond the Stethoscope: How AI and Vision Empower Healthcare’s Future:</strong></p><p>Let’s begin by exploring the impact of this convergence in the field of healthcare. For a better understanding, imagine generative AI as a brilliant diagnostician, analyzing vast amounts of medical data with the finesse of a seasoned surgeon. Through its deep learning algorithms, it can detect subtle patterns and identify potential health risks, enabling early diagnosis and timely intervention. Meanwhile, vision processing acts as the keen-eyed observer, assisting in medical imaging and detecting anomalies that may escape the human eye. This powerful collaboration ensures accurate diagnoses, personalized treatment plans, and ultimately, treating patients in a more profound manner. From radiology to pathology, the integration of AI and vision processing embodies the potential to enhance diagnostic accuracy, streamline workflows, and empower healthcare professionals with invaluable insights. Companies like MediVision and HealthAI are at the forefront of leveraging these technologies, driving advancements in healthcare.</p><p><strong>2. Beyond Textbooks: Duolingo’s powerful blend of AI, Vision Pro, and Languages:</strong></p><p>Are you familiar with a green owl who assists you in learning new languages? Perhaps someone named Duolingo? Yes, Duolingo utilises generative AI algorithms to personalise language exercises based on learners’ proficiency levels and progress. Additionally, it incorporates vision processing techniques to analyse learners’ pronunciation through voice recognition technology, providing real-time feedback for improvement. Thus, in the realm of education, Generative AI can act as a knowledgeable guide. Vision processing can enhance the immersive experience by accurately interpreting the students’ interactions with the virtual environment. Unacademy, Byjus, Vedantu, and other leading edtech platforms also embrace these advanced and effective tools to offer students a superior learning experience. By harnessing the potential of AI and vision processing, these platforms aim to maximize educational outcomes.</p><p><strong>3. Driving into the Autonomous Future: Tesla Gears Up with AI and Vision Pro:</strong></p><p>Tesla navigates its way on the road while you sit back and relax. Ever wondered how it’s possible? Answer is the title of this ongoing article. Tesla vehicles become intelligent companions, leveraging advanced data analysis, pattern recognition, and real-time decision-making to enhance safety and efficiency on the road. Simultaneously, Vision Pro serves as a vigilante, adeptly interpreting visual information to swiftly identify and respond to potential hazards.</p><p><strong>4. Lights, Camera, AI! How Entertainment is Leveraging AI and Vision Processing :</strong></p><p>A depiction of a Harvard dropout who took the world of social media by storm within the four corners of his dorm room – yes, “The Social Network”, a film about the founding of Facebook – incorporated AI and vision processing technologies to recreate the digital interfaces and social networking platforms used by the characters. These technologies helped to visually depict the online world and the interactions taking place within it. Have you ever marveled at Iron Man’s virtual reality interactions and mind-boggling graphics in Marvel films? Wondering how they bring these incredible scenes to life? Filmmakers employ Augmented Reality (AR) and Computer-Generated Imagery (CGI) to make it possible. AR combines real-world elements with computer-generated ones, immersing viewers in interactive experiences where virtual objects seamlessly merge with reality. CGI, on the other hand, utilizes computer software to create stunning visual content, creating awe-inspiring effects. Together, these technologies captivate audiences and deliver breathtaking visuals.</p><p><strong>5. Job Shake-Up: Potential Impact on Employment Opportunities:</strong></p><p>In addition to these advancements, it’s paramount to address the potential impact of AI and vision processing on job opportunities. As AI algorithms become more sophisticated and capable of handling complex tasks, there is a possibility that certain routine or repetitive jobs could be replaced by automated systems. One prime example is ChatGpt, the ongoing buzzword potentially replacing jobs in areas such as customer support, content generation, and data analysis. While the integration of these technologies may lead to job displacement in some areas, it also creates new avenues for employment. Industries adopting AI and vision processing will require professionals with expertise in AI development, data analysis, system integration, and ethical considerations related to AI. This shift in the job market requires individuals to adapt and acquire new skills to stay competitive in an AI-driven world.</p><p><strong>6. Envisioning the Extraordinary: Embracing the Fusion of AI and Vision Pro :</strong></p><p>Apple’s new technology is related to Vision Pro in a way that is both “visionary” and “pro-active”. Its visionary aspect expands our perceptual capabilities, allowing us to interact with objects in space effortlessly. On the other hand, its pro-active nature drives us to make better decisions based on the data it gathered. Undoubtedly, Apple’s future developments in this field hold great intrigue.</p><p>Let’s wrap things up with a wordplay. What will you call Apple’s technological marvel? One might call it “VISION in PRO-gress!” Lastly, let us acknowledge that AI and vision processing together give life to the statement “The sky’s the limit.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=876016fa925" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/the-brain-and-the-brawn-the-intersection-of-generative-ai-and-vision-pro-876016fa925">The Brain and the Brawn: The Intersection of Generative AI and Vision Pro</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring Bliss: Setting Up Prometheus and Grafana for Your Kubernetes Cluster Using Minikube]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/monitoring-bliss-setting-up-prometheus-and-grafana-for-your-kubernetes-cluster-using-minikube-8913e78fab92?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/8913e78fab92</guid>
            <category><![CDATA[prometheus-monitoring]]></category>
            <category><![CDATA[kubernetes-monitoring]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[grafana]]></category>
            <dc:creator><![CDATA[Tushar Chopra]]></dc:creator>
            <pubDate>Thu, 10 Aug 2023 05:48:53 GMT</pubDate>
            <atom:updated>2023-08-10T05:48:53.181Z</atom:updated>
            <content:encoded><![CDATA[<p>Monitoring a Kubernetes cluster is like having a pair of binoculars in the wilderness — it empowers you to navigate through the complexity, foresee challenges, and respond effectively. Prometheus and Grafana, two open-source tools, offer a dynamic duo for monitoring and visualization in Kubernetes environments. In this guide, we’ll explore the architecture, use cases, and step-by-step setup of Prometheus and Grafana, with a focus on using Minikube for a local Kubernetes playground.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bvfcjv19C5H-ZwyZ" /><figcaption>Photo by <a href="https://unsplash.com/@ibrahimboran?utm_source=medium&amp;utm_medium=referral">Ibrahim Boran</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Understanding Prometheus and Grafana</h3><p><strong>Prometheus: Architecture and Use Cases</strong></p><p>Prometheus is a time-series database and monitoring system designed for reliability and simplicity. It collects metrics from targets (like your Kubernetes pods) via HTTP and stores them in a customizable, highly efficient format. Prometheus’s querying language, PromQL, allows for flexible analysis and alerting. It excels in monitoring dynamic, cloud-native environments, providing insights into resource utilization, application performance, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y3c7GD_5fMOH-zuC" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Grafana: Architecture and Use Cases</strong></p><p>Grafana, on the other hand, is a powerful visualization and dashboarding tool that complements Prometheus. It integrates seamlessly to create rich, real-time visualizations of Prometheus data. Grafana supports numerous data sources and offers a wide variety of charting options. It’s not just for monitoring — Grafana dashboards can showcase business metrics, operational performance, and even weather forecasts!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ki-pFXhBPjV1BReG5ExXQ.png" /></figure><h3>Setting Up Prometheus and Grafana</h3><p>For our setup, we’ll use Minikube, a lightweight Kubernetes distribution for local development and testing. Let’s get started:</p><ol><li><strong>Prometheus Setup</strong></li></ol><p>Add the Prometheus Helm repository:</p><pre>helm repo add prometheus-community https://prometheus-community.github.io/helm-charts<br>helm repo update</pre><p>Install Prometheus using Helm:</p><pre>helm install prometheus prometheus-community/prometheus</pre><p>Expose Prometheus via a NodePort service:</p><pre>kubectl expose service prometheus-server --type=NodePort --target-port=9090 --name=prometheus-server-ext<br>minikube service prometheus-server-ext</pre><p><strong>2. Grafana Setup</strong></p><ol><li>Add the Grafana Helm repository:</li></ol><pre>helm repo add grafana https://grafana.github.io/helm-charts helm repo update</pre><p>Install Grafana using Helm:</p><pre>helm install grafana grafana/grafana</pre><p>Expose Grafana via a NodePort service:</p><pre>kubectl expose service grafana --type=NodePort --target-port=3000 --name=grafana-ext minikube service grafana-ext</pre><h3>Exploring Your Monitoring Bliss</h3><p>Now that Prometheus and Grafana are up and running, open your browser and navigate to the URLs provided by Minikube. You can access Prometheus’s web UI for querying and graphing metrics at http://&lt;MINIKUBE_IP&gt;:&lt;PROMETHEUS_PORT&gt;, and Grafana&#39;s dashboard interface at http://&lt;MINIKUBE_IP&gt;:&lt;GRAFANA_PORT&gt;.</p><h3>Use Cases and Beyond</h3><p>With Prometheus and Grafana in place, you can monitor key Kubernetes metrics like CPU and memory usage, pod health, and network traffic. Create insightful dashboards to visualize trends and patterns. Additionally, set up alerts in Prometheus to receive notifications when thresholds are breached.</p><p>While this guide offers a simplified setup, the possibilities with Prometheus and Grafana are vast. You can integrate additional exporters, create custom dashboards, and explore advanced alerting configurations to cater to your unique monitoring needs.</p><p>In the world of Kubernetes, Prometheus and Grafana are like trusty companions, guiding you through the intricacies of your cluster and helping you achieve a state of monitoring bliss.</p><p><em>Disclaimer: In production environments, ensure to follow best practices for securing Prometheus, Grafana, and your Kubernetes cluster.</em></p><p>So, there you have it — a comprehensive guide to setting up Prometheus and Grafana for your Kubernetes cluster. Enjoy your newfound monitoring bliss as you explore the depths of your application’s performance and gain insights that empower better decision-making. Happy monitoring!</p><p>Published originally at : <a href="https://medium.com/@tusharchopra02122002/monitoring-bliss-setting-up-prometheus-and-grafana-for-your-kubernetes-cluster-using-minikube-8913e78fab92">https://medium.com/@tusharchopra02122002/monitoring-bliss-setting-up-prometheus-and-grafana-for-your-kubernetes-cluster-using-minikube-8913e78fab92</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8913e78fab92" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/monitoring-bliss-setting-up-prometheus-and-grafana-for-your-kubernetes-cluster-using-minikube-8913e78fab92">Monitoring Bliss: Setting Up Prometheus and Grafana for Your Kubernetes Cluster Using Minikube</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginners guide to Routing in Cisco Packet Tracer]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/beginners-guide-to-routing-in-cisco-packet-tracer-608f8a156d94?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/608f8a156d94</guid>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[routing]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[router]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Shreeya Chatterji]]></dc:creator>
            <pubDate>Thu, 10 Aug 2023 05:43:18 GMT</pubDate>
            <atom:updated>2023-08-10T05:45:29.973Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beginners Guide to Routing in Cisco Packet Tracer</h3><p>In this article📝, I will be telling you about how you can get started with creating your first-ever computer network💻 on Cisco Packet tracer. So gear up and let’s start learning! 🎉✨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bjvvFfYTr4B1uiHg" /><figcaption>Photo by <a href="https://unsplash.com/de/@moritz_photography?utm_source=medium&amp;utm_medium=referral">Moritz Kindler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Routing is a fundamental aspect of networking. Understanding how to configure routers and routing protocols is essential for any network engineer and a stepping stone for anyone trying to explore computer networking.</p><p>So let me formally introduce you to “Routing”.</p><p><em>According to Cisco-</em></p><blockquote>Routing is the process of selecting and defining paths for IP-packet traffic within or between networks as well as the process of managing network traffic overall.</blockquote><p>In layman&#39;s terms, routing is the process of connecting and configuring routers to be used for inter-device communication. A router is a device that connects two or more networks or subnetworks.</p><p>Although right now these terms can seem very intimidating for a beginner however we will understand more when we start executing this practically on Cisco Packet Tracer.</p><h3>Why Cisco Packet Tracer?</h3><p>Having used many networking tools like GNS3 and NetSim I have come to realise from personal experience that Cisco Packet Tracer is the most user-friendly and easy-to-use networking tool out there. It is easy to install and perfect for beginners to have a hassle-free learning experience.</p><p>For the same reason, I will be using Cisco Packet Tracer for this tutorial. If you do not have Cisco Packet Tracer installed on your device then you can refer to the links given below:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfrUQMHXhnvs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfrUQMHXhnvs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfrUQMHXhnvs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/334c90c2d6c64649519fd07fa9d81eb3/href">https://medium.com/media/334c90c2d6c64649519fd07fa9d81eb3/href</a></iframe><ul><li><a href="https://www.geeksforgeeks.org/how-to-install-cisco-packet-tracer-on-windows/">How to Install Cisco Packet Tracer on Windows? - GeeksforGeeks</a></li><li><a href="https://afivdickyefendy.medium.com/how-to-install-cisco-packet-tracer-7-2-2-on-kali-linux-2020-e0828a80ae4b">How to install Cisco Packet Tracer 7.2.2 on Kali linux 2020</a></li><li><a href="https://www.sysnettechsolutions.com/en/install-packet-tracer-macos/">How to Install Packet Tracer on macOS | SYSNETTECH Solutions</a></li></ul><h3>Getting Started:</h3><p><em>Without further ado let’s jump into the implementation. I will be explaining each step so do not worry, you can get this done ✨✨</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FWs6T5PN7wHv3cY8xy8%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FWs6T5PN7wHv3cY8xy8%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExaWE0Y2gxMWpwb2JhZDR5Nmd0MnRleXMzYTY1MjFydWIzaGh4Yjk5OSZlcD12MV9naWZzX2dpZklkJmN0PWc%2FWs6T5PN7wHv3cY8xy8%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="261" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca8cc27ba44c0cc4e018e1aa1ea94abb/href">https://medium.com/media/ca8cc27ba44c0cc4e018e1aa1ea94abb/href</a></iframe><h3><strong>STEP 1:<em> CREATING THE TOPOLOGY</em></strong></h3><p>First of all, we will be creating the basic structure of the practice network which will look as follows:</p><h4><strong>(a)Devices used and where to find them in the Cisco packet tracer:</strong></h4><p>Go to the very bottom of the CPT(Cisco Packet Tracer) window and you will find something that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*c4YlMGq2tWcx66JC0YnBGw.png" /><figcaption><em>Fig 0.1: The network component box is where you will find all your devices to create the required topology</em></figcaption></figure><p>I recommend exploring this network box to see all the components available for usage as it will be very helpful whenever you try to build something new. For now, this is where I found the devices used in this tutorial:</p><p>Router2811: [network devices]-&gt;[Routers]-&gt;2811</p><p>Switch2960: [network devices]-&gt;[Switches]-&gt;2960</p><p>PC: [End Devices]-&gt;[PC]</p><p>Connections: [Connections](you can easily see it by a ⚡kinda symbol.</p><p>The inter-router connections are made by the SerialDTE connection (A red Zig-Zag symbol)</p><p>The connections from the switch and PC are made easily by the ⚡ connection which automatically chooses the type of connection that is most apt for the device.</p><h4><strong>(b) Adding Ports to Routers:</strong></h4><p>If you simply try to use the Serial DTE connection to connect the routers you will realise it can’t be done as by default there are no serial ports available in the routers. We have to manually add serial ports to the routers and it can be done by following the steps below:</p><ol><li>Click on any of the routers: A window like this will pop up.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*XlqGzm1aTxZyWdiAfLIhsw.png" /><figcaption>Fig 0.2: The default setup of the Router</figcaption></figure><p>Click on 1 to turn off the router as changes to ports can only be made when the router is turned off.</p><p>Click on 2 as WIC-1T is the serial port that we want to insert into the router. <em>The 1-port serial WAN interface card (WIC-1T) provides serial connections to remote sites or legacy serial network devices such as Synchronous Data Link Control (SDLC) concentrators, alarm systems, and packet over SONET (POS) devices.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*Z9wTm0xGNU2IIzNyrH9YZA.png" /><figcaption>Fig 0.3: Inside WIC-1T when the router is turned OFF.</figcaption></figure><p>Simply drag and drop the port from (3) to (4). You can add as many Serial Ports as you like (1–4) according to requirement. For demonstration purposes, I have added 2 ports.</p><p>After this turn ON the router using (1) and wait for some time till the router can fully boot.</p><p>Repeat this on all the 3 routers.</p><p>Currently, your topology should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*6n_NYbvbpCk_e2tH8BtR3g.png" /><figcaption>Fig 1.1: Topology without a connection</figcaption></figure><p>Use ⚡(Automatically choose connection type) connection to connect PC0-Switch0, PC1-Switch1, Router1-Switch0 and Router2-Switch1.</p><p>Use Serial DTE<em>(Red Zig-Zag symbol) </em>to connect Router1-Router0 and Router0-Router2. [❗<strong>NOTE:</strong> <em>While making this connection you will have to choose your serial ports from the ones that you just added </em><strong><em>other ports if chosen will not work</em></strong><em>.</em>]</p><p>After this, your topology should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*VOfvHnBapklRHNnLk8o6Yw.png" /><figcaption>Fig1.2: Topology with connections</figcaption></figure><h4>❗<strong>NOTE:</strong></h4><blockquote>The components are slightly tilted to make sure all labellings are fairly visibly. If your topology is not showing the port labelling like <strong>Fa0/0</strong> or <strong>Se0/0/0 </strong>in the options tab click Options-&gt;Preferences (or simply do Ctrl+R) and make sure that <strong>“Always Show Port Labels in Logical Workspace”</strong> is checked. Once selected your topology should look the same as mine.</blockquote><blockquote>P.S.- Try to use the same serial ports as I have as it might later cause confusion while configuring the router. You may change the Router names by selecting the router and heading to the <strong><em>config</em></strong> tab.</blockquote><h4><strong>Congratulations🎉✨ we are done with creating the topology. Let us try to get the setup to work (all red all the red arrows to green by configuring the routers and assigning IP addresses to the PCs and Routers.</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FZdUnQS4AXEl1AERdil%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FZdUnQS4AXEl1AERdil%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FZdUnQS4AXEl1AERdil%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="362" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b3d20be5c24ab5f7d5c3ee62c3f257b/href">https://medium.com/media/8b3d20be5c24ab5f7d5c3ee62c3f257b/href</a></iframe><h3>STEP 2: PLAN OUT THE IP ADDRESSES THAT YOU WANT TO ASSIGN</h3><p>If you are making this network for a given assignment there is a high chance that the IP addresses for the devices will be already provided to you in the assignment. If not then bring out your copy and pen and figure out the addresses you want to assign to the network.</p><h4>How to assign your IP addresses?</h4><p>This article is majorly focused on the implementation of the network so I will not be diving too deep into subnetting here. If you guys want me to write an easy-to-understand article on subnetting please make sure to let me know, I’ll get to it ASAP ✨.</p><p>Just for a simple introduction. Here is the definition of subnetting according to my understanding:</p><blockquote>Subnetting is the procedure of dividing a large network into smaller subparts. This is essential to build systems that are efficient, organised, reduce traffic, and enhances network security.</blockquote><p>There are two types of subnetting- Classful and Classless. I’d highly suggest you do some surfing on the internet on this topic.</p><p>For this, you need not have an in-depth knowledge of subnetting you can simply use the IP addresses I have used and later on in another article, I will tell you all about subnetting.</p><p>Here is an updated network topology where I have labelled the devices with their relevant IP addresses. You should also label your devices as later while configuring the devices they will come very handy and you will not have to constantly try to figure out which IP address belongs to which device. That is why planning out the IP address before configuring is a crucial step while building your network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*Dz_YLWponvwk3yHxs7cbWg.png" /><figcaption>Fig1.3: Topology with labelling</figcaption></figure><p>To label your topology simply press “N” and click anywhere on your workspace and a writing option will open.</p><p>If you want to know more about the labels here is some explanation. Don’t worry if you do not understand something here as you can easily learn about them once you know about subnetting. [<em>You can skip the below bullet points if you want.</em>]</p><ul><li>The addresses placed on the wires are the network address for the devices being connected by the wire. This is an identifying address for the network. As you will notice the devices connected to the given network only differ in the last octet ie, the last number after the 3rd dot in the address.</li><li>The number after the “/” is indicating the subnet mask of the IP address.</li></ul><p>Next comes the most important part of getting your network to work. So best of luck ✨</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FwPzm7pG2Z85QBYrBGU%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwPzm7pG2Z85QBYrBGU%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FwPzm7pG2Z85QBYrBGU%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="239" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e86261c52d454f828aea8d6cd841256/href">https://medium.com/media/7e86261c52d454f828aea8d6cd841256/href</a></iframe><h3>STEP 3: CONFIGURING THE DEVICES</h3><p>To configure the routers we will be writing commands in the CLI of each of the routers. You can find your router’s CLI by:</p><ul><li>Click on your router</li><li>Head to the CLI tab at the top navigation bar of the pop-up</li><li>Click inside the CLI to start the configuration.</li></ul><p>This is how the CLI tab looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*16mvdkbF5Oz07v8GDLg6bw.png" /><figcaption>Fig1.4: CLI Of Router0</figcaption></figure><h4>CONFIGURING ROUTERS:</h4><h4>(a) Router 0</h4><p>Inside the CLI of Router0 do the following:</p><pre>Router&gt;en<br>Router#config t<br>Enter configuration commands, one per line.  End with CNTL/Z.<br>Router(config)#int Se0/0/0<br>Router(config-if)#ip add 100.1.1.1 255.255.255.0<br>Router(config-if)#no shut</pre><p>This is the first part of the code. Let me explain each command:</p><ul><li>en — Enable. This enables your router to be configured by writing commands</li><li>config t — This allows you to start configuring the router</li><li>int Se0/0/0 — Choosing the Se0/0/0 ie, the exact name of the port whose IP address you want to set</li><li>ip add 100.1.1.1 255.255.255.0 — Setting the ports IP address to 100.1.1.1 where 255.255.255.0 is the subnet mask (class C)</li><li>no shut — this command stops the router from shutting down amid the configuration of other routers.</li></ul><p>This code pattern is repeated to configure the other port’s IP address too.</p><pre>Router(config-if)#int Se0/1/0<br>Router(config-if)#ip add 20.1.1.1 255.255.255.0<br>Router(config-if)#no shut</pre><p>Now that we have configured both the ports we do the RIP routing of the router. Here we are using RIP version 2 which is the most widely used version in today’s world.</p><h4>What is RIP?</h4><p>The full form of RIP is Routing Information Protocol. It defines where the packets(data being sent and received in the network) are allowed to move and helps avoid looping problems in the network.</p><p>Here are the RIP configuration steps:</p><pre>Router(config-if)#ex<br>Router(config)#router rip<br>Router(config-router)#ver 2 <br>Router(config-router)#net 20.1.1.0<br>Router(config-router)#net 100.1.1.0<br>Router(config-router)#end</pre><p>Explanation:</p><ul><li>ex- to exit the port where the changes are being made.</li><li>router rip- to specify that we are beginning RIP configurations.</li><li>net 20.1.1.0/ net 100.1.1.0- specifying where our packets are moving</li><li>end- to terminate configurations.</li></ul><p>Since we have 100.1.1.1 and 20.1.1.1 as the port IPs we specify the network address of these IPs as the networks where the packets are moving which are 100.1.1.0 and 20.1.1.0 respectively.</p><p>Finally, for this router, we run the command:</p><p>wr and copy run start</p><p>This turns the entire network on and ready for communication.</p><p>when shown Destination filename [startup-config]? simply press enter.</p><p>We repeat this for the other 2 routers.</p><p>Given below is the code for the other two routers. Run each line separately and try to understand what is going on by referring to the above explanation.</p><p>✨✨</p><blockquote><strong>❗NOTE: It might happen that your network will not work if you do not type the command </strong><strong>wr at the end of your configuration before running </strong><strong>copy run start. In the CLI snapshots I have not used </strong><strong>wr — this is not correct. Please run </strong><strong>wr before running </strong><strong>copy run start</strong></blockquote><p>✨✨</p><h4>(b) Router 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*ya1a9q7QPody0NZiO_EfBg.png" /><figcaption>Fig 1.5: CLI Configuration of Router 1</figcaption></figure><blockquote>❗<strong>NOTE:</strong> The text after “%” are lines generated by the CLI itself to indicate the state of the router to the person entering the commands.</blockquote><h4>(c) Router 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*no8RvtkMAS_eXTGVm6ptKA.png" /><figcaption>Fig 1.6: CLI Configuration of Router 2</figcaption></figure><blockquote>❗<strong>NOTE:</strong> You can press enter as many times as you want after each command. If your command is interrupted by some msg from the CLI simply continue the command or press enter and restart writing the command.</blockquote><h4>CONFIGURING THE PCs</h4><p>To set the IPv4 addresses of the PCs follow the steps given below:</p><ol><li>Click on the PC whose address you want to set.</li><li>At the top click on “Desktop”.</li><li>In “Desktop” click on the “IP Configuration” icon.</li><li>Set your IP address, Subnet mask and Default Gateway.</li></ol><p>Given below are the values for my PCs:</p><h4>PC 0:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*s7rEX5P2AI0I4MONbAn6vw.png" /><figcaption>Fig 1.7: Addresses for PC 0</figcaption></figure><h4>PC 1:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*Cx3TkhnxwIJYjAvK4-TGlw.png" /><figcaption>Fig 1.8: Addressing PC 1</figcaption></figure><p>Finally, our setup is done!! Phewwww!!! Congrats if you have made it here 🎉🎉</p><p><strong>Now let&#39;s see our blood, sweat and tears working!</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o7TKGMZHi73yzCumQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o7TKGMZHi73yzCumQ%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3o7TKGMZHi73yzCumQ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e3dca7a9804f31fc834411e84f9ad65/href">https://medium.com/media/3e3dca7a9804f31fc834411e84f9ad65/href</a></iframe><h3>STEP 4: CHECK THE WORKING OF THE NETWORK</h3><h4>Method 1: Pinging the PCs from the Command line</h4><p>One of the ways to check if our network is fully functional in the Cisco Packet tracer is by checking if pings between the PCs are going through. (<em>Ping is sending msgs.</em>)</p><p><strong>Open the command prompt of the PC by :</strong></p><p>Click on the PC and go to <strong>Desktop-&gt; Command prompt</strong></p><p>In the command prompt type: ping &lt;ip address of the PC to which you want to send msg&gt;</p><p>This is how my command prompt looks:</p><h4>PC 0:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*VXn9MLW-Lcc8ZtULDb-M6A.png" /><figcaption>Fig 1.9: Ping PC0 to PC1</figcaption></figure><h4>PC 1:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*OvFm7RiE7Fl6WECFqAlCAw.png" /><figcaption>Fig 2.0: Ping PC1 to PC0</figcaption></figure><h4>Method 2: Using inbuilt PDU</h4><ul><li>To start this option press “<strong>P</strong>” on the keyboard (or press 1 in Fig 2.1)</li><li>Now your mouse will have an envelope on it.</li><li>Click on the PC from which you want to send ping.</li><li>Click on the PC to which you want to send ping.</li><li>The status of the ping should be visible at the bottom right corner of your screen. ( 2 in fig 2.1)</li></ul><p>This is how mine looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4HQzMOdsiG8emqq9V0PXA.png" /><figcaption>Fig 2.1: Where to see your PDU status.</figcaption></figure><h4>The Status:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*MjUIUdu25G5yHg9GmVbg2Q.png" /><figcaption>Fig 2.2: The status of the PDU pings</figcaption></figure><h3>OUR NETWORK CONFIGURATION IS COMPLETE!!</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FdIxkmtCuuBQuM9Ux1E%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdIxkmtCuuBQuM9Ux1E%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FdIxkmtCuuBQuM9Ux1E%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="217" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a165bff41cdef188240249947434054/href">https://medium.com/media/8a165bff41cdef188240249947434054/href</a></iframe><p>I hope you guys learnt something through this blog. It is a long and cumbersome task indeed. If your network is not working then don’t be disheartened. Throughout my time working with Cisco Packet Tracer I have discovered that networks have a way of not working no matter how accurate you are 😭. Just try out these steps on other simpler networks out there. The main aim is to learn something and I am sure through this blog you have had the opportunity to play a lot with this software.</p><p>I have been working with Cisco Packet tracer for the past 6 months as it comes under Computer Networks- a course I am taking this semester of my college. I have tried to be as accurate as possible. Feel free to drop any suggestions in the comments section below.</p><h3>“Hustle on and Keep Learning! Peace ☮️”</h3><p><em>Published originally at </em><a href="https://medium.com/@shreeya.chatz/beginners-guide-to-routing-in-cisco-packet-tracer-608f8a156d94"><em>https://medium.com/@shreeya.chatz/beginners-guide-to-routing-in-cisco-packet-tracer-608f8a156d94</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=608f8a156d94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/beginners-guide-to-routing-in-cisco-packet-tracer-608f8a156d94">Beginners guide to Routing in Cisco Packet Tracer</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LinkedIn — SRE Intern Interview Experience | Off-campus | August 2021 [Offer-Accepted]]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/linkedin-sre-intern-interview-experience-off-campus-august-2021-offer-accepted-ed114ac70a35?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/ed114ac70a35</guid>
            <category><![CDATA[linkedin]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[interview-experience]]></category>
            <dc:creator><![CDATA[Saurav Shrivastav]]></dc:creator>
            <pubDate>Thu, 08 Sep 2022 10:48:41 GMT</pubDate>
            <atom:updated>2022-09-08T10:48:02.230Z</atom:updated>
            <content:encoded><![CDATA[<h3>LinkedIn — SRE Intern Interview Experience | Off-campus | August 2021 [Offer-Accepted]</h3><p><em>Originally published at </em><a href="https://blog.saurav-shrivastav.online/linkedin-sre-intern-interview-experience"><em>https://blog.saurav-shrivastav.online</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fKumxPGx7ptK5jXC" /></figure><p>My status during the recruitment procedure:</p><pre>Status: Pre-final year (3rd), Thapar Institute of Engineering and Technology <br>Position: SRE Intern <br>Location: Bangalore, India <br>Month: August-September, 2021 <br>Applied at: LinkedIn Easy Apply</pre><h3>Rounds Conducted</h3><ol><li>Hackerrank Online Test</li><li>Technical Interview- I (SRE Phone Screen — CS Fundamentals)</li><li>Technical Interview — II (Service Design &amp; Architecture)</li><li>Host Manager Round</li></ol><h3>Round 1 — Hackerrank Online Test</h3><p><strong>Date &amp; Time</strong> — 27th August 2021, 6pm IST<br><strong>Test Duration</strong> — 120 mins</p><h3>Test Syllabus:</h3><ol><li>Unix</li><li>Operating Systems</li><li>Databases &amp; SQL</li><li>HTTP &amp; Networking Fundamentals (basically Computer Networks)</li><li>Coding</li></ol><h3>Test format:</h3><ol><li>26 MCQs</li><li>2 Coding questions</li><li>2 Database Queries — 4 languages allowed (MySQL, Oracle, tsql, db2)</li></ol><p>My take for this round: <br>The MCQs were easy, and the coding questions were Easy-Medium. The Database queries were of Medium Level.</p><h3>Round 2 — Technical Interview- I (CS Fundamentals)</h3><p><strong>Date &amp; Time</strong> — 6th September 2021, 11:30am IST<br><strong>Interview Duration</strong> — 60 mins</p><ul><li>One interviewer joined the zoom call. To begin with, she introduced herself and then I followed with my introduction.</li><li>The interviewer made sure that I was not anxious and that I was ready for the interview. She asked me about the subjects already taught in my college.</li><li>The interview was very interactive and smooth.</li><li>Questions revolved around the following topics:<br>1. Operating Systems &amp; Unix<br>2. DBMS<br>3. Computer Networks</li><li>The interview involved questions on many topics in the subjects, beginning with easy-level questions. The level of questions was raised gradually during the interview.</li><li>Some questions required in-depth knowledge about how things work. For example, I explained the lifecycle of a request, from the browser involving the five layers of the TCP/IP model till a response is received.</li><li>In the end, I asked some questions about the interview and LinkedIn.</li></ul><h3>Round 3 — Technical Interview — II (Service Design &amp; Architecture)</h3><p>In simple words, <strong>System Design</strong>.</p><p><strong>Date &amp; Time</strong> — 6th September 2021, 2:00pm IST<br><strong>Interview Duration</strong> — 60 mins</p><ul><li>This interview has held on the same day as Round — 1. This interview had no right or wrong answers as there could be many ways of doing specific tasks.</li><li>An interviewer joined the call, and we began similarly with our introductions.</li><li>We first reviewed my resume, and then I elaborated more on my skills and experiences.</li><li>We also discussed some of my projects and how we could scale them.</li><li>Later, the interviewer asked me about system design concepts like horizontal and vertical scaling, monitoring, etc.</li><li>I specifically remember one question: “There is a file of size 1 TB which needs to be transferred to 10k machines. How can this be done efficiently, keeping in mind that there can be network failures, machines going out of disk space, etc.”</li></ul><h3>Round 4 — Host Manager Round</h3><p><strong>Date &amp; Time</strong> — 9th September 2021, 11:00am IST<br><strong>Interview Duration</strong> — 60 mins</p><ul><li>The interviewer was a Site Reliability Engineering Manager.</li><li>He opened my LinkedIn profile and Resume and asked me about my previous work and experiences. He tried to understand my background and why I did certain things the way I did them.</li><li>It was a conversational round, and there were no right or wrong answers.</li></ul><p>I received the offer to join LinkedIn on 15th September 2021.</p><h3>Resources:</h3><ol><li><a href="https://linkedin.github.io/school-of-sre/">LinkedIn School of SRE</a></li><li><a href="https://youtube.com/playlist?list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX">System Design — Gaurav Sen</a></li><li><a href="https://saurav-shrivastav.notion.site/Computer-Networking-adcd8886a2084368b962e35501a2f16b">Computer Networks — My notes from Google Course</a></li><li><a href="https://youtube.com/playlist?list=PLBlnK6fEyqRiVhbXDGLXDk_OQAeuVcp2O">Operating System — NESO Academy</a> or Gate-Smashers</li><li>DBMS &amp; SQL</li></ol><p><em>Originally published at </em><a href="https://blog.saurav-shrivastav.online/linkedin-sre-intern-interview-experience"><em>https://blog.saurav-shrivastav.online</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed114ac70a35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/linkedin-sre-intern-interview-experience-off-campus-august-2021-offer-accepted-ed114ac70a35">LinkedIn — SRE Intern Interview Experience | Off-campus | August 2021 [Offer-Accepted]</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rust — A Blazingly Fast Experience]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/rust-a-blazingly-fast-experience-53b6505530a4?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/53b6505530a4</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[rustlang]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[systems-programming]]></category>
            <dc:creator><![CDATA[Akshat Jaimini]]></dc:creator>
            <pubDate>Tue, 09 Aug 2022 02:45:41 GMT</pubDate>
            <atom:updated>2022-08-09T02:45:41.304Z</atom:updated>
            <content:encoded><![CDATA[<h3>Rust — A <em>Blazingly Fast</em> Experience</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jExu-5oF195FbKArTExBJg.png" /></figure><p>Throughout the years multiple programming languages have come and gone. Some of them had such a massive effect that multiple languages were based off of them while at the same time some other languages were soon forgotten.</p><p>Some of the most influential languages include C, also known as the mother of all modern languages, its most famous derivative C++, Java, C# and many more. The introduction of C in 1972 revolutionized the way we could program computers, C++ enriched this experience by introducing Object Oriented Paradigms in C but everything comes to a certain end, doesn’t it?</p><p>I am not implying that the user base for C++ is decreasing but the lack of updates in the language and sometime its “quirks” have forced many companies to switch there code bases from C++ to other modern languages. For example <a href="https://go.dev/">Go</a> and <a href="https://github.com/carbon-language/carbon-lang">Carbon-Lang</a> have been developed by Google for the purpose to replace their existing C++ code base.</p><p>One of the most promising candidates among these languages include <a href="https://www.rust-lang.org/">Rust</a>. Rust started as a personal project by an employee named Graydon Hoare at Mozilla which was later sponsored by the company in 2009. And as of now the father of Linux, Linus Torvalds, announced in the Open Source Summit 2022, organized in Austin, Texas, that he is “cautiously optimistic” about bringing rust into the next major release of the <a href="https://github.com/torvalds/linux">Linux Kernel</a>(most probably 5.20).</p><h3>Why Rust?</h3><p>There are a plethora of programming languages that could have been considered for the same tasks that rust performs but there are some features that set it apart:</p><h4>1. Performance</h4><p>Rust is one of the fastest languages till date with Go-lang being the only competitor. Rust is <em>blazingly</em> fast and memory efficient. It does not include a garbage collector which reduces the overhead processing cost for these operations.</p><h4><strong>2. Reliability</strong></h4><p>The Ownership model of Rust ensures that the programmer is not able to cause any problems with the memory management part of their application. Although the concept of ownership and borrowing might intimidate you at first but once you get a hold of them you can write efficient programs in rust.</p><h4>3. Versatile and Cross-platform</h4><p>Rust can be used to write various type of applications that can run on a range of devices. Some of the fields include Lower Level programming(“Like writing drivers etc..”), WebAssembly, Backend Developement etc. Since Rust is powered by the LLVM Compiler Infrastructure, it can easily run on embedded devices too.</p><h3>My Journey</h3><p>I started out with rust just a month ago and quickly realized that Rust was actually a really powerful language.</p><p>Although some concepts were pretty weird. For example, some features that we take for granted in other high level languages like python and javascript were absent.</p><h4>Ownership &amp; Borrowing</h4><p>First lets talk about the concept of ownership and borrowing. Lets take this piece of Rust code as an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1656d06faf392c82819992da3fb777e3/href">https://medium.com/media/1656d06faf392c82819992da3fb777e3/href</a></iframe><p>So as you can see above if we try to access the variable x after passing it to the print function the program will “panic”, which is the same as Exceptions in Python and Java. This happens because in rust all the “complex” data types like strings are stored in a very different manner as compared to other languages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*JLZunsObbnVAae0Rbusjyw.png" /></figure><p>As you can see in the figure above the values to these variables are stored in the heap while the pointer to that particular location in the heap memory and other properties like length are stored in the stack. So lets say if another variable is assigned the value of a variable x which contains a string and then if we drop x, then the value stored in the heap would also be removed and therefore the second variable would point to an empty location, resulting in a <a href="https://en.wikipedia.org/wiki/Dangling_pointer"><em>Dangling Pointer</em></a>.</p><p>This causes a lot of issues at runtime and therefore to tackle this the ownership system was setup which passes the ownership of the entire value all together. For example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c18096182940942f6c2c73958d08b1e2/href">https://medium.com/media/c18096182940942f6c2c73958d08b1e2/href</a></iframe><p>To avoid issues like this we “borrow” the value by assigning or passing a reference to that variable instead of transferring its ownership. For example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58f61279625a2d25d01f49324a5f6b6c/href">https://medium.com/media/58f61279625a2d25d01f49324a5f6b6c/href</a></iframe><p>This example clearly shows how we can pass a reference to a variable by using the ampersand(&amp;) operator(<em>Just like C, right?Well not that much).</em></p><p>You can also send a mutable reference which means you can alter the value of the reference passed but you need to remember that you can only pass a single mutable reference or multiple immutable references.</p><h3>Where are my Classes🤯?</h3><p>Yup, that was my reaction when I learnt that there are no classes in Rust. Although Rust supports high levels of abstraction but that does not imply that it has the concept of classes builtin<em>(it used to but now it does not)</em>, but honestly after diving in a little deeper I realized that we don’t need them here, because we already have <strong><em>structs</em></strong> and <strong><em>traits </em></strong>to solve all our problems.</p><h4>Structs</h4><p>Structs in rust are of three types:</p><ol><li>Named Structs <em>(Standard C-type structs)</em></li><li>Tuple Structs <em>(struct Point(i32, i32, i32);)</em></li><li>Unit Structs <em>(struct Test;)</em></li></ol><p>For Eg:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f2e762b9f9add208520756627e8ea87/href">https://medium.com/media/6f2e762b9f9add208520756627e8ea87/href</a></iframe><p>Out of this we usually use the first two. Structs can be used to create user defined data types containing multiple primitive data types. This compensates for storing our data members/object properties as we do in a class but what about the member methods😕?</p><p>For that we have <strong><em>Traits</em></strong>.</p><h4>Traits</h4><p>Traits are used to define a functionality that can be shared by multiple types.We can define a specific function and that function always takes a reference to the type associated. Lets take a look at an example to understand traits better:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c8127ad4cfa578e38741a0df37e467c/href">https://medium.com/media/1c8127ad4cfa578e38741a0df37e467c/href</a></iframe><p>We can easily define a trait using the <strong><em>trait</em></strong> keyword.</p><p>As you can see we use the <strong><em>impl </em></strong><em>(which stands for implement)</em> keyword to associate a trait with a User Defined Data Type.</p><blockquote><strong>Note: </strong>The <strong><em>for</em></strong> keyword used here has a different functionality from the one we use in a for loop, although the keyword remains the same.</blockquote><h3>Conclusion</h3><p>Well these were some of the things that I learnt while I was learning the basics of Rust. If you notice any discrepancy in the data mentioned above feel free to point them out in the comment section.</p><p>To conclude, I would only say that Rust is an amazing programming language and even if you won’t use it in your job it would be an amazing experience to learn such a beautiful approach to writing programs.</p><p>Do checkout the official <a href="https://doc.rust-lang.org/book/"><em>Rust-Lang Book</em></a>. You can also checkout my <a href="https://github.com/destrex271/rustLang"><em>Github</em></a><em> </em>repository which contains a set of basic Rust programs, some of which have been used as examples in this Blogpost.</p><p>More articles regarding Rust and other fun pieces of Technology will be coming up soon, <strong>so stay tuned!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53b6505530a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/rust-a-blazingly-fast-experience-53b6505530a4">Rust — A Blazingly Fast Experience</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Test and Improve Your REST API’s with Pytest]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/test-and-improve-your-rest-apis-with-pytest-3f873dbb6866?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f873dbb6866</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[pytest]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Akshat Jaimini]]></dc:creator>
            <pubDate>Mon, 11 Jul 2022 12:23:18 GMT</pubDate>
            <atom:updated>2022-07-11T12:23:18.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6DiKaTQOssbhimr6fJZbWw.jpeg" /></figure><blockquote><strong>“Tests are stories we tell the next generation of programmers on a project.”</strong></blockquote><p>Unit Testing is an integral part of Software Development. If your code isn’t tested properly, it might fail in production at the most critical times. All these problems that might arise in the future can be averted by following the Test driven approach to Software Development.</p><p>Today we are going to see how to use Pytest to write unit tests for your Django API’s built using the Django Rest Framework.</p><h3>Setting Up Your Django Project</h3><p>First of all install the following packages with pip</p><pre>pip install django djangorestframework pytest pytest-django factory_boy pytest_factoryboy</pre><p>This installs all the required modules to create our django application and setup the unit tests. You can clone <a href="https://github.com/destrex271/Drf_API">this repository</a> to setup this basic django project if you are following this article just to learn about this process else just look at the code in this repository to get an idea on how to integrate these unit tests.</p><h3>What is Pytest?</h3><p>The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. It is one of the most used frameworks out there in python to write unit tests and it is also really easy to use.</p><h4>Setting Up Pytest Configuration</h4><p>First of all create the <em>pytest.ini </em>file in the root directory of you django project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*GPaX23i-p_BQBT8yMC1vtA.png" /></figure><p>And add the following contents to the file:</p><pre>[pytest]</pre><pre>DJANGO_SETTINGS_MODULE = &quot;yourprojectname&quot;.settings</pre><pre>python_files = test.py test_*.py *_tests.py tests.py</pre><p>Here the <em>python_files</em> attribute gives the possible files with the following filenames that might contain the unit test functions.</p><h3>Setup Your Tests</h3><p>In this demo application we are using a single model named <em>Song.</em></p><pre>from django.db import models<br><br># Create your models here.<br><br>class Song(models.Model):<br><br>    title = models.TextField(blank=False)<br>    artist = models.TextField(blank=False, default=&quot;unknown&quot;)<br>    lyrics = models.TextField(blank=False, default=&quot;Unavailable&quot;)<br>    file_location = models.SlugField(blank=False,default=&quot;none&quot;)<br><br>    def __str__(self) -&gt; str:<br>        return (&quot;Title : &quot; + str(self.title) + &quot; Artist: &quot; + str(self.artist))</pre><p>First of all we will setup a Factory Module for this model so that we can test our API’s with automatically generated dummy data without manually providing it.</p><p>To proceed we first need to organize our tests and all the configuration files associated with them in a tests folder inside our app but before that do delete the tests.py file provided by default.</p><p>Arrange your directory structure as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8_4LZCQ3jMGBNlcBt0CvA.png" /><figcaption>Directory Structure For Tests</figcaption></figure><p>Lets setup our Model Factories.</p><h4>Setting Up the Model Factory for our Songs Model</h4><p>To conduct unit tests we cannot use the production database, so instead we create a mock database to run our tests against. The general way for that would be to create a function that would manually add some mock data to our database. That is really easy if your codebase is really small but for large codebases we need to keep everything organised and isolated as much as possible(<a href="https://docs.djangoproject.com/en/4.0/misc/design-philosophies/"><em>Loosely Coupled</em></a>) to prevent any unnecessary problems in our tests.</p><p>Therefore we utilize <a href="https://factoryboy.readthedocs.io/en/stable/orms.html"><em>Model Factories</em></a><em> </em>to create mock data for our test database. We use <a href="https://factoryboy.readthedocs.io/en/stable/introduction.html"><em>factory_boy</em></a> and <a href="https://readthedocs.org/projects/pytest-factoryboy/"><em>pytest_factoryboy</em></a> libraries for this.</p><p>Add the following content to your <em>factories.py </em>:</p><pre>import factory<br>from api.models import Song<br><br>class SongFactory(factory.django.DjangoModelFactory):<br>    class Meta:<br>        model = Song<br>    <br>    title = factory.Faker(&quot;sentence&quot;)<br>    artist = factory.Faker(&quot;name&quot;)<br>    lyrics = factory.Faker(&quot;text&quot;)<br>    file_location = factory.Faker(&quot;slug&quot;)</pre><p>This factory class allows us to define the behaviour of our Model Factory and we can later use it to create our mock data. We use the conftest.py file for that. The objects of this class can utilize the <em>create() </em>function to generate a single mock instance or the <em>create_batch(n)</em> function (where n is a positive integer) to generate “n” mock instances. In that case we will by default receive an instance of our Model Factory in the format of “model_factory” and we can use it as “model_factory.create_batch(10)”. To register our model factory we add the following to our <em>conftest.py </em>:</p><pre>from pytest_factoryboy import register<br>from .factories import SongFactory<br><br># Register Approach<br><br>register(SongFactory)</pre><p>Although this feature was made to remove fixtures but I like to use both of them as a combination and therefore add the following to your conftest.py instead:</p><pre>from .factories import StudentFactory<br>import pytest</pre><pre>@pytest.fixture<br>def students():<br>    return StudentFactory.create_batch(10)</pre><p>Now lets Finally write our tests!</p><h3>Writing Our Unit Tests</h3><p>Now we are going to utilize the true power of pytest.</p><p>First of all since we need to call our API’s we need to have some sort of a way to access there url routes. For that we use the APIClient class provided by the Django Rest Framework.</p><p>Lets import it and instantiate it in our file:</p><pre>from rest_framework.test import APIClient</pre><pre>import pytest</pre><pre>client = APIClient()</pre><p>Now lets create our unit test function as follows, here we will simulate a simple get request and check if the API returns a response with the status code 200.</p><pre>@pytest.mark.django_db<br>def test_get_song(songs):<br>    response = client.get(&#39;/songs&#39;)<br>    assert response.status_code == 200</pre><p>Here the decorator <em>‘pytest.mark.django_db’</em> is used to allow our test function to interact with the database. We use the ‘get’ function of client object to send a request to the API. Notice that we passed a parameter ‘songs’ to our function. This is the same fixture function defined in the conftest.py which will populate the test database with 10 instances of songs generated by our SongFactory object.</p><p>You can design more intricate tests that even check the validity of the data received, or by sending some wrong parameters along with your request just to validate the behavior of your API.</p><p>Just remember that your unit tests are to study and then define the behavior of your API under various conditions, so most of the edge cases must be targeted.</p><p>Now run the command:</p><pre>pytest -s</pre><p>In your terminal from the root library and it will execute all the tests that you have designed, in our case only a single test will be executed.</p><p>The -s parameter is just to allow your print statements to write to the console, if you want that, else you can just run pytest.</p><p>You can write more tests, even for post requests. A demo for that would go as follows:</p><pre>@pytest.mark.django_db<br>def test_post_song():<br>    payload = {<br>       &quot;name&quot;: &quot;Faded&quot;,<br>       &quot;artist&quot;: &quot;Alan Walker&quot;,<br>       &quot;file_location&quot;: &quot;<a href="https://www.youtube.com/watch?v=60ItHLz5WEA">https://www.youtube.com/watch?v=60ItHLz5WEA</a>&quot;<br>    }<br>    response = client.post(&#39;/songs/create&#39;, payload, format=&#39;json&#39;)<br>    assert response.status_code == 201</pre><p>This adds a song to our test database and we can check the validity by checking the status code. You can also check if the data returned in the response is same as that in the payload, this will allow you to check whether your API is storing the data sent to it properly. The format attribute specifies that the data being sent is in json format.</p><p>The same procedure can be followed for PUT and DELETE requests.</p><p>Well with this we end a basic introduction to unit testing in Django with pytest.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f873dbb6866" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/test-and-improve-your-rest-apis-with-pytest-3f873dbb6866">Test and Improve Your REST API’s with Pytest</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerization and using Docker]]></title>
            <link>https://medium.com/developer-student-clubs-tiet/containerization-and-using-docker-e75b9e67d3fd?source=rss----c488dd24ad11---4</link>
            <guid isPermaLink="false">https://medium.com/p/e75b9e67d3fd</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Utkarsh Tripathi]]></dc:creator>
            <pubDate>Mon, 11 Jul 2022 12:14:43 GMT</pubDate>
            <atom:updated>2022-07-11T12:14:43.059Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*7Y-MmRuW4e9XDEUAtjrrYw.png" /><figcaption><a href="https://www.docker.com/company/newsroom/media-resources/">Docker Logo</a></figcaption></figure><h4>Creating our own container with Docker</h4><p><strong>Containerization </strong>has become a major trend in software development. It involves packaging all the software code, its dependencies, and the runtime environment in a single box known as a container. Now, the container is platform-agnostic, which means it can be run on any OS distribution and infrastructure without changing the software&#39;s configuration.</p><blockquote>But wait, what is the need for containerization?</blockquote><p>The typical answer you may have heard of is the dilemma of “It runs on my machine ”. Many a time when developing software, developers use tools and dependencies according to their systems and there is no problem with that as long as the software runs perfectly fine, right? Yes and no, if someone else is running that software on a similar machine, it will work perfectly fine but if someone is using a different setup, it is not necessary that the program behaves in the same way, for example, software developed on Windows may not properly run on Linux or macOS as they have different underlying architecture. This problem is more pronounced in bigger codebases having hundreds of dependencies. Containerization eliminates this problem by encapsulating all the code and its configurations into a single package of software. It is a <strong>portable</strong>, <strong>lightweight </strong>and <strong>standalone </strong>piece of software that can be run on any host which has the container engine (like Docker).</p><h4>Virtual Machines vs. Containers</h4><p>Firstly, let us talk about <strong>Virtual Machines(VMs)</strong> and running our application in them. It runs on top of an emulating software called the hypervisor. It manages the sharing of resources between multiple VMs on the system. Virtual machines utilize all resources (hardware and software) of a system like CPU, RAM, Disk, and Networking and run software over a guest OS to run our software. They are slow and not much portable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kEs808dw_nFHhLt1G3ophw.png" /><figcaption>VMvsContainer (credits- <a href="https://www.atlassian.com/microservices/cloud-computing/containers-vs-vms#:~:text=The%20key%20differentiator%20between%20containers,above%20the%20operating%20system%20level.">Atlassian</a>)</figcaption></figure><p><strong>Containers </strong>on other hand, virtualize only the operating system and use the software resources of the system. All containers run on top of a container engine (like Docker) and utilize a single OS. They require very less memory and computation power and are much more portable and lightweight.</p><blockquote>It takes much less time to spin up a container than start a virtual machine.</blockquote><h4>Container Engine — Docker</h4><p>A container engine is a piece of software that is used to encapsulate all the software into a box called the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sHSx_qBD5MILKP66VcMXag.jpeg" /><figcaption><a href="https://www.datadoghq.com/knowledge-center/containerized-applications/#:~:text=The%20purpose%20of%20containerization%20is,the%20underlying%20hosts%20at%20all.">credits</a></figcaption></figure><p>Docker was launched in 2013 that jumped started the container revolution. It is a platform-as-a-service(PaaS) organization. It is the most popular engine that is used to create images and containers. It provides many more features like sharing the images, managing them, and pushing them to a public registry to share your application.</p><p>Other container engines are <a href="https://podman.io/">podman</a>, <a href="https://linuxcontainers.org/lxd/introduction/">lxd</a>, <a href="https://containerd.io/">containerd</a>, etc.</p><h4>Installing Docker on your Machine</h4><p>To install Docker on Windows, you have to first enable WSL2 (Windows Subsystem for Linux)(only for windows users) on your system.</p><p>For Windows 11 users run (Open the terminal with admin access):</p><pre>wsl --install</pre><p>For users with an older system or who want to manually enable it, run (with admin access):</p><pre>Enable-WindowsOptionalFeature -Online -FeatureName &#39;Microsoft-Windows-Subsystem-Linux&#39; -All -NoRestart</pre><p>Now, head to <a href="https://docs.docker.com/engine/install/">Docker’s Website</a> and install the software according to your system(<a href="https://docs.docker.com/engine/install/ubuntu/">Linux</a>, <a href="https://docs.docker.com/desktop/mac/install/">Mac</a>). The GUI and the CLI both will be installed in your system. Now run docker version to check if it is properly installed or not.</p><h4>Hello World with Docker</h4><p>Let’s start with the traditions and run hello world on docker.</p><pre>docker run hello-world</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lYXx4XcmPTj8iouX3Aqc0g.png" /><figcaption>Hello World image in docker</figcaption></figure><p>Behind the scenes, when we run this command, it is pulling the hello-world image (the container containing all the files and configurations) from the <a href="https://hub.docker.com/search?q=">docker hub</a>, and runs it. The docker run command will pull an image if it doesn&#39;t exist on our system or run the image if it exists. Only to pull an image from the registry, we can run docker pull hello-world .</p><h4>Basic Docker Commands</h4><p>To see all the images we have in our system, we can go to the docker desktop app or simply use the CLI commanddocker images .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WintA31ONI0FINuNn1PB9Q.png" /><figcaption>Seeing all existing images in docker</figcaption></figure><p>To see all the running containers, you can go to docker desktop or simply run docker ps to list all running containers, to view stopped all containers run docker ps -a .</p><p>Let us try another example and install Ubuntu on a container rather than installing the full operating system. It is the easiest way to use the Linux terminal and make applications on top of Ubuntu. To run the container:</p><pre>docker run -it ubuntu</pre><p>This will pull the image and start the container. With the <strong>-it</strong> flag, it will run the image in interactive mode and the Linux terminal will open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*o-KuJ9cpTst07uPRZ6M37w.png" /><figcaption>Running a basic command in the Linux terminal</figcaption></figure><p>You can see this stopped container with docker ps -a and run it again with docker run -it ubuntu .</p><p>To remove a container, copy the container id and run:</p><pre>docker rm &lt;container-id&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8KbcUdG5Uwe_rrBKKKElFA.png" /></figure><p>Similarly, you can remove the images using docker rmi &lt;image-id&gt;. You must remove any running/stopped containers before removing the image.</p><p>To see all docker commands, visit <a href="https://docs.docker.com/engine/reference/commandline/docker/">this website</a>.</p><h4>Let&#39;s create an image of an application</h4><p>Lastly, let&#39;s create a simple node API and containerize it.</p><p>We will create a simple node and express server to return some data and then create an image of the application. Create a new directory and initialize it with npm init -y (You should have Node.js installed in your system). Now install express and cors in this application.</p><pre>npm install express cors</pre><p>Create the index.js file and create a basic server or copy the below code</p><pre>const express = require(&quot;express&quot;)<br>const cors = require(&quot;cors&quot;)<br>const app = express()</pre><pre>app.use(cors())<br>app.use(express.json())</pre><pre>app.get(&quot;/hello&quot;,(req,res)=&gt;{<br>    res.status(200).json({message:&quot;Hello World&quot;})<br>})</pre><pre>app.listen(4000,()=&gt;console.log(&quot;Listening on 4000&quot;))</pre><p>Run this app by executing node index.js .On visiting localhost:4000/hello will give a JSON response {message:&quot;Hello World&quot;} .</p><p>Now to create the image, create a Dockerfile in the root directory of the project. The file name is Dockerfile without any extension.</p><pre>FROM node:18-alpine</pre><pre>WORKDIR /app</pre><pre>COPY package.json .</pre><pre>COPY package-lock.json .</pre><pre>RUN npm install</pre><pre>COPY . .</pre><pre>EXPOSE 4000</pre><pre>CMD [&quot;node&quot;, &quot;index.js&quot;]</pre><p>This is the Dockerfile to create an image of our application. Let us break it down and understand what is happening. This file only takes the commands to create an image.</p><ul><li>In the first line, FROM node:18-alpine we specify the <strong>parent image </strong>or the build environment which we want to use, since it’s a node application, we are using the node image with its 18 version in Alpine Linux Distribution, we can also specify the latest version like this node:latest .</li><li>In the next line, we are specifying the working directory for the code, we can use the root directory but it can sometimes cause conflict so we will mention /app which will create the app directory for us and all further commands will be <strong>relative to this directory</strong>.</li><li>Next, we copy the package.json and package-lock.json to the app directory. Note we are using a . at the end, since all our commands are now relative to /app directory and we want to copy these files in root.</li><li>We are running npm install with RUN command, to install all packages in the directory of the image during its creation.</li><li>Now we copy all the files from the root directory of our system to the app directory of the image. At this point, we create a .dockerignore file in our root directory of the project and add node_modules to it, to prevent copying of the folder in our image. This file is similar to .gitignore</li><li>Next, we expose port 4000 from our image to access the API, since remember, our node application is listening on port 4000. We are exposing this port since the containers run in isolation and we cannot directly access their ports.</li><li>Next, we provide the run command using CMD in the array, these are the space-separated commands. Notice we are using CMD instead of RUN because RUN is used to run commands when the image is being created while CMD commands are executed when we are starting a container.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OhC44OdNqui1DCMsbNxRsA.png" /><figcaption>Directory Structure</figcaption></figure><p>Now to build the image, we run the following command</p><pre>docker build -t &lt;image-tag-name&gt; .</pre><p>This command takes the image tag, which is later used to reference the image and a . at the end to specify that our Dockerfile is in the root directory.</p><p>To run the image, execute the following command in your terminal:</p><pre>docker run -p 4000:4000 -it &lt;image-tag-name&gt;</pre><p>This command spins up the container on port 4000, -p flag is used to map the port exposed by the container to our system’s TCP port. We can again visit the http://localhost:4000/hello and see the results but this time our app is running inside a container in isolation.</p><p>In this way, we can create images and start containers. We can easily share these containers with our friends and colleagues who can run this image and get the exact same result as ourselves.</p><p>It removes the hassle of cloning the GitHub repository and setting up the environment to see the application, we can speed the application sharing process by containerizing our applications.</p><h4>Parting Words</h4><p>With this, we come to an end of this article where we talked about Containerization and using Docker, basic commands to use with docker CLI, and how to implement the same in our applications using Dockerfiles. It is an important part of software development and scaling of our solutions, and a vital aspect of DevOps.</p><p>Share this article among your friends and stay tuned for more exciting articles. In the next article, I will talk about creating the <strong>docker-compose</strong> file and spinning up <strong>multiple container services</strong> at once, and creating <strong>microservices</strong> with Docker. Until then, follow me on <a href="https://www.linkedin.com/in/utkarsh-tripathi-80a0ab192/">Linkedin </a>and <a href="https://github.com/utkarsh-1905">Github </a>and try creating some images with what you have learned and try learning more from the internet and share them on docker hub and in the comments. Thank you 😊 👋!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e75b9e67d3fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-student-clubs-tiet/containerization-and-using-docker-e75b9e67d3fd">Containerization and using Docker</a> was originally published in <a href="https://medium.com/developer-student-clubs-tiet">Google Developer Student Clubs TIET</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>