CSC/ECE 517 Fall 2015 E1589 Automating production setup and deployment: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 8: Line 8:
*It should also include recipe for regular deployment.  
*It should also include recipe for regular deployment.  
This will provide one step setup of expertiza for production.
This will provide one step setup of expertiza for production.
[[File:Img01ExpInfra.png]]


==Terminology==
==Terminology==

Revision as of 02:17, 9 November 2015

Project Description

Automating production setup and deployment

Currently, setting up the infrastructure for expertiza is done manually. The task is to write a Chef-solo recipe which will create a production ready environment for expertiza. Chef-solo recipes are Ruby code.

  • It should include setting up the basic environment, application dependency, configuration setup, database setup. Many open sourced recipes for many individual components are available
  • It should also include recipe for regular deployment.

This will provide one step setup of expertiza for production.

Terminology

Chef Solo

Chef is a systems and cloud infrastructure automation framework that makes it easy to deploy servers and applications to any physical, virtual, or cloud location, no matter the size of the infrastructure. Each organization is comprised of one (or more) workstations, a single server, and every node that will be configured and maintained by the chef-client. Cookbooks (and recipes) are used to tell the chef-client how each node in your organization should be configured. The chef-client (which is installed on every node) does the actual configuration.

  • Node:

A node is any machine—physical, virtual, cloud, network device, etc.—that is under management by Chef.

  • Recipe:

A recipe specifies the resources to use and the order in which they are to be applied. It is mostly a collection of resources, defined using patterns (resource names, attribute-value pairs, and actions). A recipe must define everything that is required to configure part of a system.

  • Cookbook:

A cookbook is the fundamental unit of configuration and policy distribution. A cookbook defines a scenario and contains everything that is required to support that scenario.

  • WorkStation:

A workstation is a computer that is configured to run various Chef command-line tools that synchronize with a chef-repo, author cookbooks, interact with the Chef server, interact with nodes, or applications like Chef Delivery. The workstation is the location from which most users do most of their work. One (or more) workstations are configured to allow users to author, test, and maintain cookbooks. Cookbooks are uploaded to the Chef server from the workstation.

  • Chef Server:

The Chef server acts as a hub of information. Cookbooks and policy settings are uploaded to the Chef server by users from workstations.

  • Chef-client:

The chef-client uses Ruby as its reference language for creating cookbooks and defining recipes, with an extended DSL for specific resources

nginx

NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

unicorn

Steps to Implement the Automated Deployment Process

1. Setup a virtual Vanilla Ubuntu Machine.

2. Update the ubuntu to the specified version.

3. Install nginx. Nginx is a web server. It is being used in the Expertiza architecture as a reverse proxy server. Through nginx, we will also attempt to serve static pages directly.

4. Make changes in the nginx configuration.

5. Install Ruby, RVM and all the ruby dependencies.

6. Install MYSQL and configure it.

7. Install Unicorn gem. Unicorn is a Rack HTTP server that uses forked processes to handle multiple incoming requests concurrently. For expertiza, unicorn is being used as the web server, which will interact with the database servers to fetch the data.

8. Configure Unicorn and integrate it to work with nginx.

9. Bundle install, install gems and migrate databases.