Created: 2018-04-03 Tue 01:00
$ openstack flavor list
+----+-----------+-----------+------+-----------+------+-------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+----+-----------+-----------+------+-----------+------+-------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 |
| 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 |
| 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 |
| 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 |
| 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 |
+----+-----------+-----------+------+-----------+------+-------+-------------+
$ openstack image list
+--------------------------------------+--------------+--------+
| ID | Name | Status |
+--------------------------------------+--------------+--------+
| afa49adf-2831-4a00-9c57-afe1624d5557 | CentOS-6 | active |
| 842c207f-6964-4ed7-a41a-06ec66a7c954 | Ubuntu-14 | active |
| 30a2a55a-2045-4ed8-a605-2d1c1143edd3 | Ubuntu-16 | active |
| 713f2fbc-05c5-491b-9e02-e000861e7b30 | Fedora-24 | active |
| 5cb9c233-5867-4e47-80a1-9d774f800444 | Debian-7 | active |
| f84868a5-5261-404a-9c54-ec317ea16b94 | CentOS-7 | active |
| b105ad3b-7df8-4318-9c3d-4e4fa4cc4563 | Debian-8 | active |
| b67b74bc-c3a8-4087-9c28-de02161fdedd | CoreOS | active |
+--------------------------------------+--------------+--------+
$ openstack server create --flavor m1.small --key-name mykey \
--network mynetwork --image CentOS-7 mycentos
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
...
| id | 0e4011a4-3128-4674-ab16-dd1b7ecc126e |
| status | BUILD |
+------------------------+--------------------------------------+
$ openstack server list
+--------------------------------------+--------------+--------+------------------------------------------------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+--------------+--------+------------------------+----------+------------+
| 76b3adb3-1f5a-4276-8b82-abdf21352946 | mycentos | ACTIVE | mynetwork=192.168.1.23 | CentOS-7 | m1.small |
| 246e50b8-29fa-4310-b972-a71cd0df43bf | Ubuntu14 | ACTIVE | mynetwork=192.168.1.98 | Ubuntu-14| m1.large |
+--------------------------------------+--------------+--------+------------------------+----------+------------+
$ ssh centos@192.168.1.23
mycentos $
$ openstack server delete mycentos
resources:
instance:
type: OS::Nova::Server
properties:
flavor: m1.small
image: ubuntu-trusty-x86_64
networks:
- network: private
$ openstack stack create -t teststack.yaml teststack
+--------+----------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------+----------------+--------------------+----------------------+
| ... | teststack | CREATE_IN_PROGRESS | 2018-03-05T18:10:40Z |
+--------+----------------+--------------------+----------------------+