Guest speaking about food at a restaurant featured on Guy Fieri’s Diners, Drive-ins and Dives program
It is just like nothing!!
Guest speaking about food at a restaurant featured on Guy Fieri’s Diners, Drive-ins and Dives program
It is just like nothing!!
puppet, is a configuration management framework that can be used to perform several different things to validate/configure your infrastructure. We have been using puppet for sometime at my work and have just started moving into some of the advanced uses of the tool.
One of the features offered by puppet is the capability to use templates to configure different servers.
For example, say you want to configure an application on server ABCD, XYZ and 123. And the configuration file for all these servers is the same, other than the hostname of the server. The configuration file has to reside in /opt/application/config.conf . The config.xml file looks like this
[code]
db.name=blah
db.user=blahblah
db.hostname=XYZ
log.level=ERROR
log.location=/var/log/application
[/code]
Here is how you can do it in puppet.
Define a module which uses a template and then configure the template to put the host specific entry in the template. Let’s name our module test_config
The next time the puppet client runs on host ABCD, it would create the file /opt/application/config.conf with the right hostname in the config file.
If you use the default logging options for Jboss, it has a nasty habit of overwriting log files on a restart. So, if you were in the middle of troubleshooting an issue and had to restart Jboss, you will end up loosing all the historic data. You can change this default behavior by changing one option in the log4j config file
with [code]<param name="Append" value="true"/>[/code]
Final post on Project Uptime. Before I go into the details of how well I fared against the original goals, here is a screenshot of the uptime of the site for the last two weeks.. Hope I can keep that number for the rest of this year :).
Recap of the original goals and their status
GOAL : Move to a fresh VM with the latest kernel
GOAL : Upgrade to the latest version of Apache.
GOAL : Upgrade to latest version of MySQL and tune it for memory usage
GOAL : Configure cloudflare to serve a static version of front page, in case the server goes down. Design the static page to point people to my other digital presences (Google+, LinkedIn, Flickr etc)
All in all.. not bad 🙂
Said by Dan Kaminsky at the Forensecure’12 conference
If you trust everything, you might as well not trust anybody
For the record.. In addition to being an awesome speaker, he is also a down to earth guy. Makes us geeks proud :).
We finally come to one of the last posts of Project Uptime. Now that all the components have been setup, I finally copied the wordpress directory from my old server to the new one. The only changes, I had to make after copying the files were
[code]sudo chmod -v 664 $WORDPRESS_DIRECTORY/.htaccess
sudo chmod 755 $WORDPRESS_DIRECTORY/wp-content [/code]
Most of us worry about paging to disk (swap), but if you are running a transaction intensive application the paging that happens in RAM also starts to impact the application performance. This happens due to the size of the “block” that is used to store data in memory. Hugepages allows you to store the data in bigger blocks, hence reducing the need to page while interacting with the data.
Here is how you can enable hugepages and configure jboss (actually any Java app) to use hugepages on a RHEL/CentoOS system.
OS CONFIGURATION
If you see the response as below, you should be good[code]CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
[/code]
(note: I put in 1536 since that was the value I got from the above example)
JBOSS CONFIGURATION
note : A lot articles that I read online say that hugepages are effective when you are allocating large amounts of RAM to the application. The use case of just using 3GB above was just that.. a use case.
While I cannot personally vouch for it, a lot of users have noted that they saw >2 fold increase in performance.
This is on RHEL and CentOS distros. If you want to install packages without checking the GPG key (hope you know why you are doing this!!), here is the command line option
[code]sudo yum install package_to_install –nogpgcheck [/code]
I have recently started using git as a source control for the various scrips that I write. As I also mentioned in this post, I use dropbox to synchronize my data across workstations. Here is my setup for synchronizing git clients across multiple workstations using the same SSH keys (note: this is not a recommended setup from a security prospective. you are recommended to generate different SSH key pairs per workstation to ensure one key getting lost doesn’t compromise your entire account).
The server has held up pretty well, since the installation of varnish. Based on this wiki post, I added the following to /etc/varnish/default.vcl
[code]
<pre>
# Drop any cookies sent to WordPress.
sub vcl_recv {
if (!(req.url ~ "wp-(login|admin)")) {
unset req.http.cookie;
}
}
# Drop any cookies WordPress tries to send back to the client.
sub vcl_fetch {
if (!(req.url ~ "wp-(login|admin)")) {
unset beresp.http.set-cookie;
}
}
[/code]
I think the comments are pretty self explanatory.