kapil thangavelu software developer, ubuntu...

19
1

Upload: others

Post on 30-May-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

1

Page 2: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

Kapil ThangaveluSoftware Developer, Ubuntu ServerCanonical Ltd.

Page 3: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration
Page 4: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

4

Juju is service orchestration.

Juju focuses on managing the service units you need to deliver a single solution, above simply configuring the

machines or cloud instances needed to run them.

Page 5: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

5

Juju is DevOps distilled.

Most of the service applications you want will be available in the Juju Charm Store...providing direct and free access to

a DevOps community-contributed collection of charms.

Page 6: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

6

Juju is intelligent.

Juju exposes re-usable service units and well-defined interfaces that allow you to quickly and organically adjust

and scale solutions without repeating yourself.

Page 7: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

7

Juju is easy.

There’s no need to learn a domain specific language (DSL) to use Juju or create formulas. You can be up and running with

your own formula in minutes.

Page 8: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

8

Charms● Reusable, codified best-practice● Deployment expertise● 60+ in code.launchpad.net/charm● Deployable using charm-tools package● Charm Store coming soon!

Page 9: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

9 Presentation by Kapil Thangavelu

Charms are simple

● Some yaml metadata

● A few scripts that run at the right time

● Written with whatever tool you want!

● Easy to read, easy to review

● https://code.launchpad.net/principia

juju: formulaname: mediawikirevision: 84summary: "website engine for collaborative work"description: | MediaWiki is a wiki engine (a program for creating a collaboratively edited website). It is designed to handle heavy websites containing library-like document collections, and supports user uploads of images/sounds, multilingual content, TOC autogeneration, ISBN links, etc.requires: db: interface: mysql slave: interface: mysql cache: interface: memcacheprovides: website: interface: http

Page 10: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

10 Presentation by Kapil Thangavelu

Relationships

● Various strategies

● - Assumptions in code

● - Assumptions in config mgmt.

● - Puppet – Exported Configs

● - Chef – Search

● - Juju – Fundamental component

http://upload.wikimedia.org/wikipedia/commons/d/d8/Wikimedia-servers-2010-12-28.svg

Page 11: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

11 Presentation by Kapil Thangavelu

Deployment Options

●EC2 API●Ubuntu Orchestra●Local Dev●??? Fully abstracted

Page 12: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

12 Presentation by Kapil Thangavelu

Example: Mediawiki

●juju deploy mysql wiki-db●juju deploy mediawiki demo-wiki

●juju deploy –constraints=”mem=32G” memcached wiki-cache

●juju deploy haproxy wiki-balancer

●Juju deploy reconnoiter monitoring

●juju add-unit wiki-cache

●juju add-unit demo-wiki

●juju add-relation wiki-db:db demo-wiki:db

●juju add-relation wiki-cache demo-wiki

●juju add-relation wiki-balancer:reverseproxy demo-wiki:website

●Juju add-relation monitoring demo-wiki

Page 13: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

13 Presentation by Kapil Thangavelu

Add slaves

●juju deploy mysql wiki-slave-db

●juju add-relation wiki-slave-db:slave wiki-db:master

●juju add-relation demo-wiki:slave-db wiki-slave-db:db

Page 14: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

Result

wiki-db service wiki-cache servicewiki-slave-db service

wiki-balancer service

demo-wiki service

wiki-dblocal:mysql-98

wiki-db/0ec2-50-19-198-127.compute-1.amazonaws.com

demo-wikilocal:mediawiki-68

db

wiki-slave-dblocal:mysql-98

db

wiki-cachelocal:memcached-11

cache

wiki-balancerlocal:haproxy-14

reverseproxydemo-wiki/0

ec2-50-16-127-225.compute-1.amazonaws.comdemo-wiki/1ec2-50-16-149-161.compute-1.amazonaws.com

masterwiki-slave-db/0

ec2-50-17-77-63.compute-1.amazonaws.com wiki-cache/0ec2-184-72-144-240.compute-1.amazonaws.com

wiki-cache/1ec2-75-101-216-57.compute-1.amazonaws.com

wiki-balancer/0ec2-174-129-69-54.compute-1.amazonaws.com

Page 15: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

15

Architecture

Page 16: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

16

Enough Talk...Show Me the SOMETHING!

Page 17: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

17

Demo: Local Deployment

Page 18: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

18

Nice Trick...Show Me SOMETHING REAL!!!!

….SSH Fail

Page 19: Kapil Thangavelu Software Developer, Ubuntu Serverfiles.meetup.com/1780846/Introduction-to-Juju.pdf · Software Developer, Ubuntu Server Canonical Ltd. 4 Juju is service orchestration

Thank You

● www.ubuntu.com● cloud.ubuntu.com● juju.ubuntu.com