+ All Categories
Home > Documents > PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I...

PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I...

Date post: 16-Oct-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
21
KATELLO AND ANSIBLE KATELLO AND ANSIBLE FOR AUTOMATED FOR AUTOMATED TESTING AND TESTING AND RELEASING OF RELEASING OF PACKAGES PACKAGES 1
Transcript
Page 1: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

KATELLO AND ANSIBLEKATELLO AND ANSIBLEFOR AUTOMATEDFOR AUTOMATED

TESTING ANDTESTING ANDRELEASING OFRELEASING OF

PACKAGESPACKAGES1

Page 2: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

$ WHOAMI$ WHOAMI

Evgeni Golov

Software Engineer at Red Hat

ex-Consultant at Red Hat

Debian and Grml Developer

♥ FOSS ♥

♥ automation ♥

2

Page 3: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

MOTIVATIONMOTIVATIONyou build a software productyou ship the product as distribution packagesto your customersthe product has dependencies outside a baseOS (Ruby? node.js? Django?)unit tests are great, but you also need to testthe shipped bits

3

Page 4: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

ANSIBLEANSIBLE

4

Page 5: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

$ WHATIS ANSIBLE$ WHATIS ANSIBLE

radically simple IT automation enginecontains a big number of modules to executeactions and ensure state on target hostseasily extended by self-written modulesintegrates well with REST APIs

5

Page 6: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

ANSIBLE TERMINOLOGYANSIBLE TERMINOLOGYModule - discrete units of code that can beused from the command line or in a playbooktask to execute an action or ensure a stateTask - Module invocation with a set ofparametersPlay - list of Tasks to be executed against a setof hostsPlaybook - �le containing one or more Plays

6

Page 7: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

KATELLOKATELLO

7

Page 8: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

$ WHATIS KATELLO$ WHATIS KATELLO

plug-in to Foremanadds content management functionality (RPM,DEB, Puppet, Containers, Files)allows to group content for tailoredpresentation to consumersallows snapshots of content for versioning

8

Page 9: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

KATELLO TERMINOLOGYKATELLO TERMINOLOGYRepository - Collection of contentProduct - Collection of related repositories(CentOS 7 distribution with repositories fori686 and x86_64)Lifecycle Environment - Environment/stagein your deployment cycle (Test, QA,Production)

Library - special LE that receives the content�rst

9

Page 10: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

KATELLO TERMINOLOGYKATELLO TERMINOLOGYContent View - Selection of repositories(CentOS 7 + EPEL 7)

Publish creates a snapshot (Version) of theselected repositories available to LibraryPromote copies a published Content ViewVersion to another LE

Composite Content View - Selection ofContent Views (base OS + Application)

can be published and promoted like a CV

10

Page 11: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

KATELLO EXAMPLEKATELLO EXAMPLE

11

Page 12: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

STAGING CHANGES WITHSTAGING CHANGES WITHKATELLOKATELLO

every time a (Composite) Content View ispublished, a new Version is createdthis version can be made available to clients bypromoting it to a certain Lifecycle Environmentyou can revert to older versions, if problemsare found after a promotion

12

Page 13: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

STAGING CHANGES WITHSTAGING CHANGES WITHKATELLO (EXAMPLE)KATELLO (EXAMPLE)

DEV moving fast, getting changes on everycommitTEST getting changes daily, after a minimalgating happenedQA getting changes weekly, after a basic set oftests passedPROD getting changes whenever QA is happy

13

Page 14: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

TESTING WITHTESTING WITHKATELLO AND ANSIBLEKATELLO AND ANSIBLE

14

Page 15: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

ARCHITECTURE OVERVIEWARCHITECTURE OVERVIEWSource in Git (GitLab)Jenkins is the main executor, triggered byGitLabKatello is the package storeAnsible is used by Jenkins to interact with theKatello API

15

Page 16: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

TEST WORKFLOWTEST WORKFLOWJenkins builds packages on every change(using Koji)Packages are synced to KatelloKatello also syncs external packages (RHEL,RHSCL)Jenkins creates/updates ContentView (RHEL,RHSCL, Packages from Koji)Jenkins tests the content in Library by installingthe software and running end-to-end testsJenkins promotes ContentView to QA

16

Page 17: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

PACKAGE BUILDINGPACKAGE BUILDINGOn every change to the source, the following

steps are executed:a new source tarball is generatedthe RPM .spec is updatedthe RPM is built using Koji

17

Page 18: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

PACKAGE TESTINGPACKAGE TESTINGJenkins runs a daily pipeline which:

Synchronizes the packages from Koji intoKatello (Library)Executes an Ansible playbook in a Vagrant VM,which:

Subscribes the VM to KatelloInstalls the softwareExecutes a (small) set of tests

When the playbooks �nishes successfully, theContent is promoted to Test

18

Page 19: PACKAGES RELEASING OF TESTING AND FOR AUTOMATED …...TESTING WITH KATELLO AND ANSIBLE 14. A R C H I T E C T U R E O V E R V I E W Source in Git (GitLab) Jenkins is the main executor,

FURTHER TESTING ANDFURTHER TESTING ANDRELEASINGRELEASING

The tests executed in the VM ensure that thesoftware is not DOA (they take ~1h)Once a week the content from Test ispromoted to QAThis triggers a large test-suite (>24h!)Plus manual veri�cation of features and �xedbugs that have no automated testsAfter succesful veri�cation, the software isreleased

19


Recommended