Showing posts with label Christopher Gallo. Show all posts
Showing posts with label Christopher Gallo. Show all posts
/etc/dnsmasq.conf - Had to enable TFTP and reset the TFTP root folder option to /tftpboot/netboot which is already symbolically linked to the Apache served files in /var/www/html/pub. I have ensured that all of the necessary files for the Kickstart have been placed into this folder, and I have edited several files to ensure they all now point to the /tftpboot/netboot/ folder. This was done in an attempt to simplify the process and make it more understandable.

In the /etc/dnsmasq I had to enable the built in tftp server in DNSMASQ, which had not been enabled. I believe this is only needed if you're using the 'integrated' tftp server that is a part of DHCP, but it did not help. The default TFTP server had been enabled, but cannot be started independently as a service, as xinetd.d handles what inetd used to. I attempted to tftp into this server from a near by machine, and noticed I was faced with nothing but timeouts or route to host errors (most of the time). I can only seem to get files consistently across localhost (127.0.0.1, and yes, you need to use 127.0.0.1 as using localhost will likely require a –noipv6 flag should it have one. Additionally, the folder that was set as the root directory for tftp files has also been set to /tftpboot/netboot in order to make things simpler.

The last time I made a post I remember I had come across a root-path "file/location/here" for the DHCP server, which has also been set to /tftpboot/netboot. There are now 2 copies of the Oracle Linux 7 ISO. One is live mounted at bootup via /etc/fstab/ and is mounted in /tftpboot/netboot/OL7/ as well as there being a full, unmounted ISO in /tftpboot/netboot/OL7.iso I noticed that 'ftp' paths should be avoided, and either NFS, or HTTP should be used in the Kickstart file, as it wouldn't actually pull the files needed. I changed anything that was pointed to an 'ftp' server in the ks.cfg, the /tftpboot/pxelinux.cfg/default.

I took a look at the Kickstart file and passed it through a KS file validator by running the command, "ksvalidator /tftpboot/netboot/ks.cfg -e -i" to show me all of the possible errors, or files that are improperly pointed too within the setup. I was shown that one of the command flags I believed I initially needed "--nobase" was no longer needed, and in fact deprecated in an older version, which the terminal suggested could have been the cause of my error. After removing the imrproper syntax, it appears as though I got no output from running KSValidator.

While not directly news, I have been able to get the Blue KS install selection screen to pop-up occasionally (the screen from which KS installs normally occur), but it still seems incredibly sporadic. I'm wondering if this will require reducing the DHCP size, and possible finding some way for the Kickstart to know how to differentiate between our DHCP servers, and the ones used for kickstart. Sometimes the PXE boot will say there are no TFTP files in 149.61.33.10, which is one of the DNS servers. Other times, it will appear to load, and get about as far as it used to, but now it shows the root-path as /tftpboot/ as that is where the pxelinux files are containing the menu, and memdisk. It still occasionally freezes after setting up the ethernet adapter, but further googling has brought me to an interesting conclusion.

Another user mentioned that if you use the text install via kickstart, if there appear to be any incorrect settings related to partition(s), sizing, or file systems, then Anaconda will fail to work through the Kickstart configuration file as intended, and give us behavior similar to what we see: the KS process halting. I would like to believe that the KS tester (ksvalidator) would have given me errors, or verbose output stating that there other sources of error, however, at this point, I'm not even sure how well those tools work. I have also changed the adapter from 'em0' to 'eth0' in each file, and restarted services to see if it would help the installation work properly, but that did not help. Online I discovered there is essentially an "auto" option called "link". Typically, the kernel will simply work with the first device that is linked to a network, and it should still use DHCP and IPv4 settings set via the KS file. I forcefully added a --noipv6 line to the Kickstart configuration to rule out the possibility that was causing issues.

After toying with the majority of these configurations, I have uploaded a forum post to the Oracle forums (with a link to the majority of the configuration files minus the IP’s in the dhcpd config) to see if someone else with more Kickstart experience can help us out. I have a hunch that it may be a result of an improperly pointed .iso, .cfg file, or possibly improperly partitioned. The post can be located here: https://community.oracle.com/message/13198962#13198962

Just out of curiousity, I decided to check /root/anaconda-ks.cfg (the file that gets auto-created upon default Oracle Linux 7 install to attempt to duplicate your exact installation setup) and attempted simply changing the install source from an ISO to be done over the network. It still looks like the process times out at the same spot, and we know that these partitioning options should work, as they've been in use for some time now on the PXEBoot server. Accidentally forgot to comment out 2 of the additional repositories that the Anaconda-KS.cfg contained. Kickstart is known to stop if it cannot locate a package, the route to the host server, or is given a command which it cannot process. After trying to play with this configuration, I was shown the issue where the KS client connects to the campus's DNS server and fails to find a route to the Server. This leads me to believe that it may be network/dhcp related, so I will make a backup of that config, and see if we can get something out of this.

It seems that by setting the DNS servers to the PXEBoot server (possibly now that DNSMasq is enabled, can't say for sure) but it appears as though we consistently timeout in the same black and white text based screen. I'm wondering if previously it was attempting to check the DNS server, and route back first, but I believe Harris said that most of our hardware utilizes OSPF networking topology to ensure that everything travels through the shortest open path first to reach its destination. Edit: Nevermind, upon rebooting (despite having reset the dhcp service... I'm guessing this is a xinetd related thing) it still works sporadically, so I am reverting back to the old config.

While checking online pxelinux.cfg's, I noticed that the initrd.img and vmlinuz that you grab are LINUX DISTRIBUTION SPECIFIC! Meaning should we get this working for Oracle Linux 7.1 x86-x64, we would need to pull new vmlinuz and initrd files for each other OS or modified install and package those all together in a subdirectory of the tftpboot folder. This should not be an issue, as both files have been obtained from the OL7.1 ISO. 


After doing some further research for the past day or so, I am now faced with one of two choices. I'm either going to need to re-check each configuration file that we have thus far (which have been shoddily cobbled together from mis-matched guides, as per the Linux-industry standard), and make some of the following changes, start on another server, or try to only use the guide I found most recently. I came up with a list of things I would like to try to rule out each service of the server as possible. So far my brainstorming ideas are as follows:

#This edits the DHCP server and should set the ROOT-PATH
#option root-path would clearly need a different path set to your actual root path.
sudo nano /etc/dhcpd/dhcpd.conf &

subclass "allocation-class-2" 1:08:00:2b:a1:11:31 {
  option root-path "samsara:/var/diskless/alphapc";
  filename "/tftpboot/netbsd.alphapc-diskless";
}

#DHCPD Conf. guide - (http://linux.die.net/man/5/dhcpd.conf)

Try this in the DHCPD config. It would set a default root path, but I do not think this is the proper way to go about this.

In the kickstart file, /var/ftp/pub/ks.cfg try changing the network to:

network --onboot no --devce eth0 --bootproto dhcp --noipv6

'em0' may actually be the wrong nomenclature, and I believe that is what I have it set to. Somewhere between RHEL/CENTOS/OL 5 and 7 this has changed to 'em0' or 'eth0' based on the distribution. I'm not sure if this is causing issues, but considering the pxeboot segment completes and some of the files get sent over tftp I doubt it, but it could be the one component preventing everythign else from functioning.

#Kickstart HTTP Install line. ONLY LINK TO DIRECTORY
url --url="http://192.168.1.1/

*kernel=vmlinuz location, no need for file extension

*initrd requires initrd.img with correct path

/etc/httpd/conf.d/pxeboot.conf
#Change these as necessary. Could be affecting the symlinks we have in place from /tftpboot/netboot/ -> /var/www/html/pub/, or not following them, but I believe I have tried to directly point the config files directly towards the KS server. Perhaps this file needs to simply define a directory with the installation media, and it will work from there.

#The changes within the <Directory> tag should make these changes, provided we input the proper IP's and subnets using the proper CIDR notation.

Alias /kickstart /kickstart
<Directory /kickstart>
Options FollowSymLinks
AllowOverride None
Allow from 127.0.0.1 192.168.1.0/24
</Directory>

It also turns out that in the menu.c32 in /tfptboot/netboot or /var/www/html/pub/ should have not only an install option with initrd and vmlinuz, but it turns out it also needs to have the ks=ks.cfg location pointed to it following the paths to vmlinuz and initrd.

Last but not least, did we ever enable all of the ports that we needed on this server, or did we simply turn off the firewall? All of the code is beginning to look similar, and I am unsure which machine had forwarded ports, and/or if both had the firewall disabled for the sake of testing. This is probably not the cause of the issue, but it can't hurt to check.

iptables -L #this will list all of the ports that have been edited or opened#

#The ports that would need to be opened if they aren't already. Also, check the firewall-cmd status on the system.

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

iptables -I INPUT -p tcp --dport 69 -j ACCEPT

iptables -I INPUT -p udp --dport 80 -j ACCEPT

I have also decided to take another look at a couple of youtube videos to Kickstart servers in RHEL, as well as some basic Chef guides which explain (in fairly good detail) how Chef can be setup. It is still something I am interested in doing, but I believe I will play around with the server by trying some of these diagnoses first. If I cannot make any progress that way, I will attempt to either re-create the server, or re-build parts of it using this guide: http://www.smtps.net/pxe-kickstart.html. Now, I know there are a TON of guides that have been posted in previous blogs, but this MAY BE THE BEST ONE YET! It shows me almost exactly what I need to see, without any extra fluff, it is fairly well-documented, and he even used an NFS Server to do it! That was another small side thing I discovered while researching through all of this: It turns out NFS has about 2-3x the throughput of HTTP and FTP. I came across a forum post (http://wdtvforum.com/main/index.php?topic=5393.0) where the poster wrote a script to calculate the avg-bandwidth after 10 passes of a file. His results were somewhat interesting. The SSH results were fairly dismal, but I wonder if that's the compromise for getting 'secure' shells. This seems encouraging and is also a good reminder that the issues we face here technologically are fairly universal.

The following video is a video about setting up Chef/using Chef in Ubuntu. I believe that this video gave me a much better visual demonstration and explanation of how Chef can be used. (https://www.youtube.com/watch?v=13CqboU0ijI) I feel as though we may be able to see some progress in this upcoming week. I will focus on the Kickstart server primarily until that functions fairly well, at which point, customization can be added, and perhaps even re-configured during the Kickstart to remove some of the need of Chef/Puppet.

Kickstart Update / Nagios Update

I have managed to add a copy of the Oracle Linux 7 ISO to the boot-up process, so that every time the system boots, it mounts a copy of the ISO so that it should be able to serve the files over the network for kickstarts. After looking through a couple of other guides (mainly this one: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html and this one for FSTAB http://itekblog.com/mount-iso-using-fstab/, as well as the older linux-mag one which a lot of this is based on http://www.linux-mag.com/id/6747/), I noticed that once the Linux DVD is mounted, there are a couple of additional folders/files on the disc which have a lot of the necessary settings pre-configured. These are called install trees, which is exactly the type of file that Kickstart should be pointed to, as this install tree should point Kickstart in the right direction of the files based on the ISO defaults as opposed to guessing them. I have added the base and core packages to the Kickstart file, but these will be tweaked further once we can get this server to function properly.

Unfortunately, it still looks like booting from the server doesn't get any further than it used to.

I have tried pointing the Kickstart file towards both the directory with the install tree, the actual install tree file, the live-mounted ISO, a directory containing all the files from the OL7 disk obtained using the "cp -r /dev/sr0/* /var/www/html/pub/OL7/*/" all of which have not worked directly. It seems like the installation tree concept makes the most sense.

I decided to help Maheer out with his Nagios project a bit, as I asked him how far he was with it, and knew enough to be able to help him. First, we rebooted the VM his Nagios server is on. We then began to change some of the files in /usr/local/nagios/etc/. First, we looked at nagios.cfg in that directory, which needed to have some things commented on based on the setup path we chose. Since Maheer's main goal is to get Ping based monitoring done, we set it so that Ping is the only attribute monitored by the projectors that are added to it and defined properly under /usr/local/nagios/etc/objects/localhost.cfg

Typically we would NOT place all of this in the localhost.cfg file, but attempting to play with the printers, and the switches configs caused start-up errors within Nagios. Once we re-defined the parameters to those of the Dell 1610HD in RLC 102A, we were able to see it from Monitor01.manhattan.edu. I mentioned that ideally we could have each building separated from each other in one of the spanning tree layouts, which would visually indicate downed projectors. We noticed that e-mail notifications ARE possible, but are NOT setup by default. They require either a mail-server, or a package to utilize another mail-servers API, which we have not figured out yet. We found the e-mail related configurations in /usr/local/nagios/etc/objects/commands.cfg. I will continue to work towards getting Kickstart ready to be used and helping Maheer with as much as I can due to my prior knowledge of Nagios.
Kickstart Update #2

After playing around with the Kickstart servers configuration for a couple of days with the help of the knowledge Tom found, I have been tinkering more with everything. I think I may end up using visuals to try to remember which files define which configuration settings are where, as I am constantly finding myself forced to use "history | grep nano "term"" to find which files I most often change. Or perhaps even a general overview (i.e. PXE boot -> TFTP -> Kickstart... however, I'm still not positive that this is the order in which it boots. It seems to make sense though, since pxelinux0.config seems to load up fairly consistently, which then attempts to pull the memdisk and menu files from the /tftpboot/ folder on the host, but then I noticed something, now that the static IP was set. It complained that the Kickstart file could not perform an NFS mount to access files, which is very strange, as I recall looking over the kickstart configuration options and changing this to HTTP. Or at least we thought we did. After looking at the actuall ks.cfg file again, I noticed the network installation simply points to the public folder that is shared over HTTP, not an actual kickstart file. We have something along the lines of "url --url=http://149.61.33.169/pub" set, but it appears as though this isn't recognized, as the client still says it cannot NFS mount. I will try "ks=<url> Kickstart via HTTP." (Source: https://www.redhat.com/magazine/024oct06/features/kickstart/) The only downside is that article is from 2006. After spending some more time looking into all of this, I decided to look up a newer guide in hopes that it would explain the hierarchy. It seems as though setting the KS file to point to the ISO may work, but I found a guide which tells you to point the link towards the kickstart files location over http. I will try to have it use the full ISO, and keep playing with this, but as slow of a process as this is, I feel as though I am beginning to understand what it's like to work for Systems. I believe I have gained invaluable experience in the CLI in Linux environments in the past couple of weeks. Plus, it looks really cool and now all my friends think I'm a hacker when I use a terminal. I created a file which should have set the PXE server to have a static IP, but I haven't tested this and cannot tell whether or not this is active, as the online guides I used mentioned to simply create a file and fill it with the specifications. This is NORMALLY located at: /etc/sysconfig/network-scripts/ifcfg-eth0.static, but this being a Red Hat derivative, it is em1 (not eth0, use "ip addr show" to determine what the active adapter is. This was taken from the following guide: http://linux-sxs.org/internet_serving/pxeboot.html

On a side note, I have been having the ethernet drop on the main system I have been using somewhat infrequently. Occasionally I will not be able to connect to some sites, and I have tried ruling out:
1)The DHCP/DNS/TFTP/PXE server by disable services
2)Trying to turn off Kickstart server entirely
3)Not using the Linux Mint Station next to me
It seemed when all 3 machines were on, there may have been some network congestion, but it could have just been due to the topology of the lab, which I am unfamiliar with.

It still seems as though some part of this server is missing...

After googling a bit deeper I came across this page: http://www.linux-mag.com/id/6747/

There appear to be several steps this guide mentions which I do not believe the other guides we have come across contained. This guide mentions that while using Kickstart, they could NOT get LVM disks setup, and consequently had to opt to use EXT3 as a filesystem. The RPM's to be installed also need to be defined in the kickstart config, otherwise there isn't really a system to install. The kickstart config URL or HTTP location should only be to the RPM location based on this guide. In order to do this, they recommend mounting the iso to /etc/fstab on the server so that at boot, the ISO's are mounted and should be available for kickstarts. I figured that taking all the files from an already mounted disc and leaving them in a directory should work, but it likely removes the FS formatting os ISO9660. Considering that this guide was unable to use LVM disks and had to go for EXT3, is this something to think on? A quick google search shows that EXT4 can offer up to 25% more throughput in large sequential I/O workoads. EXT3 also has additional H/W limitations such as a max of a 2TB file limit, a finite number of subdirectories that can be used, no indexing, and a smaller inode size. A quick double check on the kickstart config shows that we have it set to put a bootloader on the MBR.

6-16
Yesterday I got a minimal install setup of Oracle Unbreakable Linux 7 on a test computer. From there I (attempted) to use the guide named below (the unixmen one). I was not able to make too much progress, but was able to lay a lot of the groundwork for today by knowing where to find these, as today we spent nearly all day toying with several configuration files to make anything function, as the guide was very generic, over-edited, and unspecific as to our setup.

6-17
Today we worked on configuring the Kickstart server. I had found a guide online (http://www.unixmen.com/install-pxe-server-centos-7/ I recommend avoiding it like the plague) and attempted to follow it, but was not able to make much real progress. Tom was able to configure the IP Addresses, subnets, etc. in the "/etc/dhcp/dhcpd.conf" file in order to get it online, as I wasn't able to figure it out. We were able to create a kickstart file from the GUI Oracle Linux install that we have, which although it contains enough settings and options to create a .cfg, it has not yet worked. You can access this (might need a gui, with "system-config-kickstart"). Initially we tried to use TFTP to get the files across the network, but later on noticed the default from the guide was set to NFS, however, none of these services were ever setup on the server (again, that guide was pretty awful). We had to enable http and tftp with
"systemctl start tftp.service " "systemctl enable tftp.service" "systemctl enable httpd.service" "systemctl enable httpd.service". Tom suggested HTTP as its one of the easier to work with protocols, so we then brought up the Apache server. We used a flash drive to copy the ks.cfg generated by this GUI tool and mounted it and copied it to the server. There should also be a /tftpboot/netboot/ directory with both the vmlinuz and initrd.img files that SHOULD begin the PXE boot/install. We are not sure how to get these to take the full .ISO and get it to install that, however. Tom had a nifty idea to symlink a folder offered through HTTP to the /pub/ folder that was being pointed to by kickstart, but that still didn't do it. We can consistently get a PXE boot to occur, and seemingly fail or time out after about 6-10 seconds. It seems as though the network card is not doing too much during this time either, as there is minimal disk or network activity.

6-18
After playing around with the PXElinux config file "/tftpboot/pxelinux.cfg/default" to directly have the file for the "squashfs.img" which should be necessary for a live-os install added to the kickstart config to have it load the file. It appears as though this (and sharing all of the other necessary files in the pub folder brought us to a blue menu screen, but it does not actually install anything. But hey, that's progress!
6.1.15
A Second Encounter with CentOS 7 (Oracle Linux 7)

Our first goal was to choose an Operating System to attempt to get Puppet configured on. After doing some research and coming to the realization that OVM (Oracle Virtual Machine) appears to offer more flexibility than KVM (Kernel Virtual Machine), I will initially work towards configuring Puppet within Oracle Unbreakable Linux 7. While the OS may be incredibly secure, it is also somewhat more challenging to complete simple tasks. For example, the GUI and CLI installers both fail to force the end user to choose default settings, and if you forget to enable or change a settings prior to installing, it becomes that much harder to figure out what it is you need and how to do so with only a command line. Additionally, the network adapters appear to be disabled by default. After getting a proper Oracle 7 Unbreakable ISO from Oracle, we used a “mkisoof” command to turn a flash drive into an Oracle 7 installer. We were able to install Oracle 7 using the Server w/GUI options, however, the system typically boots into CLI and does not give you a GUI until you run the window manager from a non-root account by typing 'startx.' I am opting towards GUI, and using terminal when necessary.

6.2.15
The Beginnings of My Puppeteer Position

Now that the OS is fully installed, we will begin looking into setting up Puppet. A few questions have come up as a result of this, but I believe a master/agent scheme would work much better than a standalone puppet configuration, as it would prevent other servers from having to allocate additional resources. To compensate for the increased server load on the several remaining master servers, we could implement some instance of load balancing.

It will be important to remember to forward port 8140 (it did not state if it needed TCP, UDP, or both, but a Wireshark dump could theoretically show us, maybe both can be forwarded) for both Masters and Agents of Puppet so the hostnames which will be decided upon will be easily resolvable. The default hostname should be 'puppet', and perhaps we could use a numeric naming scheme (depending on how many servers are going to end up being tied together with Puppet, otherwise we could use actual names or something less cryptic).

The network time protocol (NTP) should be enabled to ensure that any requests or certificates that are sent or received from other servers/agents can be responded too, and will not be out of date or expired, as this will cause issues. By default, it appears as though NTP is enabled in Oracle Linux 7. This can be done by running “sudo yum install ntp” followed by a “sudo systemctl start ntpd” then “sudo systemctl enable ntpd”.

Out of personal preference, I installed Chrome, and updated both Chrome and Firefox with the extentions: Adblock Plus, uBlock, and Ghostery. This improved web-browsing by preventing the computer from connecting to some advertising trackers and domains which improves page rendering time.

The first lab computer I am testing this one has a hostname of “oracleLabTest.manhattan.edu”. It is not yet reachable by hostname, but I can ping it via IP. I am guessing this is due to the DHCP setup and the fact that our DNS servers/DHCP don't have this machine set a static IP so that the hostname is unknown on the network.

I am unsure as to which paths and nodes would need to be plugged into the Puppet configurations in order for the hostname to be resolvable. Prior to this, we still need to determine how the server should be setup, how it will serve information, how many machines will be allocated to this project, how the load balancing between these machines should work (ideally), and how the SSL certificates work between the Server(s) and Agents.

6.4.15 Untangling the Strings

I have finished the Manhattan College Server Checklist and will continue attempting to get Puppet configured on this test PC in the Linux Lab. Created a Certificate Authority (CA) certificate on the puppet server, changed the default hostnames in the configuration files to match the machines, and will now need to setup some form of web server. On Puppet's site they mention that the built in web server that Puppet uses is not truly meant for production environments as it does not support concurrent connections (about 10+ will cause errors/issues). Following Puppet's install guide, I will use their recommendation of Passenger and Rack, which I believe are apache modules with some RubyRails or Rack applications in an apache/httpd server. For some reason the documentation for the installation appears to be missing a few bits and pieces of information, but after watching through several YouTube videos and checking out installation guides for older version of Puppet, I was able to begin setting up Rack. One of the videos I saw which compared Chef to Puppet claimed that Chef is most used in the United States, and that Puppet is predominantly used everywhere else. I thought this was interesting, and if for some reason am completely unable to make any headway with Puppet, will consider it as another alternative. I am not positive that I am doing this correctly, but if we can setup the Master server, I will be able to test more elements of it. Currently the process (Puppet Master) is running, but should not be responding to any requests, or even know how to receive them. Once I have a better understanding of how Puppet works/is set up, I will talk with Tom, review what we have, and see what suggestions/room for improvement there would be should we get this into the datacenter. After diagnosing my apache related issues I have realized that CentOS already has httpd enabled, however, you need to use the “systemctl start httpd.service” and “systemctl enable httpd.service” commands to be able to utilize the features. These two commands will officially enable the apache server. What threw me off regarding this was the fact that there WAS an apache process running on the system, however, there was only one of them. Once the server was enabled and I ran a “ps aux | grep apache” command only to see that there were now 7 processes with the term 'apache' in them. Viewing localhost via a web browser on the server confirms that the Apache 2 server is up. It appears as though the default Apache page is accessible via the hostname/IP of the server from within the network (I was able to connect to it and load the same page from my laptop). Now we need to get Puppet to utilize Rack over the Apache interface. I may need to go back and add firewall exceptions for Puppet at some point, but we are far from ready to test this. Or are we? I have absolutely no idea.

I believe I have installed Puppet on a single machine and have it functioning properly, but I cannot add my node (laptop) to the server. I think this may be firewall related, as I know I can ping the laptop from the server, and also the server from the laptop. However, when I perform the command “puppet agent –server 149.61.33.168 –waitforcert 60 –test” I get an error stating that there is 'No route to host' for that IP address on port 8140. I have enabled both TCP and UDP on CentOS 7. (Again, or at least I think I did. It asks you to choose either TCP or UDP in the CLI parameters, and both did not work, so I entered port 8140/tcp and port 8140/udp as two different steps.) I will look into doing the same in Ubuntu (laptop's OS) and if that doesn't work, I will ask for suggestions or see if anything would need to be changed on the network. I had to change the hostname in the 'puppet.conf' file so that it contained no upper-case letters. This is something that anecdotally I found annoying. I was taught most coding should follow the convention that the first word/letter is lowercase, and any word that follows should also begin with a capitalized letter to ensure easier reading. Since I am used to this naming convention as opposed to using hyphens and periods to separate things, I am simply in an adjusting period (hopefully) in terms of coding and this is something that will likely become natural over time.

UPDATE 2 BELOW:

6/5/15

I began today by investigating into the status of port 8140 on the Puppet Server. Some quick Google-Fu shows me that the telnet command can be instructed to use a specific port to telnet into a server. First, I wanted to be certain the port was forwarded from the server. The command used to do this was “firewall-cmd –zone-dmz –add-port=8140/tcp –permanent” and once that is successful, reloading the firewall by typing “firewall-cmd –reload.” By using the command “telnet 149.61.33.168 8140” from my laptop, I was able to connect successfully, which proves that the port is open via TCP. Perhaps earlier when I did the TCP and then the UDP the UDP rule overwrote the setting. Looks like the server is seeing the incoming request but the laptop does not appear to get the certificate back from the server once it has been signed via CLI (I believe it would be best for security to leave auto-signing of nodes off, as all you need to do to have an agent request a cert is to type “puppet agent –server HOSTNAME/IP -t –waitforcert 60” then go over to the server (or SSH in) and type “puppet cert generate HOSTNAME/IP”. It looks like I can telnet into the server, but the server cannot telnet into the laptop, maybe the port issue remains the same as I have not re-applied the firewall port change to the laptop yet. I do not know why but by default in Ubuntu 15.04 there should not be any active firewalls or ports that are restricted, but I am still unable to properly speak to the laptop on port 8140. I am aiming to get this initially working with 1 server, and attempt to learn about Puppet's Manifests, Catalogs, and lists of facts, which all act as components to be configured. Thinking about this now, it seems as though Puppet wouldn't do anything until such rule sets or configurations would be setup, unless it auto-detects the repositories and packages of the OS based on an OS name/string, and cross-checks them with another server of some sort, which I do not think it does. I was also accidentally able to create a certificate for both the hostname AND the IP address on the Ubuntu laptop, which hasn't made understanding this any easier. I realized I forgot to include a few important command line inputs which enabled the firewall on Oracle Linux and allowed us to open ports. Firstly we added the HTTP and HTTPS services after bringing up the firewall. This was done by typing “sudo firewall-cmd –permanent –add-service=http” as well as the same command with https. It appears as though for security reasons a fair number of services are disabled by default, but can be viewed by typing “sudo firewall-cmd –get-services”.

6/8/15

 I began today by ensuring that both the server and agent could still communicate. It appears as though the telnet/open port on the server has either been closed or perhaps the agent or daemon is not functioning properly. I've edited the /etc/puppet/puppet.conf file on the agent so it should know the IP and hostname of the server, and to check in with the server ever 5 minutes or so. I will look into why I can no longer telnet over a known good port. The only 2 variables that may have changed would be the IP of the lab machine I am working with, as on Friday Tom was able to set a static lease to this IP, so I would be able to do further testing on a smaller environment. Another quick Google search proves that the telnet service and/or puppet may not be running on port 8140, but it should be automatically set to start on boot. A quick “ps aux -e | grep puppet” shows that the server is in fact NOT running. I have no clue how/why this is the case, as everything was functioning, and I do not believe the system has been used since then, but I can't know that for sure. I have entered the command “sudo puppet master –daemonize –verbose and was able to restart the server to hopefully get some error log or output. Made some changes to both the agent and masters puppet configurations, but nothing is working yet. I removed the older SSL certs and have opted to make new ones just to be able to rule that out as a variable. During the process of creating new certificates, the PID file in “/var/run/puppet/master.pid” could not be created. Looks like this is because I forgot to kill the previously/currently running puppet processes. After ending the process, re-deleting the SSL certificates and re-opening Puppet, I have regenerated the main certificate for the server. This time there were no errors. Since the server talks over HTTP using the hostname puppet01.manhattan.edu and it can be reached from inside the network to see the base Apache page, I have changed the hostnames in the /etc/puppet/puppet.conf file. If I can successfully create a certificate over the network and have the Pupper server approve of it, I should (in theory) have to come up with some sort of default system configuration for my laptop (first node I am using to test) and if I can plug that into Puppet, it should work, provided I haven't done anything horrendously wrong thus far. Now that I have reset the certificates, once I bring the server up I get errors complaining that the laptop is no longer reachable, likely because the certificate it is looking for has been deleted, but it is still getting requests every update interval. Even as a superuser, the command “puppet cert clean HOSTNAME” with the hostname of the laptop fails, because it cannot find the serial number for the certificate. This is a bit frustrating. Same error occurs if an IP address is used. I still have not found a solution to this online yet. If they cannot be removed, I guess I will simply re-create a new one for the laptop, provided it is possible and that the previous certificates won't conflict with it as they are all based on the same system/node. One of the most frustrating parts of this project thus far has simply been using a Red Hat based OS, as there appear to be very few guides that will help you get a server setup properly. The documentation on the Puppet site could be better as well. The one guide I found mentioned to check /var/opt/lib/pe-puppet/client_data/catalog/ to see if any files were stored in there, but the folder did not exist on this system. Several other guides mention checking /etc/puppetlabs, but this folder does not exist either. I have already “sudo rm -rf” the /etc/puppet/ssl/* directory, and still receive this error.

After wasting more time trying to figure out why the clean command flag wouldn't work, I discovered puppet had a “revoke” flag, which appears to work for removing the nodes I did not mean to have on there. By first revoking all of the improperly assigned SSL keys and then cleaning them I was able to successfully remove the bad certificates. After resetting the services, I was able to get my laptop to request another certificate and got it signed on the server by using “puppet cert generate HOSTNAME” where I used the laptop's hostname. The certificate was awaiting a signature, and was successfully signed on the server. So at this point if there was some form of configuration for Puppet to keep this system held to, I believe it would be doing so. I will need to try to figure that out next.

6/9/15-6/12/15

I have been looking into the differences between: facts, manifests, modules, and catalogs which are used by Puppet in order to detect, determine, and deploy software to that machine based on its configuration. It appears as though facts are obtained by a program Puppet uses called Facter, which resides on both master and agent puppet nodes. Facter holds information about all of your machines hardware. It contains useful network, processor, graphics, software versions, OS type, and other relevant information. I believe a manifest is collection of files which are included in a distribution of software. Catalogs should be more like an overview of the setup, containing groups of similar nodes and their configurations, while utilizing manifests appropriately with the facts obtained from facter based on the setup. Modules are self-contained bundles of code and data which   It appears as though you cannot have one without the others, as it would fall short of providing any tangible results. Once we determine how many nodes/server we are going to be using, we may be able to play around with the Enterprise version of Puppet. Turns out that for the first 10 nodes the enterprise version is free, and makes configuring both the master and agent machines significantly easier as it can be done through a browser based GUI. However, this will depend on the scale of the project, and may not be worth looking into for production use, but it could be useful to gain a better understanding of what a correctly configured /etc/puppet/puppet.conf file should look like without having to fiddle with it one line of code at a time. Before I can begin creating any template or manifest files, I will first need to determine the types of servers we intend to use puppet on, what packages and dependencies  we need to use with those servers, and attempt to create a manifest file for a machine which will ensure that whichever daemons need to be running will be, with an appropriate check-in interval (say 5-10 minutes). Prior to this project I thought manifests were not a feature of unix/linux, but a Puppet specific feature. I incidentally went to install Steam on my laptop and was somewhat surprised to notice the CLI was mentioning a manifest. This led me to think about how Puppet should work, and realize that this is simply a group of files.

I am not sure what the best way to proceed from here is without getting input from someone. Once we have a better understanding of the specific machines, services, packages, and size of our Puppet show is, we will be able to start creating manifests based on these details.

Just found an interesting slideshow from Puppet labs website. Things I Learned While Scaling to 5000 puppet Agents Slide 5 of 36 looked VERY promising, and depending on how many nodes we would like to use, may give us a much better idea of how many resources to allocate.