Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Saikrishna | 6861940 | 2017-07-18 21:02:40 -0400 | [diff] [blame] | 17 | --- |
| 18 | # Setup nova flavors with perf attributes |
| 19 | |
| 20 | - name: Upgrade pbr |
| 21 | pip: |
| 22 | name: pbr |
| 23 | extra_args: --upgrade |
| 24 | become: True |
| 25 | |
| 26 | - name: Install shade |
| 27 | pip: |
| 28 | name: shade |
| 29 | become: True |
| 30 | |
| 31 | - name: Delete existing flavors except m1.tiny |
| 32 | os_nova_flavor: |
| 33 | state: absent |
| 34 | cacert: "{{ requests_ca_bundle }}" |
| 35 | auth: |
| 36 | auth_url: "https://keystone.{{ site_suffix }}:5000/v2.0" |
| 37 | username: admin |
| 38 | password: "{{ keystone_admin_password }}" |
| 39 | project_name: admin |
| 40 | name: "{{ item }}" |
| 41 | with_items: |
| 42 | - m1.small |
| 43 | - m1.medium |
| 44 | - m1.large |
| 45 | - m1.xlarge |
| 46 | |
| 47 | - name: Re-create flavors with perf attributes |
| 48 | os_nova_flavor: |
| 49 | state: present |
| 50 | cacert: "{{ requests_ca_bundle }}" |
| 51 | auth: |
| 52 | auth_url: "https://keystone.{{ site_suffix }}:5000/v2.0" |
| 53 | username: admin |
| 54 | password: "{{ keystone_admin_password }}" |
| 55 | project_name: admin |
| 56 | name: "{{ item.name }}" |
| 57 | ram: "{{ item.ram }}" |
| 58 | vcpus: "{{ item.vcpus }}" |
| 59 | disk: "{{ item.disk }}" |
| 60 | extra_specs: |
| 61 | "hw:mem_page_size": 2048 |
| 62 | "hw:cpu_policy": dedicated |
| 63 | with_items: |
| 64 | - { name: 'm1.small', ram: 2048, vcpus: 1, disk: 20 } |
| 65 | - { name: 'm1.medium', ram: 4096, vcpus: 2, disk: 40 } |
| 66 | - { name: 'm1.large', ram: 8192, vcpus: 4, disk: 80 } |
| 67 | - { name: 'm1.xlarge', ram: 16384, vcpus: 8, disk: 160 } |