<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Debug School: tanujit</title>
    <description>The latest articles on Debug School by tanujit (@tanujitd).</description>
    <link>https://www.debug.school/tanujitd</link>
    <image>
      <url>https://www.debug.school/images/g1JGVvrhR7ktz8h75ISgic36Oo0TyQZXeuAU1Mnu9xQ/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvdXNl/ci9wcm9maWxlX2lt/YWdlLzIzMS8zYzVm/MDEwMC02M2JjLTQx/NmMtOGMzNS0wZjUw/NzI5NGQyYTIucG5n</url>
      <title>Debug School: tanujit</title>
      <link>https://www.debug.school/tanujitd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/tanujitd"/>
    <language>en</language>
    <item>
      <title>Chef Assigment 1</title>
      <dc:creator>tanujit</dc:creator>
      <pubDate>Tue, 22 Nov 2022 05:39:00 +0000</pubDate>
      <link>https://www.debug.school/tanujitd/chef-assigment-1-62f</link>
      <guid>https://www.debug.school/tanujitd/chef-assigment-1-62f</guid>
      <description>&lt;p&gt;Write a recipe to create a file which should be owned by group called “root”, user “ec2-user” and permission executable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user    'ec2-user'      do
        comment 'New User'
end

file 'randomfile' do
        group   'root'
        user    'ec2-user'
        mode    '0770'
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a recipe to updates the access (atime) and file modification (mtime) times for a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file    'amtime'        do
        action  :touch
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a recipe to download the java tar ball, extract it under /opt/ and set JAVA_HOME using bash resources. Note – &lt;a href="https://jdk.java.net/archive/"&gt;https://jdk.java.net/archive/&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash    'Execute'       do
        user    'root'
        code    &amp;lt;&amp;lt;-EOF
                wget https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz
                tar -xf openjdk-19_linux-x64_bin.tar.gz -C /opt/
                export  JAVA_HOME="/usr/bin"
                export  PATH=$JAVA_HOME/bin:$PATH
                source  /etc/profile
                EOF
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to execute one sample bash script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash    "Execute"       do
        user    "root"
        code    &amp;lt;&amp;lt;-EOF
                ll -a
                EOF
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to Create a directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;directory       'new_dir'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to install git.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package 'git'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to clone git repo &lt;a href="https://github.com/scmgalaxy/chef-repo"&gt;https://github.com/scmgalaxy/chef-repo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package 'git'
git     '/home/centos/chef/'    do
        repository      "https://github.com/scmgalaxy/chef-repo.git"
        revision        'master'
        action  :sync
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to create group and use in linux.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;group   "devops"

user    "new_user"      do
        group   "devops"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to Download a file from a URL. Note – &lt;a href="https://raw.githubusercontent.com/scmgalaxy/chef-repo/master/README.md"&gt;https://raw.githubusercontent.com/scmgalaxy/chef-repo/master/README.md&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;directory       "downloads"
remote_file     "downloads/README.md"   do
        source  "https://raw.githubusercontent.com/scmgalaxy/chef-repo/master/README.md"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to create a new user and password in the Nodes automatically?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user    'new_user'      do
        comment 'New user'
        shell   '/bin/bash'
        password        '$1324'
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a chef recipe to add= a message to a log file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;log     'message'       do
        message 'Adding message to the log'
        level   :info
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
