Code Monkey home page Code Monkey logo

server-setup's Introduction

Server Setup

A Chef CookBook for doing a base line server setup for web applications in Qwinix.

Here are the steps one should follow to try this cookbook.

Step 1: Spin Up a CentOS Node

We need to spin up the target server node to run all of our cookbooks.

  1. Open https://learn.getchef.com/

On Left side of the page, you will see Windows Server, Ubuntu and Chef Fundamental Series.

  1. Click on "Red Hat Enterprise Linux / CentOS"

  2. Click on "Launch a CentOS Virtual Machine" under the Get a "Linux machine" heading

This will open up a new tab where you will see "Your dedicated hands-on environment is just a click away."

  1. Click on "Start Using This Environment".

This button will highlight only when the server is ready for you.

Step 2: Login to the server

Now you will see something like this :

CentOS 6.5 Server Description: OS: CentOS 6.5 x64 Spec: 16 GB HD / 1 GB RAM OS: Linux State: Running More details View VM

  1. Click More Details

VM Details External Address: uvo11okm8lv9qcu0ueh.vm.cld.sr Click to copy to clipboard Internal IP: 10.160.34.98 Total Memory: 1024 MB Disk Size: 16 GB CPU: 1 The machine was prepared in 14 seconds Credentials (show password) Auto-login: root (local user) Username: root Password: ******

Click on the show password you can also revert the whole VM if you want to wipe of everything and come back to the initial stage.

Login to the server

ssh [email protected] Enter Password

Step 3: Bootstrap the newly created node.

knife bootstrap uvo1sg5d4fxjfb8amsb.vm.cld.sr --sudo -x root -P Lo1CNOge3F -N kpv-node

options:

-x root means bootstrap as user root -P is the password -N is the node name (node name is required when you add the run list), no resitrictions on the name, put anything.

Now go to https://manage.opscode.com/organizations/qwinix-learning/nodes and you will see the newly bootstrapped node.

Step 4:

Upload the cookbook you have in your repo to the chef node server knife cookbook upload qwinix-app-setup

Step 5:

We need to create a runlist on our chef node knife node run_list add kpv-node qwinix-app-setup

The chef-repo

All installations require a central workspace known as the chef-repo. This is a place where primitive objects--cookbooks, roles, environments, data bags, and chef-repo configuration files--are stored and managed.

The chef-repo should be kept under version control, such as git, and then managed as if it were source code.

Knife Configuration

Knife is the command line interface for Chef. The chef-repo contains a .chef directory (which is a hidden directory by default) in which the Knife configuration file (knife.rb) is located. This file contains configuration settings for the chef-repo.

The knife.rb file is automatically created by the starter kit. This file can be customized to support configuration settings used by cloud provider options and custom knife plugins.

Also located inside the .chef directory are .pem files, which contain private keys used to authenticate requests made to the Chef server. The USERNAME.pem file contains a private key unique to the user (and should never be shared with anyone). The ORGANIZATION-validator.pem file contains a private key that is global to the entire organization (and is used by all nodes and workstations that send requests to the Chef server).

More information about knife.rb configuration options can be found in the documentation for knife.

Cookbooks

A cookbook is the fundamental unit of configuration and policy distribution. A sample cookbook can be found in cookbooks/starter. After making changes to any cookbook, you must upload it to the Chef server using knife:

$ knife upload cookbooks/starter

For more information about cookbooks, see the example files in the starter cookbook.

Roles

Roles provide logical grouping of cookbooks and other roles. A sample role can be found at roles/starter.rb.

Getting Started

Now that you have the chef-repo ready to go, check out Learn Chef to proceed with your workstation setup. If you have any questions about Chef you can always ask our support team for a helping hand.

server-setup's People

Contributors

abhihn avatar tponnambalam avatar achannegowda avatar kpvarma27 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.