Giter VIP home page Giter VIP logo

chef-evaluation's Introduction

Chef Evaluation

Purpose: Stand up an Automate v2.0 evaluation environment

yacs - Yet Another Chef Server cookbook setup: we enjoy shaving

  • Chef Automate v2.0
  • Chef Server (Manage-less)
  • X Nodes to Bootstrap and manage

chef-infra is a bash script that will create or download all the resources needed to setup an evaluation of the Chef Infrastructure. For a production scenario, cookbooks and the Chef DSL should be used. bash was used here to make getting started consumable by humans that may be new to Chef and/or automation.

Prereqs:

  • Vitualbox (tested v5.2.12)
  • vagrant (tested => v2.1.1)
  • chefdk (tested v2.5.3)
  • tested on MacBook Pro w/ 7GB free physical mem where a2+chef+2 nodes used 4GB memory & 1GB on disk

!Warning! This is running a number of machines on a local environment. As such, it is a resource hog. Attention to available resources is advised.

Quick Start:

  • Clone this repo and cd chef-evaluation
  • Create ./automate.license with a valid Automate license. Otherwise, add it when logging in for the first time
  • From the base directory run chef-infra setup
  • Instructions for logging in are printed to the terminal when setup is complete
  • Look at chef-infra -h for more info & teardown instructions

Troubleshooting:

Ideally, chef-infra setup will "just work" and give you everything required. However, this isn't a perfect world. If things don't work here are a few things to try.

  1. View automate logs chef-infra log
  2. Did a2 converge w/out error? Does ./a2-token exist? If no, try vagrant provision a2
  3. Did srvr converge w/out error? Does ./.chef/admin.pem exist? If no, try vagrant provision srvr
  4. Did nodeX converge w/out error? If no, check status of a2 and srvr. Try knife ssl fetch && knife cookbook upload audit && knife role from file base.rb. Was the DevSec profile added to Automate? If no, log in and do that.

Manage nodes

  • Create/install a single node only: vagrant up [a2|srvr|node1[n]]
  • Retry creation of a single node: vagrant provision [a2|srvr|node1[n]]

Chef Workstation:

Chef Workstation is a single package with a lot of helpful tools. Adding the -w option will include a Chef Workstation in the setup

  • chef-infra setup -w

Habitat on-prem Builder:

Habitat Builder can be included in the setup with the -b option. Habitat Builder is also available in the inter-cloud.

  • chef-infra setup -b

CICD pipeline:

Adding the -p option to the setup command will create a Jenkins Blueocean instance. Note: This requires Docker and currently some manual setup.

  • chef-infra setup -p once that completes, continue.
  • To get the activation key run docker exec -it jenkinsci-blueocean cat /var/jenkins_home/secrets/initialAdminPassword
  • Once up, navigate to http://localhost:8080/blue
  • Follow instructions and install all recommended plugins.
  • In Github, Fork the repo https://github.com/mtyler/chef-infra-base
  • Create a github access token:
    • In github, top right click your avatar > Settings > Developer Settings > Personal Access Settings.
    • Generate a new token with Full control of Repo, User:email
    • Use this token to create a pipeline for your newly forked repo

Patterns:

  • Bootstrap during provisioning: scripts/setup_node.sh
  • Backup: see chef-infra do_backup()

Development:

  • TODO habichef pipeline
  • TODO add windows node

Contributions Welcome and encouraged. Ways to contribute:

chef-evaluation's People

Contributors

mtyler avatar

Watchers

James Cloos 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.