14
© AtlanMod ([email protected]) © AtlanMod ([email protected]) A DSL-based Approach for Elasticity Testing of Cloud Systems AtlanMod team EMN Lina Inria http://www.emn.fr/z-info/atlanmod/ [email protected] 1 Domain-Specific Modeling Workshop Amsterdam, Netherlands - 2016 Michel Albonico UTFPr-Science without borders Brazil Amine Benellalam INRIA-Mines Nantes France Jean-Marie Mottu, Gerson Sunyé INRIA-University of Nantes France

2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod ([email protected]) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

A DSL-based Approach for Elasticity Testing of Cloud

Systems

AtlanMod team EMN — Lina — Inria

http://www.emn.fr/z-info/atlanmod/ [email protected]

1

Do

ma

in-S

pecif

ic M

od

eli

ng

Wo

rksh

op

A

mste

rdam

, N

eth

erl

an

ds -

20

16

Michel Albonico

UTFPr-Science without borders

Brazil

Amine Benellalam

INRIA-Mines Nantes

France

Jean-Marie Mottu, Gerson Sunyé

INRIA-University of Nantes

France

Page 2: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected])

1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5. Conclusion and Future Work

Outline

2

Page 3: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Elasticity Testing

3

Cloud computing elasticity:

The ability of a cloud infrastructure/system to modify

its resource configuration according to demand.

For instance: When the CPU usage is higher than 60%,

add a new resource (e.g., a Virtual Machine).

Elasticity testing: Testing cloud-based systems throughout elasticity.

Page 4: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Threshold-based Elasticity

4 Time (s)

Resource Allocation

Resource Demand

Scale-out Threshold

Scale-in Threshold

Time (s)

Re

so

urc

e

(Pro

ce

sso

rs)

2

1

Legend

80% 0.8

80% 1.6

20% 0.2

20% 0.4

Upper Threshold

Resources

Scale-out reaction time

Scale-out time

Lower Threshold

Scale-in reaction

time Scale-in time

Scale-out

threshold

breaching Scale-out threshold

breaching

Page 5: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Motivation

5

Tester’s efforts: Set up cloud-based system;

Re-configure through elasticity.

Design and implement test methods, and

coordinate their executions.

Page 6: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Motivation

6

Difficulties: Many setups: deployment of cloud-based system,

elasticity, cloud system driving, and coordination of test execution;

Each setup allows many parameters;

Each cloud provider has its own user interface, and

language.

Page 7: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

DSL-based Approach

7

Previous work1: Set up cloud provider; Set up deployment of cloud-

based system and its dependencies.

What we did not cover:

Elasticity setup; Elasticity driving; Elasticity test execution.

[1] A. Thiery, T. Cerqueus, C. Thorpe, G. Sunye, and J. Murphy, “A DSL for Deployment and Testing in the Cloud,” in 2014

IEEE Seventh International Conference on Software Testing, Verification and Validation Workshops (ICSTW), 2014, pp. 376–

382.

software_bundles {

software httpd : pkg 'apache2' '2';

software phpapp : src './app/',

dest '/var/www/app/';

source apachecfg : src 'httpd.conf',

dest '/etc/apache/httpd.conf';

bundle wsrv :

app phpapp, dep (httpd, php, mysq),

src (apachecfg, createdb, addserver),

provScript (createdb, addserver);

bundle appbench :

testingTool app_bench, dep (java),

src (bench_conf,bench),

testScript (bench);}

resources EC2 {

image iU704i386:

imageId 'ami-1234',

os 'Ubuntu' '7.04' 'i386';

zone EUWest :

'eu-west-1a', 'eu-west-1b';

instance websrv :

image iU704i386, machineType m3.large, zone EUWest,

portConfig '80' = '0.0.0.0', bundle wsrv;}

Page 8: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

DSL-based Approach

8

Our approach: Based on previous work:

Threshold-based elasticity setup; Cloud-based system driving through elasticity2; Elasticity state based test execution3.

elasticity {

resourcePool wsrv_pool : minSize 1,

maxSize 10, cloudResource websrv;

policy wsrv_policy : resourcePool slaves,

coolDown 60000, reactionTime 60000,

scalingAdjustment 1, adjustmentType Add;

alarm highCPU : resourceType CPU,

statistics Maximum, threshold 60,

comparatorOperator '>', policy wsrv_policy;}

driving {

drive wsrv_drive :

pool wsrv_pool, workType Read,

states set(scaling-out, ready,

scaling-in, scaling-out, ready);}

tests {

test t1 : script 'java -jar ./test.jar test.test1';

test t2 : script 'java -jar ./test.jar test.test2';

suite s1 : states scaling-out,

driving wsrv_drive,

test_method (t1,t2), in parallel; }

Page 9: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

DSL-based Approach

9

Conceptual compilation workflow1:

aws ec2 run-instance --image-id ‘ami-1234’ ...

Cloud Provider Setup

Executable Code in CLI

DSL to CLI Mapping

[1] Currently, the steps are run manually

Page 10: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Preliminary Results

Cloud-based system case studies:

CS1: MongoDB deployed as a replica set.

CS2: Distributed Web application composed by a

centralized database server, a load balancer, and n Web servers.

Both are driven through specific sequences of elasticity states.

10

Page 11: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Preliminary Results

Effort on writing (total amount of words): Less effort using our DSL; From CS1 to CS2, the effort varies proportionally.

11

Legend:

CS1

CS2

CS1= 246; CS2 = 273.

CS1= 430; CS2 =476.

CS1= 392; CS2 = 433.

CS1= 326; CS2 =364.

Page 12: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Preliminary Results

Increment in amount of words: New words to re-write an existing setup; Only a few words when using our DSL; Great increment (*2.1 times) when using native

CLIs.

12

Page 13: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Conclusion and Future Work

Conclusion: Our DSL reduces the effort on writing elasticity

testing setup. Multiple cloud providers with little code increment.

Future work: Language improvement; Automatic resource discovering; More exhaustive validation.

13

Page 14: 2016 A DSL-based Approach for · 2016. 11. 7. · © AtlanMod (atlanmod-contact@mines-nantes.fr) 1. Elasticity Testing 2. Motivation 3. DSL-based Approach 4. Preliminary Results 5

© AtlanMod ([email protected]) © AtlanMod ([email protected])

Thank you for your attention!

14