Git Product home page Git Product logo

cic's Introduction

CIC

Introduction

This course is intended to teach good practices around Infrastructure-as-Code development. This course contains a set of materials which are designed to teach you how to write tests for and automate the release of the things you build.

To undertake this course you will need a computer which you have full control over (i.e not your employer's desktop build) - It will need to be on a network with unrestricted access to the Internet (not behind locked-down corporate firewalls) as you will need to download and install a few components before you can begin.

Topics covered in this material:

Available Tracks:
 ansible
continuous_integration

To remove the need for dependencies on an external IaaS (Infrastructure as a Service) solution in order to participate in this course, this course has been designed to use Docker containers to simulate real computers.

The course is being actively built out so be sure to git pull regularly to get new exercises as they appear.

Participants

Environment Requirements

For this material you will need the following:

  • A Bash compatible environment
  • git
  • Docker - If you don't have it already, follow the instructions on the Docker website to install it on your system
  • Editor of your choice
  • A browser

The following video explains how to set up a suitable environment on a Windows based computer, and get started with the CIC course.

Setup

  1. create a .netrc file in your home directory with your credentials for github in it. Your entry should look something like this:
machine api.github.com
    login <username>
    password <password>

Note: If you are using MacOSX you might find that ~/.netrc is a directory on your machine. In this case replace the directory for a file as described above.

  1. Set restrictive permissions on ~/.netrc e.g. by running: chmod 0600 ~/.netrc
  2. Fork this repo
  3. Clone your fork: git clone https://github.com/<youruser>/<fork>.git cic
  4. cd in to your checkout: cd cic
  5. setup the courseware: ./bin/setup
  6. source ./bin/env to add the course commands to your path

Starting a learning track

To see the Learning tracks that CIC contains run: cic track list This will output the following

Available Tracks:
 ansible
continuous_integration

Start a track by running the cic track start command E.g. cic track start ansible --fork youruser/fork-name

This creates a project in Github to guide you through the track and outputs its URL

Go to the the url and you'll see that there is a project board waiting for you. This board contains tickets for each of the exercises that you should complete to cover the topic you have chosen.

The board will allow you to track and share progress. When you complete an exercise, raise a pull request on your own fork to and get feedback from a peer to ensure you are getting the most from the exercise.

Individual exercises

The exercises can be found inside the exercises folder. For each exercise there is a README.md which explains what is required. If you don't want to sit a whole learning track but want to brush up on something in particular, exercises can be found inside the exercises folder. For each exercise there is a README.md which explains what is required.

Contributing

Many hands make light work and your help is needed! View the Contributing Guide to find out what to do if you:

  • spot a bug in the framework or an exercise
  • think that a new exercise would be useful
  • want to work on the CIC framework itself

Revision: e5e9e7047eded02850cd22956e84a637

cic's People

Contributors

lashd avatar jimconner avatar thewonn avatar heathtechnical avatar jonrob avatar snyk-bot avatar

Watchers

James Cloos avatar

cic's Issues

Writing Playbooks

Now that you have had a basic introduction to Ansible and playbooks it's time to role your sleeves up and learn the basics of how to write a playbook for yourself.

In this exercise we'll go through what a playbook is in more detail as well as how it hangs together.

As with most of the exercises from here on in, there is a challenge at the end of the exercise test what you've learnt.

Note: Feedback is an important part of learning. If you have people supporting you on this course, do this exercise on a separate branch so that you can raise a pull request against your own fork and get someone to review it.
Click here to read the Writing Playbooks exercise

Variables

Variables are crucial to allowing the Ansible we write to be reusable. In this exercise you will be introduced to the different ways in which variables can be used to make Ansible we write more flexible and easier to maintain.

Click here to read the Variables exercise

Templating

Quite often configuration for servers is very similar baring a few environment specific value.

It is common for servers performing the same functions to have near identical configuration with specific environment specific differences. Consistency between these environments is highly desirable as variations can lead to servers exhibiting different issues and becoming a maintenance nightmare. Maintaining duplicate configuration is a low tech solution that is prone to error. Templates that can be used stamp out configuration is an ideal solution in this situation. In this exercise we look at how to write templates in the Ansible.
Click here to read the Templating exercise

Running Ansible

Before we get in to the detail of Ansible, we need to tell you a little bit about Ansible and what it is for.

In this exercise we'll introduce you to the basics and get you up and running.
Click here to read the Running Ansible exercise

Conditionals

There will come a time, as in life, where not everything will be straight forward. Actions could depend on certain conditions being true and you will be required to iterate through input. Ansible provides conditional and control constructs for such occasions.

In this exercise we will look at the features and functions that Ansible has to help you with decision making and handling data within your Playbooks.

Click here to read the Conditionals exercise

Inventory

Inventory is the term that Ansible gives to the catalogue of machines it knows about and can be asked to manage.

In this exercise you'll learn how to define inventory and they ways that it can be grouped in order to make managing infrastructure through Ansible easy.
Click here to read the Inventory exercise

Roles

Roles in Ansible are the way that related tasks and variables can be grouped together and shared. In this exercise we look at how to define Roles in ansible and how to use them to keep our Playbooks 'DRY'

Click here to read the Roles exercise

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.