non cirros - dianaclarke/openstack-notes GitHub Wiki
-
Use non-cirros image with devstack for the first time:
- https://www.mirantis.com/blog/openstack-user-tip-add-new-image-openstack/
- https://developer.rackspace.com/blog/spinning-up-your-first-instance-on-rackspace-private-cloud/
- http://docs.openstack.org/user-guide/dashboard_launch_instances.html
- http://docs.openstack.org/admin-guide/compute-admin-password-injection.html
- https://isurues.wordpress.com/tag/devstack/
- http://docs.openstack.org/openstack-ops/content/security_groups.html
- http://blog.yarwood.me.uk/2014/07/10/devstack-getting-started-with-devstack-on-fedora-20/
- https://getfedora.org/cloud/download/
-
Add a fedora cloud image via the dashboard (Fedora-Cloud-Base-23-20151030.x86_64.qcow2)
$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a | cirros-0.3.4-x86_64-uec | ACTIVE | |
| 08c625c9-e0d8-4197-bf13-e8ec3cbed615 | cirros-0.3.4-x86_64-uec-kernel | ACTIVE | |
| 5e6b021a-2e7d-4193-a0c8-1c6fa298510d | cirros-0.3.4-x86_64-uec-ramdisk | ACTIVE | |
| 7c0cb52b-dd52-48aa-b37a-ee1c224fd561 | fedora | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+
$ nova image-show fedora
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| OS-EXT-IMG-SIZE:size | 234363392 |
| created | 2016-04-15T21:07:17Z |
| id | 7c0cb52b-dd52-48aa-b37a-ee1c224fd561 |
| minDisk | 0 |
| minRam | 0 |
| name | fedora |
| progress | 100 |
| status | ACTIVE |
| updated | 2016-04-15T21:07:22Z |
+----------------------+--------------------------------------+
- Add a keypair via the dashboard
$ ssh-keygen -t rsa -f devstack.key
(add public key to dashboard)
$ nova keypair-list
+----------+------+-------------------------------------------------+
| Name | Type | Fingerprint |
+----------+------+-------------------------------------------------+
| devstack | ssh | f4:7c:84:e7:9e:e2:95:98:94:05:2b:5b:d8:aa:d6:4d |
+----------+------+-------------------------------------------------+
- Launch instance via the dashboard (using about image & keypair)
$ nova list
+--------------------------------------+--------------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+------------------+
| 7070c90c-7df0-4419-b27f-d46e76868353 | instance-abc | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+--------------+--------+------------+-------------+------------------+
$ nova show instance-abc
+--------------------------------------+----------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-abc |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-SRV-ATTR:kernel_id | |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | |
| OS-EXT-SRV-ATTR:reservation_id | r-0e0gnanq |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-15T21:10:54.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-15T21:09:59Z |
| description | instance-abc |
| flavor | ds1G (d2) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 7070c90c-7df0-4419-b27f-d46e76868353 |
| image | fedora (7c0cb52b-dd52-48aa-b37a-ee1c224fd561) |
| key_name | devstack |
| locked | False |
| metadata | {} |
| name | instance-abc |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.2 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-15T21:10:54Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------+
- Test sshing to the new instance
$ ssh -i devstack.key [email protected]
The authenticity of host '10.0.0.2 (10.0.0.2)' can't be established.
ECDSA key fingerprint is SHA256:W2YPvugw9E9x1537r7lJ1bfm2IjMICcj5eQWbQ3DktA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.2' (ECDSA) to the list of known hosts.
[fedora@instance-abc ~]$
- Current flavors
$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 42 | m1.nano | 64 | 0 | 0 | | 1 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| 84 | m1.micro | 128 | 0 | 0 | | 1 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+