 Hello, good evening. So, I will be presenting about Kickstart and as so mentioned, Kickstart is a utility for automatically installing open to without manual intervention in many machines simultaneously. So, basically the motivation as we already mentioned it is to install open to in Linux in multiple machines, which we otherwise have to run around with the CDs or USBs. And we will have to repeat the same set of package installations and configurations for multiple machines like common packages, some Firefox and Chrome Thunderbird. Some applications will be installed on all the machines in the lab flash player or like that. So, we can actually configure this system to install all those applications along with it and then we can install simultaneously. So, for this what we require is a central system which has a DHCP server, a TFTP server and a PASHA server and we need a utility called system conflict kickstart. So, I will tell what each of the servers are required for. So, the procedure is first we have to create the central system. So, for that we need to do the manual job, we will have to give the host name, IP configurations and all like we usually do for a single system. And we have to install the previously mentioned packages which is APASHA and TFTP and the other server packages. And after that we have to create a kickstart configuration file using the system conflict kickstart utility. So, after this we have created a script here, you just have to manipulate the values of certain variables in that script and then if you run that script on the newly installed system then it will actually install all these server packages and it will create the configurations required. So, after this presentation I will run you through the script what it does and from at your end you will have to install an Ubuntu system, run the script with the appropriate variable set. So, this procedure will be done by that script. Now, yeah, so these are the typical variables that we will have to manipulate in that script, the DHCP, least ranges, the certain kickstart configurations and like. And there are certain things in addition to this which we can do along with this that is so in the kickstart configuration file which I will show there is a post installation phase where we can actually specify the post installation common installations and configurations. So, creation of RSA key pair is also a very handy tool you can SSH into machines without having to enter the username and password every time. An NTP server will actually help you to keep all the systems have a same time which is actually required for the puppet utility which will be presented later by Renshith. So, basically this is what we are well what we will be doing after the deployments are really set up. Once the deployments are really set up, connect the new machine into the network, turn it on, press F12 which will boot it into the network and then it will automatically start installation. You can sit back and relax. You do this on as many machines as you want to install and it will do the installation parallelly without any mental intervention. So, now I will show you the demo. So, these are certain references from which I have made the script and you can go into this to enhance the script further and make more features into the script. So, it is fairly detailed documentation in the references into the demo part. So, this utility that we see here is the system config kickstart utility which we can install on the Linux system, the central system and once you start the utility you can actually give in the user options that you will be otherwise asked during the installation. The keyboard layout, the time zone, the installation mode. So, for this installation method you will have to select HTTP and the HTTP server should be the, it should point to the IP of our deployment server that we are creating. We should assign a static IP to the deployment server. The bootloader configuration where you want to install the bootloader, how do you want to partition? So, you can create the partition table for the systems that is going to be automatically deployed and the interconfiguration firewall. So, these are all the questions that you would otherwise be asked if you are installing manually. Now, this post installation script phase is significant. Now, here you can actually specify the scripts and commands that you would run on all the machines commonly. So, say if you want to install flash plugin then you can add apt get install flash plugin installer. So, this will actually ensure that on all the machines after the installation this commands are also done. Now, I will show you the script and I will run you through the script. So, this is what I earlier mentioned. So, usually if we have not configured RSA key pair then you have to give the username and password when you access it to a machine. So, this is script. The initial variables are for assigning an IP to the deployment server and the network that you would be having in the lab, the subnet mask, the broadcast. So, the router IP is the. So, the initial variables, the first part until here, until here is are the variables. Now, the initial variables are all for the network setup and if you have a domain name then you can set the domain name there. Now, the tftp root is a standard location where the boot files are supposed to be kept. You do not have to change it usually and then the dhcp ranges. This is something that you might want to change. If the network is changing then you will have to change this as well according to it. Now, the nodes will be named node 1, node 2, node 3, etcetera. So, if you want some other naming and starting number then you can change this numbers here and then this is the ISO file. So, you have to specify one Linux ISO file here which will be downloaded when you run the script and it will be extracted into the appropriate location so that the deployment server is set up and the kickstart file is the file that you would generate using the previous tool that I showed. You have to save the output of that utility to a location in the server and the path to that stp location you have to put in this file and so this script has to be run as root and then so this part of the script will actually assign static IP for the deployment server itself and then this part will install an open SSH server so that we can access to the deployment server. So, this part will install the tftp server. The tftp server is actually the server which serves the files over network when the other system boots into the network. Now, syslinux is the boot loader which will enable the other systems to boot into the network. DHCP server is the one which assigns IP when the system boots into the network. So, it is actually reverse so when after deployment server is set up when we boot into the network from another machine using F12 it will first go to DHCP server and get an IP and then it will get the boot loader and from the boot loader it will further get into the tftp server it will get the further next files and then it will proceed with the installation and during the installation it will also download the kickstart file which will proceed the installation without any user intervention. So, these are configurations required for the DHCP server you would not have to change anything here usually you will have to set the variables on the top and then these things should do the things on its own. And the web server is installed by the lamb server it will install the apache server which is required to publish the kickstart file and the other installation files. The icon line is another very useful utility that we can use we can turn on the power down machines using the central server when we if we have the MAC address of the systems. Now this part will download the Linux ISO that we specified and it will extract the contents of the CD the ISO file into the appropriate locations and it will also configure it will also add the kickstart file into the options. So, the script is this much only so in your lab what you have to do is you have to first set up a machine using Ubuntu the normal way and then you have to appropriately configure the values in this script and run the script. So, after running the script you can start other machines from the network. So, how that works I will show you using a virtual machine yeah so it is nothing basically since I do not have a physical machine which I can turn on and press F12 I am creating a virtual machine which will boot into the network. So, this machine the installation will happen through the network. So, the option that I specified here is network boot that is how the machine should be installed. And then I am going to the next go as type analysis generic I am giving some RAM and some CPU some storage space. And so the machine so this is as good as an example of connecting a machine into the network and starting it. So, now this is what would happen after you run the deployment server script it will boot into the network and it will. So, now you can see it downloaded the boot loader from the TFTP server and then it will show this option asking whether you want to install or something else. And then this option you can avoid actually this menu you can skip. So, once you enter install it will start the installation. Now onwards you do not have to intervene it will automatically install until the rest and the post whatever is there in the post also will be installed. You can afterwards during the post phase you can actually configure the SSH key pair which will allow you to SSH without having to enter the password. So, this is pretty much how the kickstart works. The script will be uploaded in the moodle which you can use it will be easier for you to use the script. And there are lot of there is lot of room to improve you can use the references to enhance the script especially the automatic node deployment script is very handy it actually detects the new systems and assigns an IP. So, you have kind of more control on the new systems that is going to be installed. Now, I hand over to Ranjith and Neeraj for the puppet demo and presentation. Good evening. So, once as Arun explained once the systems are loaded with the OS the next thing that we need to do is install all the softwares on them so that they can be up and ready for the lab use. So, different labs require different softwares different configurations. So, we can achieve all these through something known as a puppet configuration system. So, in this part we will see how do you exactly do all these things and how do we simplify all these tasks. So, first is puppet configuration management. So, the things that we will cover is what exactly is puppet, how do we set up the puppet master and puppet client, how we exactly manage labs using puppet that is to do all these daily tasks of installing softwares in puppet clients adding users copying files checking file permissions and existences and removing softwares. So, to start with what exactly is puppet? So, puppet is a system which is developed by puppet labs to centralize and standardize configuration and administration of our systems. So, as we can see in the diagram here the puppet we have a puppet master. So, one there is a system which is configured to have the puppet master running on it and all the other hosts that we can see are what are called as the puppet clients. So, in here in IITB we have a puppet.csc.itb.ac.in a puppet master server and all the lab machines that is the new software lab and old software lab machines are the ones which are the puppet clients. So, what does puppet let you do? It lets you perform normal system administration tasks that we just discussed that is adding users installing packages managing the user accounts and all such things on these clients. So, we will start with how. So, here we will give a step by step demo of how we exactly set up the puppet master and then how we set up the puppet clients. So, the puppet master as I said is a single system which administers all these puppet clients and the puppet clients are all your lab machines which need all these softwares to be installed on them. So, we will start with the configuration and setting up of these puppet master and clients. Hi, I am Ranjit Kumar working as a system administrator. So, here we go with the configuration of puppet master and puppet client. I just taken two machines, two virtual machine, one is puppet master and one is puppet client. So, this is puppet master and second one is puppet client. So, first we will and I am using Ubuntu 10.04 for this demonstration. So, here we will start with puppet master. So, first we need to install the puppet and puppet master package in server. So, as it is Ubuntu, we need to use apt-get command to install, apt-get install puppet and puppet master. So, it will last to continuous give us. So, now I am doing all those settings in puppet master. So, now it is installed the main configuration directory for puppet is lastetc puppet. So, in that manifeston directory is there. So, here we need to add one file side dot ppp. So, in that side dot ppp we need to add nodes that is puppet agents. So, as you saw in the diagram there are a lot of puppet agents that is a lab machines. So, right now I am adding this puppet agent, one puppet agent is puppet line dot csc dot ac csc dot itb dot ac dot in. So, this is the syntax to add puppet agents in puppet master. So, after that we need to go to slashetc default puppet. So, in that we need to. So, in that start we have to give yes instead of no. So, while booting the puppet service will start if you give this and after that we need to restart the puppet master service slashetc slash need dot d puppet master restart. So, now puppet client is added in this master. So, now we will switch to puppet client. So, here we need to install only puppet and then that main configuration directory slashetc puppet. So, in that you need to create one file puppet dot conf. So, I have already template in my home directory I am just copying that puppet dot conf to this directory. So, in that puppet dot conf you need to give server IP. So, that is our server is puppet iphone master dot csc dot itb dot ac dot in. So, after this like I said in default puppet we have to give yes to start puppet service in the boot time and here I am restarting puppet service. So, now the configuration in client set is over. So, now we have to I mean from the client set we have to send request to puppet master for the certificate. So, after the certificate only this puppet client and master able to communicate with each other. So, for sending that request this is the command to send the request puppet d iphone iphone server that server IP or hostname iphone iphone test. So, now the request is went to server. So, in the server we need to check whether any request is came or not by puppet cia iphone iphone list. So, it shows puppet iphone client dot csc is sending request. So, from here we need to sign that certificate by using this command puppet cia iphone iphone sign puppet iphone client dot csc dot in. So, after this now both puppet master and client will able to communicate each other. So, now what exactly is this puppet thing. So, what so, while communicating while having the communication between the puppet master and the puppet client. So, what exactly happens is both need to verify that the puppet clients needs to verify that it is talking to the correct puppet master and the master needs to verify that it is the proper client. So, generally this thing is done by a certification authority. So, but in order to manage the certificates for all these different clients. So, supposing your lab you have around 200 machines or something like that. So, then it will be very difficult to get certificates for externally sign certificates for all these machines. So, what puppet does is by default the puppet master is configured to have a puppet certification authority. So, by default it has its own certification authority and it issues and signs certificates. So, every client by default contacts the puppet master for a puppet certificate which the puppet certificate master then sees in its list and then it signs as was explained. So, then once this is done the client and the master are now free to communicate for future purposes. So, now this puppet master and client environment is set up I mean. So, we have I mean so from here if you want to install any software in the client machine you just update the software list in puppet master then the puppet client will communicate to master and it installs by using the puppet. So, for updating actually there is one file site.ppp so this site. So, here are the list of software for this dbms or shop. So, open jdk iphone 6 jdk postgres sql pgadmin 3 and vim editor. So, I mean so this will install so this is the format. So, this we need to add in the server and for checking the service whether it is running or not there is a service type. So, this is the format for service type and so if you want to add users there is a user type call. So, this is the format for user and you can execute Linux command by using exec type. So, these are the command I am executing wget, wget is used for downloading the softwares. So, here after creating the users this function it will download the softwares and I mean copy to its home directory dbp or shop home directory. So, all these things that is configuration that is ensuring that the packages are installed and executing Linux commands ensuring that a particular user is present. So, all these things can be done using these blocks. So, we need to add all these things in the manifest folder the site.pp file in the manifest folder. So, what this does is so in order to ensure that a particular user is present. So, we just write that ensure present and manage home is true. So, this will set up the home directory for that particular user named as dbp workshop and it will ensure that that particular user is present on that particular machine. So, the next is exec. So, we can execute our own custom commands which are not provided by puppet. So, how we do this that is the format for this is mentioned here. So, we go in the cwd we change we mention what directory we need to be in in order to execute the command then we specify what command we exactly need to execute. So, here there is just a single command that is the wget. So, here we can have a list of commands followed by a semicolon. So, effectively we what we can do is we can write bascripts here and then the path. So, the path is the here it will check since puppet does not have its own place to check where to search for this commands. So, in the so whatever we have mentioned in the path. So, it will check in all these places for all these commands. So, it will check for wget in user slash user slash bin if it does not find here it will check it in slash user slash has been. So, whatever commands we write we need to just specify the path for all these commands. So, where we can expect to find these commands and the next thing is only if. So, only if is we can put restrictions on when to execute these commands and when not to execute these commands. So, here we do the test hyphen test exclamation hyphen e. So, this is if this software dot tar dot gz file is not present in the home slash dbb workshop only then this command will be executed. So, like that we can have our own custom restrictions on depending on the situation on when we want these things to be executed and when we do not want them to be executed. So, in the original one we are where we have this package ensure installed. So, here the puppet will just check that the default installation method for that operating system for Ubuntu it is apt-get. So, it will just do apt-get install in order to install this postgres SQL. So, if you want custom installations that is installation from source files and all then we can use this exe blocks and specify the whole installation method here in this commands and that is how we can go about doing installations both custom as well as standard installation methods. And the next thing is to ensure that particular files are present particular directories are present to ensure the file permissions the owners and the group for these files. So, this is how we do it we initially we write the name of the file we ensure that it is a directory or a file then we specify the owner the group and then the file permissions for that particular file. The next is if you want to remove certain softwares which you have already installed. So, we can do is if it is a custom installed software then we can just write it as package we write the name of the package and we just write it as ensure absent. So, for Ubuntu it will do apt-get, apt-get purge remove pgadmin3 if it is not if you do not want to remove it by the standard method we can write our own scripts using the exe block in the same way that we wrote it to ensure that the software was installed. So, next thing is the so, we will just have a demo of how these things go on. So, I have already the site.ppp with me. So, I am just copying this site.ppp to slashetc puppet manifest folder. So, that is the main configuration folder. So, in this site.ppp we added all the softwares to be installed and service to be checked and users to be added and node and here I node added as puppet-client.cac.itb.ac. So, here we will see that initially in the puppet client all these things were not installed. The file was not present and now once we execute this puppet-d hyphen hyphen test all these it will contact the puppet master to check what changes it needs to be what changes are to be done in itself and then it will execute all those commands and get all these files installed by itself. See if you yeah so, we see that pgadmin3 is not installed here and vim is not installed and id dbp workshop dbp dbp. So, this there is no dbp workshop there is no user called as dbp workshop here. So, after running this puppet hyphen hyphen test puppet-d hyphen hyphen test this client will communicate with server and it will install all the packages and it will install create the users and copy that files in users from there. See so, it is it mentions all the changes that it has done. So, what exactly it needs to do from its previous version? It will take some 1 minute to install all those packages and by default this puppet-d hyphen hyphen test run by in every 30 minutes. So, if you want to reduce the time reduce the minutes you want to add it in the puppet.conf file. See if you see the output you can see that postgres SQL is present it is installing on dbp workshop it is created. So, now if you do dbp workshop see the user is the user got created and if you log into the user then you will see the software.tata.gz file and vim also created. So, vim as you know it is test editor used for used in Linux. So, we will go the next. Yeah. So, this is all about how we can use puppet to do our daily tasks. And the next thing is what other things we can what other things we do in the in our Linux system administration. So, the first thing is for in order to do in order to perform this daily task. So, we need to have a basic overview of our basic of our Linux commands and then some idea of bascrypting. So, we will go to our first basic Linux commands. So, persons who are already familiar with this will already be familiar with some of these commands or most of these commands. So, for those who are not familiar with these commands we will just explain of explain what each of these commands do. So, ls it will list all files and directories in the current directory. And there are lot of I mean the. So, each of these commands have lot of options with them. So, we can just use the man page which is mentioned here. So, we will just show one man page. So, we just need to type man and the command name. So, so you will find the detailed. Detailed description of all these commands. So, there are lot of option we can go and read and use it. And next PWD, PWD is used for find the present working directory, current working directory and CD, CD is change directory. So, right now you are in CD I mean slash home is set if you want to go desktop then CD desktop. So, CD can be done using specifying the relative path or using the absolute path. So, this was how we did using the relative path. And then we will do using absolute path. Absolute path. So, then home slash. Home slash. The entire path we can specify. So, this is known as absolute path and touch command is used for creating a file empty file which I am. So, if you see here test file is there. And MKDR is used for creating directories test too. And CAT is used for to view the contents of the file. See I am. So, before that I will edit. So, VA is the test editor. I am just opening VA. So, now we will use CAT, CAT text it will print to the contents. And next CP, CP is the copy command. We need the format is CP and then source, source and destination where you want to copy. So, if you want to copy to desktop and you want to use like this desktop. So, dot specifies the current directory and dot dot specifies the parent directory. And next move, move test to test 3. So, move also rename. So, it is used for rename also. And grep command is used for searching certain patterns in the file. So, I am just searching hello in text test file. See because we mentioned capital H. So, if you want to ignore the case sensitive, you want to use hyphen i. And find, find command is used to find a specific file. Files in there. In certain directories. Time is over. So, I am just go through very fast. So, locate also used for searching the files in entire root directory. And the user add is used for just go to slide. So, user add is used for creating the users and user mod is used for modifying any settings for the users. And user del it is used for deleting the users. And by ps top kill you can find the process id and kill the process. And man command as we said earlier it is used for find the description of the command. And also you can use ls like command hyphen hyphen help. It also does the same thing. And then we have SSH and scp. So, SSH is used for remote login and scp for copying files on all these remote machines. So, you can copy from a particular directory from a particular machine to other remote machines or copy from other remote machines to your particular machine using scp. So, the next thing is use of base scripting. So, prior to the use of puppet, we used to manage all our daily tasks like whatever we mentioned before that is creation of users, ensuring installation of softwares on all these machines using base scripts. So, now what we use them for is to manage lab exams. So, how do we do that? So, what all can be done? So, basically you can accomplish everything using base. So, as you get more and more familiar with that you will learn how to do certain tasks. So, what we do here is, so during lab exams we use them for disabling for first we disable the internet and land on all the lab machines on where the students are seated. Then we enable the local logins which are given to all the students at the start and we disable them at the end of the exam so that all the students are logged out at the same time. The next is copying the question papers on the desktop for all these students and all the relevant data like some professors would want the students to have certain data available for their exams. So, all these can be accomplished using base scripts. At the end of the exam we can retrieve the students answers and then we can send them to the TS and the professors for checking those answers. And then we enable the internet and land disabled on all these machines after the exams are over. So, we will have some script. So, we will just show some sample scripts with which we did which we do all these things. So, these are the sample scripts. So, first disable the entire network. So, this is the simple batch script. So, these are the some IP tables command to to block certain port number. So, you can see this it is blocking 5022 and it is blocking 22 port number 22 port number is for SSH like that you can block any port number. And next one is enable login. So, that is unlock login. So, password iPhone U command is used for unlock the logins. And next is the after that is the name of the account that we want to unlock. So, this is the script for locking the user's account. That is logging them out after the exams are over. Put data. So, during the exams that students need some data for reference and the question papers. So, we need to put by all these things or we are creating one script and this script will do all those things. And last is enable the network. So, after the examination is over we so, we need to enable the network. So, by using this IP tables iPhone F. We just flush all the rules we written earlier. So, the next thing is we can also find out problems. So, log files are very good keep a track of all the problems that are phase keep a track of all the things that happen when particular processes execute. So, almost all processes have their own log file. So, we can use the said or can all combining them with this powerful regular expressions to actually find out problems in all the in whatever problems we face. So, suppose that a mail server goes down due to a large number of processes being executed. So, we can we can just find them out if we use them. So, the next thing is some good tutorials with which to get started. So, for puppet we have this puppet lab. So, the puppet labs is the thing which found which created this puppet. So, they have a very good documentation of how to start how to get started how to set up. So, all these things that we explained are mentioned in much detail on in these docs. Next thing is puppet cookbook. So, this also mentions a very good way if you don't want to get into the nitty gritty of why exactly things work and just you want to get started then this is a good tutorial for that. Then puppet errors explain gives a good idea of why certain errors are faced during puppet installation. So, in case you face them you can just refer them. So, it has a fact of all the commonly faced puppet errors. Then this is the next link this link is for getting started with some Linux commands and this all these are for learning the bash. So, I think that is that is it. Is it possible for us to use this for dual boot windows as well as the Linux? Currently the scripts are such a way that it will install Linux only because the kickstart configuration will require the hard disk to be formatted since the partition also has to be done automatically. So, currently dual boot is not supported by the script. Okay sir. So, one thing if we manually do the partition and then specify that in the script and do it is it possible? Actually, if the kickstart is used then the hard disk partition table has to be modified that is how the kickstart method works. So, I do not know if there is any way in which we can override this. I will check and I will have to check. 1, 1, 2, 5. Can I follow these same instructions for Fedora operating system? A puppet can be configured once the system is up you can configure puppet. So, the puppet does not mention. So, even when you saw that ensuring packages are installed and all you saw that it just states ensure installed. So, I said that the puppets if your labs have Fedora running on them. So, it just checks what is the default installation method for those packages. So, for Fedora it is yum install. So, it will just find yum. It will just do yum install and install those things. So, you can very much accomplish them on Fedora systems as well. But the kickstart scripts are currently created for open to installation. So, it uses apt-get for installing the servers. So, it might not be usable out of the box for Fedora. Some package names and the commands might vary. But yeah, it is doable. It should not be significantly different. I am asking this question is sir. Jintu Hydrowed is followed some online examinations by using post-degree SQL. So, at that moment they used post-degree SQL and Java. Same procedure can I today you showed Ubuntu. So, can I follow the same procedure for Fedora for conducting online examinations in my college. Yes, online examinations sir. One server you showed. For conducting online examination that's actually after installing the Linux and installing the softwares. So, it should work pretty much the same way in Fedora and Ubuntu or whichever OS you are using. See, conducting online examinations you are using some applications. So, if you are installing that application properly using puppet and the base OS is if the base OS is also properly installed then it doesn't matter which OS which scripts we use to install and set it up. So, how to write the user login script that is to display the when you enter into the system that has to display the welcome like welcome details username like this we need to write we want to write a user login script how we can write it sir. There is one file in slash CTC MOTD that is message of the day. So, you can add whatever that user needs message. So, you can add welcome that username that file. Just try with that MOTD file. What is the stable version of Ubuntu? Currently it's 13.04 that has been released this April but the 12.04 is the LTS that is a long term support for. So, 13.04 does not have long term support which means they have support for it only for two years. So, after two years they won't support this system. So, if you use 12.04 which was released in April 2012 you will get support up to April 2016 I guess. So, they have for LTS they have support of four years and for non LTS systems they have support of two years. Sir, what is the minimum hardware requirement to install Ubuntu? That depends on which version you are using for 12.04 I guess 512 MB of RAM and less than 10 GB of hard disk space less than 10 GB I guess less than 10 GB of hard disk space. One, two, three, six. Can we configure this puppet software in Windows? I guess we can but we will check and let you know. Yeah, puppet is can be configured on Windows as well but here since we have only Linux machines here. So, we did it on Linux machine. So, but yes you can check docs.puppetlabs.com. So, there they have procedures for doing it. Okay, thank you sir. Yeah, 1252. Sir, while doing network process, so the two services kickstart and the puppet servers both are required or any one is required? For installation of operating system you need kickstart and after that for managing like installing softwares like other things you need puppet. So, for day-to-day activities like installing softwares and all puppets is needed and for the initial installation of the operating system kickstart is needed. Yeah, one two double one. Sir, during the installation of puppet, how do you find the repository packages sir? During the installation of puppet, how to find the repository packages? Is that your question? Actually by default it will, that repository it is Ubuntu site. So, it will install, it will download and install the package from Ubuntu repository. So, if you want to change like you can create your own repository for your college and you change the IP in slash CTC, APT and slash sources.list file. Then you will get installed by your own repository. Okay, thanks. Okay, thank you.