Agile DevOps - architecture, technical practices, and culture

Use Cloud and DevOps to build infrastructure by rapid agile iterative development using collaborative open source tools:
-chef cookbooks, puppet modules or ansible playbooks to build servers.
-Test Kitchen to deploy and test them.
-EC2Dream a graphic user interface that provides a 'single pane of glass' to do agile devops primarily on cloud servers.
-Cloud Formation or Terraform using cfndsl Ruby or Troposphere DSL for easy orchestration.
-Amazon AWS, Azure, Google Compute Engine, Softlayer, Openstack, Local and Hosted servers.

Methodology

"We used to design infrastructures that support applications. We are now developing new applications that support the cloud platforms".

1. CLOUD ORCHESTRATION
AWS - Use CloudFormation on AWS to orchestrate the AWS assets and use a dsl like cfndsl to write in ruby and generate json.
AZURE - Use Azure Resource Manager.
GOOGLE - Use Google Deployment Manager.
OTHER CLOUDS - Use Terraform

2. CONFIGURATION MANAGEMENT
Use Chef Cookbooks, Puppet Modules or Ansible Playbooks:
    a. Library Chef Cookbooks, Puppet Modules or Ansible Roles
There a large number of chef community cookbooks, puppet forge modules, Ansible roles now available to use as the building blocks for the application cookbooks. These should never be changed! Use Berkshelf or Librarian Puppet to manage. If you have to change them try and get the change back into the original or change the name with a prefix of company name and make them Application Modules or Cookbooks
    b. Application Chef Cookbooks, Puppet Modules or Ansible Playbooks)
They describe your application(s) and are built by calling the library cookbooks and are sometimes called wrapper cookbooks. These are named with your company prefix and stored in a separate directory module-mycompany for puppet or in the site-cookbooks directory for chef.
    c. Environments
Use the environment support of chef, puppet and ansible to support multiple environments with the one chef, puppet, ansible repository.

3. SERVER IMAGES or DOCKER CONTAINERS
a. Don't use unknown pre-build images. Start with standard public operating system images that can be trusted and use Chef or Puppet to install the software or build your own with Packer and upload.
For Amazon AWS it is better to use EBS-based 64-bit images. (all instance types support 64-bit):
   a. For Linux use RightScale CentOS, Alestic Ubuntu or Amazon Linux Centos images.
   b. For Windows use Rightscale Windows or Amazon Windows images.

b. Don't use public images directly. Either create a base image to be the basis of all applications or save the image after the server has been built by chef or puppet and save the image with a naming convention of base-YYYYMMDD.

4. DEVELOPMENT AND TESTING
Use Test Kitchen

5. CONTINUOUS INTEGRATION
Use a tool like Jenkins and Test Kitchen to run automated tests. See Jenkins Continuous Integration Pipeline.

6. PRODUCTION
   Use Chef Solo, Puppet Apply, Ansible Playbook to build an images or docker container that can be used to start an instance directly. Use the userdata to do any additional configuration at startup. This is a good option if you have either a small number or a large number of servers as you don't need a chef server or puppet master. It is also good if using Amazon AWS Autoscaling as startup is faster.

7. SOURCE CONTROL
The chef, puppet or ansible repository must be maintained in a source control system like git, Github, or subversion. Just have one repository.

References
    How We write Chef Cookbooks
    The Environment Cookbook Pattern
    Chef: Patterns and Anti-Patterns for Cookbooks, Environments, Roles
    Doing Wrapper cookbooks right
    Integrating AWS Cloud Formation With Opscode Chef
    How to Write Reusable Chef Cookbooks
    github.com - opscode-cookbooks
    Opscode Community Cookbooks
    Practical Cloud Computing Patterns

0 comments:

Post a Comment