@@ -56,20 +56,22 @@ For a more detailed explanation about CLI work with images, please refer to [htt
## Image visibility
In OpenStack there are 4 possible visibilities of a particular image: **public, private, shared, community**.
### 1. Public image
### 1. Public images
**Public image** is an image visible to everyone and everyone can access it.
**Public image** is an image visible and readable to everyone. Only OpenStack admins can modify them.
### 2. Private image
### 2. Private images
**Private image** is an image visible only to the owner of that image. This is the default setting for all newly created images.
### 3. Shared image
### 3. Shared images
**Shared image** is an image visible only to the owner and possibly certain groups that the owner specified. How to share an image between projects, please read the following [tutorial](#image-sharing-between-projects) below.
**Shared image** is an image visible only to the owner and possibly certain groups that the owner specified. How to share an image between projects, please read the following [tutorial](#image-sharing-between-projects) below. Image owners are responsible for managing shared images.
### 4. Community image
**Community image** is an image that is accessible to everyone, however, it is not visible in the dashboard. These images can be listed in CLI via command:
### 4. Community images
**Community image** is an image that is accessible to everyone. Image owners are responsible for managing community images.
Community images are visible in the dashboard using `Visibility: Community` query. These images can be listed via CLI command:
```openstack image list --community```.
...
...
@@ -86,9 +88,16 @@ To create or upload this image you must have an <b>image_uploader</b> right.
For a more detailed explanation about these properties, go to the following link: [https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design](https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design).
Note that references to existing community images should use `<image-id>` instead of `<image-name>`.
See [image visibility design upstream document](https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design) for more details.
## Image sharing between projects
There are two ways sharing an OpenStack Glance image among projects, using `shared` or `community` image visibility.
### Shared image approach
Image sharing allows you to share your image between different projects and then it is possible to launch instances from that image in those projects with other collaborators etc. As mentioned in a section about CLI, you will need to use your OpenStack credentials from ```openrc``` or ```cloud.yaml``` file.
Then to share an image you need to know its ID, which you can find with the command:
...
...
@@ -142,6 +151,14 @@ When you find ```<ID_project_to_unshare>``` of project, you can cancel the acces
1. Mark an image as `community` (`openstack image set --shared <image_ID>`)
1. Now everyone can use the community image, but there are two limitations:
* to list community images you **have to** specify visibility (in UI: `Visibility: Community`, cli: `openstack image list --community`)
* to use any community image you **have to** use `<image_ID>` (references via `<image_name>` result in NOT FOUND)
## Add SWAP file to instance
By default VMs after creation do not have SWAP partition. If you need to add a SWAP file to your system you can download and run [script](https://gitlab.ics.muni.cz/cloud/cloud-tools/-/blob/master/swap/swap.sh) that create a SWAP file on your VM.