Top Banner
Lower your TCO with custom solutions and NGS Ilya Sher, CTO at Beame.io, software and systems engineer since 2001.
20

илья шеер, Lower your tco with custom solutions and ngs

Apr 08, 2017

Download

Automotive

MeYouSlide
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: илья шеер, Lower your tco with custom solutions and ngs

Lower your TCO with custom solutions and

NGS

Ilya Sher, CTO at Beame.io, software and systems engineer since 2001.

Page 2: илья шеер, Lower your tco with custom solutions and ngs

What are the best parts of the configuration management tools?

• Promises of easy life• Cute “hello world” examples• Marketing (“automate”!!!)• Hype

Page 3: илья шеер, Lower your tco with custom solutions and ngs

TL;DR of the talk

Configuration management tools — frustrating

Custom solution — betterCustom solution in NGS — even better

Page 4: илья шеер, Lower your tco with custom solutions and ngs

CM tools broken promises

Community modules vs real life

Page 5: илья шеер, Lower your tco with custom solutions and ngs

CM tools broken promises

Easy maintenance

Page 6: илья шеер, Lower your tco with custom solutions and ngs

CM tools marketing

FUD: You must standardize for the next

guy

Reality: simpler systems make everyone more

productive

Page 7: илья шеер, Lower your tco with custom solutions and ngs

CM tools vs custom tool - sample

Community module Custom code

2000+ lines of code 53 lines of bash code

Nginx module

Functionality overlap – roughly none

Page 8: илья шеер, Lower your tco with custom solutions and ngs

CloudFormation & Terraform

CloudFormation / Terraform

Custom solution

Code →Configuration file →Tool modifies cloud

Code modifies cloud

Page 9: илья шеер, Lower your tco with custom solutions and ngs

Your own custom solution

Fight complexityGet better with timeStop suffering eventually

Page 10: илья шеер, Lower your tco with custom solutions and ngs

The sad part

Making custom solution is harder than it should be

There is even no good language for that

Page 11: илья шеер, Lower your tco with custom solutions and ngs

Next Generation Shell

Finally, the language for systems engineering tasks

Page 12: илья шеер, Lower your tco with custom solutions and ngs

NGS - AWS library - anchor and properties

Anchor – reference new or existing resources (no state file!)

Properties – desired state of a resource

Page 13: илья шеер, Lower your tco with custom solutions and ngs

NGS - AWS library - anchor

# Make hashedge_vpc_anchor = {'Name': 'edge-vpc'}

# Find VPC by Name tag. Fail if there isn't exactly one.vpc = AWS::Vpc(edge_vpc_anchor).expect(1)

Page 14: илья шеер, Lower your tco with custom solutions and ngs

NGS - AWS library - properties

# Get load balancer by nameelb = AWS::Elb("${env}-${role}")

# Create or update load balancerelb.converge(

Tags = ...,ListenerDescriptions = ...,Subnets =

AWS::Subnet(edge_vpc_anchor).expect(2),...

)

Page 15: илья шеер, Lower your tco with custom solutions and ngs

NGS as an utility to use from your scripts

# In bash

> ips=$(ngs -pl '``aws ec2 describe-instances``.get("PublicIpAddress")')

> echo “$ips”52.58.X.Y35.156.XX.YY...

Page 16: илья шеер, Lower your tco with custom solutions and ngs

NGS - tests mini framework

# Declare and perform a testtest("[Registration token] Use") with {

child_entity = ``$BEAME_BIN creds …``expected = { 'parent_fqdn': …, … }

assert_hash_keys_values(child_entity,expected, "Correct values in child_entity")

}

Page 17: илья шеер, Lower your tco with custom solutions and ngs

NGS - tests mini framework

# Part of a testF test_server(fqdn:Str, ...) {

...assert_resolvable(fqdn)...

}

# Tests framework implementationF assert_resolvable(h:Str, ..., times=45, sleep=2) {

retry(times=times, sleep=sleep, ...)body => { `dig "+short" $h`.lines() }...

}

Page 18: илья шеер, Lower your tco with custom solutions and ngs

NGS advantages

1) Domain-specific2) For cloud3) Easy data manipulation4) Encourages TDD

Page 19: илья шеер, Lower your tco with custom solutions and ngs

Summary

Custom solutions – much simpler, lower TCO

Resist marketing bullshit

Page 20: илья шеер, Lower your tco with custom solutions and ngs

NGS – Help wanted

Let’s develop a language to express what we mean instead of bending our thinking to make some vendors richer

Next Generation Shell