Installing Chef Standalone Server

The following example will focus on standalone installation of Chef Server. Firstly, we will need to download the Chef Server package from to which I will be installing the package on an Ubuntu Linux 14.04 operating system.

Once the package is downloaded I uploaded the package to the standalone server and installed the package from the filesystem path.

dpkg -i chef-server-core_12.0.6-1_amd64.deb

Following successful  installation of the package we now need to start the services, this process may take a couple of minutes due to the number of services which are required to be started for a functioning Chef Server.

chef-server-ctl reconfigure

Now we will need to create a administrative user, organisation and to associate that administrative user to the organisation. This step will also create an RSA private key and save this to a specified path.

chef-server-ctl user-create <user_name> <first_name> <last_name> <email> <password> --filename <FILE_NAME>

For Example, the below will create an administrative user for myself and store the RSA private key in the file system path /home/deangrant/chef_deangrant.pem.

chef-server-ctl user-create deangrant Dean Grant dean.grant@dean.local *********** --filename home/deangrant/chef_deangrant.pem

To create the organisation and associate the user, there a number of rules to which the organisation name must adhere to as follows:

  • The organization name must begin with a lower-case letter or digit, may only contain lower-case letters, digits, hyphens, and underscores, and must be between 1 and 255 characters. For example: chef.
  • The full organization name must begin with a non-white space character and must be between 1 and 1023 characters. For example: Chef Software, Inc..

Once you have decided upon an organisation name, the below will create an organisation, associate a user and create an RSA private key for the organisation and store this to a specified path.

chef-server-ctl org-create <short_name> <full_organization_name> --association_user <user_name> --filename <FILE_NAME>

For Example, the below will create an organisation named ‘deanslab’, associate the user ‘deangrant’ and create the RSA private key.

chef-server-ctl org-create deanslab "Deans Lab" --association_user deangrant --filename /secure/org_deanslab_validator.pem

Now we have completed a standalone installation of Chef Server, created our first administrative user and assiocated that user with a newly created organisation. The above installation will only install the standalone components for Chef Server. In order to install additional features we can perform the following:

Chef Manage

chef-server-ctl install opscode-manage
opscode-manage-ctl reconfigure
chef-server-ctl reconfigure

Chef Push Jobs 

chef-server-ctl install opscode-push-jobs-server
opscode-push-jobs-server-ctl reconfigure
chef-server-ctl reconfigure

Chef Replication

chef-server-ctl install chef-sync
chef-sync-ctl reconfigure
chef-server-ctl reconfigure


chef-server-ctl install opscode-reporting
opscode-reporting-ctl reconfigure
chef-server-ctl reconfigure

Install MongoDB on Ubuntu

Firstly, import the MongoDB public GPG key to require that the that the package is signed by the distributor.  I also was required to enable outbound connections on TCP service port 34898 to communicate with the key server using the hkp protocol:

sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10

Now add the distribution for the package to the repository:

echo 'deb dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Finally, reload the repository and install the package:

sudo apt-get update
sudo apt-get install mongodb-10gen

Install RabbitMQ Server On Ubuntu

Add the following entry to /etc/apt/sources.list to use the RabbitMQ repository:

deb testing main

To remove warnings about unsigned packages add the RabbitMQ public key to the trusted key list:

sudo apt-key add rabbitmq-signing-key-public.asc

Update the respoitories and install RabbitMQ:

sudo apt-get update
sudo apt-get install rabbitmq-server

To confirm the status of the RabbitMQ broker run the following:

sudo rabbitmqctl status

Install MongoDB on CentOS

The following details the steps to deploy MongoDB on a CentOS using .rpm packages and basic configuration following deployment.

For deploying MongoDB on alternative platforms, check for deployment steps.

First of all we will need to configure the package management system to hold the configuration information for the MongoDB repository: by creating the following file ‘/etc/yum.repos.d/mongodb.repo ‘.

If you are installing MongoDB on a 64-bit architecture (which is recommended) add the below for the MongoDB repository:

name=MongoDB Repository

If you looking to install  32-bit version (which is not recommended  for production environments) use the below:

name=MongoDB Repository

Once the MongoDB repository has been configured, install the MongoDB daemon and tools packages.

yum install mongo-10gen mongo-10gen-server

By default, the install package configures MongoDB to use /etc/mongod.conf and the control script at /etc/rc.d/init.d/mongod. The instance will configure data files at ‘/var/lib/mongo’  and its log files in ‘/var/log/mongo’  and run using the security context of the mongod user account.

In order to control the mongod process, run the following:

service mongod start
service mongod stop 
service mongod restart

You can verify that the mongod process has started successfully by checking f the log file /var/log/mongo/mongod.log.

If you require to ensure that MongoDB starts automatically following a reboot, run the following command:

chkconfig mongod on

Install XenServer Tools on Ubuntu

I have recently deployed a XenServer environment and was required to install the XenServer Tools on a virtual machine with Ubuntu install.

First I was required to switch to running commands with elevated root privelages.

sudo -s

Now, we are required to mount the XenServer Tools ISO on the virtual machine and then to run the following to mount the ISO and browse to the Linux installation directory.

mount /dev/xvdd /mnt
cd /mnt/Linux

Now run the Debian package for XenServer Tools for the virtual machines architecture type, in the example below this is for a 64-bit instance type of Ubuntu.

dpkg -i xe-guest-utilties_6.2.0.-1120_amd64.deb