-
Notifications
You must be signed in to change notification settings - Fork 9
FEAT: move image sharing documentation from gitlab repo to docs #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dwheel7
wants to merge
3
commits into
uabrc:main
Choose a base branch
from
dwheel7:feat-move-openstack-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Share an Image in Openstack | ||
|
|
||
| You can share an image from your project with a collaborator in a different project in OpenStack cloud so you can both launch instances using the same image. As the owner of the image, you can revoke the sharing privilege at any time. You can also use these methods to share an image with yourself in other projects, just think of yourself as the collaborator. | ||
|
|
||
| ## Image Visibility Descriptions | ||
|
|
||
| | Visibility | Description | | ||
| | ---------- | ----------- | | ||
| | public | Any user may read the image and its data payload. Additionally, the image appears in the default image list of all users. **If you need your image to be public level, it will require a support request** | | ||
| | community | Any user may read the image and its data payload, but the image does not appear in the default image list of any user other than the owner. | | ||
| | shared | Only the owner and the specific image members who have been added to the image may read the image or its data payload. The image appears in the default image list of the owner. It also appears in the default image list of members who have accepted the image. Non-owners, however, will not have access to the image until they are added as image members. | | ||
| | private (**default**) | Only the owner image may read the image or its data payload. Additionally, the image appears in the owner’s default image list. | | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Set up the OpenStack CLI to work with the project where the image to be shared is located. | ||
|
|
||
| ```shell | ||
| python3 -m venv openstackclient-env | ||
| source openstackclient-env/bin/activate | ||
| pip install --upgrade pip | ||
| pip install python-openstackclient | ||
| ``` | ||
|
|
||
| - Source the openrc file from your openstack project. You can download it from your openstack project's dashboard by clicking on the project name in the top right. Click on the Openstack RC file from the drop down to download it. | ||
|
|
||
| ```shell | ||
| # Source your openrc file | ||
| source <PATH_TO_YOUR_OPENRC_FILE> | ||
| ``` | ||
|
|
||
| - Find the ID of the target project you want to share the image with. | ||
|
|
||
| ```shell | ||
| # This runs on the receiver | ||
| openstack project list | ||
| ``` | ||
|
|
||
| The ID can also be found via the OpenStack UI. | ||
|
|
||
| ## Share an Image With Another Project | ||
|
|
||
| 1. Find the image ID you want to share. | ||
|
|
||
| ```shell | ||
| openstack image list | ||
| ``` | ||
|
|
||
| 1. Set the image visibility to shared. | ||
|
|
||
| ```shell | ||
| openstack image set --shared <IMAGE_NAME_OR_ID> | ||
| ``` | ||
|
|
||
| 1. Share the image with the target project. | ||
|
|
||
| ```shell | ||
| openstack image add project <IMAGE_NAME_OR_ID> <TARGET_PROJECT_ID> | ||
| ``` | ||
|
|
||
| ## Accept a Shared Image | ||
|
|
||
| - Source the Target Project's Credentials. The user in the target project needs to source the appropriate OpenStack credentials for their project. | ||
| - Accept the Shared Image. The target project user then accepts the shared image using its ID: | ||
|
|
||
| ```sh | ||
| # Run this on receiver's end | ||
| openstack image set --accept <IMAGE_NAME_OR_ID> | ||
| ``` | ||
|
|
||
| Upon acceptance, the image will appear in the target project's image list. | ||
|
|
||
| ## Unshare an Image (Optional) | ||
|
|
||
| If you would like to revoke a project's access to an image, you can do the following | ||
|
|
||
| - The image owner can see which projects have access to the image. | ||
|
|
||
| ```shell | ||
| openstack image member list <IMAGE_NAME_OR_ID> | ||
| ``` | ||
|
|
||
| - The owner can unshare an image like this. | ||
|
|
||
| ```shell | ||
| openstack image remove project <IMAGE_NAME_OR_ID> <TARGET_PROJECT_ID> | ||
| ``` | ||
|
|
||
| ## Share an Image With the Community (Optional) | ||
|
|
||
| You can also share an image with a community of users. | ||
|
|
||
| - To share an image with the community you need to set the visibility like this. | ||
|
|
||
| ```shell | ||
| openstack image set --visibility community <IMAGE_NAME_OR_ID> | ||
| ``` | ||
|
|
||
| Community images do not appear in the default image lists. | ||
|
|
||
| - To list an image shared to the community. | ||
|
|
||
| ```shell | ||
| openstack image list --community | ||
| ``` | ||
|
|
||
| ## Share an Image Using OpensStack UI | ||
|
|
||
| - In the [web interface](https://cloud.rc.uab.edu) you will navigate the dropdown to Compute then select Images.  | ||
|
|
||
| - From here locate the image you would like to share and locate the dropdown labeled `Launch` and click in to the dropdown menu there.  | ||
|
|
||
| - In the dropdown menu select `Edit Image` and then in the popup you will be given the choice to change the visibility.  | ||
|
|
||
| If you need to withdraw a community image, you can change its visibility back to "private" or delete it. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's list the different types of state "private, shared, community, public" and provide some guidance on what they mean. Eg. All images are private by default. Public are available to any user on openstack, typically reserved for base OS images. Submit a support request to make an image public. To share images across projects you can use either set an image to either shared or community. A shared image requires that you explicitly specify which projects get access. This typ e of sharing is easier to manage using the openstack cli. A community image will be available to other projects but won't be listed among the default images in the UI. The community image is convenient but should not be used if you have any private credentials on an image (eg. a DB user/password).
Let's add a section on how to set the sharing in the UI and how you can use community images during instance creation in the Dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something because of how my account is set up but I don't think there is anything different to do to use a community image versus a public/private one in instance setup. They just show in the list with the others

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including a screenshot like this will help readers build a mental model that matches your description. Highlight the relevant entry or entries using a red box.
Remember that some readers have low or no vision. Explicitly describe in the introductory text what you intend to show in the image so screen readers can make the (salient) image content perceivable.
Images also need alt text which describes what is in the image (as opposed to what the image shows).
Body text description might be like the following.
Alt text might be like the following.
Tools I use: