Thursday, October 19, 2017

Using OpenStack Orchestration heat stack to have the custom flavor in place OpenStack Newton

Using OpenStack Orchestration heat stack to have the custom flavor in place


The stack YAML file here helps to create a custom flavor 


[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# cat 12NovaFlavor.yml
---
# for Newton release of OpenStack
#
heat_template_version: 2016-10-14

description: Nova Flavor

resources:
  NovaFlavor1:
    type: OS::Nova::Flavor
    properties:
      is_public: true
      name: novaflavor1
      disk: 10
      ram: 4096
      swap: 1
      vcpus: 1
outputs:
  NovaFlavor_info:
    value: { get_attr: [NovaFlavor1]}
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#


This stack as run will create the flavor of the name as 'novaflavor1' having the specifications of the flavor as 

  • disk size: 10GB
  • RAM size: 4GB
  • Swap size: 1GB 
  • Virt CPU count: 1


---

Run the stack



[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack stack create -t 12NovaFlavor.yml novaflavor1
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| id                  | cb21ee12-dbee-49a3-8957-3a8ea444c320 |
| stack_name          | novaflavor1                          |
| description         | Nova Flavor                          |
| creation_time       | 2017-10-19T21:54:51Z                 |
| updated_time        | None                                 |
| stack_status        | CREATE_IN_PROGRESS                   |
| stack_status_reason | Stack CREATE started                 |
+---------------------+--------------------------------------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#


The above shows the heat stack is in implementation 

Confirming the creation of the nova flavor



[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]# openstack flavor list
+--------------------------------------+-------------+-------+------+-----------+-------+-----------+
| ID                                   | Name        |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+-------------+-------+------+-----------+-------+-----------+
| 1                                    | m1.tiny     |   512 |    1 |         0 |     1 | True      |
| 1e77331d-56d1-4849-a260-dafc4b88cb76 | novaflavor1 |  4096 |   10 |         0 |     1 | True      |
| 2                                    | m1.small    |  2048 |   20 |         0 |     1 | True      |
| 3                                    | m1.medium   |  4096 |   40 |         0 |     2 | True      |
| 4                                    | m1.large    |  8192 |   80 |         0 |     4 | True      |
| 5                                    | m1.xlarge   | 16384 |  160 |         0 |     8 | True      |
+--------------------------------------+-------------+-------+------+-----------+-------+-----------+
[root@newtonallinone HeatOrchestrationTemplates(keystone_admin)]#

No comments:

Post a Comment