2015-Middleware-Keynote / demo-ansible

Apache License 2.0
18 stars 24 forks source link

"wait to scale" is currently hard-coded, needs to be num_smoke_test_users +1 #45

Closed thoraxe closed 9 years ago

thoraxe commented 9 years ago

We tried to do the following:

- name: Wait to scale smoke app for first deployment
  shell: "oc get rc --all-namespaces | grep smoke"
  register: build_output
  until: (build_output.stdout_lines | count) == (num_smoke_test_users + 1)
  retries: 15
  delay: 30

But it doesn't work. The error is:

TASK: [Wait to scale smoke app for first deployment] ************************** 
fatal: [ec2-52-20-117-193.compute-1.amazonaws.com] => error while evaluating conditional: (build_output.stdout_lines | count) == (num_smoke_test_users + 1)

FATAL: all hosts have already failed -- aborting

We iterate over num_smoke_test_users (0 to x which means x+1). We then create the smoke test app, and we wait for the RCs to show up. This means we are deployed and can scale. So, the output of:

oc get rc --all-namespaces | grep smoke should have num_smoke_test_users + 1 lines. For example, num_smoke_test_users = 40 means that we end up with 41 projects and apps, so there should be 41 rcs once everything is deployed.

detiber commented 9 years ago

addressed in https://github.com/2015-Middleware-Keynote/demo-ansible/pull/46