Continuous Integration

Continuous Deployment

Continuous Delivery

Continuous Development

Continuous Improvement

Continuous Release

Continuous Build

DevOps

Automation

Repeatability

Continuous Integration

Continuous Deployment

Continuous Delivery

Continuous Development

Continuous Improvement

Continuous Release

Continuous Build

DevOps

Automation

Repeatability

Continuous Everything

An introduction to automating integration and deployment

continuous integration

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

Source https://insights.sei.cmu.edu/devops/2015/01/continuous-integration-in-devops-1.html

  1. Push Code Changes
  2. CI server clones repository
  3. Build runs
  4. Test suite runs
  5. Fail / Succeed
  6. Notify

Instant Feedback

Continuous Deployment

Continuous Deployment

and

Continuous delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time.

Source https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff

Repeatable Deployments

How do we do this?

Requirements

  • Source Control
  • Continuous Integration Server

Sample Project

"I'm tired of Bronco Bama and Mitt Romney"

"I'm tired of Bronco Bama and Mitt Romney"

Live Demonstration

Setup Job Runner

# Add necessary packages (URL shortened)
curl -L https://goo.gl/DS0dXg | sudo bash

# Install GitLab CI Multi Runner
sudo yum install gitlab-ci-multi-runner

# Register a runner
sudo gitlab-ci-multi-runner register

Add Project Dependencies

# Install PHP
sudo yum install php php-ldap php-curl php-xml

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Put Composer where we want it
sudo mv composer.phar /usr/local/bin/composer

Job Runner Set Up

[ec2-user@ip-172-30-2-67 ~]$ sudo gitlab-ci-multi-runner register
Running in system-mode.

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://gitlab.msu.edu/ci
Please enter the gitlab-ci token for this runner:
sEcretTOKEN12
Please enter the gitlab-ci description for this runner:
[ip-172-30-2-67]:
Please enter the gitlab-ci tags for this runner (comma separated):
php
Whether to run untagged builds [true/false]:
[false]:
Whether to lock Runner to current project [true/false]:
[false]:
Registering runner... succeeded                     runner=7rhzHU6A
Please enter the executor: docker+machine, kubernetes, docker, shell, ssh, virtualbox, docker-ssh+machine, docker-ssh, parallels:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

Setup Project

# Clone the repository
git clone git@gitlab.msu.edu:atomaka/broncobama.git

# Create a branch
git checkout -b feature/continuous-integration

# Install PHP_CodeSniffer
composer require --dev squizlabs/php_codesniffer

# Generate a .gitlab-ci.yml file
vim .gitlab-ci.yml

.gitlab-ci.yml

stages:
- analyze

style:
  stage: analyze
  script:
  - ./vendor/bin/phpcs src/
  tags:
  - php
  1. Change code
  2. Push code
  3. Create merge request
    1. CI Runs

On Success

On Failure

  • Nothing
    • Go back and fix
  • Merge
  • Deploy
    • Continuously

But We Can Do A Lot More

Example

Other Talks

Resources

Try It For Yourself

An Introduction to Continuous Everything

By Andrew Tomaka

An Introduction to Continuous Everything

  • 535
Loading comments...

More from Andrew Tomaka