chef server #5

  • By charmers
  • Latest version (#5)
  • precise
  • Stable
  • Edge

Description

Installs a Chef server (Opscode) which can then be used to deploy other
services.


Overview

Chef is a DevOps tool used for configuring cloud services or to streamline the
task of configuring a company's internal servers. Chef automatically sets up
and tweaks the operating systems and programs that run in massive data centers.

Chef can run using a client/server model, or on a consolidated configuration
named "chef-solo". Chef can be integrated with Cloud-based platforms such as
Rackspace and Amazon EC2. Traditionally, Chef is used to manage Linux but later
versions support running on Windows as well.

The user writes "recipes" that describe how a Chef manages server applications
(such as Apache, MySQL, or Hadoop) and how they are to be configured. These
recipes describe a series of resources that should be in a particular state -
packages that should be installed, services that should be running, or files
that should be written. Chef makes sure each resource is properly configured,
and automatically discovers data points of the system.

Chef can be used to create clones of Quality Assurance environments,
pre-production environments, and partner preview environments. Once automated,
a blueprint is created for the infrastructure, enabling the user to build, or
rebuild, automatically in minutes or hours.

Configurable Options

The 'chef-server' charm allows for certain values to be configured using a
config.yaml file.

Most default values used in the config.yaml file are taken from those used in a
standard installation e.g.

chef-server:
    chef-version: '0.10'
    webui-port: '4040'
    restapi-port: '4000'
    solr-port: '8983'
    webui-user: 'admin'
    webui-pw: 'adminpass'
    knife-user: 'ubuntu'

If the 'knife-user' option is set, the value must correspond to an user that
exists on the install node. If not it is ignored. If it does exist, a knife
configuration profile will be generated for that user which can be used as a
template for managing a chef repository.

Note that in order to change the username and password for the chef-server
webgui, you must do so through the UI itself. The username and password set on
install are just to seed the install. If a password is not provided, one will
be auto generated and saved in /var/cache/charms/chef-server/webui-pw.local.
Root permissions will be required to read this file.

Deployment

Bootstrap the juju environment (required before any operation can be performed)

juju bootstrap

Check that the environment has been bootstrapped successfully.

juju status

    machines:
      0:
        agent-state: running
        dns-name: <bootstrap-instance-ip-address>
        instance-id: <bootstrap-instance-id>
        instance-state: running

Now deploy the service

juju deploy -n 1 --config config.yaml chef-server

Check the status. After a few minutes the service should be deployed and
running.

juju status

    machines:
      0:
        agent-state: running
        dns-name: <bootstrap-instance-ip-address>
        instance-id: <bootstrap-instance-id>
        instance-state: running
      1:
        agent-state: running
        dns-name: <server-ip-address>
        instance-id: <service-instance-id>
        instance-state: running
    services:
      chef-server:
        charm: local:precise/chef-server-0
        exposed: false
        relations: {}
        units:
          chef-server/0:
            agent-state: started
            machine: 1
            public-address: <server-ip-address>

And then expose the service so that it is accessible over the internet.

juju expose chef-server

And check status again to see that the requested ports have been exposed.

juju status

    machines:
      0:
        agent-state: running
        dns-name: <bootstrap-instance-ip-address>
        instance-id: <bootstrap-instance-id>
        instance-state: running
      1:
        agent-state: running
        dns-name: <server-ip-address>
        instance-id: <service-instance-id>
        instance-state: running
    services:
      chef-server:
        charm: local:precise/chef-server-0
        exposed: true
        relations: {}
        units:
          chef-server/0:
            agent-state: started
            machine: 1
            open-ports:
            - 4040/tcp
            - 4000/tcp
            public-address: <server-ip-address>

Contact Information

Author: Edward Hope-Morley edward.hope-morley@canonical.com
Report bugs at: http://bugs.launchpad.net/charms/+source/chef-server/+filebug
Location: http://jujucharms.com/charms/chef-server

Configuration

hook-debug
(string) enable/disable verbose logging in hooks [yes|no]
no
chef-version
(string) The version of Chef to install.
0.10
knife-user
(string) User for whom to install knife.rb file.
ubuntu
webui-port
(string) The port for the chef-server webui.
4040
restapi-port
(string) The port for the chef-server REST api.
4000
solr-port
(string) The chef-server SOLR port.
8983
webui-user
(string) Admin user for the chef-server web interface.
admin
webui-pw
(string) Admin password for the chef-server web interface.