Coding Secure Infrastructure in the Cloud using the PIE framework

72
Coding Secure Infrastructure in the Cloud using the PIE framework Peco Karayanev James Wickett
  • date post

    19-Oct-2014
  • Category

    Technology

  • view

    2.236
  • download

    1

description

At National Instruments, we have developed an automation and provisioning framework called PIE (Programmable Infrastructure Environment) that we use daily on our devops team. Similar tools are available such as chef or puppet, but what makes PIE unique is its ability to work in multi-cloud deployments (Azure and AWS) along with multiple node OS types (linux and windows). It uses zookeeper to keep state and track dependencies across nodes and services. When building PIE we actively considered how to implement it in a Rugged way for a DevOps team. As noted in the deck on slide 68, we are Rugged by Design and Devops by Culture. We see these as intersecting domains that have the ability to impact each other. For more info see ruggeddevops.org

Transcript of Coding Secure Infrastructure in the Cloud using the PIE framework

Page 1: Coding Secure Infrastructure in the Cloud using the PIE framework

Coding Secure Infrastructure in the Cloud using the PIE framework

Peco KarayanevJames Wickett

Page 2: Coding Secure Infrastructure in the Cloud using the PIE framework

@wickett• Operations and Security for software

delivered on the cloud

• National Instruments, R&D

• Certs: CISSP, GSEC, GCFW, CCSK

• Tags: OWASP, Cloud, DevOps, Ruby

• Blogger at theagileadmin.com

• I do stuff for LASCON (http://lascon.org)

• Twitter: @wickett

Page 3: Coding Secure Infrastructure in the Cloud using the PIE framework

@bproverb

• Peco Karayanev

• OpNet, Senior Applications Engineer

• Tags: APM, Java, DevOps, Big Data

• Blogger at theagileadmin.com

• Twitter: @bproverb

Page 4: Coding Secure Infrastructure in the Cloud using the PIE framework

test

OPNET Confidential – Not for release to third parties © 2011 OPNET Technologies, Inc. All rights reserved. OPNET and OPNET product names are trademarks of OPNET Technologies, Inc.

Rev. 04-01-2011

4

Corporate Overview• Founded in 1986• Publicly traded (NASDAQ: OPNT)• HQ in Bethesda, MD• 600 employees• Worldwide presence through direct offices and

channel partners

Best-in-Class Solutions and Services• Application Performance Management• Network Performance Management

Strong Financial Track Record• Long history of profitability• Annual revenue: $140M• 25% of revenue re-invested in R&D

Broad Customer Base• Corporate Enterprises• Government Agencies• Network Service Providers

About OPNET Technologies, Inc.

Page 5: Coding Secure Infrastructure in the Cloud using the PIE framework

National Instruments• 30 years old; 5000+ employees

around the world, half in Austin, mostly engineers; $873M in 2010

• Hardware and software for data acquisition, embedded design, instrument control, and test

• LabVIEW is our graphical dataflow programming language used by scientists and engineers in many fields

Page 6: Coding Secure Infrastructure in the Cloud using the PIE framework

From toys to black holes

Page 7: Coding Secure Infrastructure in the Cloud using the PIE framework

Cloud @ NIWe built a DevOps team to rapidly deliver new SaaS products and product functionality using cloud hosting and services (IaaS, PaaS, SaaS) as the platform and operations, using model driven automation, as a key differentiating element.

With this approach we have delivered multiple major products to market quickly with a very small staffing and financial outlay.

Page 8: Coding Secure Infrastructure in the Cloud using the PIE framework

NI’s Cloud Products

• LabVIEW Web UI Builder

• FPGA Compile Cloud

• more to come...

Page 9: Coding Secure Infrastructure in the Cloud using the PIE framework

ni.com/uibuilder

Page 10: Coding Secure Infrastructure in the Cloud using the PIE framework
Page 11: Coding Secure Infrastructure in the Cloud using the PIE framework

FPGA Compile Cloud• LabVIEW FPGA compiles take hours and

consume extensive system resources; compilers are getting larger and more complex

• Implemented on Amazon - EC2, Java/Linux,C#/.NET/Windows, and LabVIEW FPGA

• Also an on premise product, the “Compile Farm”

Page 12: Coding Secure Infrastructure in the Cloud using the PIE framework

Our design tools are primitive

Page 13: Coding Secure Infrastructure in the Cloud using the PIE framework

Our operation tools are primitive

Page 14: Coding Secure Infrastructure in the Cloud using the PIE framework

Our system engineering challenges are greater

< year 2000the modern era

Page 15: Coding Secure Infrastructure in the Cloud using the PIE framework

If you want to build a ship, don't drum up people together to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea

- Antoine Jean-Baptiste Marie Roger de Saint Exupéry

Page 16: Coding Secure Infrastructure in the Cloud using the PIE framework

The vision

Page 17: Coding Secure Infrastructure in the Cloud using the PIE framework

What is Rugged?

Page 18: Coding Secure Infrastructure in the Cloud using the PIE framework

Adversity fueled innovation

• NASA in Space

• Military hard drives

• ATMs in Europe

Page 19: Coding Secure Infrastructure in the Cloud using the PIE framework

The Internets is Mean

• Latency

• Distribution

• Anonymity

• Varied protocols

• People

Page 20: Coding Secure Infrastructure in the Cloud using the PIE framework

Systems are complex

• “How Complex Systems Fail”

• Failure at multiple layers

• Synonyms in other industries

• Defense in Depth

Page 21: Coding Secure Infrastructure in the Cloud using the PIE framework

Software needs to meet adversity

Page 22: Coding Secure Infrastructure in the Cloud using the PIE framework

Intro to Rugged by analogy

Page 23: Coding Secure Infrastructure in the Cloud using the PIE framework

Current Software

Page 24: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 25: Coding Secure Infrastructure in the Cloud using the PIE framework

Current Software

Page 26: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 27: Coding Secure Infrastructure in the Cloud using the PIE framework

Current Software

Page 28: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 29: Coding Secure Infrastructure in the Cloud using the PIE framework

Current Software

Page 30: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 31: Coding Secure Infrastructure in the Cloud using the PIE framework

Current Software

Page 32: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 33: Coding Secure Infrastructure in the Cloud using the PIE framework

��

4�����.�����)�����������"�����,���

Current Software

Page 34: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software

Page 35: Coding Secure Infrastructure in the Cloud using the PIE framework
Page 36: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged Software Manifesto

Page 37: Coding Secure Infrastructure in the Cloud using the PIE framework

I am rugged... and more importantly, my code is rugged.

Page 38: Coding Secure Infrastructure in the Cloud using the PIE framework

I recognize that software has become a foundation of our modern world.

Page 39: Coding Secure Infrastructure in the Cloud using the PIE framework

I recognize the awesome responsibility that comes with this foundational role.

Page 40: Coding Secure Infrastructure in the Cloud using the PIE framework

I recognize that my code will be used in ways I cannot anticipate, in ways it was not designed, and for longer than it was ever intended.

Page 41: Coding Secure Infrastructure in the Cloud using the PIE framework

I recognize that my code will be attacked by talented and persistent adversaries who threaten our physical, economic, and national security.

Page 42: Coding Secure Infrastructure in the Cloud using the PIE framework

I recognize these things - and I choose to be rugged.

Page 43: Coding Secure Infrastructure in the Cloud using the PIE framework

I am rugged because I refuse to be a source of vulnerability or weakness.

Page 44: Coding Secure Infrastructure in the Cloud using the PIE framework

I am rugged because I assure my code will support its mission.

Page 45: Coding Secure Infrastructure in the Cloud using the PIE framework

I am rugged because my code can face these challenges and persist in spite of them.

Page 46: Coding Secure Infrastructure in the Cloud using the PIE framework

I am rugged, not because it is easy, but because it is necessary... and I am up for the challenge.

Page 47: Coding Secure Infrastructure in the Cloud using the PIE framework

Qualities of Rugged Software

• Availability - Speed and performance

• Longevity, Long-standing, persistent - Time

• Scalable, Portable

• Maintainable and Defensible - Topology Map

• Resilient in the face of failures

• Reliable - Time, Load

Page 48: Coding Secure Infrastructure in the Cloud using the PIE framework

Security vs. Rugged

• Absence of Events

• Cost

• Negative

• FUD

• Toxic

• Verification of quality

• Benefit

• Positive

• Known values

• Affirming

Page 49: Coding Secure Infrastructure in the Cloud using the PIE framework

DevOps

Page 50: Coding Secure Infrastructure in the Cloud using the PIE framework

It’s not our problem anymore

Page 51: Coding Secure Infrastructure in the Cloud using the PIE framework

DevOps is not just making the wall shorter

afterbefore

Page 52: Coding Secure Infrastructure in the Cloud using the PIE framework

-Alex Honor, dev2ops

Page 53: Coding Secure Infrastructure in the Cloud using the PIE framework

Programmable Infrastructure Environment

Page 54: Coding Secure Infrastructure in the Cloud using the PIE framework

The PIE vision

Page 55: Coding Secure Infrastructure in the Cloud using the PIE framework

People that built PIEPeco Karayanev crazy to dream up PIE and foolish to try to build it

Ernest Mueller godfather and proponent of DevOps in PIE

James Wickett chief evangelist of PIE

Michael Truchard ensuring PIE is as much for dev as it is for ops

William Hackett evolving PIE from hackery to legit software.

Karthik Gaekwad reminding PIE to KISS

Kar Meng Chow ensuring PIE is a tool for daily ops

Mohd Hafiz Ramly boldly taking PIE to new heights

John Hill herding the PIE cats

Page 56: Coding Secure Infrastructure in the Cloud using the PIE framework

What is PIE?• a a framework to define, provision,

monitor, and control cloud-based systems

• written in Java, uses SSH as transport, currently supports Amazon AWS (Linux and Windows) and MS Azure

• takes an XML-based model from source control and creates a full running system

• to define, provision, monitor, and control cloud-based systems

Page 57: Coding Secure Infrastructure in the Cloud using the PIE framework

What do we like about PIE?

• Collaborative system design and development

• Automation for building, provisioning and controlling cloud systems

• From source to running multi-tier cloud system in minutes

• Infrastructure as code

Page 58: Coding Secure Infrastructure in the Cloud using the PIE framework

What do we use PIE for

• Provisioning cloud instances• Creating new environments• Deploying & configuring software• Deploying & configuring applications• Backups• Log aggregation• Auto-scaling roles based on demand• Running tests• Continuous integration• Release workflows• Auditing cloud resource usage• Integrating with revision control & software build

Page 59: Coding Secure Infrastructure in the Cloud using the PIE framework

can we do better?

Page 60: Coding Secure Infrastructure in the Cloud using the PIE framework

Security features and use cases

• Increase the visibility and auditability of the system • Track dependencies and what code is deployed where• Diff versions of the system and see changes• Role based auth for operators• No manual steps• Passwords able to be changed with a few PIE commands• Keys out of the model• Ports and user/pass changes• App Config• Audit / Running state vs. model diff

Page 61: Coding Secure Infrastructure in the Cloud using the PIE framework

ArchitectureoDocument based Architecture Definition LanguageoCommand orchestration,dispatch and execution engine oRuntime RegistryoCommand Line Interface

Page 62: Coding Secure Infrastructure in the Cloud using the PIE framework

ADL (Architecture Definition Language)• Structural model of the system described in XML

documents.

• 4 Level Hierarchy - System,SubSystem,Role,Service

Page 63: Coding Secure Infrastructure in the Cloud using the PIE framework

ADL (continued)

Each entity is defined in XML and holds meta-data about resources and commands.

Page 64: Coding Secure Infrastructure in the Cloud using the PIE framework

Command Execution & Orchestration• The execution engine can dispatch and execute

commands to remote machines.• More complex workflows can be created from

simple commands.

• Commands can be overloaded in different model components.

Page 65: Coding Secure Infrastructure in the Cloud using the PIE framework

Runtime Registry & Name Service• The Runtime registry tracks the state and

dependencies • The Name service keeps a namespace for

instances.

Page 66: Coding Secure Infrastructure in the Cloud using the PIE framework

Command Line Interface

Example full command line invocation:

Target Query string explained:

Page 67: Coding Secure Infrastructure in the Cloud using the PIE framework

Demo

• On Azure oProvision an environment.

oDeploy an app and test.oUpdate the model and turn off port 80.oRedeploy and test the app.oDe-provision the environment.

Page 68: Coding Secure Infrastructure in the Cloud using the PIE framework

Rugged DevOps Results

• repeatable – no manual errors

• reviewable – model in source control

• rapid – bring up, install, configure, and test dozens of systems in a morning

• resilient – automated reconfiguration to swap servers (throw away infrastructure)

• rugged by design devops by culture

Page 69: Coding Secure Infrastructure in the Cloud using the PIE framework

Roadmap• Open Source

• More security workflows

• Azure data management workflows

• Add support for external keystores

• ADL and model usability features

• Port AWS functionality to 2.0 version

• New shiny distributed orchestration engine

• Add user auth through LDAP or other repos

• IDE to simplify design

• More powerful script engine

Page 70: Coding Secure Infrastructure in the Cloud using the PIE framework

PIE now and future

(28 years later)(now)

Page 71: Coding Secure Infrastructure in the Cloud using the PIE framework

Recommended Reading

Page 72: Coding Secure Infrastructure in the Cloud using the PIE framework

Want the slides?

send me a tweet @wickett